🧠 Description

SSL Pinning is a security mechanism that binds the app's HTTPS traffic to a specific certificate or public key to prevent MITM attacks. Bypassing SSL pinning allows intercepting encrypted traffic for security testing.

🎣 Frida Script Bypass

# Universal SSL Unpinning
# Save as unpin.js and run
Java.perform(function() {
    var TrustManagerImpl = Java.use('com.android.org.conscrypt.TrustManagerImpl');
    TrustManagerImpl.verifyChain.implementation = function(chain, authType, session) {
        return chain;
    }
});

// More comprehensive script
// https://github.com/httptoolkit/frida-android-unpinning

# Run with Frida
frida -U -f com.target.app -l unpin.js --no-pause

🛠️ Objection Tool

# Install objection
pip install objection

# Launch app with objection
objection explore -s "android hooking set launcher-activity"

# Disable SSL pinning
android sslpinning disable

# Or use specific module
android hooking set method com.target.SSLManager.verify false

# Dump memory
memory dump all unfiltered

📱 Xposed Modules

# Install Xposed framework on rooted device
# Install modules:
# - JustTrustMe
# - SSLUnpin
# - ProxySelector

# RootCBAY bypass module
# https://github.com_AC/RootCBD

# Enable modules in Xposed app
# Reboot device
# SSL pinning should be bypassed

🔧 Manual Bypass

# Patch APK to disable pinning
# 1. Decompile APK
apktool d target.apk

# 2. Find SSL pinning code
grep -r "X509TrustManager" target/
grep -r "checkServerTrusted" target/

# 3. Patch the trust manager
# Modify checkServerTrusted to return empty

# 4. Recompile
apktool b target -o target-patched.apk

# 5. Sign
jarsigner -verbose -keystore my.keystore target-patched.apk alias_name
Back to Mobile Security