--- /dev/null
+%YAML 1.1
+---
+
+logging:
+ default-log-level: info
+ outputs:
+ - file:
+ enabled: yes
+ filename: eve.json
+ type: json
--- /dev/null
+alert udp any any -> any any (msg:"TEST SUCCESFUL - Content Greater than Dsize INVALID combination "; dsize:10; content:"thisstringisgreaterthan10bytes"; sid:6666662; rev:1;)
--- /dev/null
+requires:
+ version: 7
+
+command: |
+ ${SRCDIR}/src/suricata --set classification-file="${SRCDIR}/classification.config" --set reference-config-file="${SRCDIR}/reference.config" -l ${OUTPUT_DIR} -c ${TEST_DIR}/suricata.yaml -r ${TEST_DIR}/ -S ${TEST_DIR}/test.rules
+
+checks:
+ # check that we have the following entries in eve.json
+ # match 1 specific rule load failure reason
+ - filter:
+ count: 1
+ match:
+ event_type: engine
+ engine.message: "signature can't match as required content length 30 exceeds dsize value 10"
+
+ - filter:
+ count: 1
+ match:
+ event_type: engine
+ engine.error: "SC_ERR_NO_RULES_LOADED"
--- /dev/null
+%YAML 1.1
+---
+
+logging:
+ default-log-level: info
+ outputs:
+ - file:
+ enabled: yes
+ filename: eve.json
+ type: json
--- /dev/null
+alert ip any any -> any any (msg:"dsize -- negated content requires more content";dsize:16; content:"abcdef"; startswith; content:!"a"; distance:0; content:"789"; distance:0; content:!"c"; distance:1; within:10;sid:5;)
--- /dev/null
+requires:
+ version: 7
+
+command: |
+ ${SRCDIR}/src/suricata --set classification-file="${SRCDIR}/etc/classification.config" --set reference-config-file="${SRCDIR}/etc/reference.config" -l ${OUTPUT_DIR} -c ${TEST_DIR}/suricata.yaml -r ${TEST_DIR}/ -S ${TEST_DIR}/test.rules
+
+checks:
+ # check that we have the following entries in eve.json
+ # match 1 specific rule load failure reason
+ - filter:
+ count: 1
+ match:
+ event_type: engine
+ engine.message: "signature can't match as required content length 20 exceeds dsize value 16"
+
+ - filter:
+ count: 1
+ match:
+ event_type: engine
+ engine.error: "SC_ERR_NO_RULES_LOADED"
--- /dev/null
+%YAML 1.1
+---
+
+logging:
+ default-log-level: info
+ outputs:
+ - file:
+ enabled: yes
+ filename: eve.json
+ type: json
--- /dev/null
+alert udp any any -> any any (msg:"TEST SUCCESSFUL - dsize/offset INVALID combination "; dsize:50; content:"AA"; offset:100; sid:6666661; rev:1;)
--- /dev/null
+requires:
+ version: 7
+
+command: |
+ ${SRCDIR}/src/suricata --set classification-file="${SRCDIR}/classification.config" --set reference-config-file="${SRCDIR}/reference.config" -l ${OUTPUT_DIR} -c ${TEST_DIR}/suricata.yaml -r ${TEST_DIR}/ -S ${TEST_DIR}/test.rules
+
+checks:
+ # check that we have the following entries in eve.json
+ # match 1 specific rule load failure reason
+ - filter:
+ count: 1
+ match:
+ event_type: engine
+ engine.message: "signature can't match as required content length 102 exceeds dsize value 50"
+
+ - filter:
+ count: 1
+ match:
+ event_type: engine
+ engine.error: "SC_ERR_NO_RULES_LOADED"
--- /dev/null
+%YAML 1.1
+---
+
+logging:
+ default-log-level: info
+ outputs:
+ - file:
+ enabled: yes
+ filename: eve.json
+ type: json
--- /dev/null
+alert udp any any -> any any (msg:"TEST SUCCESFUL - dsize/offset INVALID combination "; dsize:5<>10; content:"AAAA"; offset:8; sid:6666665; rev:1;)
--- /dev/null
+requires:
+ min-version: 7
+
+command: |
+ ${SRCDIR}/src/suricata --set classification-file="${SRCDIR}/classification.config" --set reference-config-file="${SRCDIR}/reference.config" -l ${OUTPUT_DIR} -c ${TEST_DIR}/suricata.yaml -r ${TEST_DIR}/ -S ${TEST_DIR}/test.rules
+
+checks:
+ # check that we have the following entries in eve.json
+ # match 1 specific rule load failure reason
+ - filter:
+ count: 1
+ match:
+ event_type: engine
+ engine.message: "signature can't match as required content length 12 exceeds dsize value 10"
+
+ - filter:
+ count: 1
+ match:
+ event_type: engine
+ engine.error: "SC_ERR_NO_RULES_LOADED"
--- /dev/null
+%YAML 1.1
+---
+
+logging:
+ default-log-level: info
+ outputs:
+ - file:
+ enabled: yes
+ filename: eve.json
+ type: json
--- /dev/null
+alert udp any any -> any any (msg:"TEST SUCCESFUL - dsize with range INVALID combination "; dsize:5<>10; content:"thisstringisgreaterthan10bytes"; sid:6666664; rev:1;)
--- /dev/null
+requires:
+ min-version: 7
+
+command: |
+ ${SRCDIR}/src/suricata --set classification-file="${SRCDIR}/classification.config" --set reference-config-file="${SRCDIR}/reference.config" -l ${OUTPUT_DIR} -c ${TEST_DIR}/suricata.yaml -r ${TEST_DIR}/ -S ${TEST_DIR}/test.rules
+
+checks:
+ # check that we have the following entries in eve.json
+ # match 1 specific rule load failure reason
+ - filter:
+ count: 1
+ match:
+ event_type: engine
+ engine.message: "signature can't match as required content length 30 exceeds dsize value 10"
+
+ - filter:
+ count: 1
+ match:
+ event_type: engine
+ engine.error: "SC_ERR_NO_RULES_LOADED"