Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

> it just doesn't seem like it's possible

Mobile apps can do this with certificate pinning. Web apps used to be able to do this with HTTP Public Key Pinning (HPKP) [1], but it was deprecated because it was too much of a footgun. Instead you can monitor for certificates for your domain that aren't expected via Certificate Transparency logs.

[1]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Public_Key...



sort by: page size:

> Modern iOS/Android have something called SSL Pinning.

Yep, the mobile OSes have that option, but it’s not very commonly used. I fairly regularly snoop traffic on apps and it’s not super often that I’m blocked temporarily by cert pinning.


> Mobile apps typically have other key pinning mechanisms that are preloaded (i.e. baked into the binary), but that's typically easy to bypass if you're the owner of a device; it's not really effective as a mechanism against reverse engineering.

Your comment makes me realize that HPKP can bootstrap itself, and is unlike regular pinning (with certificate bundled in the binary, as you say).

So do you agree that a powerful enough owner of the device should be considered able to setup a server which poses as the regular server the app talks to, and sniff any request the app sends to its server?

(edited for spelling)


> All traffic is encrypted these days. So you cannot check it.

Of course you can, just configure your phone to use a MITM proxy (e.g. burp). This won’t work for apps that use certificate pinning but most apps don’t.

Of course, you still don’t know what data they really store and/or sell.


He's talking about mobile apps pinning the backend certificates, not HPKP.

This works as long as the app does not enforce certificate pinning. But if it does, there's no way to override it and inspect what's actually going on, as I can on my desktop.

Many apps are "pinning" TLS certificates, so you can't see their traffic w/o changing a hard-coded public key in the app itself.

Just be ready for mitm proxying on some mobile apps to be a bust if they use certificate pinning. I’m not aware of anything that can get you past that besides patching the app itself.

> especially on mobile where you can't just add your cert as a trusted cert easily

What do you mean? Do some Androids block it? Or iOS? I've got it easily available in settings.


> I believe ssl pinning is circumvented on iOS by leveraging the objective-c runtime to hook the callbacks that an app would use to inspect the remote peer certificate.

I believe this only works if apps are using their own custom stack to perform this validation. If they are using the iOS TLS implementation, you will need a jailbroken device to fix this.


isn't this only true if the app isn't pinning certificates?

Not if the app is certificate pinning (and from a security perspective, it ought to).

"My strategy was to MITM the mobile app and use the same API."

Did the app use cert pinning

What percentage of apps actually use cert pinning


> you need an edge device that deeply inspects each packet.

As cert pinning becomes more common, we are rapidly losing the ability to do this. The only work around I know of for iOS/Android is to jailbreak/root your device and get a debugger attached to apps. I haven't seen a workaround for getting around cert pinned Metro apps.


Android apps could also do certificate pinning with the same effect though? In this case there isn't any difference between Android and iOS in functionality.

Don't rely on client side data. Pin certificates in mobile apps.

Even with certificate pinning? Maybe if you can patch the app.

> I reverse-engineered using mitmproxy. It was quite easy as the app does not use cert-pinning at all.

If the app used cert-pinning you'd probably do the RE work on android, where you can more easily install a modified APK with cert pinning disabled.


> Not if the app uses certificate pinning, ships its own version of a SSL library and uses code-signing and obfuscation to prevent you messing around with it.

Are there desktop apps that behave this way? Atleast in my experience - I haven't come across anything like this on Linux.


Looks like the android app at least does certificate pinning https://github.com/zimmra/frida-rootbypass-and-sslunpinning-...
next

Legal | privacy