需要明确的是,auditd 是一个非常宝贵的工具,但它不会使您的系统更安全。它的作用是为您提供有关某些活动的更详细的日志记录。仍然需要有人检查生成的日志。就像树一样,如果一项活动受到监控,但没有人在观看,那么日志重要吗?
最简单的是,我使用了以下内容/etc/audit/audit.rules。每当 setrlimit 或 stime 系统调用 exit 以及删除目录时,它都会抛出一个日志。
# 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
-e 1
# 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 unlink -S rmdir
-a exit,always -S stime.*
-a exit,always -S setrlimit.*
Run Code Online (Sandbox Code Playgroud)
有关一些更深入的示例,请查看RHEL 5.1-5.2的 CIS 基准。不幸的是,Ubuntu 上还没有一个,而 Debian 上的那个已经有好几年了。但是,该部分中不应该有任何特定于发行版的内容。
| 归档时间: |
|
| 查看次数: |
1365 次 |
| 最近记录: |