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.
More on Firewalls, MAC & Compliance
How do ufw, firewalld, nftables and iptables relate?BeginnerConfigure ufw for a web server with SSH only from the office.BeginnerExplain firewalld zones and runtime vs permanent configuration.IntermediateWrite a minimal nftables ruleset for a server.AdvancedWhy are nftables preferred over iptables at scale?AdvancedHow do you avoid locking yourself out when changing remote firewall rules?Intermediate