我正在尝试使用Snort检测types为NULL DNS请求。 我使用Wiresharkfind请求包的types字段:
我在McAfee上find了以下规则:
alert udp any any -> any 53 (msg:"NULL request"; content:"|01 00|"; offset:2; within :4; content:"|00 00 0a 00 01|"; offset:12; within:255; threshold: type threshold, track by_src, count 10, seconds 5; sid: 5700001; rev: 1)
但是,首先这个规则不适用于我,因为它会抛出以下错误消息:
ERROR: /etc/snort/rules/local.rules(7) within can't be used with itself, protected, offset, or depth
这很奇怪,因为显然与其itself结合使用, protected ……对迈克菲来说不是问题。 我正在使用Snort版本2.9.9.0 。
此外,我也希望能够有更好的方式来解决DNS请求的type字段。 而不是使用一个固定的偏移来指定数据包中的哪个位置,您正在寻找一个特定的模式。 没有办法在“ Domain Name System部分的“ Queries字段中查找“ Type字段。 这也会使规则比使用偏移量和hex码模式更具可读性。
所以,我的问题是:有谁知道检测types为NULL DNS请求的Snort规则?