Dit deel is nog niet vertaald. Je ziet de Engelse tekst.
Wat het doet
AIDE builds a database of chosen files (hashes, owner, permissions, SELinux context, ACLs, inode). Later aide --check compares the system with the database and lists added, removed and changed files — for example a changed /usr/bin/ssh or a new SUID binary. This is file integrity monitoring (FIM), required by PCI-DSS, CIS and STIG.
After you update packages on purpose, you update the baseline.
Zo schrijf je het
aide --init | --check | --update | --compare [--config FILE]Belangrijkste delen
Modes
--init- Build a new database.
--check- Compare the system with the database.
--update- Check and write a new database.
--compare- Compare two databases.
--config-check- Check the config syntax.
Opties 5
Meest gebruikt
Flags and config words
Niets past bij dit filter.
Voorbeelden 10
$ als gewone gebruiker# als root (of met sudo)
1Install and make the baseline
2Check for changes
aide --check AIDE found differences between database and filesystem!! Summary: Total number of entries: 61234 Added entries: 1 Changed entries: 23Check only one folder
aide --check --limit /etc/ssh4Accept changes after a planned update
5Run every night with a timer
6Watch your own app folder
cat /etc/aide.conf.d/shop.conf /srv/shop/bin CONTENT_EX !/srv/shop/logs7Check the config
aide --config-check8Keep the database safe (copy off the host)
9Compare with RPM's own checks
10Send the report to the journal
aide --check | systemd-cat -t aide
Niets past bij dit filter.
Let op
- An attacker with root can change the database too: keep a copy (or its hash) off the host.
- Exclude log and cache folders, or every check is full of noise.
Bestanden
/etc/aide.conf- Rules and paths.
/var/lib/aide/aide.db.gz- The baseline database.
/var/log/aide/aide.log- Log.
Tips om te onthouden
- The codes 1, 2 and 4 are added together: 7 = new, removed and changed files.
- In containers and immutable systems (bootc) use image signatures instead; AIDE is for classic servers.
Exitcodes
0 | No differences. |
1 | New files found. |
2 | Removed files found. |
4 | Changed files found. |
14 | Error writing the database. |
15 | Invalid argument. |
17 | Invalid configuration. |
18 | Input/output error. |