Real-time FIM (Wazuh / auditd) vs. scheduled hashing (AIDE)
Classic Linux FIM tools like AIDE or Tripwire compute SHA-256 hashes on a daily cron job. They are simple and zero-overhead, but if an attacker modifies /etc/ssh/sshd_config and cleans up within an hour, scheduled scans miss the event or alert 23 hours too late.
Wazuh pairs Linux inotify with kernel auditd 'who-data' monitoring—giving you real-time alerts that include the exact UID, process binary, and command line that modified the file.
# Add immutable auditd watch rules (/etc/audit/rules.d/fim.rules)
-w /etc/passwd -p wa -k identity_changes
-w /etc/shadow -p wa -k identity_changes
-w /etc/sudoers -p wa -k privilege_escalation
-w /etc/ssh/sshd_config -p wa -k sshd_config
Which Linux directories to monitor (and what to exclude)
Focus FIM strictly on high-signal paths: /etc, /usr/bin, /usr/sbin, /root/.ssh, /etc/cron*, and read-only application binaries. Always exclude /var/log, /tmp, /proc, /sys, and database data directories to avoid alert fatigue.