-
Notifications
You must be signed in to change notification settings - Fork 579
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 alternative backend provided by lancelot #234
Closed
Closed
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
testing updates backported and proposed in #236 |
This was referenced Aug 17, 2020
closing due to lack of attention. can re-open in the future. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
lancelot is a disassembler and code analysis framework for x86/x64 PE files. this PR adds a backend to capa that's based on lancelot. key reasons to consider merging the PR are performance and py3 support. the major reason not to merge is that lancelot is quite experimental.
i've been slowly working on lancelot for the past few years, and its gone through transformations from Go to Clojure to (now) Rust with Python bindings. it uses Zydis to disassemble bytes to instructions and has routines to extract control flow and call graphs from these instructions. it also contains algorithms that attempt to identify function start addresses, such as through call target analysis, entry points, pattern matching, etc.
file features are provided by pefile as lancelot doesn't attempt to replicate this parsing logic.
it was pretty straightforward to develop this backend. a major lesson i learned is exactly what features an analysis system must provide in order to be integrated with capa. to summarize:
overall, it took maybe 16 hours to build out this backend. i think we can take its structure as a template for integrating with other systems, such as miasm or maybe ghidra.
TODO: