You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Biometric local authentication such as fingerprint recognition can be used to protect sensitive data or actions within an application.
9
+
However, if this authentication does not use a <code>KeyStore</code>-backed key, it can be bypassed by a privileged malicious application, or by an attacker with physical access using application hooking tools such as Frida.
10
+
</p>
11
+
</overview>
12
+
13
+
<recommendation>
14
+
<p>
15
+
Generate a secure key in the Android <code>KeyStore</code>. Ensure that the <code>onAuthenticationSuccess</code> callback for a biometric prompt uses it
16
+
in a way that is required for the sensitive parts of the application to function, such as by using it to decrypt sensitive data or credentials.
17
+
</p>
18
+
</recommendation>
19
+
20
+
<example>
21
+
<p>In the following (bad) case, no <code>CryptoObject</code> is required for the biometric prompt to grant access, so it can be bypassed.</p>
<p>In the following (good) case, a secret key is generated in the Android <code>KeyStore</code>. The application requires this secret key for access, using it to decrypt data.</p>
OWASP Mobile Application Security: <ahref="https://mas.owasp.org/MASTG/Android/0x05f-Testing-Local-Authentication/">Android Local Authentication</a>
30
+
</li>
31
+
<li>
32
+
OWASP Mobile Application Security: <ahref="https://mas.owasp.org/MASTG/tests/android/MASVS-AUTH/MASTG-TEST-0018/">Testing Biometric Authentication</a>
33
+
</li>
34
+
<li>
35
+
WithSecure: <ahref="https://labs.withsecure.com/publications/how-secure-is-your-android-keystore-authentication">How Secure is your Android Keystore Authentication?</a>
* Added a new query `java/android/insecure-local-authentication` for finding uses of biometric authentication APIs that do not make use of a `KeyStore`-backed key and thus may be bypassed.
0 commit comments