Conversation
Allows for quickly checking if sig operates on frames during parsing.
Make `Signature::proto` an optional member, meaning that if it is NULL we can skip the check. This can be done for `alert ip`, as no check is needed, and for `alert tcp` and `alert udp` as having a rule in a sgh for those means that the protocol matches. Some exceptions are rules that require: - ipv4/ipv6 specific matching - frames, due to sharing prefilter between tcp and udp - ip-only rules, due to those not being per sgh
Support `alert ether` for matching all ethernet packets. Add `alert arp` for matching ARP packets. Ticket: OISF#8313.
Sticky buffer to inspect the ethernet header.
Example rule:
alert ether any any -> any any ( \
ether.hdr; content:"|08 06|"; offset:12; depth:2; \
sid:1;)
Ticket: OISF#8327.
To indicate it's not just like `alert ip`.
`alert pkthdr` was initially just an alias for `alert ip`, as that was really just a way of stating that "any" should be matched. However with the Ethernet matching in place, it no long makes sense to treat `alert ip` as "any". Since `pkthdr` is used to match on decoder events, also for packets that completely failed to parse, it should no longer be treated as `alert ip` but rather as it's own distinct logic.
Cannot be combined with --firewall-rules-exclusive
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #15122 +/- ##
==========================================
+ Coverage 82.63% 82.68% +0.05%
==========================================
Files 990 992 +2
Lines 271599 271852 +253
==========================================
+ Hits 224429 224777 +348
+ Misses 47170 47075 -95
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
2 observations:
|
Yeah this will need some further work. I suppose ultimately we want to allow MAC addresses to be used in the source/dest fields of these rules. |
|
Information: QA ran without warnings. Pipeline = 30600 |
jasonish
left a comment
There was a problem hiding this comment.
Fixes my AFP firewall setup; needed to move forward. Any thoughts on backporting? Some of the commits clearly mention a ticket marked for backporting, but not all reference a ticket.
|
Merged in #15127, thanks! |
SV_BRANCH=OISF/suricata-verify#2953
#15108 with review comments addressed and more tests in the SV test.