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
[SessionView] cloud_defend process index as a source + merged process event handling #153213
[SessionView] cloud_defend process index as a source + merged process event handling #153213
Conversation
…r/kibana into session_view_for_cloud_defend
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 just a minor suggestion
@mitodrummer is there an endpoint build available with this change? or is it already in main? |
The merging of process events is not implemented in endpoint. We are working on a new bpf sensor which which isn't quite ready yet for prime time. Though it should show up soon once 8.8 snapshot is fixed. |
…r/kibana into session_view_for_cloud_defend
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Async chunks
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
Pinging @elastic/kibana-cloud-security-posture (Team:Cloud Security) |
Summary
This PR adds logs-cloud_defend.process as a source to load process events in SessionView. (note: I have plans to optimize sessionview so it only pulls from the index that the session leader came from).
The cloud-defend service (WIP) implements a technique to reduce process event volume by squishing the 3 lifecycle event.action s (fork, exec, end) into a single event. SessionView has been updated to handle these new merged events.
Much of the information across a fork, exec and end event does not change, so given a short window, the cloud-defend service buffers the events, and merges the values from event.action and event.type into an array of the values from each event.
In most cases an SSH session leader process (e.g bash) will have two events. One event containing event.action: ['fork', 'exec'] (2
merged events), and one final event with event.action: 'end' when the user exits the session.
The nice thing about the above is that in the majority of situations processes are short lived, and so most events should contain all three actions [fork, exec, end]. In our tests, this has provided roughly a 50% savings in process event volume. It should also be noted that any rules using event.action or event.type should be unaffected by this change, as the query languages don't care if it's comparing a single value, or an array of values.
A minor change has also been made in the process analyzer feature to handle the merging of event.type
e.g event.type = ['start', 'end']
cc @kqualters-elastic if you know of any other places I need to update.
Checklist
Delete any items that are not applicable to this PR.