Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Make APK Accept CA Certificate

Automatic Method

The tool https://github.com/shroudedcode/apk-mitm will automatically make the necessary changes to the application to start capturing the requests and will also disable certificate pinning (if any).




Manual Method

First we decompile the app: apktool d *file-name*.apk

[Image: ghSPlZv.png]

Then we go into the Manifest.xml file & scroll down to the <\application android> tag & we are going to add the following line if it isn't already there:
Code
android:networkSecurityConfig="@xml/network_security_config

Before adding:

[Image: CWjcOtz.png]

After adding:


[Image: EGiiM4A.png]

Now go into the res/xml folder & create/modify a file named network_security_config.xml with the following contents:

[Image: gNeh0UE.png]

Then save the file & back out of all the directories & rebuild the apk with the following command:
Code
apktool b *folder-name/* -o *output-file.apk*

[Image: oDlwcwd.png]

Now, you need to sign the new application.
Nice share, will help many :)


Possibly Related Threads...
Thread / Author Replies Views Last Post
by SIM-4616746May 8, 2020 04:24 AM 0 105 May 8, 2020 04:24 AM
Last Post: SIM-4616746
by interactiveDec 18, 2016 07:50 AM 0 142 Dec 18, 2016 07:50 AM
Last Post: interactive
by lemmerule86Mar 13, 2011 12:00 AM 1 75 Mar 13, 2011 12:00 AM
Last Post: Sideswipe