alert http any any -> any any (msg:"hhit pkg.loongnix.cn...";content:"pkg.loongnix.cn"; reference:url, www.pkg.loongnix.cn;) reject http any any -> any any (msg:"hit pkg.loongnix.cn...";content:"pkg.loongnix.cn"; reference:url, www.pkg.loongnix.cn;)这个规则会报错11/6/2023 -- 10:48:39 - <Error> - [ERRCODE: SC_ERR_DUPLICATE_SIG(176)] - Duplicate signature "reject http any any -> any any (msg:"hit pkg.loongnix.cn...";content:"pkg.loongnix.cn"; reference:url, www.pkg.loongnix.cn;)" 11/6/2023 -- 10:48:39 - <Error> - [ERRCODE: SC_ERR_INVALID_SIGNATURE(39)] - error parsing signature "reject http any any -> any any (msg:"hit pkg.loongnix.cn...";content:"pkg.loongnix.cn"; reference:url, www.pkg.loongnix.cn;)" from file /home/wzw/gy_tsource_zw/pack/rules/test.rules at line 6 11/6/2023 -- 10:48:39 - <Warning> - [ERRCODE: SC_ERR_NOT_SUPPORTED(225)] - Eve-log support not compiled in. Reconfigure/recompile with libjansson and its development files installed to add eve-log support.如何修改
时间: 2024-03-26 09:37:45 浏览: 89
软件08206T图书信息管理系统04概要设计详细设计.doc
这个错误提示表明你的规则文件中有一个重复的规则,即出现了两个具有相同签名的规则。具体错误是"Duplicate signature",这表示规则的签名重复了。
你需要将这两个规则合并为一个规则,将它们的动作(alert或reject)合并为一个,将它们的消息内容和匹配模式合并为一个。修改后的规则如下:
alert http any any -> any any (msg:"hit pkg.loongnix.cn...";content:"pkg.loongnix.cn"; reference:url, www.pkg.loongnix.cn;)
reject http any any -> any any (msg:"hit pkg.loongnix.cn...";content:"pkg.loongnix.cn"; reference:url, www.pkg.loongnix.cn;)
这个规则将匹配HTTP流量中是否包含"pkg.loongnix.cn"字符串。如果匹配成功,它将发出一个警报并拒绝这个HTTP请求。另外,这个错误提示后面还有一个警告,提示你的Suricata版本不支持Eve-log,你需要重新编译Suricata,安装libjansson及其开发文件,才能支持Eve-log。
阅读全文