-
Notifications
You must be signed in to change notification settings - Fork 70
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
Allow exe exclude rules #97
Merged
andrewkroh
merged 6 commits into
elastic:main
from
andrewkroh:feature/exclude-exe-file-dir
Feb 5, 2022
Merged
Allow exe exclude rules #97
andrewkroh
merged 6 commits into
elastic:main
from
andrewkroh:feature/exclude-exe-file-dir
Feb 5, 2022
Conversation
This file contains 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
Not all kernels will support this, but Auditbeat will allow trying to set them. I bumped the OS provided by Vagrant to test with auditd 3.0 which allows setting the exe filter. While comparing the binary rule representation generated by go-libaudit and the binary rule from the kernel listing there was a 2 byte difference in the syscall mask. I modified go-libaudit to match the kernel output. IIUC these values shouldn't matter because they are outside the range of any existing syscall numbers. This was the diff I observed and accounted for. Diff: --- Expected +++ Actual @@ -17,3 +17,3 @@ 000000f0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| - 00000100 ff ff ff ff ff ff ff ff ff ff 00 00 67 00 00 00 |............g...| + 00000100 ff ff ff ff ff ff ff ff ff ff ff ff 67 00 00 00 |............g...| 00000110 d2 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| Fixes elastic#78
andrewkroh
added
the
Team:Security-External Integrations
Label for the Security External Integrations team
label
Jan 25, 2022
efd6
reviewed
Jan 27, 2022
After reviewing the kernel, path and dir are not supported.
efd6
approved these changes
Feb 4, 2022
renini
pushed a commit
to renini/go-libaudit
that referenced
this pull request
Jun 26, 2024
Not all kernels will support this, but Auditbeat will allow trying to set them. I bumped the OS provided by Vagrant to test with auditd 3.0 which allows setting the exe filter. While comparing the binary rule representation generated by go-libaudit and the binary rule from the kernel listing there was a 2 byte difference in the syscall mask. I modified go-libaudit to match the kernel output. IIUC these values shouldn't matter because they are outside the range of any existing syscall numbers. This was the diff I observed and accounted for. Diff: --- Expected +++ Actual @@ -17,3 +17,3 @@ 000000f0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| - 00000100 ff ff ff ff ff ff ff ff ff ff 00 00 67 00 00 00 |............g...| + 00000100 ff ff ff ff ff ff ff ff ff ff ff ff 67 00 00 00 |............g...| 00000110 d2 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
Not all kernels will support this, but Auditbeat will allow trying to set them.
I bumped the OS provided by Vagrant to test with auditd 3.0 which allows
setting the exe filter.
While comparing the binary rule representation generated by go-libaudit and
the binary rule from the kernel listing there was a 2 byte difference in the
syscall mask. I modified go-libaudit to match the kernel output. IIUC these values
shouldn't matter because they are outside the range of any existing syscall
numbers.
This was the diff I observed and accounted for.