Interview Prep/Linux/Firewalls, MAC & Compliance

How do you detect file tampering on critical system files?

AdvancedProductionFirewalls, MAC & Compliance
Answer

Use file integrity monitoring: AIDE builds a database of hashes and attributes and reports changes.

sudo aide --init && sudo mv /var/lib/aide/aide.db.new.gz /var/lib/aide/aide.db.gz
sudo aide --check

Also verify package-owned files: rpm -Va or debsums -c. Store the baseline off-host (an attacker with root can update a local DB), and in cloud fleets prefer immutable images where drift itself is the alert.

All Linux questions Roadmap: Linux

More on Firewalls, MAC & Compliance