vql/linux/audit: register PID when auditd is not running#94
Draft
xTeixeira wants to merge 1 commit intoSUSE:sensor-base-0.7.0from
Draft
vql/linux/audit: register PID when auditd is not running#94xTeixeira wants to merge 1 commit intoSUSE:sensor-base-0.7.0from
xTeixeira wants to merge 1 commit intoSUSE:sensor-base-0.7.0from
Conversation
If the audit daemon PID is not set, register our own PID as audit daemon.
djoreilly
requested changes
Jan 15, 2024
djoreilly
left a comment
There was a problem hiding this comment.
the mock client needs the method too
$ go test -v ./vql/linux/audit
# www.velocidex.com/golang/velociraptor/vql/linux/audit [www.velocidex.com/golang/velociraptor/vql/linux/audit.test]
vql/linux/audit/audit_service_test.go:136:77: cannot use self.client (variable of type *mockCommandClient) as commandClient value in argument to newAuditService: *mockCommandClient does not implement commandClient (missing method SetPID)
FAIL www.velocidex.com/golang/velociraptor/vql/linux/audit [build failed]
FAIL
Member
|
There’s more going on here. If you claim the audit pid, you own the unicast socket, which is preferable to the multicast socket. The unicast socket, in the kernel, has all the logic to queue and report dropped events. The multicast socket is lossy. You need to switch to the unicast socket if it’s available, switch back if it’s not, catch reconfiguration events to detect these changes. It may need architectural changes. That’s why it was a reach goal. It’s not as simple as claiming to be the audit pid. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If the audit daemon PID is not set, register our own PID as audit daemon.
Fixes syslog getting flooded with audit events when auditd is not running.