Bashed
Personal Rating: Easy
Last updated
Personal Rating: Easy
Last updated
nmap:
ffuf:
After fuzzing for the phpbash.php and phpbash.min.php, I found them at /dev and could use it to get the user flag. I could also use it to upload a reverse shell and get direct access to the box.
I checked the folder permissions from the webroot down and found a folder that I can write to. I got a php reverse shell there with wget.
I am the user www-data.
sudo -l:
scriptmanager : scriptmanager) NOPASSWD: ALL
There is an interesting process:
2023/02/23 04:32:01 CMD: UID=0 PID=16412 | /bin/sh -c cd /scripts; for f in *.py; do python "$f"; done
I edited the file to give me the root flag, but I have to find out how the process is executed.
I placed a python reverse shell in the python file. It was executed automatically after some time and yielded me the root reverse shell.