Skip to content

Commit 9e66688

Browse files
committed
datasets: test with delayed set postmatch
Ticket: 5576 Signature full match does not happen on first packet inspected, but signature gets stored as partially matching so far, and then postmatch retreieves the buffer to set in the dataset.
1 parent 80cfcd5 commit 9e66688

File tree

5 files changed

+38
-0
lines changed

5 files changed

+38
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Test
2+
====
3+
4+
Test datasets only sets when there is a full signature match.
5+
Test is with a signature using different keywords matching at different stages,
6+
and pcap having different packets making the transaction progress step by step.
7+
8+
https://redmine.openinfosecfoundation.org/issues/5576
9+
10+
PCAP
11+
====
12+
13+
Pcap crafted with some http server and some python client that delays or not the writing of the headers
14+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
L3BhZ2U/cGFyYW09dmFsdWU=
1.15 KB
Binary file not shown.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
alert http any any -> any any ( sid: 1; http.uri; content: "param"; fast_pattern; pcre: "/param=(.*)/,flow:paramval"; http.request_header; content: "Header1";)
2+
alert http any any -> any any ( sid: 2; http.uri; content: "param"; fast_pattern; dataset:set,http_match,type string,save http_match.csv; http.request_header; content: "Header1";)
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
requires:
2+
min-version: 8
3+
4+
args:
5+
- -k none --data-dir=${OUTPUT_DIR}
6+
7+
checks:
8+
- filter:
9+
count: 1
10+
match:
11+
event_type: alert
12+
alert.signature_id: 1
13+
#TODO ticket 7197 metadata.flowvars[0].paramval: value
14+
- filter:
15+
count: 1
16+
match:
17+
event_type: alert
18+
alert.signature_id: 2
19+
- file-compare:
20+
filename: http_match.csv
21+
expected: expected/http_match.csv

0 commit comments

Comments
 (0)