Authentication & Authorization (AA6)

Authentication & Authorization
6

Ананта може виконувати конфіденційні операції без додаткової автентифікації, оскільки вимоги до автентифікації є надто слабкими або відсутніми

How to play?

Some additional form of authentication is often desirable for sensitive actions inside the app. For example you may want to re-authenticate before contextual state changes like when changing state from running in the background to running in the foreground. confirming a bank transfer, or before applying changes to the user profile e.g: email, phone, pin, MFA, etc.

Scenario: Anant can perform sensitive operations without additional authentication because authentication requirements are too weak or missing

Anant wants to see his saved "Ultra Secret" note in the app. The app asks for a PIN to "unlock" the note view. Anant bypasses the UI check using instrumentation. Because the note was encrypted with a hardcoded key (or no key bound to the biometric), he successfully views the note without providing the PIN.

Example

Anant opens his "Vault" app. He navigates to the "View Secret" page. The app prompts for a fingerprint. Anant uses a script to hook the onAuthenticationSucceeded callback or the boolean check isUnlocked, forcing it to true. The app, which merely hid the text field behind a view overlap, now reveals the secret text. If the app had used the Android Keystore to encrypt the note, Anant's bypass would have failed because the decryption key would never have been released by the OS.

Threat Modeling

STRIDE

This scenario falls under the Tampering and Information Disclosure categories of STRIDE.

Anant performs Tampering by modifying the application's runtime logic to bypass the check, leading to Information Disclosure of the sensitive note.

What can go wrong?

Logic-Only Gates: Relying on simple boolean flags (e.g., if (isUnlocked)) allows attackers to flip the flag and bypass the check.

Insecure Storage: If data is stored in plain text or encrypted with a static key, bypassing the authentication screen grants immediate access to the data.

What are we going to do about it?

Android Keystore / iOS Keychain: Use cryptographic keys that mandate user authentication (e.g., setUserAuthenticationRequired(true)).

Crypto-Binding: Ensure the sensitive data can only be decrypted using the key that is released only after a successful biometric or PIN verification.

https://mas.owasp.org/MASTG/tests/ios/MASVS-AUTH/MASTG-TEST-0064/#static-analysis

Mappings

MASVS: AUTH-2,AUTH-3

MASTG: TEST-0064

CAPEC™: 20,49,50,55,115

SAFECode™: 28

No attacks registered!

OWASP Cornucopia

OWASP Cornucopia is a mechanism in the form of a card game to assist software development teams identify security requirements in Agile, conventional and formal development processes. It is language, platform and technology-agnostic, and is free to use. OWASP Cornucopia is licensed under the Creative Commons Attribution-ShareAlike 4.0 license, so you can copy, distribute and transmit the work, and you can adapt it, and use it commercially, but all provided that you attribute the work and if you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar licence to this one.

© 2012-2025 OWASP Foundation. The Open Worldwide Application Security Project (OWASP) is a nonprofit foundation that works to improve the security of software.