當我做:
echo "#TEST" >> /etc/passwd
我在審計日誌中得到以下資訊:
node=kayak.office.local type=SYSCALL msg=audit(1412687666.054:62033):
arch=c000003e syscall=2 success=yes exit=3 a0=2939480 a1=241 a2=1b6
a3=76 items=2 ppid=12744 pid=12748 auid=1030 uid=0 gid=0 euid=0
suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=1769 comm="bash" exe="/bin/bash" subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key="identity"
node=kayak.office.local type=CWD msg=audit(1412687666.054:62033):
cwd="/root"
node=kayak.office.local type=PATH msg=audit(1412687666.054:62033):
item=0 name="/etc/" inode=13 dev=fd:00 mode=040755 ouid=0 ogid=0
rdev=00:00 obj=system_u:object_r:etc_t:s0 nametype=PARENT
node=kayak.office.local type=PATH msg=audit(1412687666.054:62033):
item=1 name=(null) inode=15883 dev=fd:00 mode=0100644 ouid=0 ogid=0
rdev=00:00 obj=system_u:object_r:etc_t:s0 nametype=NORMAL
(為了可讀性而添加了空格)
/etc/passwd 的 inode 確實是11908
,但這很難用外部工具解析,因為外部工具會根據檔案名稱制定規則。我可以取得檔案名稱/路徑嗎?