Project

General

Profile

Actions

Bug #2511

closed

Suricata gzip unpacker bypass

Added by ajaxtpm ajaxtpm over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Affected Versions:
Effort:
medium
Difficulty:
medium
Label:

Description

Suricata gzip unpacker may be easily bypassed by nested gzip/identity compressions.
I know there is option "response-body-decompress-layer-limit" set to 2 by default, but it is incredebly easy to bypass. Snort IDS does all layers decompression (sorry for comparison).

Example:
HTTP/1.1 200 OK
Content-Encoding: identity, identity, gzip, identity, gzip, gzip

Signatures:
alert http any any -> any any (msg: "RESPONSE UNGZIPPED"; flow: established, from_server; content: "Hi"; http_server_body; nocase; sid: 1; rev: 1; )
alert http any any -> any any (msg: "FROM_SERVER |1F 8B|"; flow: established, from_server; content: "|1F 8B|"; http_server_body; nocase; sid: 2; rev: 1; )

Pcap attached

Expectation: alert sid 1
Reality: alert sid 2


Files

Actions

Also available in: Atom PDF