-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
userguide: explain rule types and categorization - v4 #12111
Conversation
Add documentation about the rule types introduced by 2696fda. Add doc tags around code definitions that are referenced in the docs. Task #https://redmine.openinfosecfoundation.org/issues/7031
- 'tcp-stream' in protocol field; simple 'content'; 'byte_extract' | ||
* - Application Layer Protocol | ||
- Flow | ||
- Per-packet basis |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this more correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think so, ya
- Flow | ||
- Once per direction | ||
- On the flow, on IP address level (negated addresses) | ||
- Source/ Destination field of a rule, containing negated address |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added this, not sure if good to have or not
Once parsed, Suricata rules are categorized for performance and further | ||
processing (as different rule types will be handled by specific engine modules). | ||
The signature types are defined in `src/detect.h | ||
<https://github.com/OISF/suricata/blob/master/src/detect.h>`_: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed the line references here, to make this more time resilient
|
||
alert tcp-pkt [192.168.0.0/16,10.0.0.0/8,172.16.0.0/12] any -> any any (msg:"tcp-pkt, no content"; sid:201;) | ||
|
||
IP Only (negated address) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it also be contains negated address
here, to ensure people are seeing it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps another example as well, e.g. [10.0.0.0/8,!10.10.10.10]
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #12111 +/- ##
==========================================
+ Coverage 83.23% 83.27% +0.04%
==========================================
Files 906 906
Lines 257647 257647
==========================================
+ Hits 214458 214567 +109
+ Misses 43189 43080 -109
Flags with carried forward coverage won't be shown. Click here to find out more. |
Information: QA ran without warnings. Pipeline 23303 |
New PR incoming to fix clang failure |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor comments inline
:header-rows: 1 | ||
|
||
* - Type | ||
- Scope |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
action scope?
- Flow, if stateful, per-packet if not | ||
- Against the reassembled stream. If stream unavailable, match per-packet | ||
(packet payload and stream payload) | ||
- 'content' with 'starts with' or 'depth' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
startswith is a keyword w/o space
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
. >_<'
- 'tcp-stream' in protocol field; simple 'content'; 'byte_extract' | ||
* - Application Layer Protocol | ||
- Flow | ||
- Per-packet basis |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think so, ya
|
||
alert tcp-pkt [192.168.0.0/16,10.0.0.0/8,172.16.0.0/12] any -> any any (msg:"tcp-pkt, no content"; sid:201;) | ||
|
||
IP Only (negated address) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps another example as well, e.g. [10.0.0.0/8,!10.10.10.10]
New version: #12112 |
Add documentation about the rule types introduced by 2696fda.
Add doc tags around code definitions that are referenced in the docs.
Link to ticket: https://redmine.openinfosecfoundation.org/issues/
I guess this covers https://redmine.openinfosecfoundation.org/issues/7031
Built docs: https://suri-rtd-test.readthedocs.io/en/doc-sigtypes-et-properties-v4/rules/intro.html#rule-s-types-and-categorization
Previous PR: #12107
Describe changes: (tried to) address feedback:
Scope
, and tie explanations to other Table columns as wellSignatureType
andSignatureProperties
app-layer protocol
rules are inspected