]> git.ipfire.org Git - thirdparty/suricata-verify.git/log
thirdparty/suricata-verify.git
4 years agohttp: fix http-sticky-server pcap by removing gaped flow 317/head
Philippe Antoine [Wed, 22 Jul 2020 19:15:25 +0000 (21:15 +0200)] 
http: fix http-sticky-server pcap by removing gaped flow

4 years agohttp: adds test with gap extending beyond body
Philippe Antoine [Mon, 13 Jul 2020 08:00:11 +0000 (10:00 +0200)] 
http: adds test with gap extending beyond body

4 years agohttp: adds test with whole body as gap
Philippe Antoine [Mon, 13 Jul 2020 07:55:47 +0000 (09:55 +0200)] 
http: adds test with whole body as gap

4 years agohttp: adds test with double gap
Philippe Antoine [Mon, 13 Jul 2020 07:53:03 +0000 (09:53 +0200)] 
http: adds test with double gap

4 years agohttp: adds test with signle gap
Philippe Antoine [Mon, 13 Jul 2020 07:50:42 +0000 (09:50 +0200)] 
http: adds test with signle gap

4 years agodns: adds test against incomplete TCP payload 315/head
Philippe Antoine [Thu, 30 Jul 2020 15:20:48 +0000 (17:20 +0200)] 
dns: adds test against incomplete TCP payload

4 years agoadd MQTT ping test
Sascha Steinbiss [Fri, 21 Aug 2020 09:09:34 +0000 (11:09 +0200)] 
add MQTT ping test

See https://github.com/OISF/suricata/pull/5307 for details.

4 years agoGive test count as output not check count
Shivani Bhardwaj [Thu, 19 Sep 2019 07:16:33 +0000 (12:46 +0530)] 
Give test count as output not check count

With the current setup, after running suricata-verify, the output would
give stats about the passed, failed or skipped checks. However, it is
cleaner to get the total stats about tests only.

The priority order for the output is:
FAILED
SKIPPED
PASSED

i.e. if a check or sub-test has failed, the entire test will be counted
as failed in the final output. If all the checks have been skipped,
the test will be counted as skipped in the final output else passed.

Closes redmine ticket 3172.

5 years agohttp2: update test to match new log format
Jason Ish [Mon, 3 Aug 2020 20:55:49 +0000 (14:55 -0600)] 
http2: update test to match new log format

Also test for http1 compatible fields.

5 years agohttp2: enable http2 app-layer and output
Jason Ish [Mon, 3 Aug 2020 15:30:41 +0000 (09:30 -0600)] 
http2: enable http2 app-layer and output

HTTP2 is experimental and disabled by default so the tests
need to explicitly enable it.

5 years agoAdds basic http2 test
Philippe Antoine [Mon, 13 Jul 2020 14:06:45 +0000 (16:06 +0200)] 
Adds basic http2 test

5 years agordp: fix new test for suricata 5
Victor Julien [Thu, 6 Aug 2020 07:17:59 +0000 (09:17 +0200)] 
rdp: fix new test for suricata 5

5 years agotest:byte_jump Test from_end 298/head
Jeff Lucovsky [Sun, 17 May 2020 13:59:28 +0000 (09:59 -0400)] 
test:byte_jump Test from_end

This commit adds test cases for the `byte_jump` `from_end` keyword.

5 years agotest: Community-id tests for dhcp, rdp, smb, tftp
Jeff Lucovsky [Mon, 29 Jun 2020 13:42:39 +0000 (09:42 -0400)] 
test: Community-id tests for dhcp, rdp, smb, tftp

This commit adds test cases that verify the community id string is
included in dhcp, rdp, smb and tftp records when configured.

5 years agordp-protocol: test rdp metadata in alert
Jason Ish [Tue, 4 Aug 2020 22:29:34 +0000 (16:29 -0600)] 
rdp-protocol: test rdp metadata in alert

5 years agosnmp-v2c-get: test snmp metadata in alert
Jason Ish [Tue, 4 Aug 2020 22:29:12 +0000 (16:29 -0600)] 
snmp-v2c-get: test snmp metadata in alert

5 years agodcerpc: Add test for gap handling 296/head
Shivani Bhardwaj [Wed, 5 Aug 2020 06:41:56 +0000 (12:11 +0530)] 
dcerpc: Add test for gap handling

5 years agodcerpc: add logging test
Shivani Bhardwaj [Fri, 5 Jun 2020 13:14:52 +0000 (18:44 +0530)] 
dcerpc: add logging test

5 years agodcerpc: Remove double tests
Shivani Bhardwaj [Fri, 5 Jun 2020 13:13:47 +0000 (18:43 +0530)] 
dcerpc: Remove double tests

5 years agocreatest: add strictcsum option
Shivani Bhardwaj [Fri, 5 Jun 2020 13:13:16 +0000 (18:43 +0530)] 
createst: add strictcsum option

5 years agoreadme: fix example indenting
Jason Ish [Tue, 4 Aug 2020 21:20:13 +0000 (15:20 -0600)] 
readme: fix example indenting

5 years agofilestore-v2.4-forced-with-meta: use "match" tests
Jason Ish [Tue, 4 Aug 2020 21:17:10 +0000 (15:17 -0600)] 
filestore-v2.4-forced-with-meta: use "match" tests

Remove jq tests, these can now be done with the match
syntax.

5 years agofilestore-v2: check for flow_id in .meta file
Jason Ish [Tue, 4 Aug 2020 21:14:45 +0000 (15:14 -0600)] 
filestore-v2: check for flow_id in .meta file

5 years agofilestore-v2: check that flow_id exists in fileinfo record
Jason Ish [Tue, 4 Aug 2020 21:08:29 +0000 (15:08 -0600)] 
filestore-v2: check that flow_id exists in fileinfo record

Redmine issue:
https://redmine.openinfosecfoundation.org/issues/2196

5 years agorunner: debug-failed fixups
Jason Ish [Tue, 4 Aug 2020 21:07:27 +0000 (15:07 -0600)] 
runner: debug-failed fixups

Don't dump a file that looks like binary. This is determined
by trying to utf-8 decode a file.

5 years agooption: adds debugfailed option
Philippe Antoine [Wed, 30 Oct 2019 16:12:53 +0000 (17:12 +0100)] 
option: adds debugfailed option

Prints contents of files in output directory of failed tests
Intent is to debug flasky behaviors

5 years agotests: test that triggers a rule with established though 3whs missing 291/head
Andreas Herz [Thu, 10 Oct 2019 20:02:56 +0000 (22:02 +0200)] 
tests: test that triggers a rule with established though 3whs missing

5 years agotests/filestore: Filestore Stream-depth test cases
Jeff Lucovsky [Sun, 14 Jun 2020 17:57:38 +0000 (13:57 -0400)] 
tests/filestore: Filestore Stream-depth test cases

This commit adds the following test cases for filestore related
stream-depth configuration settings

1.`file-stream.stream-depth` exceeds `stream.reassembly.depth`.
2.`file-stream.stream-depth` is less than `stream.reassembly.depth`.
3.`file-stream.stream-depth` set to 0.

5 years agotests: Add test for transform/content interaction
Jeff Lucovsky [Fri, 12 Jun 2020 13:04:04 +0000 (09:04 -0400)] 
tests: Add test for transform/content interaction

This commit adds a test case for issue 3661.

5 years agotests/anomaly: Test case for mult. loggers
Jeff Lucovsky [Sat, 1 Aug 2020 13:59:27 +0000 (09:59 -0400)] 
tests/anomaly: Test case for mult. loggers

This commit adds a test case for the issue described in bug 3835.
Multiple anomaly loggers aren't supported.

5 years agossh: adds regression test for hassh kex parsing
Philippe Antoine [Mon, 13 Jul 2020 12:29:56 +0000 (14:29 +0200)] 
ssh: adds regression test for hassh kex parsing

5 years agoadd cases for MAC addresses in EVE-JSON
Sascha Steinbiss [Tue, 10 Mar 2020 20:10:48 +0000 (21:10 +0100)] 
add cases for MAC addresses in EVE-JSON

5 years agotests: ERSPAN Type I packet decode if config 289/head
Jeff Lucovsky [Thu, 5 Mar 2020 13:25:36 +0000 (08:25 -0500)] 
tests: ERSPAN Type I packet decode if config

This commit adds tests for ERSPAN Type I decoding based on configuration
settings.

5 years agotests: pcrexform tests
Jeff Lucovsky [Mon, 24 Feb 2020 14:54:34 +0000 (09:54 -0500)] 
tests: pcrexform tests

This PR adds tests for the `pcrexform` including tests for
- basic functionality: Simple PCRE
- extended functionality: Multiple PCREs
- Negative: PCRE that do not match anything
- Negative: Missing option values

5 years agoadd MQTT tests 205/head
Sascha Steinbiss [Sun, 22 Mar 2020 19:19:19 +0000 (20:19 +0100)] 
add MQTT tests

5 years agotests: fixes after TCP changes 281/head
Victor Julien [Sat, 6 Jun 2020 07:27:07 +0000 (09:27 +0200)] 
tests: fixes after TCP changes

Fixes around ACK'd data.

5 years agotests/hassh: adapt to changed logging format 280/head
Victor Julien [Fri, 24 Jul 2020 11:28:11 +0000 (13:28 +0200)] 
tests/hassh: adapt to changed logging format

5 years agotests/dhcp: fix RUST test on non-RUST 260/head
Victor Julien [Mon, 13 Jul 2020 20:04:53 +0000 (22:04 +0200)] 
tests/dhcp: fix RUST test on non-RUST

5 years agotests/ftp-data Test case for event type ftp_data 275/head
Jeff Lucovsky [Sun, 14 Jun 2020 15:13:33 +0000 (11:13 -0400)] 
tests/ftp-data Test case for event type ftp_data

This commit adds a test case to insure that `ftp_data` events are being
generated.

5 years agotests/dnp3: limit midstream test to 5.0+
Victor Julien [Mon, 13 Jul 2020 13:37:16 +0000 (15:37 +0200)] 
tests/dnp3: limit midstream test to 5.0+

5 years agodnp3: new test with more detail 271/head
Jason Ish [Fri, 10 Jul 2020 22:29:53 +0000 (16:29 -0600)] 
dnp3: new test with more detail

Also rename to make it clear its an dnp3/eve test.

5 years agotests: conditional logging tests for http and dns
Victor Julien [Thu, 19 Mar 2020 08:34:22 +0000 (09:34 +0100)] 
tests: conditional logging tests for http and dns

5 years agoAdds dnp3 midstream direction probing parser test
Philippe Antoine [Tue, 30 Jun 2020 06:52:34 +0000 (08:52 +0200)] 
Adds dnp3 midstream direction probing parser test

5 years agotest: Add byte_math tests
Jeff Lucovsky [Tue, 5 May 2020 12:14:56 +0000 (08:14 -0400)] 
test: Add byte_math tests

This commit adds tests for the byte_math keyword. The test is simple
and complements the unit tests added with the Suricata pr.

5 years agoikev2: check more fields
Jason Ish [Tue, 7 Jul 2020 15:32:40 +0000 (09:32 -0600)] 
ikev2: check more fields

To help validate jsonbuilder conversion.

5 years agonew test: netflow-eve: basic check of netflow records 264/head
Jason Ish [Thu, 2 Jul 2020 17:19:14 +0000 (11:19 -0600)] 
new test: netflow-eve: basic check of netflow records

5 years agotests/hassh Add test cases for hassh 267/head
Vadym Malakhatko [Wed, 3 Jun 2020 13:19:27 +0000 (16:19 +0300)] 
tests/hassh Add test cases for hassh

5 years agotests: add test for http raw header
Angelo Mirabella [Wed, 17 Jun 2020 06:33:21 +0000 (07:33 +0100)] 
tests: add test for http raw header

5 years agodhcp test: fix test for new unicode encoding 241/head
Jason Ish [Wed, 3 Jun 2020 05:48:39 +0000 (23:48 -0600)] 
dhcp test: fix test for new unicode encoding

With JsonBuilder, NUL bytes in a string are now encoded as
unicode (\u0000) instead of our previous convention of \\x00.

Rename the old test as its still required for pre version 6.0.

5 years agotests: fix missing NSS check 236/head
Victor Julien [Sat, 23 May 2020 13:50:57 +0000 (15:50 +0200)] 
tests: fix missing NSS check

5 years agofilestore/ftp tests: require HAVE_NSS
Jason Ish [Tue, 19 May 2020 22:02:55 +0000 (16:02 -0600)] 
filestore/ftp tests: require HAVE_NSS

5 years agofilestore v1 test: require version less than 6
Jason Ish [Fri, 15 May 2020 16:23:28 +0000 (10:23 -0600)] 
filestore v1 test: require version less than 6

Filestore v1 has been removed in version 6.0.0.

5 years agogithub-ci: install cbindgen with --debug (builds faster)
Jason Ish [Fri, 15 May 2020 16:28:45 +0000 (10:28 -0600)] 
github-ci: install cbindgen with --debug (builds faster)

5 years agogithub-ci: run self test
Jason Ish [Fri, 15 May 2020 16:23:13 +0000 (10:23 -0600)] 
github-ci: run self test

5 years agorunner: fix tests, add self-test command
Jason Ish [Fri, 15 May 2020 16:22:22 +0000 (10:22 -0600)] 
runner: fix tests, add self-test command

Fix the runner unit test, looks like they had not been
update to match some changes.

Add a self-test command to run the unit tests..

./run.py --self-test

5 years agorunner: add less-than version requirements
Jason Ish [Fri, 15 May 2020 16:20:19 +0000 (10:20 -0600)] 
runner: add less-than version requirements

lt-version can be used to specify that the Suricata version must
be less than a certain value. This is similar to what a max-version
might look like but be more predictable.

For example, to run a test on all versions less than 6:
    lt-version: 6

5 years agoMove dce-iface-01 test to dcerpc folder
Shivani Bhardwaj [Tue, 21 Apr 2020 07:24:27 +0000 (12:54 +0530)] 
Move dce-iface-01 test to dcerpc folder

5 years agoAdd tests for DCERPC
Shivani Bhardwaj [Tue, 21 Apr 2020 07:23:24 +0000 (12:53 +0530)] 
Add tests for DCERPC

5 years agoAdd createst script 235/head
Shivani Bhardwaj [Tue, 9 Jul 2019 17:55:35 +0000 (23:25 +0530)] 
Add createst script

createst is a script to produce a test directory with test.yaml as per
the PCAP and configuration provided.

This currently implements the functionality of creating the "checks" block
in `test.yaml` from a given `eve.json`. You can add other configuration
in the file thus created.

Usage
=====
```
usage: createst.py [-h] [--output-path <output-path>] [--eventtype-only]
                   [--allow-events [ALLOW_EVENTS]]
                   <test-name> <pcap-file>

Create tests with a given PCAP. Execute the script from a valid Suricata
source directory.

positional arguments:
  <test-name>           Name of the test folder
  <pcap-file>           Path to the PCAP file

optional arguments:
  -h, --help            show this help message and exit
  --output-path <output-path>
                        Path to the folder where generated test.yaml should be
                        put
  --eventtype-only      Create filter blocks based on event types only
  --allow-events [ALLOW_EVENTS]
                        Create filter blocks for the specified events
```

5 years agosmtp-eve: higher fidelity smtp test with alerts
Jason Ish [Thu, 21 May 2020 17:31:03 +0000 (11:31 -0600)] 
smtp-eve: higher fidelity smtp test with alerts

5 years agonew test: dhcp-eve-extended
Jason Ish [Wed, 29 Apr 2020 21:55:46 +0000 (15:55 -0600)] 
new test: dhcp-eve-extended

Tests the extended output of DHCP.

5 years agodns txt test: break into v1 and v2 tests
Jason Ish [Mon, 20 Apr 2020 17:39:54 +0000 (11:39 -0600)] 
dns txt test: break into v1 and v2 tests

Eliminating the check.sh test at the same time.

5 years agodns dig test: break into eve v1 and v2 tests
Jason Ish [Mon, 20 Apr 2020 17:22:40 +0000 (11:22 -0600)] 
dns dig test: break into eve v1 and v2 tests

Replace the EVE DNS dig test with 2 tests, one for v1 and
one for v2, both with higher detail matching.

5 years agotests: add datarep parsing test 225/head
Victor Julien [Mon, 27 Apr 2020 06:39:22 +0000 (08:39 +0200)] 
tests: add datarep parsing test

5 years agotests: fix RUST feature checks and add them to smb tests 222/head
Victor Julien [Sun, 26 Apr 2020 12:23:59 +0000 (14:23 +0200)] 
tests: fix RUST feature checks and add them to smb tests

5 years agoAdds test for SMB keyword named_pipe with ascii and unicode
DEL VALLE Bastien [Tue, 14 Apr 2020 18:11:53 +0000 (20:11 +0200)] 
Adds test for SMB keyword named_pipe with ascii and unicode

5 years agoAdds test for SMB key word named_pipe with ascii
DEL VALLE Bastien [Tue, 7 Apr 2020 16:48:59 +0000 (18:48 +0200)] 
Adds test for SMB key word named_pipe with ascii

5 years agoAdds test for SMB EICAR file by segmentation between NetBIOS and SMB
DEL VALLE Bastien [Tue, 3 Mar 2020 17:45:20 +0000 (18:45 +0100)] 
Adds test for SMB EICAR file by segmentation between NetBIOS and SMB

5 years agoAdds test for SMB EICAR file by segmentation in random bytes
DEL VALLE Bastien [Tue, 3 Mar 2020 17:35:29 +0000 (18:35 +0100)] 
Adds test for SMB EICAR file by segmentation in random bytes

5 years agoAdds test for SMB EICAR file nbss-more-ffsmb
DEL VALLE Bastien [Tue, 3 Mar 2020 17:25:10 +0000 (18:25 +0100)] 
Adds test for SMB EICAR file nbss-more-ffsmb

Readme edited

5 years agotests: add tests for issue 3515
Jeff Lucovsky [Thu, 23 Apr 2020 14:57:01 +0000 (10:57 -0400)] 
tests: add tests for issue 3515

5 years agotest/ftp: Verify FTP memory usage
Jeff Lucovsky [Tue, 21 Apr 2020 14:34:02 +0000 (10:34 -0400)] 
test/ftp: Verify FTP memory usage

This commit adds a test case for verifying that FTP memory use and
accounting are correct.

5 years agoAdd tests for flowbit oring
Shivani Bhardwaj [Sat, 4 Apr 2020 19:31:32 +0000 (01:01 +0530)] 
Add tests for flowbit oring

5 years agotests: add dcerpc (over tcp) test 217/head
Victor Julien [Mon, 20 Apr 2020 12:54:21 +0000 (14:54 +0200)] 
tests: add dcerpc (over tcp) test

5 years agotests: add metadata and prefilter tests
Victor Julien [Mon, 20 Apr 2020 12:48:51 +0000 (14:48 +0200)] 
tests: add metadata and prefilter tests

5 years agoFix output-eve-ftp result
Philippe Antoine [Mon, 16 Mar 2020 13:54:03 +0000 (14:54 +0100)] 
Fix output-eve-ftp result

5 years agodecoder: initial hdlc test 213/head
Victor Julien [Fri, 21 Feb 2020 15:54:11 +0000 (16:54 +0100)] 
decoder: initial hdlc test

5 years agotests/tfo: add more tests
Victor Julien [Thu, 19 Mar 2020 20:28:01 +0000 (21:28 +0100)] 
tests/tfo: add more tests

5 years agotests: dns-tcp-www-google-com is rust only
Victor Julien [Sat, 11 Apr 2020 11:27:04 +0000 (13:27 +0200)] 
tests: dns-tcp-www-google-com is rust only

Rust parser has different behavior than the C parser in 4.1.x, but we're
too far into the branch to change such behavior.

5 years agotests: add http file blocking on sha256 tests
Victor Julien [Fri, 27 Mar 2020 14:08:13 +0000 (15:08 +0100)] 
tests: add http file blocking on sha256 tests

5 years agotests: mark 2 smb file tests as requiring rust 208/head
Jason Ish [Wed, 1 Apr 2020 22:50:59 +0000 (16:50 -0600)] 
tests: mark 2 smb file tests as requiring rust

- filestore-container-smb
- smb-eicar-file

5 years agoframework: warns on different type between yaml and json
Philippe Antoine [Fri, 20 Mar 2020 08:38:22 +0000 (09:38 +0100)] 
framework: warns on different type between yaml and json

5 years agoAdds test for SMB EICAR file
Philippe Antoine [Wed, 5 Feb 2020 13:03:42 +0000 (14:03 +0100)] 
Adds test for SMB EICAR file

5 years agowindows: fix version check for win32 204/head
Victor Julien [Thu, 26 Mar 2020 05:38:10 +0000 (06:38 +0100)] 
windows: fix version check for win32

There may be leading output before the expected version string,
so make sure to be a bit stricter on in the regex to extract the
version correctly.

5 years agowindows: skip tests that check for uid
Victor Julien [Tue, 24 Mar 2020 18:12:18 +0000 (19:12 +0100)] 
windows: skip tests that check for uid

5 years agowindows: skip shell checks and don't run setup 203/head
Victor Julien [Tue, 24 Mar 2020 06:35:44 +0000 (07:35 +0100)] 
windows: skip shell checks and don't run setup

5 years agotests: fix test using nanosecond precision
Victor Julien [Tue, 24 Mar 2020 06:33:29 +0000 (07:33 +0100)] 
tests: fix test using nanosecond precision

Not all libpcaps support this.

5 years agotests: byte_test bitmask tests
Jeff Lucovsky [Wed, 4 Mar 2020 13:23:37 +0000 (08:23 -0500)] 
tests: byte_test bitmask tests

5 years agoUpdate min-version to 6.0 for some test that fail on 5.0.x 202/head
Jason Ish [Sat, 21 Mar 2020 18:44:55 +0000 (12:44 -0600)] 
Update min-version to 6.0 for some test that fail on 5.0.x

- detect-filestore-config-02
- detect-filestore-config-04
- pcre-invalid-rule-01

5 years agogithub-ci: test against supported Suricata branches
Jason Ish [Sat, 21 Mar 2020 16:20:42 +0000 (10:20 -0600)] 
github-ci: test against supported Suricata branches

The idea is not to test every compile time option, but a somewhat
standard once over of our supported branches to make sure tests
that are version specific are flagged as such.

Will also allow us to quickly spot PRs that fail that may
be depending on a suricata fix/pr.

5 years agodetect-filestore-config: require nss
Jason Ish [Fri, 20 Mar 2020 23:28:08 +0000 (17:28 -0600)] 
detect-filestore-config: require nss

5 years agopcre-invalid-rule-01: min-version 5.0
Jason Ish [Fri, 20 Mar 2020 22:28:28 +0000 (16:28 -0600)] 
pcre-invalid-rule-01: min-version 5.0

5 years agofile-data-depth-inspection: break into 2 tests
Jason Ish [Fri, 20 Mar 2020 22:25:07 +0000 (16:25 -0600)] 
file-data-depth-inspection: break into 2 tests

As the alert one doesn't work with 4.1.

5 years agotests: file_data depth inspection should keep working with other rules
Gabriel L. Somlo [Mon, 23 Sep 2019 13:47:41 +0000 (09:47 -0400)] 
tests: file_data depth inspection should keep working with other rules

5 years agofilemd5: test md5 rule triggers without filestore keyword
Jason Ish [Thu, 26 Sep 2019 14:55:37 +0000 (08:55 -0600)] 
filemd5: test md5 rule triggers without filestore keyword

Redmine issue:
https://redmine.openinfosecfoundation.org/issues/2490

5 years agoAdds test for http async parsing
Philippe Antoine [Tue, 15 Oct 2019 14:33:59 +0000 (16:33 +0200)] 
Adds test for http async parsing

5 years agohttp-all-headers: remove check.sh, use new __len test
Jason Ish [Thu, 7 Nov 2019 19:25:43 +0000 (13:25 -0600)] 
http-all-headers: remove check.sh, use new __len test

Remove check.sh script and use __len to test the length
of the arrays.

5 years agoAdd ability to match on the length of an array.
Jason Ish [Thu, 7 Nov 2019 19:19:33 +0000 (13:19 -0600)] 
Add ability to match on the length of an array.

By using the "magic" key value of __len, a match can be done
on the length of an array. For example:

  - filter:
      count: 1
      match:
        event_type: http
        http.response_headers.__len: 9

This does rely on us never using __len as an actual object
key, so is a bit of a hack.

5 years agoeve/http: add request/response headers test
Maurizio Abba [Fri, 15 Feb 2019 20:19:20 +0000 (20:19 +0000)] 
eve/http: add request/response headers test

5 years agodns: add some checks on source and destination addresses
Jason Ish [Mon, 18 Nov 2019 18:51:40 +0000 (12:51 -0600)] 
dns: add some checks on source and destination addresses

Ticket #3340:
https://redmine.openinfosecfoundation.org/issues/3340