![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
A CLI application that automatically prepares Android APK files for HTTPS inspection
A CLI application that automatically prepares Android APK files for HTTPS inspection
Inspecting a mobile app's HTTPS traffic using a proxy is probably the easiest way to figure out how it works. However, with the Network Security Configuration introduced in Android 7 and app developers trying to prevent MITM attacks using certificate pinning, getting an app to work with an HTTPS proxy has become quite tedious.
apk-mitm
automates the entire process. All you have to do is give it an APK file and apk-mitm
will:
AndroidManifest.xml
to make it debuggable
return-void
opcodes to disable certificate pinning logicYou can also use apk-mitm
to patch apps using Android App Bundle and rooting your phone is not required.
If you have an up-to-date version of Node.js (10+) and Java (8+), you can run this command to patch an app:
$ npx apk-mitm <path-to-apk>
So, if your APK file is called example.apk
, you'd run:
$ npx apk-mitm example.apk
✔ Decoding APK file
✔ Modifying app manifest
✔ Modifying network security config
✔ Disabling certificate pinning
✔ Encoding patched APK file
✔ Signing patched APK file
Done! Patched APK: ./example-patched.apk
You can now install the example-patched.apk
file on your Android device and use a proxy like Charles or mitmproxy to look at the app's traffic.
You can also patch apps using Android App Bundle with apk-mitm
by providing it with a *.xapk
file (for example from APKPure) or a *.apks
file (which you can export yourself using SAI).
Sometimes you'll need to make manual changes to an app in order to get it to work. In these cases the --wait
option is what you need. Enabling it will make apk-mitm
wait before re-enconding the app, allowing you to make changes to the files in the temporary directory.
If the app uses Google Maps and the map is broken after patching, then the app's API key is probably restricted to the developer's certificate. You'll have to create your own API key without restrictions and run apk-mitm
with the --wait
option to be able to replace the com.google.android.geo.API_KEY
value in the app's AndroidManifest.xml
file.
If apk-mitm
crashes while decoding or encoding the issue is probably related to Apktool. Check their issues on GitHub to find possible workarounds. If you happen to find an Apktool version that's not affected by the issue, you can instruct apk-mitm
to use it by specifying the path of its JAR file through the --apktool
option.
The above example used npx
to download and execute apk-mitm
without local installation. If you do want to fully install it, you can do that by running:
$ npm install -g apk-mitm
MIT © Niklas Higi
FAQs
A CLI application that automatically prepares Android APK files for HTTPS inspection
The npm package apk-mitm receives a total of 0 weekly downloads. As such, apk-mitm popularity was classified as not popular.
We found that apk-mitm demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.