Cross-signature certificate vulnerability in Android system can cause system crash

Source: Internet
Author: User

Cross-signature certificate vulnerability in Android system can cause system crash

Overview

Trend Micro discovered a vulnerability affecting cross-signature certificate processing in Android. The current Android version does not properly process these certificates. When two certificates are signed with A ring certificate chain (certificate A signature certificate B; Certificate B signature certificate A), these certificates are created. Trend Micro has reported this vulnerability to Google and has not provided any patches or fixed fix time.

When a specially constructed malicious certificate is imported into an Android device (by installing a new app or importing a certificate), unexpected errors may occur, the device may slow down or be in the suspended state, and can only be forcibly restarted.

Vulnerability description

This vulnerability is caused by JarFile and KeyStore, two common classes in the android framework. Any Android function that calls one of them directly or indirectly may be attacked by cross-signature certificates.

JarUtils class

JarUtils (./libcore/luni/src/main/java/org/apache/harmony/security/utils/JarUtils. java ). This type is used to verify the certificate and signature file of the jar package. However, the JarUtils class cannot properly process the loop certificate chain and bring it into an endless loop. This problem exists in all android versions.

KeyStore class

KeyStore (for example,./external/bouncycastle/src/main/java/org/bouncycastle/jce/provider/JDKPKCS12KeyStore. java) is used to process PKCS #12 files of Android KeyStore. If the PKCS #12 file contains a loop certificate chain, code processing will also be in an endless loop.

POC

Trend Micro verifies this vulnerability in two situations: Install a specially constructed app to an Android device, and import a specially constructed key chain ). By using different Certificate Signing requests to manipulate the signature process, we can easily obtain A pair of cross-signature certificates:. the issuer of cert is B. cert, and B. the issuer of cert is. cert.

In the first scenario, we will install a new app signed by the above certificate. The new app we created is created by. the app name is LoopCertsChain signed by cert. We try to install it on an Android device (the Android device of version 4.1.2 is used below, and versions earlier than 4.4 are affected ). We get the following false-dead interface.

After further checks, we found that a key process (system_server) in Android is constantly using system resources until the process ends, which causes the device to restart. You have no other options for this issue.


In the second scenario, we import a malicious PKS #12 file with a loop certificate to the Android device.

 

The corresponding android process com. android. certinstaller is in an endless loop and can only be killed.


Up to now, this vulnerability has not produced direct security problems, but more scenarios such as arbitrary code execution may be found in future studies.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.