الفصل الثاني - المسح 75
target = 0;
filter portscan ip ( )
{
if (tcp.is)
{
# Look for ACK, RST's and if from same source #count only one.
if (byte(ip.blob, 13) == 20) # Flags set ACK, RST
{
count count + 1;
source = ip.dest;
target -
ip.source;
port = tcp.sport;
time
system.time;
}
}
}
on tick timeout ( sec: maxtime, repeat) call checkcount;
func checkcount
{
if (count >= maxcount)
{
echo("Port scan Georgie?, Time: ", time, "\n");
record system.time, source, target, port to the_recorder_portscan;
count = 0;
}
else
count = 0;
the_recorder_portscan-recorder( "bin/histogram packages/sandbox/portscan.cfg", "port_schema" );
تستطيع أيضاً أن تستخدم www.snort.org) nort) لكي تلتقط محاولات مسح منافذ (أنظر أيضاً /http://spyjurenet.com/linuxrc.org/projects/snort). كما قد تكون خمنت الآن، فإن هذا أحد أفضل برامجنا ويقوم بـ NIDS عظيم لاحظ أن الإصدارات x.1 من snort لا تعامل
ص٧٥