-
Notifications
You must be signed in to change notification settings - Fork 570
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
add a Ghidra entry script users can invoke to run capa against a loaded Ghidra database #1767
Merged
colton-gabertan
merged 11 commits into
backend-ghidra
from
enhance/add-ghidra-entry-script
Aug 26, 2023
Merged
add a Ghidra entry script users can invoke to run capa against a loaded Ghidra database #1767
colton-gabertan
merged 11 commits into
backend-ghidra
from
enhance/add-ghidra-entry-script
Aug 26, 2023
Conversation
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
mike-hunhoff
added
enhancement
New feature or request
ghidra
Related to Ghidra integration
gsoc
Work related to Google Summer of Code project.
labels
Aug 25, 2023
mike-hunhoff
commented
Aug 25, 2023
mike-hunhoff
commented
Aug 25, 2023
mike-hunhoff
commented
Aug 25, 2023
mike-hunhoff
commented
Aug 25, 2023
mike-hunhoff
commented
Aug 25, 2023
mike-hunhoff
commented
Aug 25, 2023
mike-hunhoff
commented
Aug 25, 2023
Performance significantly improved by 4283c01. Before:
After:
|
colton-gabertan
approved these changes
Aug 26, 2023
Awesome find in optimizing the byte conversions 😄 |
casual 100x improvement 🥷 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
New feature or request
ghidra
Related to Ghidra integration
gsoc
Work related to Google Summer of Code project.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a Ghidra Python 3 script that invokes capa in a way that allows users to specify a rules path and control rendering in both Ghidra headless and UI modes.
Steps:
pip install flare-capa
capa_ghidra.py
to Ghidra user scripts directorycapa_ghidra.py
from Ghidra headless or script managerUsers can specify their capa rules path and verbosity via the UI when running in Ghidra UI and users can specify their capa rules path and verbosity via command-line arguments when running in Ghidra headless. Unfortunately Ghidra's headless analyzer does not allow flags, e.g.
-v
to be specified as script arguments so instead we require users to specify their command-line arguments using a single string surrounded by quotes e.g."<path_to_rules> -vv"
. Users can specify the keywordhelp
, e.g."help"
, to view the scripts help output that would normally be accessed via-h
or--help
.This PR also includes bug fixes, refactoring, and adding Ghidra support for
show-features.py
.Ghidra UI
Selecting rules:
Selecting rendering:
Output to Ghidra console window (which can be used to navigate directly to displayed addresses):
Ghidra headless
Running capa with specified rules and verbosity:
Viewing help: