# Request line started with whitespace
alert http any any -> any any (msg:"SURICATA HTTP Request line with leading whitespace"; flow:established,to_server; app-layer-event:http.request_line_leading_whitespace; flowint:http.anomaly.count,+,1; classtype:protocol-command-decode; sid:2221031; rev:1;)
-# next sid 2221032
+
+alert http any any -> any any (msg:"SURICATA HTTP Request too many encoding layers"; flow:established,to_server; app-layer-event:http.too_many_encoding_layers; flowint:http.anomaly.count,+,1; classtype:protocol-command-decode; sid:2221032; rev:1;)
+alert http any any -> any any (msg:"SURICATA HTTP Request abnormal Content-Encoding header"; flow:established,to_server; app-layer-event:http.abnormal_ce_header; flowint:http.anomaly.count,+,1; classtype:protocol-command-decode; sid:2221033; rev:1;)
+
+# next sid 2221034
HTTP_DECODER_EVENT_METHOD_DELIM_NON_COMPLIANT},
{ "REQUEST_LINE_LEADING_WHITESPACE",
HTTP_DECODER_EVENT_REQUEST_LINE_LEADING_WHITESPACE},
+ { "TOO_MANY_ENCODING_LAYERS",
+ HTTP_DECODER_EVENT_TOO_MANY_ENCODING_LAYERS},
+ { "ABNORMAL_CE_HEADER",
+ HTTP_DECODER_EVENT_ABNORMAL_CE_HEADER},
/* suricata warnings/errors */
{ "MULTIPART_GENERIC_ERROR",
{ "Request line: URI contains non-compliant delimiter", HTTP_DECODER_EVENT_URI_DELIM_NON_COMPLIANT},
{ "Request line: non-compliant delimiter between Method and URI", HTTP_DECODER_EVENT_METHOD_DELIM_NON_COMPLIANT},
{ "Request line: leading whitespace", HTTP_DECODER_EVENT_REQUEST_LINE_LEADING_WHITESPACE},
+ { "Too many response content encoding layers", HTTP_DECODER_EVENT_TOO_MANY_ENCODING_LAYERS},
+ { "C-E gzip has abnormal value", HTTP_DECODER_EVENT_ABNORMAL_CE_HEADER},
+ { "C-E deflate has abnormal value", HTTP_DECODER_EVENT_ABNORMAL_CE_HEADER},
+ { "C-E unknown setting", HTTP_DECODER_EVENT_ABNORMAL_CE_HEADER},
};
#define HTP_ERROR_MAX (sizeof(htp_errors) / sizeof(htp_errors[0]))
HTTP_DECODER_EVENT_METHOD_DELIM_NON_COMPLIANT,
HTTP_DECODER_EVENT_URI_DELIM_NON_COMPLIANT,
HTTP_DECODER_EVENT_REQUEST_LINE_LEADING_WHITESPACE,
+ HTTP_DECODER_EVENT_TOO_MANY_ENCODING_LAYERS,
+ HTTP_DECODER_EVENT_ABNORMAL_CE_HEADER,
/* suricata errors/warnings */
HTTP_DECODER_EVENT_MULTIPART_GENERIC_ERROR,