Bypass Facebook/Instagram Certificate Pinning for Android
SUPPORTS:
TLS1.3 & TLS1.2 for x86/ARM32/ARM64
Instagram x86 currently does not work, feel free to open a pull request :)
A script to automate removing certificate pinning defense from Facebook applications.
TESTED FOR THE FOLLOWING APPS: - com.facebook.katana (Facebook for Android) - com.facebook.orca (Messenger) - com.facebook.lasso (Lasso) - com.instagram.android (Instagram for Android)
Make sure you have run the desired Facebook application atleast once - what happens is that the cert pinning library (libcoldstart.so) is unpacked from an archive embedded in the APK.
Get root shell in your device:
$(comp): adb shell $(phone): su
Pull libcoldstart.so from your desired Facebook application: ```
$(phone): exit $(comp): adb pull /sdcard/libcoldstart.so FBUnpinner/ ```
Patch the file:
$ python3 patch.pyOR:
$ python3 patch.py libliger.so libliger-patched.so
Replace libcoldstart.so in the phone with the patched version: ``` $(comp): adb push libcoldstart-patched.so /sdcard/libcoldstart.so $(comp): adb shell $(phone): su
(Optional) Setting up Burp to work with TLS 1.3 ("no cipher suites in common")
/jdk-11.0.2.jdk/Contents/Home/bin/java -jar burpsuite_community.jar
A script to just patch an APK
Android Studio: Nexus6API_24 - Google APIs Intel Atom (x86)
Genymotion: Google Nexus 5X API 26 (x86)
https://serializethoughts.com/2016/08/18/bypassing-ssl-pinning-in-android-applications/
https://plainsec.org/how-to-bypass-instagram-ssl-pinning-on-android-v78/