Puppet Class: cis_security_hardening::rules::auditd_setfiles

Defined in:
manifests/rules/auditd_setfiles.pp

Summary

Ensure audit of setfiles command.

Overview

The operating system must audit all uses of the setfiles command.

Rationale: Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.

Audit records can be generated from various components within the information system (e.g., module or policy filter).

Examples:

class { 'cis_security_hardening::rules::auditd_setfiles':
  enforce => true,
}

Parameters:

  • enforce (Boolean) (defaults to: false)

    Enforce the rule.



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'manifests/rules/auditd_setfiles.pp', line 21

class cis_security_hardening::rules::auditd_setfiles (
  Boolean $enforce = false,
) {
  if $enforce {
    $uid = fact('cis_security_hardening.auditd.uid_min') ? {
      undef => '1000',
      default => fact('cis_security_hardening.auditd.uid_min'),
    }
    concat::fragment { 'watch setfiles rule 1':
      order   => '216',
      target  => $cis_security_hardening::rules::auditd_init::rules_file,
      content => "-a always,exit -F path=/usr/sbin/setfiles -F auid>=${uid} -F auid!=4294967295 -k privileged-priv_change",
    }
  }
}