Web Security

Introducing HTTPS Downgrade

Web Security

Check out a free preview of the full Web Security course

The "Introducing HTTPS Downgrade" Lesson is part of the full, Web Security course featured in this preview video. Here's what you'd learn in this lesson:

Mike describes HTTPS downgrade, which is a variant of the Man-in-the-Middle attack where the attacker acts a proxy between the user and the secure server.


Transcript from the "Introducing HTTPS Downgrade" Lesson

>> Mike North: Let's say that, we get this certificate in place, right? We get this certificate in place, we're serving over HTTPS. What we want to see is, like now that we should distribute links that are HTTPS, we should encourage users to visit our new secure URL. But what can happen is a man in the middle can stage what is called a HTTPS downgrade attack.

So it's fantastic that everyone's moving to HTTPS, we're at 56%. We're moving more and more towards a fully-encrypted web. And what do you do about those plain HTTP connections is typically, you just want to redirect users from HTTP to HTTPS. This is our raising awareness marketing material to try to get people to bother to setup a certificate.

And to use a secure connection to their users, so this seems great. But you should still have plain HTTP links, right, they have bookmarks. Occasionally, people still spread these. Occasionally, they still pop in search results. And that initial request comes over HTTP, and this is what we do.

This is how we typically handle that. You ask for HTTP, I'm going to redirect you. A 301 redirect is a permanent redirect. So that basically tells the browser, I'm sending you here and remember for next time, I'm always going to send you here. You can in the future, just go straight there, don't bother to ask me for directions.

However, what if we get into the middle of this as an attacker. What we can do is stage this attack. This is called HTTPS Downgrading. There's a library that is basically, made for this called SSL Strip, or SSL Split is another one. But the idea is, we maintain an insecure session with the user.

And maintain a secure session with the server. So we're actually, the ones that are communicating securely with the server. And the server will think that it has an https connection to the client. It will say everything looks good. I'm encrypting everything. Someone's listening on the other side, but it's really the attacker.

And then, we're basically creating insecure proxy that downgrades that connection to an insecure one. And then, of course we can mend in the middle both ways. Because in this situation, we're holding that session key it was us who initiated that TLS handshake. It was us, the attacker who has created a means of securely communicating with the server.

And so, we can man in the middle this way as well as we ever could. So for people out there, for your users, you want to encourage them to try and not get into this situation.

Learn Straight from the Experts Who Shape the Modern Web

  • In-depth Courses
  • Industry Leading Experts
  • Learning Paths
  • Live Interactive Workshops
Get Unlimited Access Now