Skip to content

deobfuscate push ret to jmp #2539

Answered by psifertex
acheron2302 asked this question in Q&A
Discussion options

You must be logged in to vote

The best approach to this is to modify the architecture via an architecture hook. For example:
https://github.com/Vector35/binaryninja-api/blob/dev/examples/x86_extension/src/x86_extension.cpp
https://github.com/Vector35/binaryninja-api/blob/dev/python/examples/arch_hook.py

What you'd want to do is modify that second example to detect instances of this pattern and change the lifting to consume both instructions and return a jump to the target.

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by lwerdna
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants