Apache log Poisining
Apache log Poisining :
This turorial is valid if an admin have done bad coding in php to get file ( the vulnerability is in LFI (local file inclusion)) and the poising the access.log file of apache
Let's Breach the machine :
The victim machine is ubuntu: 192.168.1.6
From victim computer as index.php seems grep the file and include in the browserThe index.php is in the /var/www/html and the apache service is running and give the permission of 775 with -R to /var/log/apache2 file
In the attacker computer : as i use parrot os
See the log file of http://192.168.1.6/?file=/etc/var/apache2/access.logThe result will be
we see the access.log file from apache folder which is obiviously a LFI vulnerability and if we see this type of vulnerabiltity then we can get the remote code execution using below technique
Let's intercept the traffic in Burp and we can see the intercepting traffic in below image and change the user agents like below
you can see the the hello this is me in the log file of apache.So, here we are confirms that
the log poising works using LFI vulnerability
Test for Remote code execution from the browser.
Let's start:
Fire up the msfconsole and use exploit/multi/script/web_delivery
Now run the php script in the browser as shown in below picture
and the meterpreter reverse_tcp will be open
Happy Hacking
Comments
Post a Comment