Uh welcome to track two, talk number two on Saturday. Uh this morning we uh have Martin and he's gonna talk about breaking the rules of web cache exploitation. So are you ready Martin? I'm ready. Let's hear it for Martin. Thank you. Hello everyone. Welcome to Gara Cache Mall, bending the rules of web cache exploitation. Uh it's already not working. So this is the agenda for today. First I'm going to briefly explain how a web cache works and then I'm going to show how we can abuse some discrepancies between the URL parsers of HTTP servers and cache proxies in order to steal secret information from victims using arbitrary web cache deception. Next I'm going to show how you use the same techniques or similar techniques to obtain arbitrary web cache poisoning by modifying the keys of a store resource. Then I'm going to combine both techniques in order to store whatever I want in the web cache with any key so this will allow us to create a full defacement of a website. And finally I'm going to present some protections that can be used to defend against those attacks and it takes hours of the session. So before I start, eh I want to clarify that most of the or all the examples are going to be based on CDNs like Cloudflare, Cloudfront, Akamai, but the idea is that you can use all of these techniques with any HTTP with any web cache eh proxy or with any web cache that you want even those that are included in the HTTP server. So whenever someone sends a request to a website using a web cache, basically the first thing that is going to happen is that the cache proxy is going to handle the request and is going to try to generate the response without having to communicate with the origin server. And this is going to be done by calculating a key and this key is basically an identifier of the request that states which is the resource that is being requested and it's not really important other things like the, the heaters like cookies or user agent because when we have two requests that are looking for the same resource and that resource is static, then we just need to provide the resource and we don't care about processing anything else. So we will see that the keys are just URLs and host names and in this talk we will just focus on the URL. So when the cache proxy calculated this key and is looking for a response that can be served eh to this request, he will look at the cache table and if there's nothing there, it will send the request to the origin server. Now the origin server is going to parse the URL, obtain the path and then it's going to use an endpoint to resolve the request. Sometimes it's just a static endpoint like a file and sometimes it's a dynamic one that is generated by a program back net. So when this response is sent back to the cache proxy, the well the cache proxy is going to generate to evaluate some rules to see if this response should be stored in the cache. So if it's static or not. These rules are usually evaluated on the response using the cache control heater but also in the request the cache proxy is going to extract the path and it's going to evaluate it with some of the other rules. For example the static extension one which is by default in most CDNs that looks for static extensions. So basically this is the list that Cloudflare has. And it will look for the path and the extension of that path. And if it ends with any of these eh extension, any of these strings, then it's going to decide that this is a static res- resource and it's going to store it in the in the web cache. So in this example we see that styles dot CSS ends with a static extension. And therefore it's going to be cached using the key that was calculated in the first step. Now whenever another client or even the same client sends a request to the same resource, the cache proxy is going to handle that, it's going to get the key of that request and then it's going to retrieve the res- the store resource because it doesn't need to interact with the original server. And that's basically how a web cache works. Now we can exploit this in many ways. The first one is usually is the first one I'm going to describe actually is the one that was discovered by Omer Gil in 2017 which is a web cache deception. And basically this attack is based on the idea that some backend servers use this special mapping where they are going to put some parameters in the path. This is called path parameters. And they are going to just look for the beginning of the path and they will try to match it with uh with any regex that is a relate- related with the handler. So in this case if we send a request to slash my account slash param one, param two, then only the first part is going to be used to map the end point. And then this in this case is going to the original server is going to generate a response which contains a lot of information from the victim because it is my account. And it contains for instance the mail or the credit card details. So basically this is what we want to steal. And to do so the first thing is to send uh a link to the victim. This requires user interaction. And the link will start with the end point that we want to steal the response. So in this case it's my account. And then it will use as a parameter a dot js. And the reason this is because first when it's handled by the origin server this is going to be mapped to my account using the cookies of the victim. And so the response with the sensitive information is going to be sent back to the to the proxy. And now with the cache proxy it will use the the path. This in this case it doesn't know anything about this mapping. So it will think that the last part is just a parameter is not a parameter sorry it's a path. It's part of a path. And therefore it will think that it has a static extension. In this case dot js. And so it will start this response containing all the secret information. Now the attacker can send the same request and as the cookies are not important as the only important thing is just getting the same path. Well the cache proxy is going to match it with the key that already calculated in the first place. And it will retrieve the victim's response containing all the secret information. Now the problem in this technique is that we need a special mapping for that. Basically we need this special my account thing. And then we also require that the parameters that we are sending in this case a dot js doesn't have any effect on the backend because if not maybe the the response is not going to contain that information that we want. So I started looking at different ways to obtain arbitrary web cache deception which is basically obtaining the same thing but for any kind of uh end point that we want. And to do this I started looking at how the the path is obtained at each state. So basically the path is obtained from a URL by using these delimiters which are basically characters that can then can be used to know where each part of the URL or each part of the elements of the URL start and begin uh and end. There are a lot of them defined by the RFC. So we can see that the URL has things like the scheme, the credentials, the host, the path query and fragment. So to split the each of them in a URL we need these these delimiters. The problem is that the RFC says that any any of these delimiters may or may not be or any of these characters may or may not be used as delimiters. And so each implementation can choose new delimiters and this could create some discrepancies. So let's say we find a server that is using a cache proxy and that is using the dollar sign as a delimiter. Then if we send a request to my account dollar sign eight dot JS this is just going to be interpreted as my account because of the delimiter. However as I said in the front end there's no delimiter being being said with uh the dollar sign and therefore this is going to be interpreted the entire URL is going to be interpreted as the path and the last part which is eight dot JS is going to be used as the extension. In this case actually it's dot JS the extension and so this is going to be stored in the cache just because of that delimiter. And in this case we can use it with any kind of path we want because we are not attacking a mapping we are attacking the entire way of obtaining the path from the URL. Now which kind of delimiters we can find in the well well there are a lot of them. Some I listed were in the frameworks is uh the first one is semicolon in spring so basically to define a matrix variable that is similar to a path a parameter we can use a semicolon. And the thing is that if we send something like my account semicolon eight dot JS anyone using Java probably Java in the well so they are going to consider this as my account. This includes Google or big companies that are using Java because this is how spring works. And so we can use this for the attack. Now in Rails there's another really interesting case which is they use the dot as a delimiter and that's because um the user is able to send an extension with a valid endpoint and this will the effect that this will have is that Rails will look for a specific view for that uh request. So let's say we define uh an endpoint which is my account and then when we send a request to my account Rails will just go and look for the HTML view. Now if we send something like my account dot CSS Rails will not just return a not a not found but it will look for the view of the the CSS view of my account. Usually there's no CSS view for my account so we'll just receive a 406 error. But the thing is that if the extension that we include is not recognized by Rails so let's say we send something like my account dot AAA then Rails is just going to send us the default view which is HTML. Remember all these extensions that are defined by Cloudflare. Well in green you can see the ones that are recognized by Rails. So if we send my account dot PNG or dot GPA or CSS then all of them are going to be recognized by Rails and it's going to try to look for that response and if there's no view for that extension then it's just going to return us an error. But in red we see all the other extensions that are not recognized by Rails. So we send something like my account dot ICO then we are going to get the default view but Cloudflare is going to think that this is a cacheable resource. Now there are other delimiters that can be used in HTTP servers instead of frameworks such as the encoded null byte which is the case of open light speed. So basically this works like a question mark if we send something in my account null encoded byte A dot JS then this is just going to be used as my account. The problem for this is that we cannot send it through many CDNs like Azure, Impairment, Cloudfront, Cloudflare, Google Cloud. That's because they don't accept null encoded bytes. But fortunately Akamai and Fast2DC yes so we can use them for eh this explanation. And finally in NGINX we have a delimiter whenever we define a rewrite rule and the delimiter is the new line encoded and so basically it works just as in open light with a null encoded byte and in this case we can send it through any CDN we want. So if we send a request using any of these delimiters with the correct with the corresponding eh backend then all of them are going to be interpreted as my account. The response is going to be sent back but in this case the web caches are going to just store that because of the static extension. But the problem with this attack is that many CDNs are are already aware of this and they are implementing some detection some protection for for this kind of attacks. In the case of Clover for instance is web cache deception armor which what it does is it looks for the extension of the request and the content type of the response. And if they don't match for for instance in this example we are using dot CSS as the extension and the content type is text HTML so if they don't match basically this is an attack and Clover won't store this in the cache. So we can attack other rules like the static directories one. That's a rule that we can create as users that states that anything starting with a specific path is going to be stored in the cache and that's really common in many applications because we we usually store static files in the same directory like share, public, assets, resources, anything that you can think. And so we can use this to attack this kind of eh this kind of web caches that are used in the rules. To create an attack in this case we will need some payload that is interpreted in the front end with the static directory at the beginning so basically if the static directory is called static then we want the path to start with static slash and anything we want. And then in the backend we still want my account because we in this case want to steal my account we could steal anything else we want. So if we have a delimiter in the backend we can try to do this but we will need something else. And as I said to extract the path from a URL we just need the delimiter and then that path is used in the keys rules and mapping. Well not really there's one extra step which is normalization. We need to normalize the path and most CDNs and backend servers do normalize the path. This includes decoding the characters. We can send them with URL encoded uh notation that is percentage uh and the XML value of a character. And then in some cases the uh other characters like segment delimiters like the slash or the dot are also going to be decoded. So this is going to be really useful. And then the normalization also includes dot segments uh resolution which is just resolving path traversals and whenever we find a dot segment then we just remove the previous segment. And some parsers like the IIS one uh will also convert backslashes to slashes. So now that we know this we can actually create a new payload that is going to use normalization. Again we are using a delimiter so everything before the delimiter is going to be interpreted in the backend server. But now we are also sending an encoded uh path traversal. And that is because the frontend is not using the delimiter so it's going to resolve this into this. And this includes a path traversal which is going to convert it to static WCD. So now in the frontend we see that there are static directories there so this is going to be stored in the webcache. And in this way we are able to bypass the webcache deception armor because there's no extension so nothing to convert. Now let's see how how we can how we can apply this in a real environment. And so first we need uh a frontend that is normalizing the path. Sorry. Uh this is the case for CloudFront, Imperva and Azure. And so if we combine them with any backend that is using a specific delimiter like for instance Tomcat, then we can send the same the same payload which is secret the semicolon with that represented delimiter. And this will cause that in the backend we see secret. And in the frontend again the semicolon is not a delimiter for either CloudFront, Azure or Imperva and therefore this is going to be resolved to static slash X. And this way we will be able to steal any response we want in an environment that is using basically a default configured Tomcat and any of the CDNs that I showed. This can be used also with other backends like uh Rails and Puma or even some in the same case that we observed in the in the first example when we had a special mapping in the backend. In this case there is no delimiter, the delimiter is just the the path that we are attacking. Now we could also try another attack that is using the opposite normalization so basically in the frontend we don't have normalization, that's the case of CloudFront, uh Google Cloud Platform and Fastly. And in the backend we have normalization in Nginx, IIS and open light speed. So if we use this, we can create the attack by starting with the static directory. In this case it's slash static. And this is because the path is not normalized and so CloudFront for instance will think that this is the entire URL is the path. But in the backend this is going to be normalized and therefore anyone using Nginx or IIS or open light speed is going to see that their response is going to be for secret and this will be storing the cache because of the static path. This worked on OpenAI and many other bounties that I wasn't able to be, I'm not able to talk about. And also this can be used with IIS, basically IIS is the only one that is decoding uh normalizing the backslash. So if we send something like using the, in the slide, this is going to be converted to static and basically a dot segment with a backslash and it's going to be converted to account in IIS but not in any other uh CDN because IIS decided that this is a cool idea. And so yeah, they are the only ones that I can be attacking with any other CDN. Now if we don't find one of these rules, well there's, there's another rule that we can use which is the static files. And in many, in many CDNs we will see that there's a static file rule by default to store robots dot txt but we can also find others for favicon or for index dot html or for any, any file that is usually accessed by people and is static. And in this case we can use the same attack only that we are not going to target a static directory, we are just going to target something that is being stored by the front end. So we can do something like secret then the, the limiter, the encoded dot segment and finally robot dot txt and this should work in many, in many applications. And also we can try to find other files. I found that there are many in the, in, in the wild so you should be able to find many others if you look for. So webcast deception is pretty cool but the thing is you need user interface interaction and we don't really want user interaction. So webcast poisoning is there for rescuers and the idea in webcast poisoning is that we are going to try to store a malicious response in, in a, with a key that is going to be accessed by other people. So let's say we want to hijack someone that is using this, this website, this website and is accessing through the home page. Well if we are able to find a payload that is stored in the home page then everyone navigating through the web page is going to be affected. And usually you will look for something that is not stored, like that is not using the key so in this case if the cookie value is reflected in the, in the body of the response then we are able to store this and anyone using the home page is going to be affected and is going to re, is going to retrieve the malicious response. The problem with this attack is that in many cases we will find a, an example of a cache poisoning but it's with a, it's using a key or it's using a resource that is not going to be accessed by anyone. Like for instance if we are able to poison something that starts with files then our user name and then a unique ID, no one is going to be accessing that uh, that path by themself. So we will need user interaction. And that's not really cool. So to avoid having to interact with any victim, I designed an attack that is going to be able, it's going to allow us to change the key of the uh, poison resource. Now in this case we will need key normalization and this is by default in impaired but Azure is just normalizing the key. Uh, and it's partially by default also in Akamai and it's configured in all the other CDNs and what's really interesting about this is that if you remember Cloud Front for instance was normalizing the rules but it's not normalizing the key. So that means that they have different parsers for each of these processes which is even in the same uh, in the same HTTP parser probably. So this, this tell us that we can even find other desynchronization attacks or other discrepancies even in the same uh, in the same web cache. So as I said, what we need is uh, a front end that is normalizing the key and what we can do to detect this is to send a request to a static resource like style dot CSS and whenever we see evidence that this is of being obtained from the web cache, so for instance we have an X cache hit value uh, hitter or we can just compare the time of the response and whenever we find this then we need to modify the path so that when normalized we still have style dot CSS and if we send this request and the response is still from the cache then it means that the key was normalized and so we detected key normalization. And how we can exploit a web cache poisoning with this, well basically we will try to modify as I said the key by sending first the exploit that we want so this is the, the uh, the response that we will, we will use to poison. Uh, usually contains a malicious payload. Then a delimiter, so again we will need a delimiter in the back end, but as I said this is really common and we can find them almost anywhere. And then we will need some normalization in the front end, so in Burba, Azure, and sometimes Akamai and all the others that are configured. Uh, and this is going to be a result of poison. So basically the web cache is going to store the exploit response in the poison end point which is something we control so it's arbitrary, we can just wire up a path we want, usually the home page. So in the, in the first example I didn't talk about one of the delimiters because we weren't able to send it with web cache deception and that's because the user needs to send it through his browser and anything but uh, and if the browser sees a hash, then it's not going to send the fragment. But in web cache poisoning we can use the fragment. So I, I started looking at different, at the behavior of different CDNs and HTTP servers and even frameworks in regarding the, the hash. And I found that there were a lot of differences. The most interesting one was again in purple because there were no likes in the key. A cloud front, well sorry, cloud front can be configured to, to do the same thing so it's interesting to see they are too. And basically if we have a hash and a, and key normalization then we can use in purple for, for this exploit that I'm going to show. And in the backend we can use pretty much any HTTP server like NGINX, Unicorn, Puma, then we can use also frameworks like Rails, Flash, they are not going to see the hash as a delimiter. Sorry, they are going to see the hash as a delimiter. And so basically we can send an attack that uses the hash. First we are going to send what we want to be interpreted in the backend because it's going to be using the hash. And so if we send something like this, then the XSS is going to be interpreted as the path in the backend. It's going to retrieve, retrieve the response, the malicious response. And now this is going to be normalized, the key, so we will be able to poison the homepage with any, any webcache poisoning eh, payload that we have. This was found in Vista, MasterCard and T-Mobile and again many others that I'm still unable to talk about. And of course we can use the same attack for with eh, Azure in purple and also with Tomcat, with Rails, with NGINX, with eh, new line encoded. And also again with any backend that is using a special mapping. So it should be pretty easy and I already saw many people exploiting this eh, since I give this talk in black hat so it seems like there are a lot of targets. Now we can do similar, a similar thing with Azure, only in this case Azure is considering the front, the hash as a delimiter and this is not the case for OpenLaySpeed, Express and Django. So what we are going to do is we're going to send a payload that in this case starts with what we want to poison, so the keys, the beginning and that's because the front end is using the hash as a delimiter. Then the rest is going to be normalized and we have the exploit. And again we can poison any path we want that is using Azure and OpenLight or other frameworks. There are other examples but as I, in this research I wasn't able to look for all, all servers but yeah. And this was found again in OpenAI so yeah, they, they acted really fast and they fixed the issue which I'm not sure, really sure how they fixed because it's still there. And, and so what if we don't have a payload? So let's say we don't have anything that we can use to poison a malicious response. We only, we are only able to change the keys. Well, we still can do something. We can start poisoning all the paths with a static file. So let's say we use status.css, this will poison every single path and so when a user sends a request to home, my account or any other path, he will just get CSS and therefore a denial of service. Which many companies think that this is not a vulnerability. So, sorry. So we already saw how we can poison anything we want and how we can change the key so it's just combining those ideas to create a very useful payload. And the first thing we need to do to store everything, anything we want in anywhere is to identify a malicious response that we want to use. And this malicious response, the, the, what's interesting about this attack is that we are going to combine both so the response doesn't need to be uh, cacheable. So we can use anything we want. In this case we are going to use an open redirect which is not stored, which is not cacheable and therefore is, is not a vulnerability. You can't report this to anyone because it's really not a vulnerability. Then we need to choose what we are going to poison and what I usually recommend is to poison some script that is being included in uh, in any web page, usually the home page. So in this case we have a home page that is uh, loading a main.js script. So we are going to poison that with an open redirect. Why? Well because first, as I said, we are going to use this technique. In this, in this example, this demo I'm going to show it using Azure and Tomcat. I finished coding this, this morning so it could work, it could not work. But uh, the thing is if we send something that starts with, in this case logout which is the open redirect, then the semicolon which is the delimiter, this is going to be interpreted as logout using the x forwarded host header which is going to show, to show, to send the, the victim to the evil.com. And then this is going to be normalized so we are going to poison main.js and this is because it has a static extension. So even if the operator wasn't storable by default, well we have the static extension so we are able to poison main.js using this attack. Now when a user loads the home page, he will again load the main.js script and when this request is uh, is received by the, by Azure, he will just send the open redirect which will redirect the victim to the evil.com server, will load the malicious JavaScript and we will be able to poison any, any victim with a malicious script that we completely control. And if we have the content security policy enabled to provide, to avoid this kind of attacks, then we can use something like CSX exfiltration to obtain anything we want. You can ask Gareth about that, he knows a lot. And so yeah, this is the demo. Uh, so yeah, so this is the web page. This is using Azure right now. And maybe this is, yeah, this is loading, perfect. Internet. Uh, so when we send a request to the home page, which is caches, cache all Azure blah blah. Don't hack it right now please. Uh, yeah. So we see that the main.js is being imported. So that's what we want to attack. This is main.js. Yeah. Main.js is being obtained from the cache right now. So it's going to last 20 seconds. I said 20 seconds probably is going, in a real application is going to be a day, maybe some days. So you will need to wait for that to stop doing, you can just use uh, an intruder session. Now, this is the open redirect that we are going to use. This is the evil.com. And as you can see, this is being, this is an open redirect that is not being cacheable. Config no cache means no cacheable. This is the evil.com server that is going to load our arbitrary javascript. And this is the exploit. Now I'm going to try to code it by myself. So again, the exploit is going to work like this. First we put the thing that we want to, to log. So this is going to be used in the backend. Logout. Logout is the open redirect. Then the semicolon to um, to use as a delimiter. Now, because the way that java use semicolons is uh, is uh, semicolons only work for a segment so we cannot put a slash after the semicolon because it's not going to be, it's not going to work. So we need to send the slashes and everything encoded in this case. So this is a slash encoded. This is a dot encoded. Yeah, the dot segment encoded. And then we will put what we want to poison which is main.js. And it seems we are lucky enough. Yeah. So first, as you, if you observe, the first time we got a miss, so nothing there. Now we got a hit. So it seems it worked. So if we load, if we try to get the main.js now, instead of getting the js that we had, we have an open redirect. So now, if we load, let's try this. Wow. Let's do it again. The problem is the time because, yeah, so I need to wait the 20 seconds for this to stop being cached. Unfortunately. C cached. So as you see, I'm getting the main.js, that's because it's being resolved the key and I'm getting the restore resource right now. But right now it worked. So okay, so now if I go, I do this, this is going to do everything that we saw. And it's good. Okay. I'm running out of battery. Okay, so I have time for this secret demo. Yeah. Okay, so we already saw how we can use different discrepancies between URL parsers to exploit web caches. But there are other kind of discrepancies where you can use, and there are many other discrepancies that I didn't research on, but probably you can look for them. One of them is the HTTP 0.9 smuggling. And basically, I trust that most of you already know what HTTP is, the basic protocol that we use every day to communicate in the internet. But, and probably you already know the really new HTTP 3, the still new HTTP 2, the classic HTTP 1.1 and even HTTP 1.0. But maybe you don't know that there's HTTP 0.9. 0.9 is basically a legacy protocol that shouldn't be used by anyone unless you are NGINX, Apache, IIS or any other HTTP server in the world. And the thing with HTTP 0.9 is that we don't have any headers, so no header for requests, no header for responses. And the connections are not persisted, the responses of course shouldn't be cacheable. So this is basically a basic 1.1 request, a HTTP 1.1 request. We send a request to home, we get a response, nothing strange. Now if we remove the HTTP version and we just send get, and the URL, the entire URL, then we will receive a 0.9 response if we are targeting NGINX, as I said, Apache, IIS, Tomcat, any HTTP server basically. You will just get the response which is the body. If you send something like this, still HTTP 0.9. If you send this, 0.9. And if you send this, 0.9. So why is this interesting at all? Well browsers are a little bit smarter than others and they knew that it doesn't make sense to keep talking this uh this old protocol, so you cannot send a 0.9 request through browsers. So most of the attacks are discarded just because of that. But let's see what happens if the front end and the back end are not doing the same thing or they don't talk the same protocol. So if we send a request like an HTTP 0.9 request and we send it through a CDN, most CDNs will take this request and they will upgrade it to HTTP 1.1. So then the back end will just generate a 1.1 response, the body will be extracted and sorry, the response will be actually downgraded and we will just be left with the body. And this works basically even if no one should be using 0.9, this works because if the upgrade and downgrading is done correctly then this works. And also connections are not persistent so a lot of attacks are also discarded because of that. But the interesting thing is that some CDNs such as Imperva, they don't verify the HTTP version before forwarding a request. So if we send a request, a 0.9 request, Imperva will say well I will just forward it, I don't care. And the problem is Imperva is not just going to forward it, it's going to think that this is a 1.1 request because Imperva doesn't know about 0.9. And the back end will send a body because it's 0.9 and so no headers. And now Imperva is going to try to use this as a response. And probably it's going to fail. And so you are not going to see a lot of valid responses because of the parsing. Because when Imperva tries to parse a body of a response that doesn't contain valid HTTP headers then this is going to be interpreted as an error. But what if the body does have these valid HTTP response headers? So let's say we have a upload download file feature or let's say we can control the body of a plain text or let's say we are even able to modify the response using byte range or something like that. Then if by any means we are able to control the response, then the body of the response no matter what the content type, no matter anything, then we will be able to use this attack. Again this demo, I hope it works. Um, okay, yeah. So in this super page, web page I created an upload file feature. Okay. And in this upload file feature we can upload any file we want. In this case an evil file that if you want to see it, well it's really really small but basically it's a response containing a script and containing a cache control header. Probably you can't see it. But yeah, it contains a cache control header saying that it should be stored for 10 seconds I think. Let's put 100 seconds. And so when I upload this, I will also be able to retrieve this. So it seems like it was uploaded. So let's go back to burp. Okay. And so, okay, so this is the file that I uploaded. Okay, let's say we have this upload download feature which is pretty common in many applications. And this works. Yeah. As you can see, I uploaded this file which in the body we have a valid HTTP response. Containing headers, containing everything we want. Now, if I send an, let's say I send a, an HTTP 0.9 request, which is basically this request that doesn't contain any header here. As you can see, Imperva sends, says that it's an error because it was trying to load the home page as a 0.9. It was trying to parse the response body of the home page as 0.9. Failed. Okay. Now, what if we send the same but for this response? And as you can see, Imperva thinks that this is a valid response. It's actually using the cache control header. And it's contain, it's putting everything. It's also including his own header so it seems like it's working. So, yeah, we can poison this file. Great. So someone that is accessing this file is going to receive this response and is going to be attacked. Now, not really cool. So we can use something that I just explained which is modifying the old cache key. Again, we can use the request to the thing that we want to store. Then the cache, in this case we are using Imperva. Imperva doesn't think that the cache is a, is a delimiter. Ah, this, sorry, this time we are using Imperva and Nginx. And the, then we have a path reversal. I added a few slashes because it's the way to avoid being detected as an attack by many CDNs. And so I have this path reversal that removes the files, removes the abl5.txt and so basically the path is going to be converted to the home page which is indexed. And so we are going to poison the index. So if we send this, I will have a little bit of luck. Yeah, it seems it's working because the second time was obtained from the cache. So now if I go back to the home page, it's not working. Ah, sorry, I this was, eh, this was the Azure one. This is the Imperva one, fortunately. So if we go to Imperva, arbitrary cache. Okay, so how we can defend against these kind of attacks? Well, first we need to use the, eh, cache control header for web cache deception. So whenever we have a response that we don't want to, anyone to store it, then just use private and no store for the, for the cache control header. But also, eh, I wasn't able to show it in the example but there are many CDNs that will override this cache control header if there's a rule for the path. So sometimes the rules for the request have priority and therefore it's important to check if this is happening. If this is happening, try to modify this and if it's not possible, then try to consider using another CDN. And then, eh, for cache poisoning, well, we can try to abort, to disable the key normalization. In some cases it's possible, in some cases it's not. So in those cases, I suggest using the tool that I will provide that will let you know if there's any discrepancy between normalization and, eh, delimiters and anything. So this will allow you to know if you need to change either your HTTP server or your, eh, front end server. These are all the references, eh, for the reason I, I use all this information. All the other attacks that inspired me. And also, in the slide you have the, eh, the links for the cache poisoning and cache deception academy topics. We just released the academy topic for deception. And also the extension for cache killer, which is the, the extension I created for, to detect this. It's still in progress, eh, it should work, but I will, I will keep working on, on this, on this tool for the next probably month or two. And the takeaways, basically I showed that we can use any kind of discrepancy we, we find in the, in the wild to exploit, eh, different servers using web cache. So web cache poisoning and deception, eh, can be used in many, many cases wherever we find these kind of discrepancies. Then we can use the exploitation things in many bounties because I found that these kind of delimiters are being used in many systems. So I invite you to look for them in different bounties and collect them and send me a message to just add you in the list of people that are using this. And finally, eh, I found, I showed you a way of chaining these vulnerabilities but you probably can think of many other ways to combine them with different vulnerabilities. Probably to upgrade vulnerabilities that are not really useful and probably to be, to get better payments in bad bounties. So I hope this helps everyone. And that's it. Thank you.