]> git.ipfire.org Git - thirdparty/suricata-verify.git/log
thirdparty/suricata-verify.git
5 years agoAdds a testcase for HTTP multiple content-length 131/head
Philippe Antoine [Mon, 4 Mar 2019 16:27:57 +0000 (17:27 +0100)] 
Adds a testcase for HTTP multiple content-length

5 years agoAdds a testcase for http invalid request line
Philippe Antoine [Tue, 5 Mar 2019 13:09:05 +0000 (14:09 +0100)] 
Adds a testcase for http invalid request line

5 years agotests/evader: rename 116 to indicate its about lzma
Victor Julien [Fri, 20 Sep 2019 06:42:58 +0000 (08:42 +0200)] 
tests/evader: rename 116 to indicate its about lzma

5 years agotests: make sure lzma is enabled in evader test
Victor Julien [Fri, 20 Sep 2019 06:38:32 +0000 (08:38 +0200)] 
tests: make sure lzma is enabled in evader test

5 years agotests: add test case for file_data depth inspection
Andreas Herz [Wed, 21 Aug 2019 20:04:20 +0000 (22:04 +0200)] 
tests: add test case for file_data depth inspection

5 years agodns-opcode: test dns.opcode keyword
Jason Ish [Mon, 16 Sep 2019 22:28:47 +0000 (16:28 -0600)] 
dns-opcode: test dns.opcode keyword

5 years agosip: enable sip for sip tests
Jason Ish [Mon, 16 Sep 2019 23:05:19 +0000 (17:05 -0600)] 
sip: enable sip for sip tests

5 years agotests: add tests for sip keywords
Giuseppe Longo [Thu, 11 Jul 2019 14:19:49 +0000 (16:19 +0200)] 
tests: add tests for sip keywords

5 years agofile-store: add tests for stream-depth
Giuseppe Longo [Wed, 10 Apr 2019 20:17:09 +0000 (22:17 +0200)] 
file-store: add tests for stream-depth

5 years agotests: dns midstream reversed tests for tcp and udp 125/head
Jason Ish [Mon, 22 Apr 2019 17:35:00 +0000 (11:35 -0600)] 
tests: dns midstream reversed tests for tcp and udp

5 years agotests: add testmyids variant with midstream
Victor Julien [Tue, 11 Jun 2019 17:23:47 +0000 (19:23 +0200)] 
tests: add testmyids variant with midstream

5 years agotests: set proper requirements for dotprefix tests
Victor Julien [Fri, 13 Sep 2019 08:42:42 +0000 (10:42 +0200)] 
tests: set proper requirements for dotprefix tests

5 years agoAdds test case for http with missing protocol
Philippe Antoine [Tue, 2 Apr 2019 09:13:36 +0000 (11:13 +0200)] 
Adds test case for http with missing protocol

And header_names keyword in rules

5 years agotests: convert dotprefix test type to pcap
Jeff Lucovsky [Mon, 22 Jul 2019 22:39:22 +0000 (18:39 -0400)] 
tests: convert dotprefix test type to pcap

5 years agotests: add test for dotprefix transform
Jeff Lucovsky [Sun, 14 Jul 2019 18:52:09 +0000 (14:52 -0400)] 
tests: add test for dotprefix transform

5 years agotests: Update anomaly logging to use new config 123/head
Jeff Lucovsky [Tue, 13 Aug 2019 14:59:02 +0000 (10:59 -0400)] 
tests: Update anomaly logging to use new config

5 years agorun: pass OUTPUT_DIR to check.sh 120/head
Victor Julien [Thu, 5 Sep 2019 12:53:55 +0000 (14:53 +0200)] 
run: pass OUTPUT_DIR to check.sh

5 years agotests: add datasets tests
Victor Julien [Fri, 12 Jul 2019 18:43:16 +0000 (20:43 +0200)] 
tests: add datasets tests

5 years agoFix output in cmdline file for specified command 119/head
Shivani Bhardwaj [Thu, 5 Sep 2019 11:43:17 +0000 (17:13 +0530)] 
Fix output in cmdline file for specified command

So far if a command was specified in test.yaml, it showed up unusable in
cmdline file. Fix it with appropriate environment handling.

5 years agoRevert "Skips not yet passing http evader cases" 118/head
Philippe Antoine [Tue, 3 Sep 2019 14:26:26 +0000 (16:26 +0200)] 
Revert "Skips not yet passing http evader cases"

This reverts commit d6be0d9bde7ec9fd9028670966eabb46ccfd3f92.

5 years agorun: Add --skip-tests option 115/head
Shivani Bhardwaj [Thu, 11 Jul 2019 14:14:55 +0000 (19:44 +0530)] 
run: Add --skip-tests option

Given the ever increasing number of tests, give the developer an option
to skip tests based on patterns. Multiple patterns can be provided
separated by commas.

Usage
=====
```
 $  python ../suricata-verify/run.py --skip-tests evad,draft
```

As a result, all the tests containing "evad" or "draft" in their names.

5 years agoMove http-evader-* tests to http-evader folder
Shivani Bhardwaj [Thu, 11 Jul 2019 12:41:54 +0000 (18:11 +0530)] 
Move http-evader-* tests to http-evader folder

5 years agorun: Allow tests in subdirectories
Shivani Bhardwaj [Thu, 11 Jul 2019 12:32:32 +0000 (18:02 +0530)] 
run: Allow tests in subdirectories

With this patch it is now possible to have subdirectories with tests
under the main test directory. This shall help tests become more
organized.

5 years agotests: add tcp fastopen test
Jeff Lucovsky [Tue, 2 Jul 2019 19:16:31 +0000 (21:16 +0200)] 
tests: add tcp fastopen test

5 years agoAdds test case for http_header while closing
Philippe Antoine [Tue, 7 May 2019 14:22:42 +0000 (16:22 +0200)] 
Adds test case for http_header while closing

6 years agotests: pcap-ng -> pcap 107/head
Victor Julien [Tue, 23 Jul 2019 08:41:53 +0000 (10:41 +0200)] 
tests: pcap-ng -> pcap

6 years agotravis: add check for pcap-ng files
Victor Julien [Tue, 23 Jul 2019 08:57:59 +0000 (10:57 +0200)] 
travis: add check for pcap-ng files

6 years agotests: add test cases for FTP logging 106/head
Jeff Lucovsky [Sun, 21 Jul 2019 16:33:32 +0000 (12:33 -0400)] 
tests: add test cases for FTP logging

6 years agotests: update for anomaly filters 96/head
Jeff Lucovsky [Sat, 13 Jul 2019 15:58:36 +0000 (11:58 -0400)] 
tests: update for anomaly filters

6 years agoModify test.yaml to support tests for 4.1.x
Shivani Bhardwaj [Fri, 5 Jul 2019 12:08:20 +0000 (17:38 +0530)] 
Modify test.yaml to support tests for 4.1.x

6 years agoRemove min-version requirement
Shivani Bhardwaj [Wed, 3 Jul 2019 07:42:18 +0000 (13:12 +0530)] 
Remove min-version requirement

6 years agoAdd tests for TFTP read and write requests
Shivani Bhardwaj [Tue, 18 Jun 2019 16:22:49 +0000 (21:52 +0530)] 
Add tests for TFTP read and write requests

Closes redmine ticket #3043.

6 years agoMoving pcapng files to pcap format
Philippe Antoine [Wed, 3 Jul 2019 20:02:38 +0000 (22:02 +0200)] 
Moving pcapng files to pcap format

6 years agoSkips not yet passing http evader cases
Philippe Antoine [Thu, 20 Jun 2019 08:10:55 +0000 (10:10 +0200)] 
Skips not yet passing http evader cases

6 years agoAdds all http evader cases
Philippe Antoine [Fri, 8 Mar 2019 09:35:42 +0000 (10:35 +0100)] 
Adds all http evader cases

6 years agotests: add ipv4.hdr and ipv6.hdr tests 85/head
Victor Julien [Mon, 1 Jul 2019 12:47:00 +0000 (14:47 +0200)] 
tests: add ipv4.hdr and ipv6.hdr tests

6 years agotests: fix vxlan test
Victor Julien [Fri, 28 Jun 2019 15:03:34 +0000 (17:03 +0200)] 
tests: fix vxlan test

6 years agotests: add vxlan with ssh test 83/head
Victor Julien [Fri, 28 Jun 2019 08:52:08 +0000 (10:52 +0200)] 
tests: add vxlan with ssh test

6 years agotests: icmp over vxlan test 82/head
Victor Julien [Thu, 27 Jun 2019 13:14:26 +0000 (15:14 +0200)] 
tests: icmp over vxlan test

6 years agotests: add basic vxlan test 81/head
Victor Julien [Thu, 27 Jun 2019 07:10:49 +0000 (09:10 +0200)] 
tests: add basic vxlan test

6 years agotests: add tests for udp.hdr and tcp.hdr 78/head
Victor Julien [Fri, 21 Jun 2019 12:39:25 +0000 (14:39 +0200)] 
tests: add tests for udp.hdr and tcp.hdr

6 years agotests: add test for tcp.mss keyword 75/head
Victor Julien [Tue, 18 Jun 2019 13:51:28 +0000 (15:51 +0200)] 
tests: add test for tcp.mss keyword

6 years agosnmp: convert pcap-ng file to pcap 71/head
Victor Julien [Thu, 6 Jun 2019 11:51:58 +0000 (13:51 +0200)] 
snmp: convert pcap-ng file to pcap

6 years agotests: add testcases for SNMP
Pierre Chifflier [Tue, 21 May 2019 18:51:23 +0000 (20:51 +0200)] 
tests: add testcases for SNMP

SNMP v2c, v3 (unauth and encrypted)

6 years agotests: add invalid byte extract depth usage 72/head
jason taylor [Thu, 23 May 2019 00:04:55 +0000 (20:04 -0400)] 
tests: add invalid byte extract depth usage

Signed-off-by: jason taylor <jtfas90@gmail.com>
6 years agotests: add invalid relative fast_pattern usage
jason taylor [Tue, 21 May 2019 01:35:22 +0000 (21:35 -0400)] 
tests: add invalid relative fast_pattern usage

Signed-off-by: jason taylor <jtfas90@gmail.com>
6 years agotests: add invalid relative negate fast_pattern
jason taylor [Tue, 21 May 2019 01:32:55 +0000 (21:32 -0400)] 
tests: add invalid relative negate fast_pattern

Signed-off-by: jason taylor <jtfas90@gmail.com>
6 years agotests: add invalid hex usage
jason taylor [Sun, 19 May 2019 01:15:56 +0000 (21:15 -0400)] 
tests: add invalid hex usage

Signed-off-by: jason taylor <jtfas90@gmail.com>
6 years agotests: add invalid content quotes usage
jason taylor [Sun, 19 May 2019 01:14:35 +0000 (21:14 -0400)] 
tests: add invalid content quotes usage

Signed-off-by: jason taylor <jtfas90@gmail.com>
6 years agotests: update checks for suricata PR #3865
jason taylor [Sat, 18 May 2019 23:55:53 +0000 (19:55 -0400)] 
tests: update checks for suricata PR #3865

Signed-off-by: jason taylor <jtfas90@gmail.com>
6 years agoAdds test case four uri double encoding
Philippe Antoine [Fri, 17 May 2019 11:56:06 +0000 (13:56 +0200)] 
Adds test case four uri double encoding

6 years agoFTP active/passive mode file extraction tests
Jeff Lucovsky [Sat, 30 Mar 2019 15:07:37 +0000 (08:07 -0700)] 
FTP active/passive mode file extraction tests

This changeset adds test cases for FTP active and passive mode using
the pcaps from issue 2527.

6 years agoAdd tests for bug 28 70/head
Shivani Bhardwaj [Sat, 18 May 2019 14:35:07 +0000 (20:05 +0530)] 
Add tests for bug 28

This patch adds tests for the long closed redmine ticket #28.

6 years agotests/tls: add testcases for JA3S
Mats Klepsland [Thu, 16 May 2019 09:44:31 +0000 (11:44 +0200)] 
tests/tls: add testcases for JA3S

6 years agotests: update minimum version to 5.0.0
jason taylor [Fri, 17 May 2019 15:18:54 +0000 (11:18 -0400)] 
tests: update minimum version to 5.0.0

Signed-off-by: jason taylor <jtfas90@gmail.com>
6 years agotests: add invalid semicolon usage
jason taylor [Wed, 15 May 2019 16:11:27 +0000 (12:11 -0400)] 
tests: add invalid semicolon usage

Signed-off-by: jason taylor <jtfas90@gmail.com>
6 years agotests: add invalid semicolon usage
jason taylor [Wed, 15 May 2019 16:11:10 +0000 (12:11 -0400)] 
tests: add invalid semicolon usage

Signed-off-by: jason taylor <jtfas90@gmail.com>
6 years agotests: add invalid quotation mark usage
jason taylor [Wed, 15 May 2019 16:10:47 +0000 (12:10 -0400)] 
tests: add invalid quotation mark usage

Signed-off-by: jason taylor <jtfas90@gmail.com>
6 years agotests: add invalid dsize range usage
jason taylor [Wed, 15 May 2019 16:10:17 +0000 (12:10 -0400)] 
tests: add invalid dsize range usage

Signed-off-by: jason taylor <jtfas90@gmail.com>
6 years agotests: add invalid dsize range and offset usage
jason taylor [Wed, 15 May 2019 16:09:38 +0000 (12:09 -0400)] 
tests: add invalid dsize range and offset usage

Signed-off-by: jason taylor <jtfas90@gmail.com>
6 years agotests: add invalid dsize and offset usage
jason taylor [Wed, 15 May 2019 16:08:52 +0000 (12:08 -0400)] 
tests: add invalid dsize and offset usage

Signed-off-by: jason taylor <jtfas90@gmail.com>
6 years agotests: add invalid content and dsize usage
jason taylor [Wed, 15 May 2019 16:07:54 +0000 (12:07 -0400)] 
tests: add invalid content and dsize usage

Signed-off-by: jason taylor <jtfas90@gmail.com>
6 years agotests: add invalid within and within usage
jason taylor [Wed, 15 May 2019 15:23:36 +0000 (11:23 -0400)] 
tests: add invalid within and within usage

Signed-off-by: jason taylor <jtfas90@gmail.com>
6 years agotests: add invalid offset and offset usage
jason taylor [Wed, 15 May 2019 15:23:14 +0000 (11:23 -0400)] 
tests: add invalid offset and offset usage

Signed-off-by: jason taylor <jtfas90@gmail.com>
6 years agotests: add invalid offset and distance usage
jason taylor [Wed, 15 May 2019 15:22:47 +0000 (11:22 -0400)] 
tests: add invalid offset and distance usage

Signed-off-by: jason taylor <jtfas90@gmail.com>
6 years agotests: add invalid depth within usage
jason taylor [Wed, 15 May 2019 15:22:23 +0000 (11:22 -0400)] 
tests: add invalid depth within usage

Signed-off-by: jason taylor <jtfas90@gmail.com>
6 years agotests: add invalid depth within usage
jason taylor [Wed, 15 May 2019 15:21:53 +0000 (11:21 -0400)] 
tests: add invalid depth within usage

Signed-off-by: jason taylor <jtfas90@gmail.com>
6 years agotests: add invalid depth usage
jason taylor [Wed, 15 May 2019 15:21:21 +0000 (11:21 -0400)] 
tests: add invalid depth usage

Signed-off-by: jason taylor <jtfas90@gmail.com>
6 years agotests: add invalid depth and depth usage
jason taylor [Wed, 15 May 2019 15:19:48 +0000 (11:19 -0400)] 
tests: add invalid depth and depth usage

Signed-off-by: jason taylor <jtfas90@gmail.com>
6 years agotests: add more invalid depth and distance usage
jason taylor [Wed, 15 May 2019 01:04:14 +0000 (21:04 -0400)] 
tests: add more invalid depth and distance usage

Signed-off-by: jason taylor <jtfas90@gmail.com>
6 years agotests: add invalid offset and within usage
jason taylor [Wed, 15 May 2019 00:59:03 +0000 (20:59 -0400)] 
tests: add invalid offset and within usage

Signed-off-by: jason taylor <jtfas90@gmail.com>
6 years agotests: add invalid depth and distance usage
jason taylor [Wed, 15 May 2019 00:45:13 +0000 (20:45 -0400)] 
tests: add invalid depth and distance usage

Signed-off-by: jason taylor <jtfas90@gmail.com>
6 years agotests/tls: add testcases for tls.certs keyword 60/head
Mats Klepsland [Wed, 15 May 2019 12:57:09 +0000 (14:57 +0200)] 
tests/tls: add testcases for tls.certs keyword

6 years agotests: add missing magic dep to filestore
Victor Julien [Mon, 6 May 2019 11:26:32 +0000 (13:26 +0200)] 
tests: add missing magic dep to filestore

6 years agofilestore: add testcases for filecontainer with http and smb 52/head
Andreas Herz [Fri, 3 May 2019 08:46:30 +0000 (10:46 +0200)] 
filestore: add testcases for filecontainer with http and smb

6 years agotests/anomaly: fix for mingw
Victor Julien [Mon, 29 Apr 2019 10:06:04 +0000 (12:06 +0200)] 
tests/anomaly: fix for mingw

6 years agotests: fix wrong jansson test
Victor Julien [Mon, 29 Apr 2019 10:04:59 +0000 (12:04 +0200)] 
tests: fix wrong jansson test

6 years agoAdds test case for JSON anomaly logging 50/head
Jeff Lucovsky [Wed, 17 Apr 2019 23:34:36 +0000 (16:34 -0700)] 
Adds test case for JSON anomaly logging

6 years agotests: fix test requirements for 4.1.x and 4.0.x
Victor Julien [Fri, 26 Apr 2019 08:27:14 +0000 (10:27 +0200)] 
tests: fix test requirements for 4.1.x and 4.0.x

6 years agorun: Make test result output compact
Shivani Bhardwaj [Thu, 25 Apr 2019 15:46:39 +0000 (21:16 +0530)] 
run: Make test result output compact

The new sub test routine causes the test result output cluttered. In
order to avoid that, only print the information of any sub-tests being
skipped or failed.

Before
```
===> alert-testmyids:
|
 --> Sub test #1: OK

|
 --> Sub test #2: SKIPPED : Suricata v6.0 not found

|
 --> Sub test #3: SKIPPED : Suricata v2.0 not found
OK
```

After this patch

```
===> alert-testmyids: Sub test #2: SKIPPED : Suricata v6.0 not found
Sub test #3: SKIPPED : Suricata v2.0 not found
OK
```

6 years agodetect-http-protocol: test inspect/mpm v2 apis
Giuseppe Longo [Tue, 23 Apr 2019 18:42:37 +0000 (20:42 +0200)] 
detect-http-protocol: test inspect/mpm v2 apis

6 years agoAdds a test case for http auth unrecognized
Philippe Antoine [Wed, 6 Mar 2019 07:57:48 +0000 (08:57 +0100)] 
Adds a test case for http auth unrecognized

6 years agoeve/flow: add vlan and double-tagged vlan test 48/head
Mark Janssen [Thu, 28 Feb 2019 15:15:25 +0000 (16:15 +0100)] 
eve/flow: add vlan and double-tagged vlan test

6 years agoSuricata-verify tests for http.{location,server}
Jeff Lucovsky [Sat, 2 Mar 2019 17:21:30 +0000 (09:21 -0800)] 
Suricata-verify tests for http.{location,server}

Add test cases to suricata-verify for new HTTP sticky buffers: location and server

6 years agoalert: verify test for distance/within keywords
jason taylor [Thu, 4 Apr 2019 00:33:52 +0000 (20:33 -0400)] 
alert: verify test for distance/within keywords

* this is based on https://redmine.openinfosecfoundation.org/issues/1

Signed-off-by: jason taylor <jtfas90@gmail.com>
6 years agorun: Add per test check for Suricata version
Shivani Bhardwaj [Sat, 20 Apr 2019 19:21:16 +0000 (00:51 +0530)] 
run: Add per test check for Suricata version

Some tests in the latest versions might fail due to compatibility issues
because of the changes in features with every version. In order to avoid
failure in such cases, add per test checks that allow to check for the
current Suricata version and in case it does not match the version of
Suricata required to run that particular test, skip that test with an
appropriate message. This feature allows to run different underlying
tests individually and observe their individual outputs.

Sample conf
-----------
```
requires:
  features:
    - HAVE_LIBJANSSON

checks:
  - filter:
     version: 2
      count: 1
      match:
        event_type: alert
  - filter:
      version: 5.0
      count: 1
      match:
          event_type: alert

  # Check how many lines were logged to fast.log.
  - shell:
      args: cat fast.log | wc -l | xargs
      expect: 1
```

Sample output
-------------
Running `tests/alert-testmyids` with above configuration (test.yaml)
gives the following output when run from a directory having Suricata
version 5.0.0-dev.
```
===> alert-testmyids:
|
 --> Sub test #1: SKIPPED: Suricata v2 not found

|
 --> Sub test #2: OK

|
 --> Sub test #3: OK
OK
```

Case handling
-------------
Case #1
=======
In case someone specifies `min-version` as well as `version` as a part
of the configuration, the test fails with an error as below.
```
===> alert-testmyids: FAIL: Specify either min-version or version
```

Case #2
=======
In case someone provides an old style `check.sh` as well as `checks` in
test.yaml, the test only performs the operations mentioned in tests.yaml
and ignores the presence of `check.sh`.

Case #3
=======
In case someone provides a faulty `check.sh`, entire test fails.

Closes redmine ticket #2924

6 years agoAdds smtp rset test
Philippe Antoine [Thu, 18 Apr 2019 13:43:17 +0000 (15:43 +0200)] 
Adds smtp rset test

Resetting BDAT chunks length

6 years agowindows: fixes for for windows
Victor Julien [Thu, 21 Feb 2019 09:37:00 +0000 (10:37 +0100)] 
windows: fixes for for windows

Support running tests on Windows. Fix unix-isms like 'command > /dev/null'
and use 'command > nil' in Windows.

Skip tests that use the 'check.sh' or 'command' logic.

Pass the run.py's env to the subprocess to make sure the PATH is passed
on correctly.

6 years agoeve/dns-v2: remove unnecessary include
Victor Julien [Thu, 21 Feb 2019 17:55:46 +0000 (18:55 +0100)] 
eve/dns-v2: remove unnecessary include

6 years agotests: add test for bug 2769
Victor Julien [Thu, 21 Feb 2019 11:12:39 +0000 (12:12 +0100)] 
tests: add test for bug 2769

6 years agorunner: use --disable-detection when no rules in test
Victor Julien [Fri, 29 Mar 2019 14:04:22 +0000 (15:04 +0100)] 
runner: use --disable-detection when no rules in test

6 years agoAdds test case for http range logging 44/head
Philippe Antoine [Thu, 4 Apr 2019 18:55:51 +0000 (20:55 +0200)] 
Adds test case for http range logging

6 years agoAdd test for IKEv2 Weak DH parameters detection
Pierre Chifflier [Mon, 4 Mar 2019 20:34:35 +0000 (21:34 +0100)] 
Add test for IKEv2 Weak DH parameters detection

6 years agosmtp: add raw extraction test
Maurizio Abba [Fri, 15 Feb 2019 17:51:46 +0000 (17:51 +0000)] 
smtp: add raw extraction test

6 years agotests: fix tls and eve tests for 4.0.x
Victor Julien [Sat, 16 Feb 2019 09:42:09 +0000 (10:42 +0100)] 
tests: fix tls and eve tests for 4.0.x

6 years agoAdds a readme and the dummy python script 8/head
Philippe Antoine [Fri, 18 Jan 2019 16:37:58 +0000 (17:37 +0100)] 
Adds a readme and the dummy python script

Commit to be squashed

6 years agoAdds smtp pipelining test
Philippe Antoine [Fri, 14 Dec 2018 10:21:31 +0000 (11:21 +0100)] 
Adds smtp pipelining test

See #1863

6 years agodns test: add check for dns object in alert
Jason Ish [Thu, 24 Jan 2019 16:51:31 +0000 (10:51 -0600)] 
dns test: add check for dns object in alert

Extend an existing test to check that the DNS object exists
on a DNS alert.

6 years agokrb5: Add parser test with fragmented packets
jason taylor [Tue, 18 Dec 2018 21:07:07 +0000 (16:07 -0500)] 
krb5: Add parser test with fragmented packets

- adds test case
- reference: https://github.com/OISF/suricata/pull/3583
- reference: https://redmine.openinfosecfoundation.org/issues/2528

Signed-off-by: jason taylor <jtfas90@gmail.com>
6 years agotls tests: don't include full yaml
Victor Julien [Fri, 8 Feb 2019 10:48:28 +0000 (11:48 +0100)] 
tls tests: don't include full yaml