22/tcp open ssh OpenSSH 7.2p2 Ubuntu 4ubuntu2.2 (Ubuntu Linux; protocol 2.0)
80/tcp open http Apache httpd 2.4.18 ((Ubuntu))
443/tcp open ssl/http Apache httpd 2.4.18 ((Ubuntu))
SQLi Authentication bypass
SSL certificate gives us a new domain so update hosts file:
Visiting the site gives us a login page.
Capture a login with burp and send it to the intruder to be fuzzed for sqli
Can bypass the login with an sqli payload:
Request this payload in the browser and we are logged in
Under the tools tab you can generate a VPN config file so test it for command execution.
Eventually we found it is vulnerable using the following command:
Successfully hitting our server:
Generate a php reverse shell with msfvenom and host it in the webroot
Generate a reverse shell with nc and URL encode it.
Shell spawned on 443
Another misconfigured cronjob
Inspecting the file shows us that it is executing another sh file located in /var/www/cmd/
So create the file and wait for it to execute
Now we have a root shell and collect our flags