[00:00.000 --> 00:07.260] Hello, hello, and welcome to HTTP 1.1 Must Die, the desync endgame. [00:08.340 --> 00:13.160] Have you ever had a good thing that went a bit too far? [00:13.160 --> 00:16.400] Maybe you got more than you bargained for. [00:16.500 --> 00:24.520] This is the fourth year that I've spent researching HTTP desync attacks, and so I thought I knew what I was going to find. [00:24.520 --> 00:38.380] The plan was to neatly wrap up a well-understood attack class, by finding some weird bugs and niche flaws in obscure systems, the long tail of desync attacks. [00:38.440 --> 00:45.100] But what I actually discovered changed both my perspective and the title of this presentation. [00:46.100 --> 01:02.980] So today, in this session, I'm going to share tools and techniques to enable you to embrace the never-ending horror of HTTP 1.1, navigate the desync endgame, and convince the rest of the world that it's time for HTTP 1 to die. [01:03.220 --> 01:11.220] This started back in 2019, when I realized that H1 has a fatal flaw. [01:11.220 --> 01:17.120] The isolation between individual HTTP requests is fundamentally broken. [01:17.120 --> 01:24.000] There's no single reliable way to tell where one request finishes and the next request starts. [01:24.000 --> 01:34.920] So an attacker who finds the tiniest parser discrepancy between the frontend and backend server can cause a desync, enabling complete site takeover. [01:35.620 --> 01:46.420] And with HTTP 1 being an old, lenient, text-based protocol with thousands of different implementations, finding parser discrepancies was not hard. [01:46.420 --> 01:52.580] At the time, it felt like you could hack pretty much any website you wanted to. [01:52.580 --> 02:01.560] For example, I was able to show this could be exploited to get persistent control over PayPal's login page twice. [02:02.200 --> 02:04.580] But we knew what the solution was. [02:04.580 --> 02:13.580] If we deployed HTTP 2 for the upstream connection between the frontend and backend, then we could almost eliminate the entire attack class. [02:14.440 --> 02:17.440] So six years later, what actually happened? [02:17.440 --> 02:19.580] Well, we didn't do that. [02:19.580 --> 02:32.500] We have started using H2 for the connection between the client and the frontend, but then most servers just downgrade that request to H1 to talk to the backend, and that conversion actually makes the threat worse. [02:33.520 --> 02:38.060] And then because we could see, well, okay, maybe that's not ideal. [02:38.060 --> 02:40.180] Yes, some things are getting hacked. [02:40.180 --> 02:45.380] We decided to bolt on the ultimate security measure, regular expressions. [02:46.260 --> 02:49.280] The result is a mess. [02:49.280 --> 02:52.740] Here's a classic desync detection probe. [02:52.740 --> 03:04.820] You send two requests, and if the target is vulnerable, the first one poisons the connection to the backend, so the second request gets prefixed with the text shown in orange. [03:05.460 --> 03:14.180] Now, if you try this technique on a modern site, chances are the attack will fail even if they're actually vulnerable. [03:14.180 --> 03:24.320] That's because it will get blocked by multiple regular expressions, or the gadget might not work on that target, or it might get missed due to the race condition involved in that technique as well. [03:24.360 --> 03:31.920] And there's an alternative timeout-based approach that avoids the race condition issue, but it gets blocked by even more regular expressions. [03:32.880 --> 03:39.680] So to summarize, over the last six years, the industry has patched the detection methodology. [03:39.680 --> 03:45.740] They've patched the scanning tools, they haven't fixed the actual vulnerability. [03:46.060 --> 03:56.420] This has created the desync end game where everything looks secure until you make the tiniest change to your approach. [03:56.420 --> 03:59.140] Let's take a look at an example. [03:59.680 --> 04:08.600] A few months ago, I got an email from Vans saying he'd found a puzzling vulnerability and would like to know my thoughts about what was happening. [04:08.600 --> 04:14.000] The attack that he was trying to do was a pretty standard technique. [04:14.000 --> 04:25.660] You send a request that looks like this, gets downgraded to H1, poisons the connection to the back end, and the next person to access the affected site gets redirected to his server. [04:26.140 --> 04:36.800] And that redirection would get saved in a cache, enabling persistent cache poisoning of JavaScript files and giving persistent control over every page on the site. [04:37.400 --> 04:50.780] And the attack was working absolutely fine except for one small thing, which is that the users that we were seeing being hijacked weren't actually trying to access the target website. [04:50.780 --> 04:57.820] They were trying to access random other websites, including things like banks, which is a bit weird. [04:58.300 --> 05:02.560] So, clearly, the server setup doesn't look like this. [05:02.560 --> 05:22.280] And after seeing what infrastructure the target site was on, my first guess was that this was a desync between the CloudFlare front end and Heroku's reverse proxy, which would mean we were exploiting random websites hosted on the Heroku platform. [05:22.980 --> 05:27.860] And that was plausible, but actually completely wrong. [05:27.860 --> 05:29.680] It's not that simple. [05:29.940 --> 05:40.520] So, I realized this when I tried to replicate his attack and went, hang on, this attack is getting blocked by CloudFlare's cache. [05:40.520 --> 05:43.980] So, the attack isn't actually reaching the backend server. [05:43.980 --> 05:46.820] So, there's no way that this could possibly work. [05:46.920 --> 05:51.300] But when I corrected his mistake, the attack stopped working. [05:51.440 --> 05:55.340] And I replied back in an email and said, it's not working for me. [05:55.340 --> 05:56.760] And he said, are you sure? [05:56.760 --> 06:03.460] And I went back and I tried his broken version of the attack and it actually worked fine when you did it like that. [06:03.460 --> 06:09.340] So, what that means is that Heroku has nothing to do with this. [06:09.340 --> 06:18.180] There was a period of time during which if you tested any website on CloudFlare and you did it correctly, you wouldn't find anything. [06:18.180 --> 06:32.760] But if you forgot to specify a cache buster, well, then you'd cause a desync inside CloudFlare's own infrastructure, enabling you to persistently compromise almost every website using CloudFlare. [06:32.820 --> 06:35.800] This is the desync endgame. [06:35.800 --> 06:43.260] Everything looks secure, but if you do one slightly wrong, you can end up hacking 24 million websites. [06:44.900 --> 06:46.960] How do bugs like that even happen? [06:46.960 --> 06:53.500] Well, partly it's the excessive complexity of the systems involved. [06:53.500 --> 07:07.400] For example, in this case, we know CloudFlare is receiving a request over H2, converting it to H1 for internal use and then converting it back to H2 again to talk to the upstream, which is obviously not ideal. [07:07.400 --> 07:12.540] But the underlying problem comes from the foundation. [07:13.200 --> 07:24.300] There's this idea that HTTP 1 is a simple protocol and that makes it a secure foundation for whatever arbitrarily complex system you want to build. [07:24.300 --> 07:30.780] But the truth is that as soon as you start to proxy H1, it gets really quite complex. [07:31.200 --> 07:41.840] To illustrate that, here's five lies that I used to personally believe and every one of these is going to be used for an exploit in this presentation. [07:44.240 --> 08:08.800] When combined, the last three lies here taken together mean that your proxy needs state just to read in the correct number of bytes off the TCP socket from the backend server and you need special casing just to read in the headers before you even get to the body and the entire response may arrive before you've even received the complete request from the client. [08:09.300 --> 08:10.900] This is HTTP 1. [08:10.900 --> 08:22.620] It's the foundation of the web and it's composed of landmines that routinely expose millions of websites and we've spent six years demonstrating that we're not able to fix it. [08:22.620 --> 08:24.500] It needs to die. [08:24.920 --> 08:27.320] So, how do we kill it? [08:27.560 --> 08:38.100] Well, we need to collectively show the world that HTTP 1.1 is insecure and that more desync attacks are always coming. [08:38.200 --> 08:41.340] And in the rest of this session, I'll show you how to do that. [08:41.700 --> 08:51.840] First, I'm going to introduce a new toolkit to handle the desync end game and then I'll introduce two entire new classes of attack exposing a few million more websites. [08:52.120 --> 09:03.080] Then I'll take a focused look at how we can escape this situation and wrap up and take some and take some questions at the back. [09:03.480 --> 09:08.500] Now, during this session, I'm going to be roughly following the research journey. [09:08.500 --> 09:15.640] So, towards the start, we're going to be gaining knowledge, but not very much by way of bug bounties. [09:15.640 --> 09:24.800] And then towards the end, as the knowledge that we've gained takes us further beyond the state of the art, things are going to rapidly get a lot more profitable. [09:25.420 --> 09:30.740] All bounties in this presentation were split equally between everyone involved. [09:30.740 --> 09:43.840] A hundred percent of my cut of the bounties has been doubled by Port Swigger and donated to a local charity and all vulnerabilities in named targets have been resolved. [09:45.220 --> 09:50.960] So, how do you win in the end game when there's regexes everywhere? [09:50.960 --> 09:57.020] Well, what you need is a reliable way to detect parser discrepancies. [09:57.100 --> 10:02.480] And back in 2021, in a presentation at Black Hat Europe, Daniel Thatcher gave us one. [10:02.480 --> 10:15.820] And I was so hyped by this talk that I took the concept and I implemented an extra powerful version in HTTP request smuggler version 3, which I've just released. [10:15.820 --> 10:22.820] This is an open source burp suite extension fully compatible with the free version. [10:22.840 --> 10:35.260] What it does is it uses a broad range of techniques to analyze and classify how the front end and back end are parsing the request and find discrepancies. [10:36.280 --> 10:51.580] For example, on this target, by looking at simply the status codes, we can see that if we use a space to mask a host header, then we get a unique result that's different to what we get if we just leave the host header out entirely. [10:51.580 --> 10:56.020] And just from that, we can infer that we found a parser discrepancy. [10:56.280 --> 11:07.100] This particular one I will call a visible hidden discrepancy because the masked header is visible to the front end but hidden from the back end. [11:07.720 --> 11:17.320] That scenario can usually be exploited to cause a CL0 desync simply by hiding the content length header as shown here. [11:17.960 --> 11:31.500] But crucially, if you run into any issues when you're trying to convert it into a desync like that, well, you can adapt and overcome those problems because you know the underlying flaw. [11:31.760 --> 11:37.060] For example, on a different target, they were blocking get requests when they had a body. [11:37.060 --> 11:42.120] But I was able to bypass that simply by switching the method to options. [11:42.120 --> 11:48.420] It's that kind of versatility that makes this detection approach so valuable. [11:49.100 --> 11:55.460] It also achieves pretty good coverage by combining different headers, permutations and strategies. [11:55.460 --> 12:11.580] For example, in this one here, we're still using the host header and we're still using a leading space to hide the host header but this time we're using a duplicate host header with a malformed value to reveal the issue. [12:11.580 --> 12:18.600] And in this example, that's revealed a desync on a web VPN used by a bank. [12:19.580 --> 12:23.860] This system even lets you predict vulnerabilities. [12:24.100 --> 12:31.540] For example, the RFC says you're allowed to accept a slash end by itself as a line terminator. [12:31.540 --> 12:37.020] And the tool has detected on this target, they're not doing that. [12:37.020 --> 12:44.800] Which means if you place that server behind an RFC compliant proxy, there's a good chance it will be vulnerable. [12:44.800 --> 12:51.600] And we were able to trace that issue back to the underlying library and a patch is on the way. [12:52.160 --> 12:58.140] The tool also flagged a whole load of servers running IIS behind Amazon's application load balancer. [12:58.520 --> 13:04.700] As you can infer from the server banners here, this discrepancy is a hidden visible one. [13:04.700 --> 13:07.280] So it's the opposite way around. [13:07.280 --> 13:10.920] It's the front end that doesn't see the masked header. [13:11.380 --> 13:16.060] Now, these targets are protected by AWS desync guardian. [13:16.060 --> 13:19.840] And when I saw that, I thought, oh, this thing's a bit of a pain to deal with. [13:19.840 --> 13:23.260] So I just put it on the shelf and thought I'd come back to it later. [13:23.940 --> 13:34.860] And while it sat on my shelf, Thomas Stacey independently discovered the same issue and bypassed desync guardian for a full exploit on those targets. [13:35.520 --> 13:44.580] The interesting thing is that even now that his bypass has been fixed, they haven't actually fixed the parser discrepancy. [13:44.580 --> 13:53.920] So these systems are still vulnerable to header injection and to patch that, you have to change a couple of settings on your front end. [13:54.060 --> 14:00.140] Now, when I saw that, I went to AWS and said, hang on, why don't you just change these settings by default? [14:00.140 --> 14:02.060] Why not make it secure by default? [14:02.700 --> 14:15.000] And they said, well, some of their clients are using ancient HTTP clients which send malformed requests and they couldn't possibly break those clients. [14:15.520 --> 14:19.420] So that's why things are vulnerable by default. [14:19.420 --> 14:27.840] Basically, when you use a cloud proxy, you're importing other people's technical debt into your own infrastructure. [14:29.100 --> 14:34.000] This finding is where things started to go off on a little bit of a tangent. [14:34.080 --> 14:39.620] And I'm quite sad I can't name it because we're going to be talking about this one target for the next ten minutes. [14:39.960 --> 14:42.900] It's another hidden visible scenario. [14:42.900 --> 14:47.480] And the obvious exploit of using transfer encoding doesn't work. [14:47.620 --> 14:53.380] So it forced me to ask, well, how do you cause a desync on this? [14:53.380 --> 14:57.000] What happens if you smuggle a content length header? [14:57.420 --> 15:03.980] That would be a zero CL desync and these are widely regarded as impossible. [15:04.100 --> 15:15.920] That's because when the front end doesn't see the content length header, it only forwards the header block to the back end and then the back end ends up timing out while waiting for the body to arrive. [15:16.460 --> 15:26.820] In other words, as soon as you try the attack, you get a server side deadlock, which is great for taking down servers, but not very useful for desync attacks. [15:28.120 --> 15:33.840] Last year, while researching timing attacks, I stumbled on the solution. [15:34.280 --> 15:49.900] Whenever I tried to time how long it would take to load a static file served by NGINX, I would get a negative time stamp because NGINX was responding to my request before I'd actually finished sending it. [15:50.140 --> 16:01.560] This was a massive nuisance at the time, but it showed that sometimes servers respond to incomplete requests, which is something that would let us escape this deadlock. [16:01.780 --> 16:07.420] However, the target isn't running NGINX, it's running IIS. [16:07.560 --> 16:13.340] So how do we make IIS respond early to our request? [16:16.180 --> 16:18.100] Documentation is a wonderful thing. [16:18.400 --> 16:21.120] And this is an example of why. [16:21.300 --> 16:32.840] On Windows, if you use one of the following names for a file or a folder, the operating system will think you're referring to a device driver or something like that and then just blow up. [16:32.880 --> 16:36.120] So what happens if you hit that path on a server? [16:36.400 --> 16:47.120] Well, you hit a special code path which makes the server respond early without waiting for the body to arrive, thereby escaping the deadlock. [16:47.380 --> 16:59.040] That means that when the next request arrives, the back end will chop some data off the start of the request and you'll probably get a 400 bad request response. [16:59.680 --> 17:05.260] Seeing this happen was quite an emotional moment for me for two key reasons. [17:05.260 --> 17:11.920] Firstly, I'd known about that slash con feature for over ten years. [17:11.920 --> 17:15.580] But this was the first time I'd actually been able to make use of it. [17:15.980 --> 17:32.340] And secondly, over the last six years, while researching desync attacks, I'd seen so many mysterious bad request responses that I actually made my tool report them as mystery 400 findings. [17:32.340 --> 17:38.340] And this was the moment when I realized that all of those findings were probably actually exploitable. [17:39.160 --> 17:47.700] So if you find a zero CL desync scenario, to make it work, the first thing you need is an early response gadget. [17:48.400 --> 17:54.380] Next up, we need to get beyond that bad, the bad request response to something more promising. [17:54.380 --> 18:07.220] And you can do that by nesting a second request line inside the header block of the second request and adjusting the content length of the first request to slice out the data before it. [18:07.600 --> 18:20.220] This proves that there's a zero CL desync, but it's not a realistic attack because our victim is not going to conveniently contain a payload to exploit themselves inside their own request. [18:20.760 --> 18:28.400] What we need is a way to add our payload to their request instead of just chopping bits off. [18:28.560 --> 18:32.180] And we can do that with a double desync. [18:32.220 --> 18:34.820] This is where things get a tiny bit complex. [18:34.820 --> 18:54.260] So this is a two-stage attack where the first request from the attacker causes a zero CL desync that weaponizes the second request that also comes from the attacker to cause a CL zero desync that means the third request from the victim gets exploited. [18:54.500 --> 19:15.800] This is the cleanest conceptual way to do it where you simply chop the headers off the second request but in practice this rarely actually works because front ends tend to inject extra headers to requests before forwarding them to the back end which makes all your length calculations incorrect. [19:16.540 --> 19:36.860] I'm releasing a script which works out the length of the injected header but unfortunately these headers often contain values like your IP address which means even if you can identify the offset your attack will work perfectly for you but then break as soon as you give it to someone else. [19:37.440 --> 19:40.240] Fortunately there's a better way. [19:41.160 --> 19:53.700] Most servers inject headers at the end of the header block so that means that if your payload starts before that your attack although it now looks quite ugly will be a lot more reliable. [19:53.820 --> 20:13.660] In this example here I'm just chaining the desync with a input reflection on the website to reveal the value of the injected header but by then chaining that with the head technique to merge two responses into one I was able to serve malicious JavaScript to random live users of the website. [20:14.280 --> 20:27.980] There was a race condition involved in this which caused me a huge amount of pain but basically it just meant the attack would work reliably as long as you were sending a few hundred requests per second. [20:28.820 --> 20:40.560] Now things got a bit involved there but the good news is we've just published a web security academy lab so you can practice that technique yourself on a live system for free. [20:40.960 --> 20:46.980] And in about a week's time I'll be attempting to do a live demo showing how to solve that lab. [20:47.920 --> 21:06.600] Now with that technique we were able to exploit a reasonable number of targets with the best payout coming from XNS and notably most of those targets were vulnerable because they had a web application firewall. [21:06.600 --> 21:13.660] They would have been secure if they had not deployed that web application firewall in front of their website. [21:15.100 --> 21:28.800] Now at this point I thought great we're done the desync threat is finally fully mapped and any future issues will be weird niche problems rather than big class breaks and I can finally start to research something else. [21:28.940 --> 21:33.460] This is a mistake that I make every single year. [21:33.680 --> 21:44.980] It took the next discovery for me to finally realize the truth which is that more desync attacks are always on the way. [21:46.660 --> 21:58.320] Back in 2022 I tried out exploiting the expect header but I didn't find anything but as it turns out I wasn't looking close enough. [21:58.620 --> 22:19.720] The first clue that the expect header is something special is that it instantly broke turbo intruder which is my HTTP client and fixing it introduced a ton of complexity and if something introduces complexity for a client or for a server it's always way worse for a proxy. [22:20.440 --> 22:28.580] Expect is supposed to break sending a request into a two-part process so the client can bail early in order to save bandwidth. [22:28.580 --> 22:37.660] No browsers support it but because it's in the RFC and has been since forever virtually all servers attempt to support it. [22:38.240 --> 22:52.420] But because it introduces statefulness into a core area of the logic that didn't previously need it, it raises a load of questions about edge cases and basically when you send this header things go wrong. [22:53.000 --> 23:10.180] For example on this site the head request which is a special case works fine and the expect header which is a special case works fine but you combine the two and the server forgets about the first special case, tries to read too many bytes from the backend server and deadlocks. [23:10.640 --> 23:27.700] Now that's the kind of flaw that you could predict but you'll also find some more unexpected discoveries such as the fact that on multiple different web servers if you send the expect header they just leak memory including secret keys. [23:28.040 --> 23:36.000] When I went to report that particular one I found they'd just deleted their bug bounty program which is not ideal. [23:37.320 --> 23:56.540] Now because the expect header triggers two header blocks and all other responses have one, it often breaks attempts by front end servers to strip sensitive headers in order to hide them from end users and thereby it reveals internal headers. [23:56.540 --> 24:08.580] And this technique works on everything on the Netlify CDN and when I went to report that to them they said this is actually a feature but they did pay me for it. [24:08.580 --> 24:13.160] But I don't think they fixed it so if you need any of those values it might come in useful. [24:14.200 --> 24:24.780] Now around this time I got a message from a small team of full time bounty hunters who had also noticed the expect header making interesting things happen. [24:25.280 --> 24:31.260] And this kind of made me panic because in general a research collision is not good news. [24:31.260 --> 24:40.600] In fact we lost a potential Defcon presentation this year on SAML exploitation thanks to a different research collision. [24:41.040 --> 24:54.580] But this issue hadn't been published yet and since I knew these people from their research on T0 request smuggling and they already knew the technique, I figured we might as well team up. [24:54.580 --> 25:01.040] With my help hopefully they'd make more money and with their help I should end up with more case studies. [25:01.180 --> 25:02.860] This was a good decision. [25:03.200 --> 25:12.600] We quickly found that by sending a normal valid expect header you get a zero CLD sync on a whole lot of targets. [25:12.600 --> 25:15.500] So I'm going to focus on two in particular. [25:16.120 --> 25:27.820] On this one, this was just a great interaction because T-Mobile gave us a $12,000 payout even though it only affected a single pre-production server. [25:28.500 --> 25:46.160] And on this target it only worked if you obfuscated the expect header value by adding a single character and the vulnerable domain holds the attachments to the vulnerability reports sent to GitLab's bug bounty program. [25:47.120 --> 25:50.340] Which obviously would be quite nice to see some of those, wouldn't it? [25:50.900 --> 25:55.580] So on this target we opted to go for response queue poisoning. [25:55.580 --> 26:10.860] This is a truly glorious attack where you smuggle two complete requests which makes the server lose track of which response is meant to go to who and just sends everyone random responses intended for other users. [26:11.280 --> 26:29.380] Now it can be quite hard on low traffic servers like that target but we persisted and after sending 27,000 requests we got access to someone else's private vulnerability report and a respectable $7,000 payout off GitLab. [26:30.240 --> 26:38.220] Using similar techniques elsewhere we got some really quite nice bounties that I can't talk about taking the total to over 100K. [26:38.700 --> 26:43.000] The expect header also causes CL0 desyncs. [26:43.000 --> 26:47.020] Basically if you send expect everything that might go wrong does. [26:47.260 --> 26:55.840] So this one affects every single website on our favorite, the Netlify CDN. [26:55.840 --> 27:08.880] And once again we've got response queue poisoning but this time it's affecting the entire CDN so it's hijacking a continuous stream of responses from over a million different websites. [27:09.440 --> 27:27.240] Now we found this vulnerability on a particular Netlify user that has their own bounty program but because we were hijacking responses from so many websites we couldn't actually get a response from that target which was a bit annoying because it meant we couldn't report it to them. [27:27.600 --> 27:33.980] And then the issue mysteriously stopped working so we said okay let's just report it to Netlify. [27:34.320 --> 27:43.420] And they said websites using Netlify are not in scope and didn't pay us anything which was a bit disappointing. [27:43.700 --> 27:57.420] And normally when I have a bad bounty experience I don't talk about it because it just distracts everyone from the technical content but this particular one is useful context as to something that happened shortly later. [27:58.820 --> 28:04.960] This is the last desync attack in this presentation and it's a special one. [28:05.080 --> 28:16.860] It gave us full control over auth.lastpass.com letting us serve content from entirely different websites on there and letting us their maximum bounty but there was more to it. [28:16.860 --> 28:21.420] This technique worked on a large number of websites. [28:22.120 --> 28:31.200] There's a few select sites where if you find that you can hack them you know that you're on to something really good. [28:31.640 --> 28:38.100] And with that technique there was significant evidence that we could have used it to hack example.com. [28:38.720 --> 28:45.160] This would have been seriously cool because I bet they get a lot of interesting traffic. [28:45.460 --> 28:55.380] Unfortunately they don't have a VDP or bounty program or anything like that so it would have been illegal to prove it and we will never know for sure. [28:55.540 --> 29:00.400] Hopefully I can persuade them to set one up and have another go next year. [29:01.260 --> 29:08.080] Now most of the targets were using the Akamai CDN so we kind of had a choice here. [29:08.080 --> 29:19.500] Should we report the vulnerability to every affected company individually or should we report it to Akamai only and if they react the same way as Netlify did, not get paid. [29:19.920 --> 29:22.660] You can probably guess which option was more appealing. [29:24.580 --> 29:33.060] It was a tricky decision for me because having a good relationship with a CDN over the long term is important. [29:33.340 --> 29:41.340] But when I collaborate with bounty hunters I want them to make more money as a result of working with me not less. [29:41.720 --> 29:48.720] So looking at the specifics of that finding I said to the bounty hunters, well you would have found this without me. [29:48.720 --> 29:58.340] So I'm going to sit this one out, you report it, don't put me on the report and I won't take a cut of the payouts. [29:58.500 --> 30:10.040] This is a decision that I still have somewhat mixed feelings about because they went on to earn over $200,000 from this issue. [30:11.400 --> 30:17.260] Overall the reports were well received but things didn't go entirely smoothly. [30:17.420 --> 30:36.380] It turned out that the vulnerability was actually fully inside Akamai's infrastructure so they just got hammered with support tickets from their clients and it seemed to be taking them a while to fix it and because it had been reported to so many different companies I got stressed about the technique potentially leaking before it was fixed. [30:36.720 --> 30:43.880] So I reached out to Akamai directly and got a $9,000 bounty in the process for that. [30:43.900 --> 30:53.740] But although they got a hot fix out for some clients quite fast it still took over 65 days from that point to fully resolve the vulnerability. [30:54.520 --> 31:08.980] Overall that one was quite a stressful experience but at least I got some good US dollar backed evidence of the dangers posed by HTTP 1.1 as it took the total bounties earned to over $350,000. [31:10.440 --> 31:17.140] So all the attacks I've shown you are exploiting implementation flaws. [31:17.140 --> 31:33.320] So it might seem weird to say that the solution is to delete the protocol but they all come from the same single protocol flaw which is the lack of robust request isolation. [31:33.600 --> 31:35.600] It's compounded by two key factors. [31:35.600 --> 31:49.740] One is that HTTP 1.1 is not simple if you're trying to proxy it and number two is that we basically don't want to patch HTTP 1.1 the right way because it would break support for legacy clients. [31:50.160 --> 31:57.040] These factors all just combine to mean exactly one thing which is that more desync attacks are always coming. [31:57.800 --> 32:01.480] To escape we need to use H2 or 3. [32:01.480 --> 32:04.380] It's not the perfect protocol by any means. [32:04.380 --> 32:13.100] It's obnoxiously complex and it's binary so you can't just read it but it doesn't have the fatal flaw. [32:13.100 --> 32:19.900] So what that means is that the inevitable implementation bugs are going to be much lower impact. [32:20.520 --> 32:24.620] Of course, don't use HB2 downgrading. [32:24.620 --> 32:26.600] That just makes everything worse. [32:27.040 --> 32:39.680] So to kill request smuggling, make sure your origin server supports H2 and then turn on upstream H2 on the front end and the protocol will just take care of everything else. [32:39.840 --> 32:45.220] Note that you do not need to turn off HB1 for clients. [32:45.660 --> 32:54.460] That's because those connections are not shared between different users which makes them significantly less dangerous. [32:55.140 --> 33:03.380] Unfortunately, some major players such as Nginx, Akamai, CloudFront and Fastly don't support upstream H2 yet. [33:03.380 --> 33:11.160] So if you're stuck on one of those, there's some other approaches you can take to try to mitigate these issues. [33:11.160 --> 33:16.960] But I do not regard any of these as adequate long term solutions. [33:16.960 --> 33:21.380] It's mostly about surviving until you can deploy H2. [33:21.700 --> 33:26.760] The only way to use H1 safely is don't have a front end server. [33:27.760 --> 33:34.680] We will be releasing more updates to request smuggler 3 as more techniques become known. [33:34.680 --> 33:40.340] So at least if you're doing regular scans with that, you'll find out relatively fast if you're exposed. [33:41.240 --> 33:44.280] Now, this is where I need your help. [33:44.680 --> 33:51.120] The number one problem that we've got is that people think upstream H1 is secure. [33:51.120 --> 33:55.120] So together, we need to show the world the truth. [33:55.120 --> 34:05.780] We need to show how broken it is by exploiting systems, breaking them and sharing our findings with the message that more desync attacks are coming. [34:06.020 --> 34:27.000] And because we're in the desync end game, and there's inevitably going to be future waves of regular expressions, regular expressions dedicated to breaking every detection method we can think of, take my tools and take techniques but adapt them. [34:27.000 --> 34:32.820] Make small changes and you'll discover a lot more vulnerabilities. [34:33.920 --> 34:39.300] For me, the key big research question is what's the next expect? [34:39.300 --> 34:45.260] What other features in HTTP 1.1 have serious desync potential? [34:45.320 --> 34:55.520] The cool thing about this question is that H1 is so poorly understood that there's actually tons to find even beyond the realm of desync attacks. [34:56.080 --> 35:04.200] For example, it's well known that you can use the trace method to leak internal headers if the back end supports it. [35:04.200 --> 35:07.280] But what if the back end has disabled trace? [35:07.800 --> 35:09.100] Does that mean they're secure? [35:09.100 --> 35:19.480] Well, unfortunately not because using the max forwards header, you can target an arbitrary intermediary server with that request instead. [35:19.480 --> 35:24.580] So unless they've configured every server in the chain, the technique still works. [35:24.580 --> 35:30.500] Basically, HTTP 1 is an absolute gold mine for all kinds of research. [35:31.180 --> 35:40.300] There's a whole load of further reading available online and you can find everything you need linked from http1mustdie.com. [35:40.300 --> 35:54.980] Note, this website is hosted on CloudFront and that means it is actually using upstream HTTP 1, but if you can get a desync on it, we will pay you a bonus on your bug bounty. [35:56.180 --> 36:00.780] The three key things to take away are that this is not the end. [36:00.780 --> 36:03.960] More desync attacks are always coming. [36:04.120 --> 36:12.000] If we want a secure web, HTTP 1 needs to die and together we can kill it. [36:13.860 --> 36:16.500] I'm also going to have some t-shirts to hand out. [36:16.760 --> 36:22.540] Don't forget to follow me on social media and if you have any more questions after that, feel free to chuck me an email. [36:22.720 --> 36:23.940] Thank you for listening.