-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
PoC frida.re Base Script #3359
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
base: master
Are you sure you want to change the base?
PoC frida.re Base Script #3359
Conversation
demos/android/MASVS-CRYPTO/MASTG-DEMO-0058/MastgTest_reversed.java
Outdated
Show resolved
Hide resolved
demos/android/MASVS-STORAGE/MASTG-DEMO-0059/MastgTest_reversed.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Restoring the Request Changes status
@cpholguera I've commented each comment. |
Updated hook.js to match new demo. Co-authored-by: Carlos Holguera <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cpholguera I've resolved or commented all discussions. A few discussions are unresolved, since I had some questions or feedback. But I think we should make issues for these topics in order to close this PR.
Should I write these issues already or wait for feedback from the remaining open discussions in this PR?
@bernhste I think something related to the website build checker action is currently broken (probably since I moved the action to the new mas-website repo). Don't worry about it for now. |
@bernhste I fixed the website checker ;) |
Perfect. I just wanted to create an issue :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cpholguera From my point of view, there all the discussed changes have now been reviewed and resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a Proof of Concept (PoC) for a standardized Frida-based framework to detect insecure or weak API usage across MASTG demos. The framework includes a base script architecture, Android-specific decoders, and automated JSON output for analysis.
- Adds reusable Frida script infrastructure with base hooks, decoders, and JSON output
- Creates two demonstration cases for crypto and storage security issues
- Provides automated evaluation scripts using jq for parsing security findings
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 5 comments.
Show a summary per file
File | Description |
---|---|
utils/frida/android/run.sh | Main script that merges hook configurations with base scripts and runs Frida analysis |
utils/frida/android/base_script.js | Core Frida script providing hook registration, method interception, and event logging |
utils/frida/android/android_decoder.js | Android-specific value decoders for various Java types and data structures |
demos/android/MASVS-STORAGE/MASTG-DEMO-0059/* | Demo for detecting unencrypted sensitive data in SharedPreferences |
demos/android/MASVS-CRYPTO/MASTG-DEMO-0058/* | Demo for detecting insecure ECB block mode usage in KeyGenParameterSpec |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Fixed a bug in the Android cursor decoder, where the position of the cursor was not set to its original position after iterating through the cursor. Co-authored-by: Copilot <[email protected]>
Updated string concatenation for better readability. Co-authored-by: Copilot <[email protected]>
Removed tailing comma. Co-authored-by: Copilot <[email protected]>
Removed tailing comma Co-authored-by: Copilot <[email protected]>
Last month @cpholguera and I discussed how we could normalize demos which use frida.re to identify insecure or weak API usage.
This is a proposal of how we could do that. The quick summary:
./frida
which hooks into provided APIjq
As a PoC, I added 2 new DEMOS:
If you want to add a new DEMO, basically all you have to do is update the file
hook.js
to match the API you want to intercept.Ideally we can use this setup to
Please let me know if you have feedback or additional ideas.