DET-072 · human · confidence Medium

Linux Time Zone Change Audit Rule

Watch /etc/localtime with auditd to see when the system time zone is switched.

Shifting the time zone does not change the stored UTC times, but it can confuse people reading local-time logs, shell history and application output. On many Linux systems, /etc/localtime defines the zone, and is often a symbolic link.

Add an audit watch with write and attribute flags and a key. Because tools like timedatectl replace the link rather than editing it, also watch /etc/timezone and the directory, and check that events show up in testing. Search by key with ausearch.

Data sources
auditd logs
Platforms
Linux

Logic

-w /etc/localtime -p wa -k timezone-changed
-w /etc/timezone -p wa -k timezone-changed
Then: ausearch -k timezone-changed -i. Test with timedatectl set-timezone to confirm events fire.

False positives

Cloud-init, provisioning scripts and some installers set the zone on first boot.

Catches 1 technique