From 69e147b381c03b6d77efa993e57964ab974a3103 Mon Sep 17 00:00:00 2001 From: Philippe Antoine Date: Wed, 29 Mar 2023 19:06:12 +0200 Subject: [PATCH] Adds test about http.connection with to client Ticket: #5746 --- tests/http-connection-toclient/README.md | 9 +++++++++ tests/http-connection-toclient/input.pcap | Bin 0 -> 1215 bytes tests/http-connection-toclient/test.rules | 1 + tests/http-connection-toclient/test.yaml | 11 +++++++++++ 4 files changed, 21 insertions(+) create mode 100644 tests/http-connection-toclient/README.md create mode 100644 tests/http-connection-toclient/input.pcap create mode 100644 tests/http-connection-toclient/test.rules create mode 100644 tests/http-connection-toclient/test.yaml diff --git a/tests/http-connection-toclient/README.md b/tests/http-connection-toclient/README.md new file mode 100644 index 000000000..aebb0f5ff --- /dev/null +++ b/tests/http-connection-toclient/README.md @@ -0,0 +1,9 @@ +PCAP +---- + +Coming from https://redmine.openinfosecfoundation.org/issues/5746 + +Test +---- + +Test that keyword `http.connection` works in the to client direction diff --git a/tests/http-connection-toclient/input.pcap b/tests/http-connection-toclient/input.pcap new file mode 100644 index 0000000000000000000000000000000000000000..6ee4ea7ef0b38bdeabe7dff864cf597047e88937 GIT binary patch literal 1215 zc-noFPfXKL9LL|rM5va4?!ZCxaUnwNx(yW4G?Ot9lo+R(dU1r=J-3FgZMFy7E@lz% zpa$Hx~VD-BwexpOF{dl*k2Ufe&PiWQ2NAd#!SX zQ5hWtH%6CQu4RC}ID2SkCw-r*k5Qer2J27xV66p~TEg=% zs=www7YFMRYd<4C`G@%5Z`Boe&B8o(w>-@7ycK2>n#@m?hslVW5BKzV+w%CkipPAe l2|Ru%dVIX=(J39=%j2r$@lJ)uJW%^{jo`7Z=+V!pe*rtdZFv9y literal 0 Hc-jL100001 diff --git a/tests/http-connection-toclient/test.rules b/tests/http-connection-toclient/test.rules new file mode 100644 index 000000000..8232a2893 --- /dev/null +++ b/tests/http-connection-toclient/test.rules @@ -0,0 +1 @@ +alert tcp any any -> any any (msg:"tfo test15"; flow: to_client; http.connection; content:"close"; sid:15;) diff --git a/tests/http-connection-toclient/test.yaml b/tests/http-connection-toclient/test.yaml new file mode 100644 index 000000000..5743ee65f --- /dev/null +++ b/tests/http-connection-toclient/test.yaml @@ -0,0 +1,11 @@ +requires: + min-version: 7 + +args: +- -k none --set stream.midstream=true + +checks: + - filter: + count: 1 + match: + event_type: alert -- 2.47.2