Skip to content
Mobile Write-up Intermediate

**Janus Vulnerability (CVE-2017-13156)**

The Janus vulnerability (CVE-2017-13156) allows an attacker to modify an Android app's code without invalidating its digital signature, because the APK signature verification process can be bypassed by adding a malicious DEX file. An attacker could create a malicious app that appears legitimate and, once installed, take control of the device and steal sensitive information.

Sandeep Vishwakarma Follow

Published on infosecwriteups.com

Greetings fellow hackers, my name is Sandy, Security Analyst and Bug bounty hunter. As I’m presently engaged in Android penetration testing, I’d like to relay my experiences with you, as they may prove beneficial in addressing some of the inquiries, I had difficulty resolving answers too, without more introductions…

Sandeep Vishwakarma, on infosecwriteups.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely a flaw in how Android verifies APK signatures, allowing a malicious DEX file to be added without invalidating the signature.

Impact

An attacker could create a malicious app that appears legitimate and, once installed, take control of the device and steal sensitive information such as passwords or credit card numbers.

What the attacker needed

Android 5.0–7.1.2 device; Security patch level before Dec 2017; APK signed only with v1

The fix

Google released a patch for the vulnerability as part of its Android security updates in February 2018.

How it was found

  1. Check the APK's signature schemes with apksigner to confirm it only uses v1.
  2. Determine the minimum Android version of the target APK using apktool.
  3. Extract classes.dex from a sample APK using apktool.
  4. Inject the extracted classes.dex into the target APK using a Janus exploit script.
  5. Install the modified APK on a vulnerable Android device (e.g., Android 7.1).
  6. Open the installed app to trigger the injected code.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

Android apps are packaged in files called APKs, and each APK is digitally signed to prove it hasn't been tampered with. The Janus bug lets an attacker add extra code to an APK without breaking that signature, so the app still looks trustworthy. If a user installs such a modified app, the hidden code can run and do harmful things.

What is Mobile?

Flaws specific to Android and iOS apps: exported components, deep links, WebViews and data left on the device.

More by Sandeep Vishwakarma

View all

5 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Mobile app vulnerabilities

The lesson behind this report.

Flaws specific to Android and iOS apps: exported components, deep links, WebViews and data left on the device.