audit in debian

1.系统环境:
linux内核编译时必须支持audit,对于我来说:
“kernel_src/arch/arm64/configs/rockchip_linux_bizerba_defconfig”

CONFIG_AUDIT=y
CONFIG_AUDITSYSCALL=y

重新编译内核,重新烧写img。

2.软件
sudo apt install auditd

3.配置
vim  /etc/audit/rules.d/audit.rules
追加:
-w /.config -p war -k location
-w /.cache  -p war -k location
-w /usr/bin/xfce4-panel -p warx -k panel             //find who called xfce4-panel
reload:
sudo augenrules --load

解释:
-w :监控 /.config 文件
-p :监控它的 w写 / r读 / a属性改变 / x 运行
-k :给多个配置,起同样的昵称,方便追踪

4.监控日志:
sudo ausearch -k location
sudo ausearch -k panel -i                                    //-i or --interpret , to interpret some hex value to human readable word

posted @ 2021-07-02 10:24  hkingsp  阅读(211)  评论(0编辑  收藏  举报