On Postcards (or How Email Is Secured)

Microsoft announced significant security enhancements to our Exchange Online, Outlook.com, and Hotmail email offerings in February - MTA-STS and DANE. As a former developer on Microsoft's consumer email product, here's why that matters.

When email was originally invented, all emails flowed unencrypted over the Internet through a protocol called the Simple Mail Transfer Protocol (SMTP). Attackers able to listen to Internet traffic between our email server and our recipient's email server would be able to read our emails, just like reading what we might have written on a postcard. As disclosed by various whistleblowers over the last several decades, the intelligence community has such a capability and regularly uses it. This means that any emails we send could be read by our government, the government of the country hosting our email provider, or, in the worst case, someone else in the same coffee shop.

In response to this problem, the STARTTLS command was introduced to SMTP in 2002 to "provide private, authenticated communication over the Internet" in order to give email providers "the ability to protect some or all of their communications from eavesdroppers and attackers." Instead of a postcard, we could use envelopes to protect the contents of our message. However, to preserve backwards compatibility, email providers could choose whether they required incoming emails to be sent over a secure connection (enforced TLS), simply supported a secure connection if the sender wanted to use one (opportunistic TLS), or didn't support secure connections at all. Very few chose to require secure connections. In fact, in 2016, Gmail started notifying users if they were sending email to a email server that still didn't support secure connections to attempt to improve adoption of STARTTLS.

Even worse, the protection that we get from STARTTLS isn't the same as the protection we have when visiting web sites where our web browsers can tell the difference between my bank's web site and a web site pretending to be my bank. The SMTP protocol is vulnerable to tampering that can redirect connections to an attacker's server. In fact, senders have no way to confirm that destination server is the intended server. Our message is protected by an envelope, but we hand it to whoever claims to be the mail carrier.

As a result of these flaws, an attacker sitting between the two email providers could simply pretend to be the recipient email provider and tell the sender either "I don't support secure connections. Send the email without a secure connection" or "I am the recipient's email provider". This is bad! We still can't trust that our emails remain private; an attacker can open our envelope and read the letter and neither us nor our email provider can stop them.

This leads us to these new announcements, which are designed to fix this problem.

The SMTP MTA Strict Transport Security (MTA-STS) standard was developed to ensure that secure connections are always used by SMTP, and to provide a way for senders to refuse to deliver messages to servers they don't trust. The email provider indicates to senders that they support the new standard with a DNS record and a HTTPS web page. Email providers can look up this information before they start to send the email to your email provider and vice-versa rather than after. These protocols secure the web sites we browse every day, so they should be secure and easy for email providers to adopt. Now, we're asking the postal service who our mail carrier is and making sure we only give him or her our envelope. Gmail was the first to adopt this protocol in April 2019.

Although MTA-STS offers a much-needed upgrade to current protections, the second protocol, DNS-based Authentication of Named Entities (DANE) for SMTP, is the current gold standard for securing email communication. A really advanced attacker could still hijack the DNS lookup that's used in MTA-STS. Actually, such an attacker could do that for the web sites we visit, too. Recognizing this weakness, the Internet community has been working on a more secure version of DNS (called DNSSEC) that ensures that DNS records aren't tampered with and are authentic. When using DANE, an email sender would look up the recipient's email provider's DNS records and verify that they are authentic using DNSSEC, start a secure connection to the recipient, verify the recipient's provided information matches what would be expected based on the DNS record lookup, and only then send the message. Our attacker can no longer impersonate the postal service; we proveably know we're talking to the real postal service and that they have not lied about who our mail carrier is, we've checked the mail carrier's identification before trusting them with our letter, and we know the letter won't be opened before it gets to the recipient.

These protocols are a huge step forward in ensuring that our email communication is read only by the intended recipients, and I'm excited to see them roll out in both Microsoft's and others' products to secure the communications of billions of people.

Postscript

As a security expert, I would be remiss not to point out that our email is still not protected from all attackers, even with these new protections. Although MTA-STS and DANE ensure that email gets from you to your recipient without being modified or snooped on, emails are generally readable by both your email provider and your recipient's email provider. Google famously had a long-standing practice of scanning Gmail users' inboxes to deliver more effective advertisements (which they ended in 2017). Your email can also potentially be accessed by the employees of the email providers or governments with a legal order. In the United States, the Electronic Communications Protection Act actually allows law enforcement to obtain emails older than 180 days from email providers without a warrant! For your most sensitive communications, if you have to ensure that only one person can read your communication, an encrypted messaging app like Signal, encrypted messages within Skype, or encrypted email in Outlook or Outlook.com might be more suitable.

plaintextoffenders:

netgear.com

Computer equipment

Editor's Note: Not our first NetGear domain.

It's two years later and their user account passwords are still in plaintext. And these guys make routers. Where, you know, security is important and stuff.

The National Security Agency director and three past National Security Agency directors, a former CIA director, a former Homeland Security secretary have all said that they're much more sympathetic with Apple in this case.

— Richard Clarke, former counterterrorism official. (via NPR)

Last Week Tonight with John Oliver covers encryption, and man does he do a good job.

The path to hell starts at the backdoor, and we need to make sure that encryption technology remains strong.

Brad Smith, Chief Legal Officer, Microsoft

We are not Charlie, in other words, because we risk so little for what we claim to value so much.

— Philip Gourevitch, The Life-Giving Defiance of the Charlie Hebdo Cartoonists

A few years ago we did a complete analysis of our entire network. Cyber engineers found out that the system is extremely safe and extremely secure in the way it's developed.

— ICBM forces commander Major General Jack Weinstein

This is at least in part due to the fact that 8" floppy disks are involved in launching a nuclear missile.

The response of those who are worried about surveillance has so far been too much couched, it seems to me, in terms of the violation of the right to privacy. Of course it's true that my privacy has been violated if someone is reading my emails without my knowledge. But my point is that my liberty is also being violated, and not merely by the fact that someone is reading my emails but also by the fact that someone has the power to do so should they choose. We have to insist that this in itself takes away liberty because it leaves us at the mercy of arbitrary power. It's no use those who have possession of this power promising that they won't necessarily use it, or will use it only for the common good. What is offensive to liberty is the very existence of such arbitrary power.

— Quentin Skinner, Liberty, Liberalism and Surveillance: A Historic Overview (via Three Things I Learned From the Snowden Files)

At a press event today in New York and San Francisco, we announced and previewed a selection of new Windows Live Hotmail features that will be rolling out to users in the coming month, including better tools for managing newsletters like unsubscribe and scheduled inbox cleanup, improvements to flagging, custom categories for filters and quickviews, a new Android app with full email, contact, and calendar syncing, and my favorite, instant actions that appear when hovering over messages. The official blog post has details a few of these, WinRumors has a writeup with some other details and screenshots, and http://anotherlookathotmail.com has video of the new features in action along with facts and stats, performance numbers, info on security, and why you should give Hotmail another look.

Love is the ultimate outlaw. It just won't adhere to any rules. The most any of us can do is to sign on as its accomplice. Instead of vowing to honor and obey, maybe we should swear to aid and abet. That would mean that security is out of the question.

Tom Robbins

Console Hacking 2010 (via Joystiq)

Hackers fully crack the PS3's encryption scheme because Sony failed to use a random number in the right place in the encryption algorithm. (Start at 35:47).