-
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: log app-layer metadata in alert with single tx v5 #12168
detect: log app-layer metadata in alert with single tx v5 #12168
Conversation
Ticket: 7199 Uses a config parameter detect.force-applayer-findtx to enable this behavior (off by default) This feature is requested for use cases with signatures not using app-layer keywords but still targetting application layer transactions, such as pass/drop rule combination, or lua usage. This overrides the previous behavior of checking if the signature has a content match, by checking if there is only one live transaction, in addition to the config parameter being set.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #12168 +/- ##
==========================================
- Coverage 49.81% 45.33% -4.49%
==========================================
Files 909 909
Lines 257904 257736 -168
==========================================
- Hits 128467 116832 -11635
- Misses 129437 140904 +11467
Flags with carried forward coverage won't be shown. Click here to find out more. |
WARNING:
Pipeline 23591 |
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.
I do hope we find something we can agree upon with this work :)
Left a couple of comments for the docs/ expressions used part.
The alert event will have ``"tx_id_forced": true`` to recognize | ||
these alerts. |
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.
Pondering on the name here (as it will be used in the log output).
tx_match_forced
? tx_logged_forced
?
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.
match
has too much meaning with rule matching in Suricata-language, so I'd avoid that.
Are we only logging in the case there is one TX? |
Yes logging if one tx and config parameter set Please give me better names :-) |
# try to find an app-layer transaction for rules without app-layer keywords | ||
# allows to log app-layer metadata in alert | ||
# but the transaction may not be the relevant one. | ||
# force-applayer-findtx: no |
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.
force-tx-log
?
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.
Yeah... I am not sure.
This is the detect engine doing the work here, not the logging...
Next in #12195 |
Link to ticket: https://redmine.openinfosecfoundation.org/issues/
https://redmine.openinfosecfoundation.org/issues/7199
May also solve https://redmine.openinfosecfoundation.org/issues/7406 and https://redmine.openinfosecfoundation.org/issues/7350
Describe changes:
SV_BRANCH=OISF/suricata-verify#2146
#12166 with big changes
detect.force-applayer-findtx
tx_id_forced: true
in such casesPACKET_ALERT_FLAG_STREAM_MATCH
as overridden by the new one : one live tx + config okAnswering #12166 (comment) :
I think/fear that for every protocol, there does not exist a condition robust enough to provide the relevant tx for all use cases = set of rules + people expectations
Do you have such a condition ?
I think there is quite a demand to log something, and since I think we cannot be always right, we can ask the user to turn on some configuration parameter to ask for it