Add a Rizin-based core library#205
Conversation
|
Hello @haeter525! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2021-07-09 10:56:50 UTC |
Sourcery Code Quality ReportMerging this PR leaves code quality unchanged.
Here are some functions in these files that still need a tune-up:
Legend and ExplanationThe emojis denote the absolute quality of the code:
The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request. Please see our documentation here for details on how these metrics are calculated. We are actively working on this report - lots more documentation and extra metrics to come! Help us improve this quality report! |
|
This pull request introduces 1 alert when merging 6718711 into 18a7115 - view on LGTM.com new alerts:
|
krnick
left a comment
There was a problem hiding this comment.
Nice work @haeter525 !
Supporting rizin will make our code base more stable!
1. Support a new Android reversing engineer framework, Rizin to analyze the APK. (#205) 2. Making `click` package optional to install. (#214) @0ssigeno 3. Improve the tainted analysis by @haeter525 in bytecode loader 4. Add an Optional Parameter Filter For JSON Rules (#212) 5. Adjust some directory names. Objects->core, Evaluator->evaluator. 6. Add VirusTotal analysis module by @pulorsok. (#195) 7. More tests for Quark by @haeter525. (#189) 8. Add a new feature to show Parent Functions' Cross-References In Rule Classification by @haeter525. (#192)
Description
Quark needs an alternate core library apart from Androguard. Here are the concerns of the Quark team.
Hence, this PR aims to add a core library based on Rizin.
Why is Rizin?
Rizin is a fork of the radare2 reverse engineering tools. Here are the advantages.
How to enable it?
Command Line
Add an option --core-library with the parameter Rizin.
quark --core-library "Rizin" -a APK_FILE -sPython Module
Add a keyword argument named "core_library" with the string Rizin.
How accurate is the Rizin-based core library?
For now, most of the analysis results are not correct.
The reason is that Rizin doesn't fully support the following analysis on APKs.
I have reported these issues to the Rizin community. They are currently working on them.
Also, to ensure the core library works with those functions in the future, I made two assumptions to build the core library.
Once Rizin fixes the above issues, the core library will work as expected.
How do you prove your code is reliable?
I collected a set of rules that are not impacted by the above issues to verify the analysis results.
For example, 0007.json is one of these rules.
The confidence has been confirmed 100% by the Androguard-based core library.
Then, I will ensure that the Rizin-based core library reports the same confidence.
Code Changes
quark/Objects/axmlreader/*
quark/Objects/rzapkinfo.py
quark/Objects/quark.py
quark/Objects/forensic.py and quark/report.py
quark/cli.py
Pipfile and setup.py
Test Plans