alert http any any -> any any (msg:"SURICATA HTTP Request excessive header repetition"; flow:established,to_server; app-layer-event:http.request_header_repetition; flowint:http.anomaly.count,+,1; classtype:protocol-command-decode; sid:2221035; rev:1;)
alert http any any -> any any (msg:"SURICATA HTTP Response excessive header repetition"; flow:established,to_client; app-layer-event:http.response_header_repetition; flowint:http.anomaly.count,+,1; classtype:protocol-command-decode; sid:2221036; rev:1;)
-# next sid 2221037
+# This is a suricata limitation rather than anomaly traffic
+# alert http any any -> any any (msg:"SURICATA HTTP Response multipart/byteranges"; flow:established,to_client; app-layer-event:http.response_multipart_byteranges; flowint:http.anomaly.count,+,1; classtype:protocol-command-decode; sid:2221037; rev:1;)
+
+alert http any any -> any any (msg:"SURICATA HTTP Response abnormal chunked for transfer-encoding"; flow:established,to_client; app-layer-event:http.response_abnormal_transfer_encoding; flowint:http.anomaly.count,+,1; classtype:protocol-command-decode; sid:2221038; rev:1;)
+
+alert http any any -> any any (msg:"SURICATA HTTP Response chunked with HTTP 0.9 or 1.0"; flow:established,to_client; app-layer-event:http.response_chunked_old_proto; flowint:http.anomaly.count,+,1; classtype:protocol-command-decode; sid:2221039; rev:1;)
+
+alert http any any -> any any (msg:"SURICATA HTTP Response invalid protocol"; flow:established,to_client; app-layer-event:http.response_invalid_protocol; flowint:http.anomaly.count,+,1; classtype:protocol-command-decode; sid:2221040; rev:1;)
+alert http any any -> any any (msg:"SURICATA HTTP Response invalid status"; flow:established,to_client; app-layer-event:http.response_invalid_status; flowint:http.anomaly.count,+,1; classtype:protocol-command-decode; sid:2221041; rev:1;)
+
+alert http any any -> any any (msg:"SURICATA HTTP Request line incomplete"; flow:established,to_server; app-layer-event:http.request_line_incomplete; flowint:http.anomaly.count,+,1; classtype:protocol-command-decode; sid:2221042; rev:1;)
+
+# next sid 2221043
HTTP_DECODER_EVENT_TOO_MANY_ENCODING_LAYERS},
{ "ABNORMAL_CE_HEADER",
HTTP_DECODER_EVENT_ABNORMAL_CE_HEADER},
+ { "RESPONSE_MULTIPART_BYTERANGES",
+ HTTP_DECODER_EVENT_RESPONSE_MULTIPART_BYTERANGES},
+ { "RESPONSE_ABNORMAL_TRANSFER_ENCODING",
+ HTTP_DECODER_EVENT_RESPONSE_ABNORMAL_TRANSFER_ENCODING},
+ { "RESPONSE_CHUNKED_OLD_PROTO",
+ HTTP_DECODER_EVENT_RESPONSE_CHUNKED_OLD_PROTO},
+ { "RESPONSE_INVALID_PROTOCOL",
+ HTTP_DECODER_EVENT_RESPONSE_INVALID_PROTOCOL},
+ { "RESPONSE_INVALID_STATUS",
+ HTTP_DECODER_EVENT_RESPONSE_INVALID_STATUS},
+ { "REQUEST_LINE_INCOMPLETE",
+ HTTP_DECODER_EVENT_REQUEST_LINE_INCOMPLETE},
/* suricata warnings/errors */
{ "MULTIPART_GENERIC_ERROR",
/* { "Invalid authority port", HTTP_DECODER_EVENT_INVALID_AUTHORITY_PORT}, htp no longer returns this error */
{ "Request buffer over", HTTP_DECODER_EVENT_REQUEST_FIELD_TOO_LONG},
{ "Response buffer over", HTTP_DECODER_EVENT_RESPONSE_FIELD_TOO_LONG},
+ { "C-T multipart/byteranges in responses not supported", HTTP_DECODER_EVENT_RESPONSE_MULTIPART_BYTERANGES},
};
struct {
{ "C-E unknown setting", HTTP_DECODER_EVENT_ABNORMAL_CE_HEADER},
{ "Excessive request header repetitions", HTTP_DECODER_EVENT_REQUEST_HEADER_REPETITION},
{ "Excessive response header repetitions", HTTP_DECODER_EVENT_RESPONSE_HEADER_REPETITION},
+ { "Transfer-encoding has abnormal chunked value", HTTP_DECODER_EVENT_RESPONSE_ABNORMAL_TRANSFER_ENCODING},
+ { "Chunked transfer-encoding on HTTP/0.9 or HTTP/1.0", HTTP_DECODER_EVENT_RESPONSE_CHUNKED_OLD_PROTO},
+ { "Invalid response line: invalid protocol", HTTP_DECODER_EVENT_RESPONSE_INVALID_PROTOCOL},
+ { "Invalid response line: invalid response status", HTTP_DECODER_EVENT_RESPONSE_INVALID_STATUS},
+ { "Request line incomplete", HTTP_DECODER_EVENT_REQUEST_LINE_INCOMPLETE},
};
#define HTP_ERROR_MAX (sizeof(htp_errors) / sizeof(htp_errors[0]))
HTTP_DECODER_EVENT_AUTH_UNRECOGNIZED,
HTTP_DECODER_EVENT_REQUEST_HEADER_REPETITION,
HTTP_DECODER_EVENT_RESPONSE_HEADER_REPETITION,
+ HTTP_DECODER_EVENT_RESPONSE_MULTIPART_BYTERANGES,
+ HTTP_DECODER_EVENT_RESPONSE_ABNORMAL_TRANSFER_ENCODING,
+ HTTP_DECODER_EVENT_RESPONSE_CHUNKED_OLD_PROTO,
+ HTTP_DECODER_EVENT_RESPONSE_INVALID_PROTOCOL,
+ HTTP_DECODER_EVENT_RESPONSE_INVALID_STATUS,
+ HTTP_DECODER_EVENT_REQUEST_LINE_INCOMPLETE,
/* suricata errors/warnings */
HTTP_DECODER_EVENT_MULTIPART_GENERIC_ERROR,