DERP_N_STINK_1
- Layout for this exercise:
1 - INTRODUCTION
- The goal of this exercise is to develop a hacking process (discovering 4 flags) for the vulnerable machine DerpNStink, from the VulnHub pentesting platform.
https://www.vulnhub.com/entry/derpnstink-1,221/
- Once downloaded DerpNStink and extracted with VirtualBox:
- Scanning with Nmap:
- Scanning deeper port 80 we discover robots.txt and directories /php, /temporary:
- Going to the browser:
- dirbusting the web server we also discover directory /weblog, what according to its content seems to be a Wordpress webpage:
- Reading robots.txt:
- Acess to /php is denied:
- Nothing interesting at /temporary:
- Editing /etc/hosts:
- Now we can view-source the webpage and discover FLAG_1:
- Trying admin:admin the login is successful:
3 - EXPLOITATION
- Copying locally php-reverse-shell.php, renaming it to myshell.php and adapting to our needs:
- Setting a listener session:
- Now, let's upload myshell.php to Slideshow gallery:
- Once we are sure that the upload has been successful let's Save Slide:
- Going to /weblog:
- Reading wp-config.php we discover database credentials root:mysql:
- Identifying what type of encryption is used:
- Using these password wedgie75 for user unclestinky:
- The FLAG_2 is available:
- Access to SSH for user unclestinky is denied:
- Checking home folder for user stinky:
- Transferring the .pcap file to Kali:
4 - PRIVILEGE ESCALATION
- SSH-ing for user mrderp:
- Checking for mrderp's sudoer privileges:
- Executing derpy1.sh with sudo we get a root shell:
- Reading FLAG_4: