====== auditd ===== Permet de logger tous les processus lancé sous Linux. ==== Installation ==== Pour installer : apt-get install auditd ==== Lancement en live ==== 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 ==== Configuration au lancement du système ==== 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 ==== Rapport et logs ==== Les logs générés se trouvent dans : ''/var/log/audit''