Giter Club home page Giter Club logo

janus-exploit's Introduction

Janus Vulnerability (CVE-2017-13156) Exploit with Proof-of-Concept(POC)

Android package installer does not check extra data before PKZIP, thus we can concat DEX & APK together with little bit of fix to pass the installation.

ART can run both APK and DEX, so here DEX ahead of base.apk is actually the one to execute.

extract the original classes.dex from apk
use APKTOOL to do stuffs on it
Inject the new dex into original APK
update the installed app :)

Some automation has been added to the exploit to make it easier with the following checks.

  • Check if APK is signed with v1 signature scheme
  • Check if APK is supported to run on vulnerable android versions
  • Decide if APK is vulnerable based on above points and Android version it can be exploited on.
  • Wait for user to connect suggested vulnerable device and warn if recommended device is not connected
  • Fuse user provided dex into original apk and generate injected apk
  • Push an injected apk as an update to the original application
  • confirm if exploit was successful or abort with error.

All you have to do is pass dex file along with vulnerable original apk to the script and run the suitable android device.

You can extract raw classes.dex file from the apk using apktool apktool -s d h5.apk and modify the dex if you want and pass it to the script.

usage: kal-janus.py [-h] dex-file original-apk

I use classes.dex of other application and inject with the vulnerable application so that it breaks the vulnerable application.

image

image

Proof Of Concept (POC)

janus-poc(1)

NOTE

You can check the writeup link to find the vulnerability and exploit it manually.

janus-exploit's People

Contributors

ari5ti avatar rigyaja avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.