背景:html
生产环境中部署了suricata,平常规则更新使用suricata-update,若是想禁用某些规则,能够在配置文件/etc/suricata/disable.conf中添加,好比:url
2018959 #禁用规则号 2018959 group:dshield.rules #禁用组 dshield.rules re:heartbledd #禁用与heartblead相关的规则
可是有些带有flowbits的规则没法直接禁用,好比规则号 2018959,该规则的具体内容以下spa
alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET POLICY PE EXE or DLL Windows file download HTTP"; flow:established,to_client; flowbits:isnotset,ET.http.binary; flowbits:isnotset,ET.INFO.WindowsUpdate; file_data; content:"MZ"; within:2; byte_jump:4,58,relative,little; content:"PE|00 00|"; distance:-64; within:4; flowbits:set,ET.http.binary; reference:url,doc.emergingthreats.net/bin/view/Main/2000419; classtype:policy-violation; sid:2018959; rev:3; metadata:created_at 2014_08_19, updated_at 2017_02_01;)
查询官方解决方法,要么就是该规则前面加 #号注释,可是使用suricata-update的时候会自动覆盖回来,结果很差,.net
另一种解决办法:压缩规则,官方介绍在这,code
编辑配置文件 /etc/suricata/threshold.config 加入以下内容htm
suppress gen_id 1, sig_id 2018959