[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [OT] Personalizar fichero bash_history en Debian.



Yo solo hago una pregunta..

Probaste con auditd ?

Asi seteas que archivos a auditar (configuraciones, binarios, etc)

# auditctl -w /etc/passwd -p war -k password-file

Y así, buscas al culpable:

# ausearch -f /etc/passwd -i | less

La salida del comando anterior, será similar a esta:

----
type=PATH msg=audit(03/16/2007 14:52:59.985:55) : name=/etc/passwd
flags=follow,open inode=23087346 dev=08:02 mode=file,644 ouid=root
ogid=root rdev=00:00
type=CWD msg=audit(03/16/2007 14:52:59.985:55) :  cwd=/webroot/home/lighttpd
type=FS_INODE msg=audit(03/16/2007 14:52:59.985:55) : inode=23087346
inode_uid=root inode_gid=root inode_dev=08:02 inode_rdev=00:00
type=FS_WATCH msg=audit(03/16/2007 14:52:59.985:55) :
watch_inode=23087346 watch=passwd filterkey=password-file
perm=read,write,append perm_mask=read
type=SYSCALL msg=audit(03/16/2007 14:52:59.985:55) : arch=x86_64
syscall=open success=yes exit=3 a0=7fbffffcb4 a1=0 a2=2 a3=6171d0
items=1 pid=12551 auid=unknown(4294967295) uid=lighttpd gid=lighttpd
euid=lighttpd suid=lighttpd fsuid=lighttpd egid=lighttpd sgid=lighttpd
fsgid=lighttpd comm=grep exe=/bin/grep



Más info y ejemplos:
http://www.cyberciti.biz/tips/linux-audit-files-to-see-who-made-changes-to-a-file.html
--
Diego - Yo no soy paranoico! (pero que me siguen, me siguen)


Reply to: