Skip to content

cotfas/Bypass-Android-SSLPinning-MitM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

16 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Bypassing the SSL Pinning for Twitter/X Android App to see the exchanged data between client-server

Man in the Middle attack (MitM) method, by using Frida inject and ProxyMan

Requirements: Mac OS computer;


⚠️ When you first try to do a SSL sniffing, you will most probably get to an error like: SSL Handshake Failed:

insert image

πŸ’‘ The reason why this happens is the fact that developers add an extra layer of security embedded into the client application, by SSL Pinning the server certificate to each request that is made, this way doing MitM ( Man in the Middle attacks ), are harder to be achieved.

🧩 First and foremost, install Genymotion, Python, ProxyMan and do the proper setup for proxying. *you can follow this article if you don't know how to do it: https://proxyman.io/android-emulator



πŸ‘‰ Next step is to install the proper command lines:
pip install Frida
pip install objection
pip install frida-tools


πŸ‘‰ Install on the Genymotion emulator: `- Samsung Galaxy S8 - Android 8.0 ( api 26 ) *the reason I've chosen this device is because with newer versions of Android there are extra layers of security to bypass, but if the APK Android application has support lower to this version, you are good to go.`

insert image



πŸ‘‰ Install Open GApps from the right menu of Genymotion:



πŸ‘‰ Drag & drop the "ARM Translation v8" zip file over Genymotion emulator:



πŸ‘‰ Install X-plore, and grant root privileges:



πŸ‘‰ Export the ProxyMan certificate to your local computer, and rename it to cert-der-proxyman.crt

πŸ‘‰ Setup the ProxyMan SSL certificates over the emulator:



πŸ‘‰ Copy the frida-server and the cert-der-proxyman.crt certificate to your emulator (you can also use drag&drop), then move the files to: `device location: /data/local/tmp/`



πŸ‘‰ Execute proper shell access:
adb shell chmod 755 /data/local/tmp/frida-server
adb shell chmod 755 /data/local/tmp/cert-der-proxyman.crt


πŸ‘‰ Execute the FRIDA server locally and let it run:
adb shell /data/local/tmp/frida-server



πŸ‘‰ Check if the FRIDA connection works by doing a PS ( process list ):
frida-ps -U



♻️ Start the Android App as SSL nuked:
frida -U -f com.twitter.android -l frida-inject.js



πŸ† Voila.

🎯 Results:

insert image

insert image

insert image

insert image

insert image

insert image

About

🚧 Bypass Android SSL Pinning with ProxyMan and Frida

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published