背景: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