-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
macOS: Implement ES Authentication Events Table #8565
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
base: master
Are you sure you want to change the base?
Conversation
Implements a new table for capturing authentication events via EndpointSecurity. This is the first of several modular ES event tables, introducing a new CoreEventRouter system for event categorization. The es_authentication_events table captures: - Authentication events (login/logout) - SSH sessions - Login window activity - Screen sharing connections - SU/SUDO executions (macOS 14+) Changes: - Implement es_authentication_events table - Update documentation - Add example queries to macos-endpoint-security pack
4fa4774 to
9653579
Compare
Reorganizes ES event categories by moving malware events to a dedicated "security" category and adds additional event types to existing categories. Implements the genTable method for authentication events to properly return query results.
6280695 to
1bf9f49
Compare
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.
Thanks for your contribution!
I will get the review going this week, but some quick observations from a cursory look:
- We would want to create a new
es_clientfor these events, like we do for process events and file events. I didn't see that? Have you considered that? - I don't think we should create our own uuid for event correlation. I would want a discussion on that (since we will be using different es_clients_, and I believe we should use the provided
audit_tokensif we want a similar functionality. - I am a little concerned about backwards compatibility, have you been able to do much testing on older macOS versions?
| Column("ssh_login_username", TEXT, "Username for SSH login (may differ from process username)"), | ||
| Column("su_from_username", TEXT, "Original username for su events"), | ||
| Column("su_to_username", TEXT, "Target username for su events"), | ||
| Column("sudo_command", TEXT, "Command executed with sudo"), |
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.
on one hand, I can see why you might want one authentication events table. On the other hand, this feels really unrelated and messy
|
Definitely open to any design input and ordering in terms of breaking #8564 down This is a model-assisted cut at making that large PR more manageable https://github.com/tmc/osquery/blob/endpointsecurity-expansion-stacked-diff-planning/osquery/events/darwin/ES_DIFF_PLAN.md I'm open to input here and am also starting a slack thread. Perhaps a good way to tackle this is a read out of current ES coverage gaps and then aligning on the most useful parts to tackle in which order. |
|
This is a model-assisted breakdown of circumstances to cover and areas to expand coverage. Legend:
Footnotes:
|
This commit implements the first of the new EndpointSecurity event tables, focused on authentication events. It introduces a new CoreEventRouter system that categorizes events and routes them to specialized tables.
The new es_authentication_events table captures:
This is part of a multi-PR plan to modularize the EndpointSecurity events in osquery for better organization, query performance, and maintainability.
Changes include: