S/MIME Certificate Replacement Attacks
Categories
(MailNews Core :: Security: S/MIME, defect)
Tracking
(Not tracked)
People
(Reporter: jens.a.mueller, Unassigned)
Details
(Keywords: sec-want)
Comment 1•7 years ago
|
||
Updated•6 years ago
|
Comment 2•6 years ago
|
||
Comment 3•6 years ago
|
||
Comment 4•6 years ago
|
||
Comment 5•6 years ago
|
||
Reporter | ||
Comment 6•6 years ago
|
||
Updated•6 years ago
|
Reporter | ||
Comment 7•5 years ago
|
||
Any updates on this issue? Was the auto-cert-overwrite behavior changed for Thunderbird?
Comment 8•5 years ago
|
||
It's still the same AFAIK. Would be inclined to wontfix this. Asking could do more damage than it could do help the situation. It's a broken trust model, and having the user second guess if the CA did the right thing... how could they even begin to assess that?
Comment 9•5 years ago
|
||
The security of S/MIME encrypted communication is reduced to anyone can read and manipulate a user's emails somewhere within the process of delivery.
It's true and it's serious.
The attack here is valid and completely destroys the promise of S/MIME.
There are 2 possible solutions:
- Change all CAs to stop issuing email certificates based on email confirmation. However, letsencrypt uses a similar model for HTTPS certs. So, CA policies are very unlikely to change.
- Thunderbird insist on certificate continuity. That means, before a new certificate is imported, and if we already have a cert for that email partner, the user needs to manually approve and explicitly confirm the new certificate. This is just a confirmation dialog, but makes it impossible for an attacker to silently replace the key, as described above. This is the same mechanism used by other systems, like Signal and various others.
Comment 10•5 years ago
|
||
Since certificates have to be changed/renewed yearly and that is a normal thing, having to confirm every update would destroy usability. In the end you'd be none the wiser as to whether it's a real or fake update.
Comment 11•5 years ago
|
||
How about warning only if the CA changes?
Also when the validity period is far from over? (Which would limit the time frame of an attack seriously.)
Reporter | ||
Comment 12•5 years ago
|
||
My three cents:
- There will always be CAs that issue S/MIME certificates based on the ability to receive an email address (actually, most commercial S/MIME CAs, even those you pay for, use this way of "authentication" / certificate deployment).
- As Magnus pointed out, certificates change after one (or depending on your CA, at least after three) years. However, IMAPS/POP3S/SMTPS server certificates also change regularly -- and TB also shows a warning here for new certificates, for good reasons.
- That said, warning only if the CA changes maybe a good trade-off. Without having any numbers, my guess is that most organisations which actually use S/MIME do use their institutional CA and security-aware users will get suspicious if it changes to $SomeFreeCA).
Comment 13•5 years ago
|
||
(In reply to Ben Bucksch (:BenB) from comment #11)
How about warning only if the CA changes?
Also when the validity period is far from over? (Which would limit the time frame of an attack seriously.)
I guess at least the time frame would be doable. For personal S/MIME certs, it's easy you switch. OTOH who are we kidding - personal S/MIME are as dead as they could be, especially after <keygen> was discontinued.
Comment 14•5 years ago
|
||
(In reply to Jens Müller from comment #12)
However, IMAPS/POP3S/SMTPS server certificates also change regularly -- and TB also shows a warning here for new certificates, for good reasons.
Those usually have proper certificates, and there is no warning if it changes (and the CA is trusted).
Comment 15•5 years ago
•
|
||
personal S/MIME are as dead
Yes, but corporate S/MIME is still alive. As Jens said, this is the typical scenario for S/MIME, and they use a single CA for the entire company. So, the warning when switching CAs makes sense.
Comment 16•5 years ago
|
||
(In reply to Jens Müller from comment #12)
- As Magnus pointed out, certificates change after one (or depending on your CA, at least after three) years. However, IMAPS/POP3S/SMTPS server certificates also change regularly -- and TB also shows a warning here for new certificates, for good reasons.
Where does TB show such a warning? I don't think I've never seen a warning if a server changes from one good cert to another good cert. Are you referring to a different scenario?
Comment 17•5 years ago
|
||
I think that's only showed when connecting to servers where you'd have to add exceptions [I think broken on trunk].
For corporate S/MIME, the whole situation isn't really an issue. They would be the ones administrating the mail server and potentially also giving the certificates, probably administrating your machine. They might as well just hand out a "real" one as fake. It's all under their control. For corporation usage, you also don't really have to care about free speech and such aspects either. If the certificate is from outside the organization - you have the same situation as for personal S/MIME certificates, that there's no knowing if the other party changed CA.
Comment 18•5 years ago
•
|
||
You're making a lot of assumptions there. If Amnesty International were using S/MIME with a corporate CA, then most or all of your assumptions (secure network, managed machine, low risk) would fall and the user would be vulnerable, possibly facing death.
Comment 19•5 years ago
|
||
I'm talking about the corporate internal traffic between sites. If it's outside the organization, you get the personal S/MIME case no? How would the outside user know if Amnesty really switched CA for some of their certificates or not.
Reporter | ||
Comment 20•5 years ago
|
||
Where does TB show such a warning?
[off-topic] Sorry, my fault. I though this would be the case because I got a warning message once when my institution updated to a new IMAPS cert, but they may have done something dumb back then (e.g., expired, self-signed, etc.).
In any case, I think that while S/MIME is rarely used in practice, for organizations who actually rely and depend on its end-to-end security promises, it should not be possible to basically "overwrite" public keys (even though I do definitely see the benefits of auto-import for user experience).
Comment 21•5 years ago
|
||
The security model of S/MIME and TLS relies on the hope that nobody will create false certificates, intentionally or unintentionally.
This bug report is a complaint that "hope" isn't secure, because CAs can be tricked to issue false certificates (by gaining control to a mailbox or DNS).
I don't think this can be fixed on the Thunderbird application side.
The expectation of PKI is that you only trust CAs that you consider sufficiently diligent for your purposes.
In a closed, strictly controlled corporate environment, you'd have to use a deployment in which email clients only trust your own corporate CA (which can be operated in a way that performs stricter identity verification), and mark any public CAs as untrusted for S/MIME certificates (remove the email trust flags provided by the Mozilla CA list).
This model (only rely on corporate CA) fails as soon as you need to communicate with S/MIME across organizational borders. If you cannot trust other CAs to perform identity verification in a way that seems appropriate to you, then S/MIME doesn't work for you.
It seems fair to say, today's security model of public S/MIME certificates relies on no active attacker to ever obtain a false certificate. Given how easy it is for many network/server administrators to obtain an email in transit, I agree that it's not a good idea to rely on that.
We could potentially downgrade the security indicators we're showing. We're currently working on OpenPGP, and have suggested to distinguish between public keys that have been fully verified by yourself, and public keys that you simply assume/hope to be correct.
We could decide that for all public CAs we change the visible indicators to a weaker "unverified identity" level. In a first step, we could do that for S/MIME in general. Potentially, as a future enhancement, we could allow users to mark a CA as "I trust this CA to perform strong identity verification", which could then result in the stronger indicators being shown with email. Deployments could control which CAs get that stronger flag, resulting in stronger identity reliability indicators shown in email.
Currently I think we shouldn't start to offer manual verification for the S/MIME certificates of your conversation partners, because that's now how S/MIME works. Thunderbird would be the only app doing so (right?) and that could confuse users in environments with controlled S/MIME deployments. If users want to do the manual verification, they should switch to the (pending) OpenPGP support.,
Comment 22•3 years ago
|
||
(In reply to Kai Engert (:KaiE:) from comment #21)
The security model of S/MIME and TLS relies on the hope that nobody will create false certificates, intentionally or unintentionally.
This bug report is a complaint that "hope" isn't secure, because CAs can be tricked to issue false certificates (by gaining control to a mailbox or DNS).
I don't think this can be fixed on the Thunderbird application side.
The expectation of PKI is that you only trust CAs that you consider sufficiently diligent for your purposes.
I think the crux of this attack is that people think a class 1 certificate provides more assurance than it actually does.
A class 1 certificate guarantees that your email service has not tampered with the message and cannot alter it. It also guarantees that the message comes from your peer’s email account, rather than from a spammer spoofing their From: address. It does not (and cannot) guarantee that the holder of the certificate is the person who ought to have control of the account. For that, you need a higher level of validation: either an OV or EV certificate, or a certificate signed by a private corporate CA.
The DV model works for TLS because certificate transparency means that no browser will trust a certificate unless it has been placed in a publicly available, immutable, and signed log. It is therefore possible to reliably know of every TLS certificate that has ever been issued for one’s domain name, and trigger an alert if a rogue one is ever found. There is no such mechanism for S/MIME, and I am not certain if one can exist.
In a closed, strictly controlled corporate environment, you'd have to use a deployment in which email clients only trust your own corporate CA (which can be operated in a way that performs stricter identity verification), and mark any public CAs as untrusted for S/MIME certificates (remove the email trust flags provided by the Mozilla CA list).
This is what I would do, though it is admittedly a poor workaround.
This model (only rely on corporate CA) fails as soon as you need to communicate with S/MIME across organizational borders. If you cannot trust other CAs to perform identity verification in a way that seems appropriate to you, then S/MIME doesn't work for you.
Indeed so.
It seems fair to say, today's security model of public S/MIME certificates relies on no active attacker to ever obtain a false certificate. Given how easy it is for many network/server administrators to obtain an email in transit, I agree that it's not a good idea to rely on that.
We could potentially downgrade the security indicators we're showing. We're currently working on OpenPGP, and have suggested to distinguish between public keys that have been fully verified by yourself, and public keys that you simply assume/hope to be correct.
We could decide that for all public CAs we change the visible indicators to a weaker "unverified identity" level. In a first step, we could do that for S/MIME in general. Potentially, as a future enhancement, we could allow users to mark a CA as "I trust this CA to perform strong identity verification", which could then result in the stronger indicators being shown with email. Deployments could control which CAs get that stronger flag, resulting in stronger identity reliability indicators shown in email.
I think there is a hybrid approach that might work (disclaimer: I don’t use S/MIME myself):
- Mark all class 1 certificates as unverified. A class 1 certificate guarantees that your email provider has not tampered with anything, but it guarantees nothing if your peer’s email provider can tamper with stuff.
- Allow users and/or deployments to mark CAs as trustworthy for specific domains. A corporation will mark its own CA as trusted for its own domain, so internal email will be marked as trusted.
- Provide yet another indicator for publicly trusted EV and OV certificates. These presumably guarantee that the human person who has signed a message is the one you think they are.
- Encourage delegation (with name constraints) from publicly trusted CAs to corporate CAs. For instance, if Mozilla has an S/MIME CA (I don’t know if they do), DigiCert (or any other publicly trusted CA) could sign Mozilla’s root with a name constraint only allowing it to issue for
@mozilla.org
email addresses. Within Mozilla, such certificates would be marked as validated per point 2. Outside of Mozilla, they would be marked as unverified by default, but users could mark the cross-signed, name-constrained as trusted for the domains it is allowed to issue for. - Do not allow one certificate to overwrite another without prompting unless the new certificate has a higher level of validation. 2 and 3 are considered incomparable for this purpose (neither is higher than the other), at least by default.
It is worth noting that most of my focus here is on email signing, because email encryption has well-known and unfixable flaws. The only area I know of where it works well is security vulnerability reporting, and that only because there is no need for forward secrecy (the bugs will eventually be made public) and metadata leakage is not very useful to an attacker.
Updated•2 years ago
|
Description
•