documentation_complete: true

prodtype: rhel7,fedora

title: 'Record Attempts to Alter the localtime File'

description: |-
    If the <tt>auditd</tt> daemon is configured to use the
    <tt>augenrules</tt> program to read audit rules during daemon startup (the default),
    add the following line to a file with suffix <tt>.rules</tt> in the directory
    <tt>/etc/audit/rules.d</tt>:
    <pre>-w /etc/localtime -p wa -k audit_time_rules</pre>
    If the <tt>auditd</tt> daemon is configured to use the <tt>auditctl</tt>
    utility to read audit rules during daemon startup, add the following line to
    <tt>/etc/audit/audit.rules</tt> file:
    <pre>-w /etc/localtime -p wa -k audit_time_rules</pre>
    The -k option allows for the specification of a key in string form that can
    be used for better reporting capability through ausearch and aureport and
    should always be used.

rationale: |-
    Arbitrary changes to the system time can be used to obfuscate
    nefarious activities in log files, as well as to confuse network services that
    are highly dependent upon an accurate system time (such as sshd). All changes
    to the system time should be audited.

severity: unknown

identifiers:
    cce@rhel7: 27310-2

references:
    cis: 5.2.4
    cjis: 5.4.1.1
    cui: 3.1.7
    disa: 1487,169
    hipaa: 164.308(a)(1)(ii)(D),164.308(a)(3)(ii)(A),164.308(a)(5)(ii)(C),164.312(a)(2)(i),164.312(b),164.312(d),164.312(e)
    nist: AC-17(7),AU-1(b),AU-2(a),AU-2(c),AU-2(d),AU-12(a),AU-12(b),IR-5
    pcidss: Req-10.4.2.b

ocil_clause: 'the system is not configured to audit time changes'

ocil: |-
    To determine if the system is configured to audit attempts to
    alter time via the /etc/localtime file, run the following
    command:
    <pre>$ sudo auditctl -l | grep "watch=/etc/localtime"</pre>
    If the system is configured to audit this activity, it will return a line.
