-
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
detect: allow rule which need both directions to match #10252
Conversation
Fixup for the warning |
Ticket: 5665 This is done with `alert ip any any => any any` The => operator means that we will need both directions
4479e05
to
e57e501
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #10252 +/- ##
==========================================
- Coverage 82.28% 82.28% -0.01%
==========================================
Files 977 977
Lines 271950 272011 +61
==========================================
+ Hits 223784 223828 +44
- Misses 48166 48183 +17
Flags with carried forward coverage won't be shown. Click here to find out more. |
Information: QA ran without warnings. Pipeline 17766 |
I've very excited by this feature, but I noticed some limitations that I'd like to confirm my understanding
This would mean that using values such has http.response_body, http.response_header, etc could not be used as a fast_pattern? so a rule such this one, would not be allowed? Instead, the fast_pattern would have to be
This would apply to keywords such as http.cookie, http.header, http.connection, http.header_names? After reading through the docs and attempting to write a bi directional rule, I was left wondering what values should be used for the src/dst host/port variables as well as the flow direction. Given this limitation
I imagine that the src/dst host/port vars should be reflective of the client (in a tcp sense) initiating a session with the server. and that the flow keyword directional option should always be either "to_server" or "from_client"? If so, this might be more clearly indicated in the docs and validated within the rules. |
Thanks for you interest @zoomequipd As a foreword, I would like to say that these limitations are the limitations of the current PR.
Your understanding is correct, the fast_pattern would have to be .png... This will be hard to tackle because of streaming buffer like
Yes, this is correct.
Like a normal directional rule The limitation (linked with the fast_pattern one) is that you cannot match on HTTP2 push promise, where you get first the data from the server, then the data from the client...
You cannot use I feel there is something unclear to you. |
Continued in #10506 |
Link to redmine ticket:
https://redmine.openinfosecfoundation.org/issues/5665
Describe changes:
OISF/suricata-verify#1603
Not so much a draft anymore...
But I still expect to see next iterations...
TODO :
to_client
andto_server
keywords that are not inflow
keyword, but only apply to a previous keyword). Here, it is a documented limitation...#10242 rebased to get green CI