主动响应:执行各种对策来解决威胁,下面是一些执行对策的脚本。
1. 禁用用户disable-account(disable-account.c)
将用户添加到禁用列表
/usr/bin/passwd -l 用户
将用户移除禁用列表
/usr/bin/passwd -u 用户
2. 防火墙拦截firewall-drop(default-firewall-drop.c)
将IP加入iptables拒绝列表
/usr/bin/iptables -I INPUT -s 源IP -j DROP /usr/bin/iptables -I FORWARD -s 源IP -j DROP
将IP移除iptables拒绝列表
/usr/bin/iptables -D INPUT -s 源IP -j DROP /usr/bin/iptables -D FORWARD -s 源IP -j DROP
3. 防火墙拦截firewalld-drop(firewalld-drop.c)
将IP加入firewall丢弃列表
/bin/firewall-cmd --add-rich-rule="rule family=ipv4 source address=源IP drop"
将IP移除firewall丢弃列表
/bin/firewall-cmd --remove-rich-rule="rule family=ipv4 source address=源IP drop"4. 主机拒绝host-deny(host-deny.c) 5. 自定义OSSEC块(ip-customblock.c) 6. ipfw(ipfw.c) 7. npf(npf.c) 8. wazuh-slack(wazuh-slack.c) 9. pf(pf.c) 10. 重启wazuh(restart-wazuh.c)
更改ossec.conf时自动重启wazuh
11. 设置空路由(route-null.c)


