suricata-verify icon indicating copy to clipboard operation
suricata-verify copied to clipboard

tests: add tests for negated protocol matching

Open catenacyber opened this issue 1 year ago • 7 comments

Ticket

https://redmine.openinfosecfoundation.org/issues/4921

#1012 with rewritten rule to match suricata incoming PR

catenacyber avatar Jan 25 '24 20:01 catenacyber

Considering the README description and the docs for this, could we have a rule with something like app-layer-protocol:failed; app-layer-protocol:toserver ?

Do you mean rather app-layer-protocol:failed,toserver; ?

catenacyber avatar Mar 12 '24 19:03 catenacyber

Changed the pcap to not use SUBSCRIBE SIP method

catenacyber avatar Mar 12 '24 21:03 catenacyber

Considering the README description and the docs for this, could we have a rule with something like app-layer-protocol:failed; app-layer-protocol:toserver ?

Do you mean rather app-layer-protocol:failed,toserver; ?

Yes, that, sorry.

jufajardini avatar Apr 18 '24 00:04 jufajardini

But this rule would not match :

Here, we have a pcap with one flow, where do not recognize protocol to server, but we recognize http toclient, and we thus classify the whole as http...

Maybe you are on to something about protocol detection, rather than the keyword... So, what do you expect ?

catenacyber avatar Apr 18 '24 07:04 catenacyber

But this rule would not match :

Here, we have a pcap with one flow, where do not recognize protocol to server, but we recognize http toclient, and we thus classify the whole as http...

Maybe you are on to something about protocol detection, rather than the keyword... So, what do you expect ?

It was more about trying to understand how the keyword works and what is allowed or not with it...

jufajardini avatar Apr 22 '24 22:04 jufajardini

Do you want unit tests for keyword parser ?

catenacyber avatar Apr 23 '24 19:04 catenacyber

Do you want unit tests for keyword parser ?

You're right, maybe this isn't the right test for those. XD

jufajardini avatar Apr 23 '24 20:04 jufajardini

Continued in https://github.com/OISF/suricata-verify/pull/1823

catenacyber avatar May 07 '24 07:05 catenacyber