Live data from Hacker News

iOS 18 breaks IMAPS self-signed certs

forums.developer.apple.com

61–70 of 157 posts

Re: iOS 18 breaks IMAPS self-signed certs

#61
post #53

Earlier quoted context omitted.

You have to consider the rarity of your use case vs the use case they're defending against. How often do you think someone tries to connect their gamepad to a local server? Not never, but the total amount of users doing it is probably high tens or low hundreds at most Compare that to how often gamepad users try to connect to a malicious website - probably hundreds or ever thousands of times a day. Loosening certifica…

Any malicious website can access my gamepad, since it can trivially get a Letsencrypt certificate – the only requirement for getting "secure origin" API access. What exactly is this restriction preventing me from, then? (And what does a malicious website do with my gamepad data anyway?) > Not never, but the total amount of users doing it is probably high tens or low hundreds at most Yes, I'm fully aware that local ho…

Allowing self-signed certificates creates a higher risk for MITM attacks. Sure you can trivially get a letsencrypt certificate once you register a DNS entry, but you can't trivially get a letsencrypt certificate which validates google.com

If you control the local network it's trivial to redirect traffic intended for elsewhere, like "google.com", and trivial to have the server it redirects to present a certificate with "google.com" in it's subject or SAN.

What would happen on a laptop is you would be hit with a certificate validation error because it was self signed, and on the laptop you have the ability to bypass it, but that ability to bypass is very dangerous. Most users will not properly check a certificate before clicking to trust it.

As far as what could be done, "this is a low value device to an attacker" is not a security measure, but beyond that I'm sure that people have bought games on a gamepad, and anything which involves financial transactions has the potential for malicious behavior with severe consequences

Re: iOS 18 breaks IMAPS self-signed certs

#62
post #57
post #44

Earlier quoted context omitted.

Or is operating a local-only mailserver not connected to the larger internet? I guess that's a lazy or stupid thing too, these days... I'm a fan of having TLS on by default for everything on the Internet, but I'm seriously annoyed by the collateral damage to local self-hosted services the implementation of that has caused. It shouldn't be this hard to e.g. host web server on my local network that browsers grace with…

> We absolutely need a localhost and local domain exemption for both TLS/X.509 certificate validation and web APIs. localhost is already considered a secure origin. Local networks are horribly insecure; easily the most likely place for a MITM attack.

Ah, that’s good – it’s been a while since I last had to work around that.

And I generally agree on local networks being insecure. So how about making them more secure instead of marginalizing them even more?

TOFU for TLS certs on .local (for Zeroconf, and maybe something else/new for local DNS) would be a huge step forward from unencrypted and unauthenticated HTTP. Such sites could even still be displayed with a broken padlock or whatever HTTP gets these days to not create any false expectations by users.

Re: iOS 18 breaks IMAPS self-signed certs

#63
post #48
post #9

Can you add your own CA cert to your device?

You can, but I find that much less secure than being able to TOFU a self-signed certificate: I once did this, and besides being incredibly unergonomic, now I have to either securely destroy or safely store the signing key for the self-signed CA, or risk malware from performing an MITM against any app on my device, and not just e.g. the email client.

does iphone support name constraints on CA certificates? (https://systemoverlord.com/2020/06/14/private-ca-with-x-509-...)

Re: iOS 18 breaks IMAPS self-signed certs

#64
post #53

Earlier quoted context omitted.

Any malicious website can access my gamepad, since it can trivially get a Letsencrypt certificate – the only requirement for getting "secure origin" API access. What exactly is this restriction preventing me from, then? (And what does a malicious website do with my gamepad data anyway?) > Not never, but the total amount of users doing it is probably high tens or low hundreds at most Yes, I'm fully aware that local ho…

Allowing self-signed certificates creates a higher risk for MITM attacks. Sure you can trivially get a letsencrypt certificate once you register a DNS entry, but you can't trivially get a letsencrypt certificate which validates google.com If you control the local network it's trivial to redirect traffic intended for elsewhere, like "google.com", and trivial to have the server it redirects to present a certificate wit…

Then only allow self-signed certificates for literal IPs or those on .local (and other private/reserved TLDs).

Right now, .local is completely impossible to encrypt, as well as impossible to use “secure origin” APIs on, which is a shame.

Re: iOS 18 breaks IMAPS self-signed certs

#65
post #56

Earlier quoted context omitted.

If a user set up a NAS they should be capable of googling "Openssl how to set up a CA" > First link fully explains it https://arminreiter.com/2022/01/create-your-own-certificate-... "How to import CA into iPhone" > First link fully explains it https://www.ibm.com/docs/en/mpf/7.1.0?topic=certificates-ins... "Android app customize trusted CAs" > First link fully explains it https://developer.android.com/privacy-and-sec…

Setting up a NAS means buying one on Amazon and plugging it in. You're completely out of touch with the majority of the userbase of these products if you think even one in 10 NAS users will set up their own CA using OpenSSL (in a secure way that doesn't expose themselves to being MITMed even on public sites such as that of their bank down the road).

In that case the NAS company should, at a minimum, be loading their NAS with a certificate signed by a CA owned by the NAS company, where the trust chain for their NAS's certificates are easily available for users to grab and install.

In an ideal world they would load a letencrypt certificate and set up the tooling required to automatically pull down a new one when required.

A NAS company owned CA doesn't offer much of a benefit directly for the plug-n-play users, but it's still better than just a self signed cert, and for people who care about their security even a little bit it can significantly protection.

Most Plug-n-Play NAS solutions will integrate with a web api and/or an app, and it's more common than it should be that NAS'es are exposed to the internet.

Once you control both the NAS and it's clients, there's absolutely no reason not to preload a complete PKI implementation. Even just an installation app which loaded the chain onto any device you wanted to interact with the NAS would be sufficient.

If NAS'es are intended for non-technical people, then any NAS sold should be secure by default.

Re: iOS 18 breaks IMAPS self-signed certs

#66
post #56

Earlier quoted context omitted.

Setting up a NAS means buying one on Amazon and plugging it in. You're completely out of touch with the majority of the userbase of these products if you think even one in 10 NAS users will set up their own CA using OpenSSL (in a secure way that doesn't expose themselves to being MITMed even on public sites such as that of their bank down the road).

In that case the NAS company should, at a minimum, be loading their NAS with a certificate signed by a CA owned by the NAS company, where the trust chain for their NAS's certificates are easily available for users to grab and install. In an ideal world they would load a letencrypt certificate and set up the tooling required to automatically pull down a new one when required. A NAS company owned CA doesn't offer much…

My point is precisely that current browsers and OSes make it impossible to ship a secure-by-default device running a local web server, NAS or otherwise.

Requiring users to install a globally trusted CA is a disaster from a security point of view (now my NAS vendor or anyone that hacks them can pose as google.com!), and for this reason doesn’t even work with modern Android apps anymore, for example.

Re: iOS 18 breaks IMAPS self-signed certs

#67
post #3

I switched to letsencrypt certs for my imap server. Works well, IMO better than the self-signed ones I used before.

ACME DNS-01 Challenge doesn't need a public resolvable and reachable host, it just sets a temporary DNS record to verify.

Re: iOS 18 breaks IMAPS self-signed certs

#68
post #10
post #8

Earlier quoted context omitted.

No, but you could use DNS for that internal IP. And then you'd have a hostname. Since your IMAP server likely has some way of getting external mail, it is likely that you have a DNS zone and MX records, so adding an A record for your internal IMAP access isn't that much of an effort compared to what you already would have. If you have mmd45.com as a domain and have MX records pointing to your mail server, adding imap…

unfortunately none of that applies to my setup. my imap server lives in a dmz and doesn't have all that other jazz.

Mine too. It does apply.

Seems to be a safe assumption you have a domain since you're receiving mail.

Go run something like certbot[0] on your mail server. It has plugins to integrate with various DNS providers. (This is who is hosting the zone where you map domains to IPs, not necessarily where you registered the domain.) If they don't have a plugin for your host, you could look at moving the zone (e.g., CloudFlare is free for something like this, Route53 is No external IPs involved anywhere and you can get valid, trusted SSL certificates for your domain. Set up the auto-renewal (in essentially all cases, add something to crontab), and it'll periodically dump new certificates to disk for you so you never need to think about the certificates again.

If you don't even want anyone to know that there's a "imap.mmd45.com" in existence _somewhere_ in the world, you can issue a certificate for `*.mmd45.com` and it will cover any direct subdomains.

Now you actually need to _connect_ to your mailserver with some sort of hostname rather than IP. For desktop devices and stuff, you could just throw this in /etc/hosts if you wanted. Some VPN/VPN-adjacent tools have ways to push mappings like that. Basically all of them have a way to override the DNS server in use if you were willing to run your own DNS server on the same host that has your mailserver. You can also just create a public record mapping imap.mmd45.com to 10.1.2.3.

[0] https://eff-certbot.readthedocs.io/en/latest/ [1] https://letsencrypt.org/docs/client-options/

Re: iOS 18 breaks IMAPS self-signed certs

#69
post #33

I wish they could break Snapchat, Facebook etcs ‘s self-signed certs. I own the device, why can’t I see the traffic to and from all of these apps if I add my self-signed cert and approve to use a MITM-proxy. Most apps work, but not everyone. Often called certificate pinning.

i saw a video on youtube where a guy intercepted https app traffic from an android app for a smart scale where the app used certificate pinning. there was some very automated tool for defeating the cert pinning. unfortunately i can't find the video link.

Probably objection, which uses Frida internally. Unfortunately, it depends on the implementation. It patches Java X509 classes, but some apps don’t use that.

The biggest pain is Flutter apps, which come with their own native TLS stack.

Post reply on HN