diff --git a/tests/bug-130/test.yaml b/tests/bug-130/test.yaml index 36fe83840..5e5d8a942 100644 --- a/tests/bug-130/test.yaml +++ b/tests/bug-130/test.yaml @@ -1,10 +1,8 @@ requires: min-version: 5.0.0 - features: - - HAVE_LIBJANSSON args: - - -k none + - -k none --set detect.force-applayer-findtx=true checks: - filter: diff --git a/tests/bug-7199/README.md b/tests/bug-7199/README.md new file mode 100644 index 000000000..b8ac42937 --- /dev/null +++ b/tests/bug-7199/README.md @@ -0,0 +1,15 @@ +# Test + +Showcase change of behavior from Suricata-7.0.5 to Suricata-7.0.6. +Before, a non-stream rule that matched traffic associated with an app-layer +transaction would result in app-layer metadata being logged with the alert, if +metadata was enabled. Starting with 7.0.6, this will only be achieved if the +rule is an app-layer/stream one. + +### Pcap + +Packet capture resulting of a curl to suricata.io. + +### Ticket + +https://redmine.openinfosecfoundation.org/issues/7199 diff --git a/tests/bug-7199/TLPW-curl-http-suricata.pcap b/tests/bug-7199/TLPW-curl-http-suricata.pcap new file mode 100644 index 000000000..144e4fcaa Binary files /dev/null and b/tests/bug-7199/TLPW-curl-http-suricata.pcap differ diff --git a/tests/bug-7199/suricata.yaml b/tests/bug-7199/suricata.yaml new file mode 100644 index 000000000..e7c828a2c --- /dev/null +++ b/tests/bug-7199/suricata.yaml @@ -0,0 +1,22 @@ +%YAML 1.1 +--- + +outputs: + - eve-log: + enabled: yes + filetype: regular + filename: eve.json + types: + - alert: + enabled: true + tagged-packets: true + metadata: true + http-body: true + - http: + extended: true + tagged-packets: true + - tls: + extended: true + +detect: + force-applayer-findtx: yes \ No newline at end of file diff --git a/tests/bug-7199/test.rules b/tests/bug-7199/test.rules new file mode 100644 index 000000000..3df3608a6 --- /dev/null +++ b/tests/bug-7199/test.rules @@ -0,0 +1,3 @@ +reject ip any any -> any any (msg: "Reject by AntreaNetworkPolicy:default/ingress-allow-http-request-to-api-v2"; flow: to_server, established; sid: 1;) +pass http any any -> any any (msg: "Allow http by AntreaNetworkPolicy:default/ingress-allow-http-request-to-api-v2"; http.uri; content:"/api/v2/"; startswith; http.method; content:"GET"; http.host; content:"foo.bar.com"; startswith; endswith; sid: 2;) +alert http any any -> any any (msg: "Alert by AntreaNetworkPolicy:default/ingress-allow-http-request-to-api-v2"; http.uri; content:!"/api/v2/"; sid: 3;) diff --git a/tests/bug-7199/test.yaml b/tests/bug-7199/test.yaml new file mode 100644 index 000000000..510fe6017 --- /dev/null +++ b/tests/bug-7199/test.yaml @@ -0,0 +1,33 @@ +requires: + features: + - LIBNET1.1 + +args: +- -k none +- --set stream.midstream=true +- --simulate-ips + +checks: + - filter: + count: 4 + match: + event_type: alert + alert.signature_id: 1 + - filter: + min-version: 8 + count: 1 + match: + event_type: alert + alert.signature_id: 1 + has-key: http + - filter: + count: 0 + match: + event_type: alert + alert.signature_id: 2 + - filter: + count: 1 + match: + event_type: alert + alert.signature_id: 3 + has-key: http diff --git a/tests/pgsql/pgsql-7000-ids/suricata.yaml b/tests/pgsql/pgsql-7000-ids/suricata.yaml index aac151f99..31efb6daa 100644 --- a/tests/pgsql/pgsql-7000-ids/suricata.yaml +++ b/tests/pgsql/pgsql-7000-ids/suricata.yaml @@ -15,3 +15,6 @@ app-layer: protocols: pgsql: enabled: yes + +detect: + force-applayer-findtx: true \ No newline at end of file diff --git a/tests/pgsql/pgsql-7000-ids/test.yaml b/tests/pgsql/pgsql-7000-ids/test.yaml index 0e5d976c6..0f5e5ec5d 100644 --- a/tests/pgsql/pgsql-7000-ids/test.yaml +++ b/tests/pgsql/pgsql-7000-ids/test.yaml @@ -171,11 +171,4 @@ checks: Dumbledore....prof_dumbledore@gmail.comD...2.....\nMcGonagall....prof_mc.gonagall@gmail.comD...'......Rogue....prof_rogue@yahoo.comD...)......Hagrid....prof_hagrid@gmail.comD...,......Hermione....prof_gramger@gmail.comD...'......Remus....prof_lupin@gmail.comD...)......Maugre....prof_folloy@gmail.comD...-......Londubat....prof_londubat@gmail.comC...\r\ SELECT 8.Z....I" pcap_cnt: 87 - pgsql.request.simple_query: SELECT * FROM new_table; - pgsql.response.command_completed: SELECT 8 - pgsql.response.data_rows: 8 - pgsql.response.data_size: 236 - pgsql.response.field_count: 2 - pgsql.tx_id: 26 stream: 1 - tx_id: 25 diff --git a/tests/pgsql/pgsql-bug-6983-ips/suricata.yaml b/tests/pgsql/pgsql-bug-6983-ips/suricata.yaml index b1049819c..6e79935b3 100755 --- a/tests/pgsql/pgsql-bug-6983-ips/suricata.yaml +++ b/tests/pgsql/pgsql-bug-6983-ips/suricata.yaml @@ -16,3 +16,6 @@ app-layer: protocols: pgsql: enabled: yes + +detect: + force-applayer-findtx: true \ No newline at end of file