具体的な幾つかの例についてルールファイルを見て見よう。
alert icmp any any -> any any (msg: "ICMP Destination Unreachable (Communication with Destination Network is Administratively Prohibited)";\ itype: 3; icode: 9; sid:487; rev:1;) |
上の例はICMP Host Unreacheable メッセージをキャッチしている。
一方、下の例は、telnet でのログインにおけるサーバからの返事の データを検索し、"Login incorrect" というデータを監視している。
alert tcp $HOME_NET 23 -> $EXTERNAL_NET any \ (msg:"TELNET login incorrect"; content:"Login incorrect"; \ flags: A+; reference:arachnids,127; classtype:bad-unknown; \ sid:718; rev:1;) |
次の例は、Webサーバへのアクセスの内、"LOCK" というデータ内容を
持つパケットを監視しているが、注目すべきは flags:A+ や、
offset, depth を設定している点である。
alert tcp $EXTERNAL_NET any -> $HTTP_SERVERS 80 \ (msg:"WEB-IIS webdav file lock attempt"; flags:A+; content:"LOCK ";\ offset:0; depth:5; reference:bugtraq,2736; classtype:bad-unknown;\ sid:969; rev:1;) |