Add an Optional Parameter Filter For JSON Rules#212
Add an Optional Parameter Filter For JSON Rules#212krnick merged 2 commits intoev-flow:masterfrom haeter525:feature_an_optional_parameter_filter
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-12 07:41:31 UTC |
|
Thank you @haeter525 for adding this feature! |
|
For the |
Sourcery Code Quality Report✅ Merging this PR will increase code quality in the affected files by 1.65%.
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! |
|
Hi @krnick I have renamed the key according to your advice. |
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
This PR proposes to add an optional keyword filter for JSON Rules.
Users can use the keyword filter to match APIs with specified parameters.
When will the detection be triggered?
The detection is applied when a rule's confidence reaches 100%.
If no parameters in the corresponding API contain the specified keyword, the rule will be discarded.
How to use it
Append key
match_keywordswith a keyword list to an API.For example, add the keyword
content://call_log/callsto the second one as below.{ "api": [ { "descriptor": "()Landroid/content/ContentResolver;", "class": "Landroid/content/Context;", "method": "getContentResolver" }, { "descriptor": "(Landroid/net/Uri; [Ljava/lang/String; Ljava/lang/String; [Ljava/lang/String; Ljava/lang/String;)Landroid/database/Cursor;", "class": "Landroid/content/ContentResolver;", "method": "query", "match_keywords": [ <--- Added Keyword filter. "content://call_log/calls" <--- The keyword ] } ], }Code Changes
quark/Objects/quark.pyTest Plans