mablanco.antirootkits

mablanco.antirootkits

Ansible角色,用于部署多个rootkit和恶意软件检测工具:

  • Rkhunter: rootkit、后门、嗅探器和漏洞扫描程序
  • chkrootkit: rootkit检测器
  • Unhide: 取证工具,用于通过rootkit查找隐藏的进程和TCP/UDP端口
  • Shell Detector: 帮助您查找和识别php/cgi(perl)/asp/aspx shells的应用程序

支持Debian、RHEL及其相应的衍生版。chkrootkit在RHEL中不可用。

角色变量

要安装的工具

以下变量控制工具是否安装(true)或不安装(false)。所有变量默认设置为 _'false'_。

  • rkhunter
  • chkrootkit
  • unhide
  • shelldetector

一般设置

  • antirootkits_mail_cmd: 发送报告的命令(Debian和RHEL之间有所不同)
  • antirootkits_mail_from: 审计报告的发件人电子邮件地址。没有有效的默认值,您需要填写。
  • antirootkits_mail_to: 审计报告的收件人电子邮件地址。没有有效的默认值,您需要填写。
  • antirootkits_log_expire: 日志被清除的天数。默认值为 _'90'_。
  • antirootkits_rkhunter_diag_scan: 包括应用程序检查以获取详细报告扫描。默认值为 _'no'_(仅限RHEL)

Unhide设置

  • unhide_cron_hour: Unhide的cron作业执行的小时。默认值为 _'6'_。
  • unhide_cron_minute: Unhide的cron作业执行的分钟。默认值为 _'00'_。

Shell Detector设置

  • shelldetector_install_directory: 安装目录。默认值为 _'/opt/Shell-Detector'_。
  • shelldetector_scan_directory: 扫描的目录。默认值为 _'/var/www'_。
  • shelldetector_cron_hour: Shell Detector的cron作业执行的小时。默认值为 _'6'_。
  • shelldetector_cron_minute: Shell Detector的cron作业执行的分钟。默认值为 _'30'_。

Rkhunter设置

  • rkhunter_allow_ssh_root_user: 定义rkhunter在sshd配置中应该期望的内容。默认值为 _'no'_。

示例剧本

如何使用此角色的示例:

- hosts: servers
  vars:
     antirootkits_mail_from: '[email protected]'
     antirootkits_mail_to: '[email protected]'
  roles:
     - { role: mablanco.antirootkits }

许可证

GPLv3

关于项目

Linux antirootkit tools deployment

安装
ansible-galaxy install mablanco.antirootkits
许可证
gpl-3.0
下载
2.1k
拥有者
DevSecOps & Cloud Engineer, FOSS advocate and Agile supporter.