News for hackers. Stuff that matters.
Re:Comcast Shot Themselves in the Foot with MTA-STS by zokier on Wednesday January 19, 2022 @02:15PM (#29998569)
Does anyone know why SNI style approach is not used for email? The client could indicate in the TLS handshake (or in STARTTLS command) that it wants to send email to comcast.com and the server would use comcast.com certificate to prove that it is authentic destination for those emails. That way you'd avoid this whole mess of needing to fetch another file using another protocol based on another DNS record etc. SNI seems to work well for web, so why not for email too?
Re:Comcast Shot Themselves in the Foot with MTA-STS by agwa on Wednesday January 19, 2022 @03:44PM (#29999826)
This is a good question. It's a bit more complicated than just using SNI.

First is certificate management. There is currently no automated way for mail providers to obtain TLS certificates for domains whose MX records point to them - i.e. there is no SMTP/MX equivalent to the Baseline Requirement's "Agreed-Upon Change to Website" domain validation method, or ACME's HTTP-01 challenge type. And in general domain operators don't want their mail providers to have certificates which could be used to impersonate their websites.

The certificate problem could be solved with SRVName certificates, which permit certificates to be scoped to a particular service on a host. Combined with an automated SMTP/MX-based validation method, this would permit mail providers to easily and securely get certificates for the domains whose mail they host. But there are thorny security-critical compatibility problems which are blocking the deployment of SRVName certificates. I wrote about the problem near the end of this blog post: https://www.agwa.name/blog/post/avoiding_dnssec

Second is that you need a mechanism for servers to remember that they should use TLS with a particular recipient domain, similar to HSTS. This could probably be accomplished with a simple SMTP extension that's included in the EHLO response.

Re:Comcast Shot Themselves in the Foot with MTA-STS by zokier on Wednesday January 19, 2022 @04:26PM (#30000385)
> And in general domain operators don't want their mail providers to have certificates which could be used to impersonate their websites.

> The certificate problem could be solved with SRVName certificates, which permit certificates to be scoped to a particular service on a host.

What about extended key usage extension, doesn't it function similarly without needing to fiddle with SANs? https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1....

Re:Comcast Shot Themselves in the Foot with MTA-STS by agwa on Wednesday January 19, 2022 @05:21PM (#30001182)
Yeah it seems like EKU could be used for this. But I might be overlooking something.
Re:Comcast Shot Themselves in the Foot with MTA-STS by meepmorp on Wednesday January 19, 2022 @02:30PM (#29998755)
You're not always talking directly to the destination mailserver when sending a message via SMTP.
Re:Comcast Shot Themselves in the Foot with MTA-STS by zokier on Wednesday January 19, 2022 @03:03PM (#29999200)
I don't see how that makes a difference? Sure, the cert issuance/distribution can be bit of hassle but it doesn't seem insurmountable
Re:Comcast Shot Themselves in the Foot with MTA-STS by rblatz on Wednesday January 19, 2022 @08:27PM (#30003061)
I’ve heard this, and I believe it is technically true. But in practice never happens anymore.

Are there any situations today where that happens?

Re:Comcast Shot Themselves in the Foot with MTA-STS by tedunangst on Wednesday January 19, 2022 @05:57PM (#30001656)
What do you do when the mail server you're talking to (or its impersonator) doesn't offer startssl?
Re:Comcast Shot Themselves in the Foot with MTA-STS by zokier on Wednesday January 19, 2022 @06:03PM (#30001732)
if the server does not have tls then mta-sts does not help much either?

edit: I actually read the spec, and apparently the listing of allowed servers is a side aspect of the spec, the main meat is opting in to tls overall; that was not immediately obvious from the article. In that context your question makes more sense. To answer more comprehensively, I don't see why similar mechanism that functions well with HTTP would not work here; that the server would send STS policy to the client after connection which the client then caches and consults on subsequent connections. This is how HSTS works.

Re:Comcast Shot Themselves in the Foot with MTA-STS by tedunangst on Wednesday January 19, 2022 @06:58PM (#30002280)
I agree they could have added HAVESTS to the EHLO reply.