-
Notifications
You must be signed in to change notification settings - Fork 565
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash when analyzing large file with binary ninja backend becuase the IL function is not available #2249
Comments
A fix will be coming soon for it |
We are unlikely to create a way to force analysis to be done when it exceeds the thresholds, at least headlessly. That will be way too easy to lead to runaway analysis and eat all the RAM. In case of obfuscated or complex code, one should first use Binary Ninja GUI to fix the issue, save the database, and then run capa on it. See #2496 |
This is actually caused by Vector35/binaryninja-api#6020 |
Thanks for looking into all these issues, @xusheng6! I love how capa helps to improve other analysis tools. I've added the labels and will keep an eye out for future related issues. |
Capa and binja are helping each other to become better! |
Status update on this:
How to validate the binja fix is in effect: run capa with debug mode on the sample |
How high does memory usage grow if we cache all of the IL for a program? Within capa (specifically, the capa Binja backend/integration), we could do an initial pass that fetches the IL for all the functions in the program. Then we could use this later rather than computing the IL on demand. I understand this trades memory usage for performance - is this possible/reasonable? |
I am not sure. I will think of it. I am also thinking of some other ways to avoid the "random" access on function ILs so that the pattern will be more cache-friendly |
Stack trace:
This happens because when analyzing large files, binary ninja does not always generate the IL for all the functions. The code should be improved to account for the situation and only try to access the IL if it is available. Furthermore, there should be an option to force binary ninja to generate the IL for all the functions, at the cost of longer analysis time and RAM usage
The text was updated successfully, but these errors were encountered: