Undefined Android Fake ID Vulnerability: Complete Guide In 2014

MD
Written by
Integrated MA

The Android Fake ID vulnerability represents a pivotal moment in mobile security history, revealing deep flaws in how the operating system handles app authentication. Discovered by Bluebox Security researchers and detailed at Black Hat 2014, this issue allowed attackers to craft malicious applications that could masquerade as legitimate, privileged software. Affecting Android versions from 2.1 to 4.4, it underscored the risks of inadequate cryptographic verification in widely deployed systems.

Understanding App Signing in Android

At the heart of Android’s security model lies app signing using digital certificates. Developers sign their APKs with private keys, creating a public certificate that devices verify during installation. This process ensures app integrity and controls updates—only the original signer can modify the app.

Certificates form chains: an app’s signing certificate may be issued by an intermediate one, ultimately tracing to a trusted root. Android’s PackageManagerService relies on this chain to establish trust. However, the Fake ID flaw exposed a critical weakness in chain construction and validation.

  • Key Components: JarUtils class handles chain building via createChain() and findCert() methods.
  • Trust Model: Devices implicitly trust chains presented in APKs without rigorous checks.
  • Privileged Access: System apps and vendor extensions use unique certs for exclusive APIs.

The Core Technical Flaw

The vulnerability stems from Android’s JarUtils implementation, inherited from Apache Harmony libraries. When parsing an APK’s signature block (in PKCS#7 format), the system extracts signer certificates but fails to cryptographically verify issuer claims.

Specifically:

  1. Extract the leaf (signer) certificate.
  2. Identify its claimed issuer’s subject name.
  3. Search the included certificate set for a match by subject name only.
  4. Link them into a chain without validating the issuer’s signature over the child cert.

This name-based matching ignores whether the purported issuer actually signed the child. Attackers exploit this by forging a chain: take a target app’s legitimate certificate, generate a new leaf cert claiming issuance by the target’s cert (but not actually signed by it), and bundle the target’s cert as a “CA” in the APK.

StepAttack ActionAndroid Behavior
1. Isolate Target CertExtract cert from privileged app–
2. Forge Leaf CertCreate new cert with target’s subject as issuerAccepts subject match
3. Bundle ChainInclude target cert in PKCS#12 keystoreBuilds chain on name match
4. Sign & InstallUse keystore to sign malicious APKGrants target privileges

This bypasses sandbox restrictions, as Android grants permissions based on matching certificate identities.

Real-World Exploitation Scenarios

Bluebox demonstrated multiple attack vectors, highlighting the flaw’s severity across device features.

  • Adobe Flash Impersonation: Fake cert mimics Adobe’s, injecting code into WebView plugins for remote exploitation.
  • NFC Data Theft: Masquerade as Google Wallet to access payment credentials via NFC APIs.
  • Device Admin Takeover: Impersonate vendor admin apps (e.g., 3LM) for full management control, including factory reset evasion.
  • App Data Access: Read protected data from banking or enterprise apps sharing cert-based trust.

Exploitation requires sideloading an APK, common via phishing, drive-by downloads, or malvertising. No root or user interaction beyond install approval was needed.

Historical Context and Discovery

Jeff Forristal of Bluebox Labs uncovered the issue in early 2014, coordinating disclosure with Google (bug 13678484). Public reveal came at Black Hat US on August 6, 2014, via the talk “Android Fake ID Vulnerability Walkthrough.”

The flaw persisted since Android 2.1 (Eclair) due to unpatched Harmony code. Android 4.4 (KitKat) marked the end, with fixes in 4.4.3+ via stricter chain validation using public key matching, not just subjects.

Primary source: Android Vulnerabilities Database confirms affected range 2.1–4.4.

Broader Implications for PKI and Mobile Security

Fake ID illustrates pitfalls in PKI deployment: even robust cryptography fails without proper verification. Android’s model assumed benign certificate bundles, but real threats forge them effortlessly—13 lines of Python sufficed for chain forgery.

Lessons include:

  • Verify, Don’t Assume: Always cryptographically validate signatures in chains.
  • Key vs. Name Matching: Post-Fake ID, Android checks public keys, preventing subject spoofing.
  • System App Hardening: Modern Android restricts privileged cert usage.

Similar issues appear in other platforms; iOS faced cert pinning bypasses, while web PKI battles misissuance.

How Google Patched the Vulnerability

Google’s fix, committed in April 2014, overhauled JarUtils:

// Pre-fix: subject name match onlyCertificate[] chain = findCertBySubject(leaf.getIssuerX500Principal());// Post-fix: public key validationif (!leaf.getPublicKey().equals(chain.getPublicKey())) {    throw new SignatureException("Issuer key mismatch");}

Affected OEMs like Samsung, LG, HTC rolled out 4.4.3+ updates. Devices on 4.4.2 with security patches (e.g., Galaxy S5) resisted exploits.

Modern Relevance and Evolving Threats

Though patched a decade ago, Fake ID principles endure. Attackers now target signature scheme v2/v3 flaws or supply-chain compromises. Android 15 enforces hardware-backed attestation for high-risk apps.

Users should:

  • Enable Google Play Protect.
  • Avoid sideloaded APKs.
  • Keep OS updated.

Frequently Asked Questions

Which Android versions were vulnerable to Fake ID?

Versions 2.1 (Eclair) through 4.4 (KitKat). Fixed in 4.4.3 and later.

Did Fake ID require root access?

No. Only APK installation, exploitable via social engineering.

Can Fake ID affect current Android devices?

No, patches since 2014 render it ineffective on updated systems.

How does Fake ID differ from other Android vulns?

It targeted core signature validation, enabling privilege escalation without code execution bugs.

Key Takeaways for Developers

For app makers:

  • Use unique keys per app; avoid shared certs.
  • Implement runtime cert pinning for sensitive communications.
  • Leverage Android’s App Bundle for v3+ signing.

This vulnerability reminds us that security is implementation, not just design. Thorough auditing of crypto primitives remains essential.

References

  1. Android Vulnerabilities: Fake ID — Android Vulnerabilities Project. 2014. https://androidvulnerabilities.org/vulnerabilities/Fake_ID
  2. Android Fake ID Vulnerability Walkthrough — Black Hat. 2014-08-06. https://www.blackhat.com/docs/us-14/materials/us-14-Forristal-Android-FakeID-Vulnerability-Walkthrough.pdf
  3. Google Android Security Bulletin — Google. 2014-07. https://source.android.com/docs/security/bulletin/2014-07-01
  4. Apache Harmony DRL Documentation — Apache Software Foundation. 2010 (authoritative for inherited code). https://archive.apache.org/dist/harmony/drl/
‹›