MASTG-DEMO-0040: Debuggable Flag Enabled in the AndroidManifest with semgrep
Content in BETA
This content is in beta and still under active development, so it is subject to change any time (e.g. structure, IDs, content, URLs, etc.).
Download MASTG-DEMO-0040 APK Open MASTG-DEMO-0040 Folder Build MASTG-DEMO-0040 APK
Sample¶
The code snippet below shows a sample manifest file with the debuggable flag enabled.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
|
Steps¶
Let's run our semgrep rule against the manifest file.
../../../../rules/mastg-android-debuggable-flag.yml | |
---|---|
1 2 3 4 5 6 7 8 9 10 |
|
run.sh | |
---|---|
1 |
|
Observation¶
The rule has identified the android:debuggable
attribute in the AndroidManifest.
output.txt | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
|
Evaluation¶
The test case fails because the android:debuggable
attribute is explicitly set to true
.