ansible_security.ids_rule

ids_rule

技术预览

一个用于管理多种入侵检测系统规则和签名的角色,这些系统被定义为该角色的“提供者”。

当前支持的提供者列表:

  • snort

要求

Red Hat Enterprise Linux 7.x,或衍生的Linux发行版,如CentOS 7、Scientific Linux 7等

角色变量

  • ids_provider - 定义使用的IDS提供者(默认值: "snort")
  • ids_rule - 你想添加或从管理规则集中移除的规则
  • ids_rule_state - 应为 present(存在)或 absent(不存在)之一
  • ids_rules_file - 管理的规则文件(默认: /etc/snort/rules/local.rules

依赖

依赖项因提供者而异

snort 依赖

示例剧本

- 名称:管理snort规则
  主机:idshosts
  提升权限:是
  以用户身份:root
  收集事实:否

  变量:
    ids_provider: snort
    协议:tcp
    源端口:任意
    源IP:任意
    目标端口:任意
    目标IP:任意

  任务:
    - 名称:添加snort密码攻击规则
      包含角色:
        名称: "ids_rule"
      变量:
        ids_rule: 'alert {{protocol}} {{source_ip}} {{source_port}} -> {{dest_ip}} {{dest_port}}  (msg:"试图攻击 /etc/passwd"; uricontent:"/etc/passwd"; classtype:attempted-user; sid:99000004; priority:1; rev:1;)'
        ids_rules_file: '/etc/snort/rules/local.rules'
        ids_rule_state: present

许可证

GPLv3

作者信息

Ansible安全自动化团队

关于项目

Ansible role to manage rules and signatures for Intrusion Detection Systems

安装
ansible-galaxy install ansible_security.ids_rule
许可证
gpl-3.0
下载
23.1k
拥有者