]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
http: adds test about decompression
authorPhilippe Antoine <pantoine@oisf.net>
Tue, 16 Apr 2024 20:55:38 +0000 (22:55 +0200)
committerVictor Julien <victor@inliniac.net>
Thu, 2 May 2024 17:49:30 +0000 (19:49 +0200)
Ticket: 6959

tests/http-encoding-gzip-uncompressed/README.md [new file with mode: 0644]
tests/http-encoding-gzip-uncompressed/input.pcap [new file with mode: 0644]
tests/http-encoding-gzip-uncompressed/test.rules [new file with mode: 0644]
tests/http-encoding-gzip-uncompressed/test.yaml [new file with mode: 0644]

diff --git a/tests/http-encoding-gzip-uncompressed/README.md b/tests/http-encoding-gzip-uncompressed/README.md
new file mode 100644 (file)
index 0000000..f5db8fe
--- /dev/null
@@ -0,0 +1,12 @@
+# Test Description
+
+Test that we do not wrongly decompress if we have encoding gzip but clear text
+
+## PCAP
+
+From https://redmine.openinfosecfoundation.org/issues/6959
+
+
+## Related issues
+
+https://redmine.openinfosecfoundation.org/issues/6959
diff --git a/tests/http-encoding-gzip-uncompressed/input.pcap b/tests/http-encoding-gzip-uncompressed/input.pcap
new file mode 100644 (file)
index 0000000..dd66e9b
Binary files /dev/null and b/tests/http-encoding-gzip-uncompressed/input.pcap differ
diff --git a/tests/http-encoding-gzip-uncompressed/test.rules b/tests/http-encoding-gzip-uncompressed/test.rules
new file mode 100644 (file)
index 0000000..8cda461
--- /dev/null
@@ -0,0 +1 @@
+alert http $HOME_NET any -> $EXTERNAL_NET 8100 (msg:"ET MOBILE_MALWARE Android Dropper Checkin Activity (POST)"; flow:established,to_server; http.request_body; content:"|22|sdk_version|22 3a|"; content:"|22|app_package|22 3a 22|"; distance:0; content:"|22|app_version|22 3a 22|"; distance:0; content:"|22|device_id|22 3a 22|"; distance:0; classtype:trojan-activity; sid:2038629; rev:1;)
diff --git a/tests/http-encoding-gzip-uncompressed/test.yaml b/tests/http-encoding-gzip-uncompressed/test.yaml
new file mode 100644 (file)
index 0000000..4b5bb4b
--- /dev/null
@@ -0,0 +1,9 @@
+args:
+  - -k none
+
+checks:
+  - filter:
+      count: 1
+      match:
+        event_type: alert
+        alert.signature_id: 2038629