Breaking the chain of CA Certificate detection & SSL Pinning bypa
An Android app detected the user-installed proxy CA certificate and refused to run, and it also enforced SSL pinning that blocked traffic interception. By removing the CA certificate from the device's root store, routing traffic through HTTP Toolkit with an upstream proxy, and running a Frida SSL pinning bypass script, the author captured the app's traffic.
Published on medium.com
Hi there, my name is Suprit Pandurangi aka s3ctat0r let's get started without any further delay!! While testing an Android app, I encountered one with proxy certificate detection enabled.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the app relied only on client-side checks (detecting a user CA certificate and certificate pinning) that can be removed or patched on a rooted or instrumented device.
Impact
An attacker with physical or ADB access to a device could intercept and inspect the app's HTTPS traffic, though the technique requires a rooted or instrumented setup and a licensed HTTP Toolkit for the upstream proxy.
What the attacker needed
Physical or ADB access to the device; rooted or instrumented device for Frida; licensed HTTP Toolkit for upstream proxy
The fix
The app should not rely solely on client-side certificate detection and pinning; stronger protections such as server-side checks and tamper resistance should be considered.
How it was found
- Remove the installed CA certificate from the device's root certificates.
- Connect HTTP Toolkit to the device via ADB and set an upstream proxy to the loopback address running Burp Suite.
- Disable battery optimisation for the app under App info.
- Run the Frida server from /data/local/tmp via ADB shell and execute the SSL pinning bypass script.
- Capture the application's traffic.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Apps can check whether a proxy's certificate is installed on the phone and refuse to work if it is. They can also 'pin' the expected server certificate so a proxy cannot pretend to be the server. The author hid the certificate from the app and used a tool that patches the app at runtime so the pinning check passes, letting them read the traffic.
What is Mobile?
Flaws specific to Android and iOS apps: exported components, deep links, WebViews and data left on the device.