From 0a31d52710b51e4ba26734305d6eb2b643e7c2bc Mon Sep 17 00:00:00 2001 From: Juliana Fajardini Date: Tue, 28 Nov 2023 18:19:48 -0300 Subject: [PATCH] tests: add test for pgsql probe bug 6080 Add test for pgsql probing function bug 6080. Crafted pcap. Related to Bug #6080 --- tests/pgsql-bug-6080-probe-test-01/README.md | 15 +++++++++ tests/pgsql-bug-6080-probe-test-01/input.pcap | Bin 0 -> 733 bytes .../suricata.yaml | 18 ++++++++++ tests/pgsql-bug-6080-probe-test-01/test.yaml | 22 +++++++++++++ .../pgsql-bug-6080-probe-test-01/writepcap.py | 31 ++++++++++++++++++ 5 files changed, 86 insertions(+) create mode 100644 tests/pgsql-bug-6080-probe-test-01/README.md create mode 100644 tests/pgsql-bug-6080-probe-test-01/input.pcap create mode 100644 tests/pgsql-bug-6080-probe-test-01/suricata.yaml create mode 100644 tests/pgsql-bug-6080-probe-test-01/test.yaml create mode 100644 tests/pgsql-bug-6080-probe-test-01/writepcap.py diff --git a/tests/pgsql-bug-6080-probe-test-01/README.md b/tests/pgsql-bug-6080-probe-test-01/README.md new file mode 100644 index 000000000..3cd229550 --- /dev/null +++ b/tests/pgsql-bug-6080-probe-test-01/README.md @@ -0,0 +1,15 @@ +# Test Description + +The probing function for PGSQL, in some scenarios, could identify any TCP message +sent to the standard PGSQL port - 5432 - as PGSQL traffic, leading to false +positives. + +## PCAP + +This pcap was created using the Scapy script included in the test directory, +to reproduce a non-shareable traffic capture. + +## Related issues + +Bug report on Redmine: +https://redmine.openinfosecfoundation.org/issues/6080 diff --git a/tests/pgsql-bug-6080-probe-test-01/input.pcap b/tests/pgsql-bug-6080-probe-test-01/input.pcap new file mode 100644 index 0000000000000000000000000000000000000000..0238838f6a5f5eae8c7317d39448b1885c897436 GIT binary patch literal 733 zcmca|c+)~A1{MYw`2U}Q;R%rQBqA+UeF_VM0gw&Ct{{q$fx&@IcJdklM#eP)EW#{O zq82cH1x)|{^Uh*mU}9n2!omd6?=lUSeimVn8KM>}Qc(Sj1wvvMzU@HO|6n=`g9cCm z2m|fcfZ9JB&3>S(7#ITt{{Of1f!I5JCSiT7H)ceD^-28yKU)N%@91n?`cT{pvQITY zK5N<; zqXHHa