What would be the recommended settings for large malformed binaries? #3168
-
The issue that I am having is at Step 1, which is the initial control flow analysis. What happens is that the binary has a lot of random indirect branches, mostly jumps (50% of the binary) which causes binary ninja to slow down to a crawl, changing settings doesn't appear to help that much. Although patching out most of them is rather trivial. I feel like binary ninja should at-least be able to pass the control-flow step as the binary is only 1/5th the size with all "junk" code removed. A rather simple example would be:
This is a simple vmprotect type number mutation combined with a large amount of jump branches as junk code. Not sure if this is already a setting within binary ninja to prevent binary ninja trying to follow every single possible path a program can take. More information: The log that is generated in this case is:
which adds a large amount of "Continuation of function sub_*. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Not following branches is... impossible. Binary Ninja wouldn't know which branch to follow and wouldn't be analyzing anything if it didn't. It has to identify complete functions at the disassembly level before it can lift to an IL and use its data flow analysis to be able to optimize paths as dead and remove them from analysis. I would recommend opening with options and choosing "basic" or control flow" mode for analysis mode. You can also try changing the analysis time per function or minimum function analysis size to enable quicker first analysis before patching and re-enabling to continue analysis. Additionally, this would likely benefit from a plugin to do those patches such as OPP: https://github.com/Vector35/OpaquePredicatePatcher The new workflow APIs (only really available in the C++ APIs unfortunately for performance reasons right now) could also be used to rewrite the binary on the fly and improve analysis but that would be a lot more work. |
Beta Was this translation helpful? Give feedback.
Not following branches is... impossible. Binary Ninja wouldn't know which branch to follow and wouldn't be analyzing anything if it didn't. It has to identify complete functions at the disassembly level before it can lift to an IL and use its data flow analysis to be able to optimize paths as dead and remove them from analysis.
I would recommend opening with options and choosing "basic" or control flow" mode for analysis mode. You can also try changing the analysis time per function or minimum function analysis size to enable quicker first analysis before patching and re-enabling to continue analysis.
Additionally, this would likely benefit from a plugin to do those patches such as OPP: h…