用IPTables实现字符串模式匹配
http://tech.ddvip.com 2006年04月03日 社区交流 收藏本文
本文详细介绍用IPTables实现字符串模式匹配
--limit 1/hour
Bill Steams(Mason firewall building script的作者)提供了一个极好的建议----转换网络IDS Snort的规则成为iptables字符串模式匹配的规则。Snort的攻击信号数据库中包含了大约1200种信号and appears to be the biggest publicly available attack database suitable for instant deployment。在iptables上使用现成的信号是合理的一种方式。http: //www.strearns.org/snort2iptables 是Bill Stearm提供的试验性的软件。在这里你可以找到shell脚本以便将标准的Snort规则转换为iptables的规则。下面是一个将snort关于 Linux下针对mountd的攻击和bind的攻击转化为iptables的规则的例子:
Snort规则:
1、alert udp $EXTERNAL_NET any -> $HOME_NET 518
(msg:"EXPLOIT ntalkd x86 linux overflow";
content:"|0103 0000 000 0 0001 0002 02e8|";
reference:bugtraq,210; classtype:attempted-admin; sid:313; rev:2;)
2、alert tcp $EXTERNAL_NET any -> $HOME_NET 53
(msg:"EXPLOIT named tsig infoleak";
content: "|AB CD 09 80 00 00 00 01 00 00 00 00 00 00 01 00 01 20 20 20 20 02 61|";
reference:cve,CAN-2000-0010; reference:bugtraq,2302; reference:arachnids,482;
classtype:attempted-admin; sid:303; rev:3;)
3、alert udp $EXTERNAL_NET any -> $HOME_NET 635
(msg:"EXPLOIT x86 linux mountd overflow";
content:"|5eb0 0289 06fe c889 4604 b006 8946|";
reference:cve,CVE-1999-0002; classtype:attempted-admin; sid:315; rev:1;)
责编:豆豆技术应用