Permet de logger tous les processus lancé sous Linux.
Pour installer :
apt-get install auditd
Pour lancer un audit :
auditctl -a task,always
Pour tracer ce que fait le user www-data (uid 33) :
auditctl -a exit,always -S all -F uid=33
Pour tracer tous les fichiers ouverts par apache (www-data uid 33) :
auditctl -a always,exit -F arch=b64 -S open -S openat -F uid=33 auditctl -a always,exit -F arch=b32 -S open -S openat -F uid=33
Il est possible d'indiquer les paramètres dans le fichier /etc/audit/audit.rules
, Exemple :
# This file contains the auditctl rules that are loaded # whenever the audit daemon is started via the initscripts. # The rules are simply the parameters that would be passed # to auditctl. # First rule - delete all -D # Increase the buffers to survive stress events. # Make this bigger for busy systems -b 1024 # Feel free to add below this line. See auditctl man page #-a exit,always -S all -F uid=33 -a always,exit -F arch=b64 -S open -S openat -F uid=33 -a always,exit -F arch=b32 -S open -S openat -F uid=33
relancer le service :
/etc/init.d/auditd restart
Les logs générés se trouvent dans : /var/log/audit