Security

What is the TLS padlock saying?

Mallory is the imposter
What is the TLS padlock saying?
Alice and Bob use TLS to keep their long distance relationship hot and private.

TL;DR: skip to the conclusions to see what Alice learned

The Privacy Problem

Alice and Bob had to turn their relationship into a long distance one. They were to finally figure out how long you can play the game you hang up first before it gets old. Naturally, they also had plans for a lot of very private conversations online.

But the Mallory problem had not yet been solved (for the backstory about Mallory’s jealousy and VPNs click here). Mallory was considered a genius until the notion of emotional intelligence was discovered. He was the kind of guy who was rooting for the dinosaurs while watching Jurassic Park.

Mallory, still intent on sabotaging Alice and Bob’s relationship in order to take Bob’s place, still has a vested interest in meddling. So how could Alice and Bob establish a secure connection over an insecure network where the likes of Mallory can be found?

What TLS Does

Transport Layer Security (TLS), represented by the padlock symbol in your address bar, is a cryptographic protocol used by all browsers to protect your data in transit. It gives strong guarantees that your connection is encrypted and protected from unwanted tampering. There’s also a guarantee that the party you are connecting to is, in fact, who you think it is. However, every time you connect through an untrusted network, you are still facing the risk of a man-in-the-middle attack (MITM). 

Let’s say Alice wants to have an online chat with Bob. Mallory, being a clever fella and a sysadmin at the local Internet Service Provider (ISP), could inject himself in the middle of it: He could tell Alice that he’s Bob, and tell Bob that he is Alice. In this scenario there would be two perfectly safe TLS connections – one from Alice to Mallory, and the second from Mallory to Bob. So Alice would be sending her secret messages to Mallory, thinking that he’s Bob. Mallory would be able to decipher and read them. Then, he’d be sending them to the real Bob. Bob’s responses would also be going back to Alice through Mallory.

Trusted Third Party

Of course, Mallory’s evil software would be doing the heavy lifting here, not Mallory himself. Unfortunately, software that enables man-in-the-middle attacks is widely available to would-be hackers, so the threat is very real. The solution to MITM threats is the trusted third party that vouches for the identities of the connecting parties, making it difficult for Mallory to impersonate anyone. In fact, there is a big ecosystem called the Public Key Infrastructure which is in place to prevent MITM attacks. Each computer has a list of root certificates that are considered trusted third parties. Those certificates are put there by the OS vendor after completing a vetting process.

This solution is not without its own weaknesses though. How can we know that a trusted third party is really trustworthy?

Limitations of TLS

A lot is being done to ensure that the whole ecosystem of trusted third parties is secure, and a whole lot of sophisticated infrastructure and procedures are in place to that end. Browsers hide that complexity from the user behind the little padlock symbol in the address bar. If the padlock is there, you’re good to go. All the security checks done by the browser were successful. If the browser is displaying a warning instead, take it seriously. Never let your personal data go through a connection without a padlock.

Unfortunately, trusted third party infrastructure could be bypassed if Mallory got administrator rights to Alice’s laptop. He could then install a root certificate for his evil server. With this action, he’d be adding himself to the list of “trusted third parties” and the padlock would not warn anyone. From the browser’s perspective, a trusted third party had vouched for Mallory, so everything was fine.

Therefore, never let anyone trick you into installing a root certificate. Such a request is equivalent to letting someone unencrypt all of your traffic. Some employers, like banks, will have their root certificate preinstalled on your work computer. This is done to scan traffic for viruses and prevent data leakage. It also means that you can’t expect to have online privacy.

If you do online banking from your work computer, your employer can effectively know how much money you have. They can also read your private emails, chats, and so on. The simple solution is to not use your work computer for private things, which most companies require anyway. Use your personal computer and your personal browser for private matters.

Man in the middle

TLS Doesn’t Hide IPs

As we mentioned in the previous episode, TLS will encrypt your transmissions, but by design it doesn’t hide the IPs of the communicating parties. This means that a passive eavesdropper like sneaky Mallory can tell which IPs were contacted by other IPs and get an idea of the websites Alice and Bob have been visiting.

Someone with access to the encrypted traffic could tell when and how long she has been using YouTube, Facebook, Instagram and so on. In this particular case it doesn’t seem like a big deal, but what if those IPs belonged to a website of a mental health clinic, a suicide helpline, an alcoholics anonymous forum, a HIV+ support group or to any other sensitive site? How many explanations are there for spending an hour each day on an AA forum?

TLS gives you a lot in terms of privacy, but full deniability that certain hosts were accessed is not included. Fortunately, that kind of privacy can be gained through the combined usage of a VPN with an anonymizing proxy, a private window, and common sense. Common sense is particularly important, because no technology can stop you from voluntarily disclosing your secrets to untrustworthy people. So keep your friends close and your laptop closer.

Conclusions

  • The TLS padlock means that you have established end-to-end encryption between your browser and a website, and a “trusted third party” is asserting that a real website is associated with the given address. The connection is exactly as private as the third party is trusted. The list of trusted parties is maintained by OS vendors and the administrators of your computer. All of those institutions, theoretically, have the ability to eavesdrop on your connections.
  • If someone asks you to install a root certificate on your computer, they are effectively asking you for the right to observe all of your encrypted network traffic.
  • Some companies do “friendly MITM attacks” on the padlocked connections of their employees to perform antivirus scans or prevent data leakage. Some countries do it too. Your browser will not tell you that because, from its perspective, the identity of the eavesdropper has been vouched for by a trusted third party (trusted by an OS vendor or your computer’s admin).
  • The padlock only refers to the security of the particular connection. It says nothing about the trustworthiness of the website. In attacks known as phishing, fraudulent websites impersonate real ones in order to steal credentials. This is yet another story for another time.
  • TLS doesn’t hide metadata, such as the IPs of communicating parties or the amount of data transmitted. Therefore, even encrypted traffic might reveal a lot, e.g. that one household is frequently accessing the websites of a mental health clinic, suicide helpline, or alcoholics anonymous forum.
  • If a browser warns you that a connection is unsafe, please take it seriously. Browsers do a lot to protect your privacy online, but it only works when you cooperate.

Epilogue

What happened next? We can see that what Mallory lacks in emotional development, he makes up for in technical sophistication. Clearly, he hasn’t given up just yet. What else could he do to meddle in our lovely couple’s relationship?

Stay tuned for the next episode to find out.


User comments



Opera

You deserve a better browser

Opera's free VPN, Ad blocker, and Flow file sharing. Just a few of the must-have features built into Opera for faster, smoother and distraction-free browsing designed to improve your online experience.

Download now