Forum Discussion

newf5learner's avatar
newf5learner
Icon for Nimbostratus rankNimbostratus
Sep 16, 2020

irule to mitigate HTTP de-sync attack

Hi Experts,

I'm here to seek some help in implementing irule that would search the http requests that contains both the headers 1. Transfer Encoding 2. Content-length and reset the connection for the these requests. This is to mitigate the HTTP de-sync attack on the F5 units which has the ASM security policy in transparent mode. I tried the below, but it didn't work. Request your help.

when HTTP_REQUEST {
if { [class match [HTTP::header "Content-length"] > 0 ] AND [HTTP::header "Transfer-encoding"] equals "chunked"} {
reset
}
}

I need to look at the HTTP requests which has the headers content-length > 0 and with header transfer-encoding as chunked, drop this connection, allow the rest of the request to through.