-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dataset/rep: add tests for error conditions
- Loading branch information
Showing
16 changed files
with
173 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
alert dns any any -> any any (dns.query; datarep:dns_string, >, 200, load dns_string.rep, type string; sid:1;) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Z29vZ2xlLm;NvbQ==,1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
%YAML 1.1 | ||
--- | ||
|
||
# Logging configuration. This is not about logging IDS alerts/events, but | ||
# output about what Suricata is doing, like startup messages, errors, etc. | ||
logging: | ||
default-log-level: notice | ||
outputs: | ||
- console: | ||
enabled: yes | ||
# type: json | ||
- file: | ||
enabled: yes | ||
level: info | ||
filename: suricata.json | ||
type: json | ||
- syslog: | ||
enabled: no | ||
facility: local5 | ||
format: "[%i] <%d> -- " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
pcap: ../../flowbit-oring/input.pcap | ||
|
||
requires: | ||
features: | ||
- HAVE_LIBJANSSON | ||
files: | ||
- src/datasets.c | ||
|
||
args: | ||
- -k none | ||
|
||
exit-code: 1 | ||
|
||
checks: | ||
- filter: | ||
min-version: 8 | ||
filename: suricata.json | ||
count: 1 | ||
match: | ||
log_level: "Error" | ||
event_type: "engine" | ||
engine.message.__find: "bad base64 encoding dns_string" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
alert dns any any -> any any (dns.query; datarep:dns_string, >, 200, load dns_string.rep, type string; sid:1;) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Z29vZ2xlLmNvbQ==,-1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
%YAML 1.1 | ||
--- | ||
|
||
# Logging configuration. This is not about logging IDS alerts/events, but | ||
# output about what Suricata is doing, like startup messages, errors, etc. | ||
logging: | ||
default-log-level: notice | ||
outputs: | ||
- console: | ||
enabled: yes | ||
# type: json | ||
- file: | ||
enabled: yes | ||
level: info | ||
filename: suricata.json | ||
type: json | ||
- syslog: | ||
enabled: no | ||
facility: local5 | ||
format: "[%i] <%d> -- " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
pcap: ../../flowbit-oring/input.pcap | ||
|
||
requires: | ||
features: | ||
- HAVE_LIBJANSSON | ||
files: | ||
- src/datasets.c | ||
|
||
args: | ||
- -k none | ||
|
||
exit-code: 1 | ||
|
||
checks: | ||
- filter: | ||
min-version: 8 | ||
filename: suricata.json | ||
count: 1 | ||
match: | ||
log_level: "Error" | ||
event_type: "engine" | ||
engine.message.__find: "invalid datarep value dns_string" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Y3VybC83LjQzLjA= | ||
YmxhaA==,1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
%YAML 1.1 | ||
--- | ||
|
||
# Logging configuration. This is not about logging IDS alerts/events, but | ||
# output about what Suricata is doing, like startup messages, errors, etc. | ||
logging: | ||
default-log-level: notice | ||
outputs: | ||
- console: | ||
enabled: yes | ||
# type: json | ||
- file: | ||
enabled: yes | ||
level: info | ||
filename: suricata.json | ||
type: json | ||
- syslog: | ||
enabled: no | ||
facility: local5 | ||
format: "[%i] <%d> -- " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
alert http any any -> any any (http.user_agent; dataset:isset,ua-seen,type string,load datasets.csv; sid:1;) | ||
alert http any any -> any any (http.user_agent; dataset:isnotset,ua-seen,type string,load datasets.csv; sid:2;) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
pcap: ../../flowbit-oring/input.pcap | ||
|
||
requires: | ||
min-version: 8 | ||
|
||
args: | ||
- -k none | ||
|
||
exit-code: 1 | ||
|
||
checks: | ||
- filter: | ||
min-version: 8 | ||
filename: suricata.json | ||
count: 1 | ||
match: | ||
log_level: "Error" | ||
event_type: "engine" | ||
engine.message.__find: "Cannot mix dataset and datarep values for set ua-seen" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
alert dns any any -> any any (dns.query; datarep:dns_string, >, 200, load dns_string.rep, type string; sid:1;) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Z29vZ2xlLmNvbQ==,1 | ||
YmxhaA== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
%YAML 1.1 | ||
--- | ||
|
||
# Logging configuration. This is not about logging IDS alerts/events, but | ||
# output about what Suricata is doing, like startup messages, errors, etc. | ||
logging: | ||
default-log-level: notice | ||
outputs: | ||
- console: | ||
enabled: yes | ||
# type: json | ||
- file: | ||
enabled: yes | ||
level: info | ||
filename: suricata.json | ||
type: json | ||
- syslog: | ||
enabled: no | ||
facility: local5 | ||
format: "[%i] <%d> -- " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
pcap: ../../flowbit-oring/input.pcap | ||
|
||
requires: | ||
min-version: 8 | ||
|
||
args: | ||
- -k none | ||
|
||
exit-code: 1 | ||
|
||
checks: | ||
- filter: | ||
min-version: 8 | ||
filename: suricata.json | ||
count: 1 | ||
match: | ||
log_level: "Error" | ||
event_type: "engine" | ||
engine.message.__find: "Cannot mix dataset and datarep values for set dns_string" |