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 zc-p&ic+)~A1{MYw`2U}Q;R%p_5|NgwK81zB0LTVmR}jU>z~I0pJ9&)&BjXwY7GV}C zQ45&90;d1}d1o;&FtM<1VPS&kcbSGuKZ`KP3{eXfDX4bF0wJ*r-*%wte=wbeK?5kM z0nx7k)ju1}ent=u5cvP!(g&h%`b@(5SZ~aT0PBV@3|}tnm|EKh(1lIzFAoHNr+u|;m5#W1=3hDpC}J9K`i|L&r$