Created
March 20, 2016 15:16
-
-
Save kokjo/e6eac0e0a36be14096c3 to your computer and use it in GitHub Desktop.
Product key generator for the serial task form Codegate Quals 2016
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("./serial") | |
s = p.factory.blank_state(addr = 0x400CBB ) | |
serial = s.se.BVS("serial", 32*8) | |
s.memory.store(0x6020BA, serial) # store some symbolic memory in the bss | |
s.regs.rdi = 0x6020BA # let the first arguemnt(rdi) point to it | |
pg = p.factory.path_group(s) | |
pg.explore(find = 0x400E5C) # I want to go here now! | |
# Find out what to give as input to reach this state. (Solve it like a TI-89, please?) | |
print "Serial is: %r" % pg.found[0].state.se.any_str(serial).strip("\x00") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment