NAME

Monitoring::Sneck::Checks::auditd - checks Linux auditing is on, with the rules it should have

VERSION

Version 0.0.1

SYNOPSIS

auditd|perl:auditd
auditd_cis|perl:auditd -I
auditd_hash|perl:auditd -H 3b8d6f0e5a2c4b19d7e8f6a5c3b2a1908f7e6d5c4b3a29180f7e6d5c4b3a2918
auditd_rules|perl:auditd -r /etc/sneck/audit.rules.loaded

DESCRIPTION

Checks auditd is running, auditing is enabled, and what rules are loaded, through auditctl -s and auditctl -l.

- CRITICAL :: auditd not running. Auditing disabled. Rules missing from, or not in, --rules-file. The rules not matching --hash. Lost events over --lost-critical.

- WARNING :: The rules not immutable, with --immutable. Lost events over --lost-warning.

- UNKNOWN :: Not being Linux, auditctl not being there, or failing, as it does when not run as root.

The file for --rules-file is as auditctl -l prints them, so can be made with auditctl -l > $file once the rules are as wanted. Blank lines and those starting with # are skipped. Order is not compared.

The hash for --hash is the SHA-256 of what auditctl -l prints, the same as auditctl -l | sha256sum gives. The current one is on a line after the status line, so it can be taken from a run on a host with the rules as wanted. Use --rules-file instead to see which rules differ.

Lost is the events the kernel dropped since boot, such as when the backlog filled.

OPTIONS

- -r, --rules-file :: A file of the rules there must be, and no others.

- -H, --hash :: The SHA-256 the rules must have, in hex.

- -I, --immutable :: WARNING if the rules are not locked with -e 2.

- --lost-warning :: Range for lost events.

- --lost-critical :: Range for lost events.

METHODS

check

Does the check.