-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Port MASTG-TEST-0035: Testing for Android overlay attack protections #3649
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?
Conversation
…emo, and best practice Co-authored-by: cpholguera <29175115+cpholguera@users.noreply.github.com>
| @@ -0,0 +1,52 @@ | |||
| --- | |||
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.
⚠️ Duplicate MASTG-DEMO ID Detected
This file has the ID MASTG-DEMO-0083 which already exists in demos/ios/MASVS-NETWORK/MASTG-DEMO-0083/MASTG-DEMO-0083.md.
IMPORTANT: Please use the next available ID: MASTG-DEMO-0087
| - The `setFilterTouchesWhenObscured` method | ||
| - The `android:filterTouchesWhenObscured` attribute in layout files | ||
| - The `onFilterTouchEventForSecurity` method | ||
| - Checks for `FLAG_WINDOW_IS_OBSCURED` or `FLAG_WINDOW_IS_PARTIALLY_OBSCURED` flags |
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.
| - Checks for `FLAG_WINDOW_IS_OBSCURED` or `FLAG_WINDOW_IS_PARTIALLY_OBSCURED` flags | |
| - Checks for `FLAG_WINDOW_IS_OBSCURED` or `FLAG_WINDOW_IS_PARTIALLY_OBSCURED` flags | |
| - The [`setHideOverlayWindows`](https://developer.android.com/reference/android/view/Window#setHideOverlayWindows(boolean)) method |
There is a Manifest equivalent flag that works globally in the same way HIDE_OVERLAY_WINDOWS
Let's also add it to BEST-0029 and KNOW
| profiles: [L2] | ||
| status: deprecated | ||
| covered_by: [MASTG-TEST-0035] | ||
| deprecation_note: "New version available in MASTG V2 focusing on static analysis only" |
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.
| deprecation_note: "New version available in MASTG V2 focusing on static analysis only" | |
| deprecation_note: "New version available in MASTG V2" |
| --- | ||
| platform: android | ||
| title: References to Overlay Attack Protections | ||
| id: MASTG-TEST-0035 |
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.
Update ID to fake ID here and in the file name and demo
| id: MASTG-TEST-0035 | |
| id: MASTG-TEST-0x35 |
Ports v1 test for overlay/tapjacking attacks to v2 format. The v1 test included both static and dynamic analysis; v2 focuses exclusively on static detection of touch filtering mechanisms.
Changes
Test (MASTG-TEST-0035)
setFilterTouchesWhenObscured,onFilterTouchEventForSecurity, and obscured window flag checkstargetSdkVersionand sensitive UI contextDemo (MASTG-DEMO-0083)
filterTouchesWhenObscured, custom override with flag checkingSemgrep Rule (mastg-android-overlay-protection.yml)
Best Practice (MASTG-BEST-0029)
Knowledge Article Update (MASTG-KNOW-0022)
V1 Deprecation
covered_by: [MASTG-TEST-0035]Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
developer.android.com/home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js(dns block)/usr/bin/curl curl -s REDACTED(dns block)semgrep.dev/home/REDACTED/.local/bin/pysemgrep osemgrep -c ../../../../rules/mastg-android-overlay-protection.yml ./MastgTest_reversed.java --text -o output.txt(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.