-
Notifications
You must be signed in to change notification settings - Fork 102
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
Enable auditd and config it according to CIS DIL Benchmark #139
Conversation
HardeningFramework-DCO-1.1-Signed-off-by: Tim Stoop <[email protected]> (github: timstoop)
HardeningFramework-DCO-1.1-Signed-off-by: Tim Stoop <[email protected]> (github: timstoop)
HardeningFramework-DCO-1.1-Signed-off-by: Tim Stoop <[email protected]> (github: timstoop)
HardeningFramework-DCO-1.1-Signed-off-by: Tim Stoop <[email protected]> (github: timstoop)
HardeningFramework-DCO-1.1-Signed-off-by: Tim Stoop <[email protected]> (github: timstoop)
HardeningFramework-DCO-1.1-Signed-off-by: Tim Stoop <[email protected]> (github: timstoop)
HardeningFramework-DCO-1.1-Signed-off-by: Tim Stoop <[email protected]> (github: timstoop)
HardeningFramework-DCO-1.1-Signed-off-by: Tim Stoop <[email protected]> (github: timstoop)
HardeningFramework-DCO-1.1-Signed-off-by: Tim Stoop <[email protected]> (github: timstoop)
HardeningFramework-DCO-1.1-Signed-off-by: Tim Stoop <[email protected]> (github: timstoop)
HardeningFramework-DCO-1.1-Signed-off-by: Tim Stoop <[email protected]> (github: timstoop)
HardeningFramework-DCO-1.1-Signed-off-by: Tim Stoop <[email protected]> (github: timstoop)
HardeningFramework-DCO-1.1-Signed-off-by: Tim Stoop <[email protected]> (github: timstoop)
HardeningFramework-DCO-1.1-Signed-off-by: Tim Stoop <[email protected]> (github: timstoop)
HardeningFramework-DCO-1.1-Signed-off-by: Tim Stoop <[email protected]> (github: timstoop)
HardeningFramework-DCO-1.1-Signed-off-by: Tim Stoop <[email protected]> (github: timstoop)
HardeningFramework-DCO-1.1-Signed-off-by: Tim Stoop <[email protected]> (github: timstoop)
HardeningFramework-DCO-1.1-Signed-off-by: Tim Stoop <[email protected]> (github: timstoop)
HardeningFramework-DCO-1.1-Signed-off-by: Tim Stoop <[email protected]> (github: timstoop)
HardeningFramework-DCO-1.1-Signed-off-by: Tim Stoop <[email protected]> (github: timstoop)
HardeningFramework-DCO-1.1-Signed-off-by: Tim Stoop <[email protected]> (github: timstoop)
HardeningFramework-DCO-1.1-Signed-off-by: Tim Stoop <[email protected]> (github: timstoop)
HardeningFramework-DCO-1.1-Signed-off-by: Tim Stoop <[email protected]> (github: timstoop)
HardeningFramework-DCO-1.1-Signed-off-by: Tim Stoop <[email protected]> (github: timstoop)
HardeningFramework-DCO-1.1-Signed-off-by: Tim Stoop <[email protected]> (github: timstoop)
HardeningFramework-DCO-1.1-Signed-off-by: Tim Stoop <[email protected]> (github: timstoop)
HardeningFramework-DCO-1.1-Signed-off-by: Tim Stoop <[email protected]> (github: timstoop)
HardeningFramework-DCO-1.1-Signed-off-by: Tim Stoop <[email protected]> (github: timstoop)
HardeningFramework-DCO-1.1-Signed-off-by: Tim Stoop <[email protected]> (github: timstoop)
HardeningFramework-DCO-1.1-Signed-off-by: Tim Stoop <[email protected]> (github: timstoop)
HardeningFramework-DCO-1.1-Signed-off-by: Tim Stoop <[email protected]> (github: timstoop)
HardeningFramework-DCO-1.1-Signed-off-by: Tim Stoop <[email protected]> (github: timstoop)
HardeningFramework-DCO-1.1-Signed-off-by: Tim Stoop <[email protected]> (github: timstoop)
@timstoop thanks for this PR! I think we should port this one to chef/ansible too. For chef there is a PR open (dev-sec/chef-os-hardening#191) already for a while (something there went wrong with reintegration merges). However I think this puppet PR provides much more detailed implementation, so it make sense to take this one as a source for porting. @mcgege @atomic111 @chris-rock opinions? |
HardeningFramework-DCO-1.1-Signed-off-by: Tim Stoop <[email protected]> (github: timstoop)
Judging from the other requests at other PRs, I assume you want |
@timstoop Yep, I think this would be helpful - not just for me ;-) |
That is great work. Am a bit hesitant in taking the direction to implement a specific benchmark, we made a lot of references in this PR to CIS benchmark. Instead, I think we should more think in components, eg. auditd. All properties should be named around that. Its okay if the default values match the CIS recommendation though. This allows the hardening cookbook to fulfill multiple benchmarks. Would love to hear what you think. |
@mcgege Regarding testing, the inspec rules already check all of these controls: https://github.com/dev-sec/cis-dil-benchmark I don't really know of another way to test aside from having the system perform actions and checking if they actually end up in the log, which would be a huge amount of work, really. |
May have made some additional changes to manifests/init.pp as well. HardeningFramework-DCO-1.1-Signed-off-by: Tim Stoop <[email protected]> (github: timstoop)
HardeningFramework-DCO-1.1-Signed-off-by: Tim Stoop <[email protected]> (github: timstoop)
I don't revert the actual file changes, as purging the package should remove all left over config anyway. Let me know if you prefer me to remove them anyway. |
@timstoop What should we do about this pr? |
Please re-open if you'll continue on this |
This is a large patch that adds an additional module to fulfill the CIS DIL Benchmark chapter 4 requirements. These are mostly level 2 requirements.
The deployment is optional and only tested on Debian Stretch, but I suspect it'll work with only small changes on other OSes as well. If people can let me know, I will happily incorporate those changes as well.
Although you should probably check the options, one thing is important to note: According to the CIS DIL Benchmark 4.1.1.3 auditd should not rotate or throw away old logs, which is in most cases not helpful and can crash your machine if the disk becomes full due to this. So I've made the default to be rotate, so old logs are rotated away. You are still responsible for sending the logs to a remote log aggregation server before they are removed.
I know this is a large one, but I hope to get this incorporated, as it's pretty straight forward.