Email Security II
Total Page:16
File Type:pdf, Size:1020Kb
Email Security 1 / 43 Secure Email General Strategy Some Details Transit Issues Signing Headers General Flow Securing Transit Mail Steps MTA to MTA Security Secure Email Traffic Analysis PGP and S/MIME Spam Phishing 2 / 43 General Strategy Secure Email ■ General Strategy Basic scheme is pretty straight-forward Some Details ■ Transit Issues Encrypt the message body with a symmetric Signing Headers cipher, using a randomly-generated traffic key General Flow ■ Securing Transit Use public key cryptography to encrypt the Mail Steps MTA to MTA traffic key to all recipients Security ■ Traffic Analysis Digitally sign a hash of the message PGP and S/MIME ■ But there are many details Spam Phishing 3 / 43 Some Details Secure Email ■ General Strategy Obvious ones: which symmetric, public key, Some Details Transit Issues and hash algorithms to use? Signing ■ Headers More subtle: which algorithms do the General Flow Securing Transit recipients understand? Mail Steps ■ MTA to MTA Where do certificates come from? Security ■ Traffic Analysis Do you sign the plaintext or the ciphertext? PGP and S/MIME ■ How do you handle BCC? Spam ■ Phishing Will the ciphertext survive transit intact? ■ How are header lines protected? ■ What about attachments? ■ Many possible answers to all of these questions 4 / 43 Transit Issues Secure Email ■ General Strategy Not all mail systems accept all characters Some Details ■ Transit Issues Very few are 8-bit clean Signing ■ Headers Cryptographic transforms won’t survive even General Flow Securing Transit minor changes Mail Steps ■ MTA to MTA EBCDIC vs. ASCII? Unicode? Tabs versus Security Traffic Analysis blanks? PGP and S/MIME ■ Solution: encode all email in base 64, using Spam Phishing characters all systems accept: A-Za-z0-9+/ ■ Use 4 bytes to represent 3; overhead is 33% ■ For padding, use = sign (see RFC 3548) ■ Only those characters matter; everything else is deleted on receipt, including white space 5 / 43 Signing Secure Email ■ General Strategy If you sign the plaintext and then encrypt, the Some Details Transit Issues sender’s identity is hidden from all except the Signing Headers proper recipients General Flow ■ Securing Transit If you sign the ciphertext, a gateway can verify Mail Steps MTA to MTA signatures and present mail accordingly — Security Traffic Analysis perhaps better for anti-spam and anti-phishing PGP and S/MIME Spam Phishing 6 / 43 Headers Secure Email ■ General Strategy Headers change in transit Some Details ■ Transit Issues Obvious example: Received: lines are added Signing ■ Headers Less-obvious example: Email addresses are General Flow Securing Transit often rewritten to hide internal machines, and Mail Steps MTA to MTA present clearer addresses to the outside: Security → Traffic Analysis [email protected] [email protected] PGP and S/MIME ■ Consequence: headers are not protected by Spam Phishing secure email schemes ■ But — users look at (and search on) the headers 7 / 43 General Flow Secure Email ■ General Strategy Collect input message Some Details ■ Transit Issues Put in canonical form Signing ■ Headers Encrypt and sign, or sign and encrypt General Flow ■ Securing Transit Add metadata: encrypted traffic key, your Mail Steps MTA to MTA certificate, algorithm identifiers, etc. Security ■ Traffic Analysis Convert to transit form PGP and S/MIME ■ Embed in email message Spam Phishing 8 / 43 Securing Transit Secure Email ■ General Strategy Many pieces — but we can usually use TLS Some Details ■ Transit Issues POP, IMAP, connection to submission server: Signing Headers all are by prearrangement General Flow ■ Securing Transit Protect content; more important, protect Mail Steps MTA to MTA passwords Security ■ Traffic Analysis Problem area: road warriors vs. firewalls and PGP and S/MIME anti-spam Spam Phishing 9 / 43 Mail Steps Secure Email General Strategy 1. Normal process: user composes mail on MUA; Some Details Transit Issues submits it to local submission server. Signing Headers 2. Optional internal hops General Flow Securing Transit 3. Outbound MTA contacts recipient’s MTA — Mail Steps MTA to MTA interorganizational hop Security Traffic Analysis 4. Optional internal hops to recipient’s mail PGP and S/MIME server (IMAP or POP) Spam Phishing 5. IMAP or POP retrieval 6. How do we protect Step 3? 10 / 43 MTA to MTA Security Secure Email ■ General Strategy Do we need to protect it at all? Some Details ■ Transit Issues These are hard-to-tap links: phone company Signing Headers fiber, ISP backbones, etc. General Flow ■ Securing Transit What about government wiretaps? Mail Steps ■ MTA to MTA Can use TLS — but what is the other side’s Security Traffic Analysis key? No PKI for Internet email! PGP and S/MIME ■ One answer: don’t worry; it’s still better than Spam Phishing cleartext against passive eavesdroppers ■ But — what about routing attacks? 11 / 43 Traffic Analysis Secure Email ■ General Strategy Another reason to secure transit: traffic Some Details Transit Issues analysis Signing ■ Headers Protect against traffic analysis — who is General Flow Securing Transit talking to whom Mail Steps ■ MTA to MTA Also: length, timing Security ■ Traffic Analysis In practice, extremely valuable for law PGP and S/MIME enforcement and intelligence agencies Spam ■ Phishing Less protected by US law 12 / 43 Secure Email PGP and S/MIME Approaches to Protecting Content Certificate Style Web of Trust Does the Web of Trust Work? Finding Public Keys Which Style is Better? PGP and S/MIME Spam Phishing 13 / 43 Approaches to Protecting Content Secure Email ■ Two major standards, PGP and S/MIME PGP and S/MIME Approaches to ■ Protecting Content Many minor syntactic differences Certificate Style ■ Web of Trust Major split by audience: computer scientists Does the Web of Trust Work? like PGP; mainstream users use S/MIME Finding Public Keys Which Style is ■ Biggest technical difference: how certificates Better? Spam are signed Phishing 14 / 43 Certificate Style Secure Email ■ S/MIME uses standard X.509 certificate PGP and S/MIME Approaches to Protecting Content format Certificate Style ■ Web of Trust More importantly, X.509 certificates form a Does the Web of Trust Work? traditional PKI, with a root and a hierarchical Finding Public Keys Which Style is structure Better? ■ Spam Works well within an organization Phishing ■ Between organizations, can work if it’s easy to find that organization’s root ■ CU has no PKI — what is the PKI under which you’d find my cert? Why should you trust its root? 15 / 43 Web of Trust Secure Email ■ PGP use a “web of trust” — rather than a PGP and S/MIME Approaches to Protecting Content tree, certificates form an arbitrary graph Certificate Style ■ Anyone Web of Trust can sign a certificate Does the Web of ■ Trust Work? Most people have more than one signature — Finding Public Keys Which Style is I have 65 signatures on my primary PGP key Better? ■ Spam Do you know and trust any of my signers? Phishing ■ See my key at http://www.cs.columbia.edu/~smb/smbpgp.txt 16 / 43 Does the Web of Trust Work? Secure Email ■ Number of signatures alone is meaningless; I PGP and S/MIME Approaches to Protecting Content can create lots of identities if I want Certificate Style ■ Web of Trust I can even forge names — is the “Angelos Does the Web of Trust Work? Keromytis” who signed my key the same one Finding Public Keys Which Style is who’s a professor here? How do you know? Better? ■ Spam There are at least six PGP keys purporting to Phishing belong to “George W. Bush”. One is signed by “Yes, it’s really Bush!” ■ You have to define your own set of trust anchors, as well as policies on how long a signature chain is too long 17 / 43 Finding Public Keys Secure Email ■ Many mailers cache received certificates PGP and S/MIME Approaches to ■ Protecting Content Some organizations list people’s certificates in Certificate Style Web of Trust an LDAP database Does the Web of ■ Trust Work? Some people have them on their web site Finding Public Keys ■ Which Style is For PGP, there are public key servers — Better? Spam anyone can upload keys Phishing ■ Is that safe? Sure — the security of a certificate derives from the signature, not from where you found it 18 / 43 Which Style is Better? Secure Email ■ PGP was easier to start — it doesn’t need an PGP and S/MIME Approaches to Protecting Content infrastructure Certificate Style ■ Web of Trust Many security and network conferences have Does the Web of Trust Work? “PGP key-signing parties” Finding Public Keys ■ Which Style is S/MIME is better for official use — it makes it Better? Spam clearer when someone is speaking in an Phishing organizational role, since the organization issued the certificate. ■ Both have usability issues, though PGP is probably worse 19 / 43 Secure Email PGP and S/MIME Spam Spam Originating Machines Effective Defenses Today’s Defenses Blacklisting Port 25 Blocks Origin Spam Authentication SPF Records DKIM Authentication The Real Issue with Origin Authentication Semantic and Keyword Filters Charging for Email Phishing 20 / 43 Spam Secure Email ■ We all know what it is. PGP and S/MIME ■ Spam Defending against it is very hard Spam ■ Originating It is unlikely that the problem will ever go away Machines Effective Defenses Today’s Defenses Blacklisting Port 25 Blocks Origin Authentication SPF Records DKIM Authentication The Real Issue with Origin Authentication Semantic and Keyword Filters Charging for Email Phishing 21 / 43 Originating Machines Secure Email ■ Originally from the spammer’s own machines PGP and S/MIME Spam — those were blacklisted Spam ■ Originating Next: open relays — those have mostly been Machines Effective