GithubHelp home page GithubHelp logo

kevcui / apk-mitm Goto Github PK

View Code? Open in Web Editor NEW
8.0 3.0 1.0 5 KB

:package: Prepare apk and ready go MITM

License: MIT License

Shell 100.00%
bash bash-script apk apktool reverse-engineering mitm man-in-the-middle

apk-mitm's Introduction

apk-mitm

A Bash script modifies app networks configurations and makes any apk MITM-ready.

Dependency

Usage

Usage:
  ./apkmitm.sh <apk>

Options:
  <apk>          target apk file
  --help         display this help message

Why this script is needed?

Since Android 7 (API level 24), secure connections from apps won't trust user-added CA store by default. It means, in many cases, simply adding proxy CA on the device won't be enough to intercept HTTPS requests from proxy tool. In addition, some network security configurations are required to be added in app source code, in order to enable the trust of user-added proxy CA store. This script automates the process to add these additional network configurations and then recompile target apk, ready for MITM.

What this script does exactly?

  1. Decompile target apk with apktool

  2. Add res/xml/network_security_config, which enables app trusts user-added CA

  3. Modify AndroidManifest.xml to apply network configurations from res/xml/network_security_config.xml, also add android:debuggable="true"

  4. Build apk with the changes above

  5. Generate a new keystore

  6. Sign apk with self-signed keystore


Buy Me A Coffee

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.