Last active
September 30, 2016 05:01
-
-
Save inaz2/f397b63375ac58af6b47aa3479e6e574 to your computer and use it in GitHub Desktop.
angr writeup of CSAW Quals CTF 2013 crackme / https://github.com/ctfs/write-ups-2013/tree/master/csaw-quals-2013/reversing/crackme-300
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
# time python solve.py | |
'_\x96\x1es\xdd\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' | |
real 0m4.301s | |
user 0m3.588s | |
sys 0m0.688s | |
# useradd -m crackme | |
# echo THIS_IS_FLAG > /home/crackme/key | |
# ./crackme & | |
# echo -e '_\x96\x1es\xdd\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' | nc localhost 54321 | |
Enter registration code: Thank you, valued customer! | |
Your key is: THIS_IS_FLAG |
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
import angr | |
p = angr.Project('./crackme', load_options={'auto_load_libs': False}) | |
s = p.factory.blank_state(addr=0x8048ef6) | |
initial_path = p.factory.path(s) | |
pg = p.factory.path_group(initial_path) | |
e = pg.explore(find=0x8048f88, avoid=0x804900b) | |
if len(e.found) > 0: | |
s = e.found[0].state | |
print "%r" % s.se.any_str(s.memory.load(s.regs.bp-0x20c, 0x10)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment