4 ms·
> Once that's bypassed Do you mean that you trick the app into accepting a wrong cert? How does one do that, apart from decompilation?
by aasasd 6y ago
> Once that's bypassed
Do you mean that you trick the app into accepting a wrong cert? How does one do that, apart from decompilation?
- captn3m0 6y agoYou usually recompile the app, or if you have a jailbroke phone - you can do it at runtime. But considering how the API is documented now (and alternative third party apps exist), it might not even be necessary.
- jeroenhd 6y agoJailbreaking an iPhone and using a tool like SSL Kill Switch [1] or just plain, old Frida with a script like [2] will do the job. Jailbreaking is the hard part, especially for an up to date iPhone, after that there's loads of guides you can follow that disable certificate validation for pretty much every application. It all boils down to hooking the necessary validation functions and having the APIs lie to the app code. Some apps package their own crypto helpers (often with big crypto problems) to make this harder and require actual reverse engineering, but those are a pain to maintain and it's only a matter of time before someone finds a way around them. If you can extract the symbols (so if the app has not been obfuscated well) you can use Frida's API to hook those as well through any language you like. There's even an interactive Javascript console you can hook into the apps you're hooking! Certificate pinning is a great way to protect users' security and privacy, especially in countries with questionable governments or ISPs, but it won't protect your app's secrets. [1]: https://github.com/nabla-c0d3/ssl-kill-switch2 https://github.com/nabla-c0d3/ssl-kill-switch2 [2]: https://techblog.mediaservice.net/2020/08/ios-13-certificate-pinning-bypass-for-frida-and-brida/ https://techblog.mediaservice.net/2020/08/ios-13-certificate...
- mittermayr 6y agoThat's exactly right. The hardest part is finding a phone that runs iOS 13+ and can be jailbroken still. I think I used an iPhone 7 or 8. If someone's really curious, it's probably even worth the $50-$100 for a used iPhone that can be jailbroken, it opens up A LOT of similar doors for investigating.
- lukec11 6y agoFWIW, the iPhone 12 I bought 2 weeks ago came with 14.2.1 (which has 2 jailbreaks available for it, unc0ver and Taurine) Not sure if older iPhones would come with older versions too, I assume used ones would normally be up to date - though iPhone X and earlier are jailbreakable on all versions via checkm8
- z33k 6y agoYou can jailbreak any non-A14 device running 14.2.1 or lower right now by following this guide to update to 14.3 and then jailbreaking with unc0ver https://www.reddit.com/r/jailbreak/comments/mm0g3f/news_new_method_of_updating_to_ios_143_if_you_are/ https://www.reddit.com/r/jailbreak/comments/mm0g3f/news_new_... Jailbreaking iOS 14 with checkra1n breaks faceID because it requires an additional SepOS exploit https://checkra.in/news/2020/09/iOS-14-announcement https://checkra.in/news/2020/09/iOS-14-announcement
- aasasd 6y ago> Some apps package their own crypto helpers Didn't even know that mobile OSes have APIs for cert validation, since that's not a part of the OS in my books. Though the motivation for shared libs is understandable (Facebook being an example of what not to do). I guess one drunken evening I'm gonna read through lists of the APIs just to see what kinds of stuff are crammed there.
- jeroenhd 6y agoI'm not sure why you're surprised, Windows has come with a library for certificate validation since the late 90s. The OSX documentation library has an example of using SecureTransport all the way back to 2004, but the API is probably older. The *nix systems, with their modular nature, may be technically usable without a TLS library, but even your average RTOS comes with fully-featured TLS support built in these days. Mobile operating systems provide a very broad API so that access management and sandboxing is made easy. I'm not sure how things are done on the iOS side, but on Android you can enable certificate pinning application-wide by just putting an XML file with the right name in the right place and adding a key/value pair for the hostname and the pinned public key (anywhere in the validation chain, AFAIK). The same XML file also allows disabling plain text requests from your application runtime, preventing accidental data leaks to insecure networks. Because adding security is so easy, there's loads of apps enforcing a security setting that otherwise would be considered obscure to most application developers. Exposing an optional, application-wide API is a pretty solid idea in my book; I'm not aware of any Linux system API that can easily enforce certificate pinning on an application-wide level.
- nerdbaggy 6y agoiOS you can use Charles app and intercept https request without any extra device. https://www.charlesproxy.com/documentation/ios/ https://www.charlesproxy.com/documentation/ios/
- atommclain 6y agoMy understanding is that Charles (man in the middle attacks) will only work with apps that don’t use certificate pinning. If an app uses that, I’m not aware of a way around without jailbreaking. https://www.raywenderlich.com/1484288-preventing-man-in-the-middle-attacks-in-ios-with-ssl-pinning https://www.raywenderlich.com/1484288-preventing-man-in-the-...