-
Notifications
You must be signed in to change notification settings - Fork 566
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
Error when running capa with Binary Ninja backend on shellcode #2489
Comments
Good find, there's no proper support for shellcode in Binary Ninja. |
Yes! I think you can change the line at
|
Great, thanks for the input. @as0ni do you want to make the PR? |
@mr-tz will do! |
Description
When running capa against shellcode using the Binary Ninja backend, I encountered an error related to an unexpected file format. The analysis fails, preventing capa from assessing shellcode capabilities as expected.
Steps to Reproduce
Run capa on shellcode using Binary Ninja as a backend with the following command:
capa.exe -r C:\Tools\capa-rules -f sc64 sc.bin -b binja -d
Expected behavior:
capa should analyze the shellcode file and report any detected capabilities based on the specified rules.
Actual behavior:
The above command produces the following error:
Versions
capa version: 7.3.0
Installed as: Python library
Backend: Binary Ninja 4.1.5902
Potential solution:
To work around this issue, I modified the file file.py in the Binary Ninja extractor by changing the line:
elif view_type == "Raw":
to
elif view_type == "Mapped":
within the
extract_file_format
function. After this change, capa ran successfully and produced the expected results.The text was updated successfully, but these errors were encountered: