]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
Adds checks with http.uri keyword and HTTP2 traffic
authorPhilippe Antoine <contact@catenacyber.fr>
Mon, 7 Dec 2020 11:33:01 +0000 (12:33 +0100)
committerJason Ish <jason.ish@oisf.net>
Wed, 10 Mar 2021 15:41:50 +0000 (09:41 -0600)
tests/http2-basic/test.rules
tests/http2-basic/test.yaml
tests/http2-upgrade/test.rules [new file with mode: 0644]
tests/http2-upgrade/test.yaml

index d0866dadd512fa1ebcd52178239ee8862db5526b..499c11f780e39b24198612c0e94f774cc14af94a 100644 (file)
@@ -2,3 +2,9 @@ alert http2 any any -> any any (http2.header; content:"agent: nghttp2"; sid:1; r
 alert http2 any any -> any any (http2.frametype:GOAWAY; sid:2; rev:1;)
 alert http2 any any -> any any (http2.settings:SETTINGS_HEADER_TABLE_SIZE>1000; sid:3; rev:1;)
 alert http2 any any -> any any (http2.window:34634; sid:4; rev:1;)
+
+alert http any any -> any any (http.uri; content:"/doc/manual/html/index.html"; sid:10;)
+alert http1 any any -> any any (http.uri; content:"/doc/manual/html/index.html"; sid:11;)
+alert http2 any any -> any any (http.uri; content:"/doc/manual/html/index.html"; sid:12;)
+alert tcp any any -> any any (http.uri; content:"/doc/manual/html/index.html"; sid:13;)
+alert ip any any -> any any (http.uri; content:"/doc/manual/html/index.html"; sid:14;)
index 0ffbc7e6ec83589609f7083d15512e05a8df7990..21b3bf5594d629e5784df1abb5c81ba552913f62 100644 (file)
@@ -78,3 +78,29 @@ checks:
       count: 0
       match:
         event_type: anomaly
+  # HTTP generic keywords with HTTP2 traffic
+  - filter:
+      count: 1
+      match:
+        event_type: alert
+        alert.signature_id: 10
+  - filter:
+      count: 0
+      match:
+        event_type: alert
+        alert.signature_id: 11
+  - filter:
+      count: 1
+      match:
+        event_type: alert
+        alert.signature_id: 12
+  - filter:
+      count: 1
+      match:
+        event_type: alert
+        alert.signature_id: 13
+  - filter:
+      count: 1
+      match:
+        event_type: alert
+        alert.signature_id: 14
diff --git a/tests/http2-upgrade/test.rules b/tests/http2-upgrade/test.rules
new file mode 100644 (file)
index 0000000..46d4352
--- /dev/null
@@ -0,0 +1,3 @@
+alert http1 any any -> any any (http.uri; content:"/robots.txt"; sid:10;)
+alert http2 any any -> any any (http.uri; content:"/robots.txt"; sid:11;)
+alert http any any -> any any (http.uri; content:"/robots.txt"; sid:12;)
index 0e24fb77825d7d91eee94ce9c68f578134ad0a0f..26d913ee33ec2c50f6a8f05a0a3ef596ab61d1ba 100644 (file)
@@ -50,3 +50,19 @@ checks:
         http.http_method: "GET"
         http.url: "/humans.txt"
         http.status: 404
+# checks for http.uti keyword : 1 for HTTP1, 1 for mimicked HTTP2 response, so 2 for whole HTTP
+  - filter:
+      count: 1
+      match:
+        event_type: alert
+        alert.signature_id: 10
+  - filter:
+      count: 1
+      match:
+        event_type: alert
+        alert.signature_id: 11
+  - filter:
+      count: 2
+      match:
+        event_type: alert
+        alert.signature_id: 12