Test protocol detection only engine-analysis tests to accompany rule
types documentation.
Related to
Task #7031
--- /dev/null
+# Protocol Detection Only Rules
+alert tcp any any -> any any (msg:"tcp, pd negated"; app-layer-protocol:!http; sid:401;)
+alert tcp any any -> any any (msg:"tcp, pd positive"; app-layer-protocol:http; sid:402;)
+alert tcp any any -> any any (msg:"tcp, pd positive dns"; app-layer-protocol:dns; sid:403;)
+alert tcp any any -> any any (msg:"tcp, pd positive, dns, flow:to_server"; app-layer-protocol:dns; flow:to_server; sid:405;)
--- /dev/null
+requires:
+ min-version: 7
+ pcap: false
+args:
+- --engine-analysis
+checks:
+ - filter:
+ filename: rules.json
+ count: 1
+ match:
+ raw: "alert tcp any any -> any any (msg:\"tcp, pd negated\"; app-layer-protocol:!http; sid:401;)"
+ id: 401
+ type: "pd_only"
+ - filter:
+ filename: rules.json
+ count: 1
+ match:
+ raw: "alert tcp any any -> any any (msg:\"tcp, pd positive\"; app-layer-protocol:http; sid:402;)"
+ id: 402
+ type: "pd_only"
+ - filter:
+ filename: rules.json
+ count: 1
+ match:
+ raw: "alert tcp any any -> any any (msg:\"tcp, pd positive dns\"; app-layer-protocol:dns; sid:403;)"
+ id: 403
+ type: "pd_only"
+ - filter:
+ filename: rules.json
+ count: 1
+ match:
+ raw: "alert tcp any any -> any any (msg:\"tcp, pd positive, dns, flow:to_server\"; app-layer-protocol:dns; flow:to_server; sid:405;)"
+ id: 405
+ type: "pd_only"