Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
informatique:linux:auditctl [2015/04/14 14:54] benoit |
informatique:linux:auditctl [2018/09/06 19:10] (Version actuelle) |
||
---|---|---|---|
Ligne 3: | Ligne 3: | ||
Permet de logger tous les processus lancé sous Linux. | Permet de logger tous les processus lancé sous Linux. | ||
+ | ==== Installation ==== | ||
Pour installer : | Pour installer : | ||
apt-get install auditd | apt-get install auditd | ||
+ | |||
+ | ==== Lancement en live ==== | ||
Pour lancer un audit : | Pour lancer un audit : | ||
auditctl -a task,always | auditctl -a task,always | ||
Ligne 16: | Ligne 19: | ||
auditctl -a always,exit -F arch=b64 -S open -S openat -F 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 | 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 : | Il est possible d'indiquer les paramètres dans le fichier ''/etc/audit/audit.rules'', Exemple : | ||
Ligne 23: | Ligne 28: | ||
# The rules are simply the parameters that would be passed | # The rules are simply the parameters that would be passed | ||
# to auditctl. | # to auditctl. | ||
+ | | ||
# First rule - delete all | # First rule - delete all | ||
-D | -D | ||
+ | | ||
# Increase the buffers to survive stress events. | # Increase the buffers to survive stress events. | ||
# Make this bigger for busy systems | # Make this bigger for busy systems | ||
-b 1024 | -b 1024 | ||
+ | | ||
# Feel free to add below this line. See auditctl man page | # Feel free to add below this line. See auditctl man page | ||
+ | | ||
#-a exit,always -S all -F uid=33 | #-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=b64 -S open -S openat -F uid=33 | ||
Ligne 40: | Ligne 45: | ||
/etc/init.d/auditd restart | /etc/init.d/auditd restart | ||
- | Il est possible de mettre en démarrage | + | ==== Rapport et logs ==== |
Les logs générés se trouvent dans : ''/var/log/audit'' | Les logs générés se trouvent dans : ''/var/log/audit'' |