I am currently looking for method to detect HTTP pipelining request. This pipelining is currently exploiting our vulnerability in which cannot detect subsequent request on HTTP request in pipelining form (this may include someterm called HRS/HTTP Request Smuggling).
The request above sent in a single frame, which should be meant a single socket. The “\r\n” delimiter between request seems to be a legitimate method to do the pipelining.
From some traces, I found that HTTP_REQUEST event fired for each subrequest.
Tried to detect and reject this pipeline request using this iRule
when HTTP_REQUEST {
-----
if {[info exists httpmethodprev]} {
log local0. “rejected HTTP pipeline”
reject
return
} else {
set httpmethodprev [HTTP::method]
}
-------
}
But the first request, in which the method saved on httpmethodprev variable, is not rejected.
Only the subsequent request successfully being rejected.
Hi Kevin & Nitass,many thanks for helping me with disabling pipelining idea. But I still need to ensure the behavior.
You said that “when pipelining is disabled, bigip will terminate a connection after responding 1st request”. Does this mean bigip will close the socket created before to handle the first request? Or does it mean that bigip simply ignore the subsequent request in which delimited with “\r\n” character?
Let me add more info regarding my case. So there was HTTP pipeline request that is suspected being used for this purpose:
1. The first request is the legitimate HTTP request, in which requesting the web page that the client truly want to visit
2. The second request (or the third, fourth, and so forth if exist) is used to trick the DPI system, in which read for certain pattern and in fact cannot detect if pipeline is being used.
So the bigip is located behind the DPI system on the client perspective.
That is why I need the bigip to detect if the request is in pipeline form or not, and reject the request totally (first and subsequent) if so.
But I cannot implement the CLIENT_ACCEPTED and CLIENT_DATA event as you suggest, since the same VS used currently need to run another HTTP inspection using HTTP_REQUEST event.
I will also test the disable pipelining on my network and let you know if the behavior meets my expectation.
Does this mean bigip will close the socket created before to handle the first request? Or does it mean that bigip simply ignore the subsequent request in which delimited with “\r\n” character?based on packet trace, bigip sends FIN to both client and server after forwarding 1st response from server to client.
But I cannot implement the CLIENT_ACCEPTED and CLIENT_DATA event as you suggest, since the same VS used currently need to run another HTTP inspection using HTTP_REQUEST event.only pipelining request is rejected. HTTP_REQUEST is still triggered by non-pipelining request.
Hi Nitass, glad to hear these events combination works
I’m not touching my network to try disabling pipeline yet since it still weekend days, but I think the event combination is exactly what meet my expectations.
Thanks a lot for your help, really appreciate that