| platform | android | ||
|---|---|---|---|
| title | Password Exposed Through Accessibility Metadata | ||
| id | MASTG-DEMO-0x01 | ||
| code |
|
||
| kind | fail | ||
| test | MASTG-TEST-0x01 |
The sample displays a password input whose characters are visually masked. An accessibility delegate intentionally copies the underlying plaintext into the node's content description, making the value observable through accessibility while it remains visually concealed.
{{ MastgTest.kt # AndroidManifest.xml }}
- Use @MASTG-TECH-0005 to install the app on a device.
- Install and enable the attacker app from @MASTG-DEMO-0x02.
- Open this app and tap Start.
- Enter
MASTG-SECRET-1234into the password field. - Use @MASTG-TECH-0009 to obtain the output generated by the attacker accessibility service.
The password characters are visually masked in the victim app, but the attacker accessibility service reports MASTG-SECRET-1234 in the node's accessibility metadata.
{{ ../MASTG-DEMO-0x02/output.txt }}
The test case fails because the visually masked password is exposed in plaintext through accessibility metadata to an accessibility service that is not declared as an accessibility tool.