-
-
Save Bono-iPad/a030b4317a96999e44475e5c6da5877b to your computer and use it in GitHub Desktop.
Unbreakable Enterprise Product Activation (solved with angr)
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, simuvex, claripy | |
import logging | |
logging.basicConfig() | |
angr.path_group.l.setLevel('DEBUG') | |
p = angr.Project("./unbreakable-enterprise-product-activation2") | |
initial_state = p.factory.blank_state(addr=0x4005bd) | |
flag = claripy.BVS('flag', 8*0x43) | |
initial_state.memory.store(0x6042c0,flag) | |
pg = p.factory.path_group(initial_state, immutable=False) | |
pg.explore(find=0x400830) | |
s = pg.found[0].state | |
for a in range(0,10): | |
s.add_constraints(s.memory.load(0x6042c0 + a, 1) < 0x80) | |
s.add_constraints(s.memory.load(0x6042c0 + a, 1) >= 0x20) | |
print "%r" % s.se.any_str(pg.found[0].state.memory.load(0x6042c0, 0x43)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment