-
Notifications
You must be signed in to change notification settings - Fork 522
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
[Rule Tuning] Event Aggregation - Fix event.action
& event.type
conditions
#4445
Conversation
Rule: Tuning - GuidelinesThese guidelines serve as a reminder set of considerations when tuning an existing rule. Documentation and Context
Rule Metadata Checks
Testing and Validation
|
@@ -41,8 +41,8 @@ process where container.id: "*" and | |||
event.type== "start" and | |||
/*D4C consolidates closely spawned event.actions, this excludes end actions to only capture ongoing processes*/ | |||
event.action in ("fork", "exec") and event.action != "end" |
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.
Not sure if the Event aggregation affects Defend for Cloud, but I'm removing event.action != "end"
as it would never match anyway as event.action in ("fork", "exec")
is specified
@@ -45,7 +45,7 @@ type = "eql" | |||
|
|||
query = ''' | |||
process where container.id: "*" and event.type== "start" and | |||
event.action in ("fork", "exec") and event.action != "end" and |
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.
Not sure if the Event aggregation affects Defend for Cloud, but I'm removing event.action != "end"
as it would never match anyway as event.action in ("fork", "exec")
is specified
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.
LGTM
⛔️ Tests failed:
|
⛔️ Tests failed:
|
Issues
Part of https://github.com/elastic/ia-trade-team/issues/368
Summary
Fix
event.action
&event.type
conditions that rely on "NOT end", as these would cause logic to not match in aggregated events.Example Aggregated event:
![imagem](https://private-user-images.githubusercontent.com/26856693/409623600-4de3ff41-a2f4-4e8c-9928-95b7bcc282cf.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5NzM2OTMsIm5iZiI6MTczODk3MzM5MywicGF0aCI6Ii8yNjg1NjY5My80MDk2MjM2MDAtNGRlM2ZmNDEtYTJmNC00ZThjLTk5MjgtOTViN2JjYzI4MmNmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA4VDAwMDk1M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQxOWJkMTg3MDdiZjBhNzBmMWNjNTk1YmQ5N2UwNzk5NjE1MzI0NWMxNDM5MmI3ZGNhZDgwZGNlY2E5NWZiZjEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.F_1iFH0nLGHxM-fZblRu_E9hb2j9U_4DBSC-WPZs7uI)
Trying a
![imagem](https://private-user-images.githubusercontent.com/26856693/409623883-0c662338-7119-42e1-9508-15d74b5f836f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5NzM2OTMsIm5iZiI6MTczODk3MzM5MywicGF0aCI6Ii8yNjg1NjY5My80MDk2MjM4ODMtMGM2NjIzMzgtNzExOS00MmUxLTk1MDgtMTVkNzRiNWY4MzZmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA4VDAwMDk1M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTdkMGZlZmM1NmM2ODk2MDg1NGQxNDFmMWM2ZjQ1ZmUwNDdlNGJiNzM2OGQxZDA2NWIxODM3OTUzMmUzMGU5NWImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.nXGaAocIv4uX9BRBH9IUPNuFlJUIn7PxDU-lZqkYadg)
event.action != "end"
against it: