-
-
Save Bono-iPad/99a226f5ec4661af41f66f5c2a76cd11 to your computer and use it in GitHub Desktop.
Nuit du Hack CTF Quals - 2016 Matriochka stage 2 (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 | |
import logging | |
logging.basicConfig() | |
angr.path_group.l.setLevel('DEBUG') | |
p = angr.Project("./stage2.bin") | |
initial_state = p.factory.entry_state(args=[angr.StringSpec(string="./stage2.bin"), angr.StringSpec(sym_length=11, nonnull=True)],add_options={"BYPASS_UNSUPPORTED_SYSCALL"}) | |
pg = p.factory.path_group(initial_state, immutable=False) | |
pg.explore(find=0x40064d) | |
print pg.found[0].state.se.any_str(pg.found[0].state.memory.load(pg.found[0].state.posix.argv, 100)) | |
# ./stage2.binPandi_panda |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment