Live data from Hacker News

Charles Proxy now available on iOS

charlesproxy.com

41–50 of 113 posts

Re: Charles Proxy now available on iOS

#41
post #34

Genuine question here: How is it not absolutely terrifying that an iOS App Store app can man in the middle HTTPS communications made by other apps? Is there some way in which this isn’t poking a hole in exactly the sort of security sandbox that iOS tends to be good at? (And yes there probably is some part of what’s going on that I don’t understand, that’s why I’m asking the question)

Can't say much about the security, but I suspect it's working by pretending to be a VPN provider and then proxying the traffic. It's then able to install a CA root to generate any certs it needs to MITM traffic. Cert pinning will prevent this from working, but that's the only thing that will.

How do you intercept traffic from apps that use cert pinning? Is the only way to patch the app binary and reinstall the patched binary using a dev certificate?

How exactly does one go about patching the binary – is there a tutorial somewhere?

Re: Charles Proxy now available on iOS

#42
post #29

Earlier quoted context omitted.

Sure, but then you'd have to JB the phone. Most of this stuff is pretty straightforward, but not exactly 'trivial' - especially given the context is an iOS app specifically aimed at making MITM easier.

Certificate pinning is inherently security by obscurity; it's intended as an annoyance for anyone trying to reverse-engineer the service, rather than an insurmountable barrier.

Basically anything you do client-side falls into that category. If your code runs on my device, there's not much you can do to stop me from fiddling with it.

Re: Charles Proxy now available on iOS

#43
post #41

Earlier quoted context omitted.

Can't say much about the security, but I suspect it's working by pretending to be a VPN provider and then proxying the traffic. It's then able to install a CA root to generate any certs it needs to MITM traffic. Cert pinning will prevent this from working, but that's the only thing that will.

How do you intercept traffic from apps that use cert pinning? Is the only way to patch the app binary and reinstall the patched binary using a dev certificate? How exactly does one go about patching the binary – is there a tutorial somewhere?

>Is the only way to patch the app binary and reinstall the patched binary using a dev certificate?

Yes

>How exactly does one go about patching the binary – is there a tutorial somewhere?

https://www.guardsquare.com/en/blog/iOS-SSL-certificate-pinn...

Re: Charles Proxy now available on iOS

#44
post #21

Earlier quoted context omitted.

Could you go about describing how this would work for a 3rd party app like Uber for example?

I've never done this personally, but I'm pretty sure there is no way to protect against hooking and/or patching functions in Secure Transport (iOS's low-level TLS stack), since all network traffic goes through these APIs. I'm sure there's something similar in Android.

You're not forced to use system facilities for TLS on Android. Back when you needed up to date TLS support for your app on older Android versions you would use e.g. BouncyCastle instead of the system's TLS facilities. Probably the same for iOS.

Re: Charles Proxy now available on iOS

#45

mitmproxy has worked on iOS and Android for years now and is OSS and easy to use

It seems to include SSL support as well https://jasdev.me/intercepting-ios-traffic

mitmproxy supports TLS just fine. It had a simple setup for installing a root CA in your device.

Re: Charles Proxy now available on iOS

#46

Imagine if the user could compile their own kernels for iOS^W^W [edit] that can control an iPhone. She enables IP forwarding in the kernel configuration. Maybe she can also disable some crucial bits for interacting with the baseband. She only wants wifi to work. Then she uses this phone with the custom kernel (phone #1) as a gateway for another phone (phone #2). She can easily block ads and other undesired traffic de…

Looks like she wants Android, specifically, something like LineageOS, or even CopperheadOS for better security.

Re: Charles Proxy now available on iOS

#47
post #32

Earlier quoted context omitted.

Certificate pinning is inherently security by obscurity; it's intended as an annoyance for anyone trying to reverse-engineer the service, rather than an insurmountable barrier.

Certificate pinning is also a secure way of protecting against MITM attacks, mis-issued certs, and enterprise proxies.

Yes: that's what it should be used for. It's not a way to keep your HTTP REST API private.

Re: Charles Proxy now available on iOS

#49
post #34

Genuine question here: How is it not absolutely terrifying that an iOS App Store app can man in the middle HTTPS communications made by other apps? Is there some way in which this isn’t poking a hole in exactly the sort of security sandbox that iOS tends to be good at? (And yes there probably is some part of what’s going on that I don’t understand, that’s why I’m asking the question)

Except on iOS you get:

- Prompt to allow app to act like VPN

- Having to enter your passcode after said prompt

It's impossible for apps to MITM silently.

Re: Charles Proxy now available on iOS

#50

mitmproxy has worked on iOS and Android for years now and is OSS and easy to use

I get the sense the Charles users are just not familiar with mitmproxy. Here’s a guide I wrote awhile ago to get you up to speed: https://gist.github.com/joshenders/2b0dc14c89a8769f64a7
Post reply on HN