Skip to content
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

Linux Security's Ensure login and logout events are collected check does not work on Debian/Ubuntu #450

Closed
tas50 opened this issue Nov 18, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@tas50
Copy link
Member

tas50 commented Nov 18, 2024

Describe the bug

Our remediation steps include these lines on Debian/Ubuntu systems:

Image

Here's the file after following these steps:

root@ip-172-31-41-52:/home/ubuntu# cat /etc/audit/rules.d/50-logins.rules
-w /var/log/lastlog -p wa -k logins
-w /var/log/tallylog -p wa -k logins
-w /var/log/faillog -p wa -k logins

The problem is the query only checks for the locations that we recommend on RHEL based systems:

props.mondooLinuxSecurityAuditFiles.any(_.contains(/^(\s+)?\-w\s+\/var\/run\/faillock\s+\-p\s+wa\s+\-k\s+logins(\s+)?$/))
props.mondooLinuxSecurityAuditFiles.any(_.contains(/^(\s+)?\-w\s+\/var\/log\/lastlog\s+\-p\s+wa\s+\-k\s+logins(\s+)?$/))

This query needs to handle platforms properly since the recommendations differ

@chris-rock chris-rock added the bug Something isn't working label Nov 19, 2024
@mm-weber
Copy link
Contributor

Can be solved best with a variant

@mm-weber
Copy link
Contributor

mm-weber commented Dec 3, 2024

Fixed her:
#455

atomic111 pushed a commit that referenced this issue Dec 4, 2024
Fixes:
- #450
- #453

---------

Signed-off-by: Manuel Weber <[email protected]>
@mm-weber mm-weber closed this as completed Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants