Ethical Hacking Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package. | Computer Forensics Training at InfoSec Institute Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors. |

| Subject: | Re: [Snort-sigs] portscan rule |
|---|---|
| Date: | Thu, 07 Oct 2004 13:58:16 +1300 |
Benjamin J Paradis <paradis.b@neu.edu> writes:
Hi All, I've been trying to put together a rule in the snort.conf file to address portscans. For instance, if there is x amount of machines hit in y amount of minutes on port 445, snort will indicate that port 445 is getting hit so many times. This is a snippet of what I have so far: ------------------------snippet------------------------------- ##preporcessor portscan: $HOME_NET 5 7 /var/log/portscan.log ##preprocessor portscan-ignorehosts: x.x.x.x y.y.y.y etc. preprocessor portscan: scanners_max 3200, targets_max 5000, target_limit 5, port_limit 20, timeout 60 ------------------------/snippet-------------------------------- Is there anything I'm missing here?
Not really a sig as such, but I'm piping portscan.log into the
following script - rotating portscan.log daily - to get my alerts
about Welchia, Sasser, Blaster, RxBot scans, etc. You might need to
tune the >1000 for your site, but it seems to pick stuff up quite well
here. (I know, I know - it's ugly, but it works.)
#!/usr/bin/perl
$foo=`rm -rf /tmp/*.virus`;
use Socket;
$f=time();
while ($line=<STDIN>) {
$line=~s/ / /g;
($mnth,$dt,$time,$ip,$ar,$dst,$etc) = split (m/ /,$line);
($ip,$port)=split(m/:/,$ip);
($dstip,$dstp)=split(m/:/,$dst);
if ($dstp == 445 || $dstp == 135 || $dstp==139)
{
$att{$ip}++;
if ($att{$ip}>1000) {
$file="/tmp/$ip.virus";
if (! -e $file) {
$foo=`touch $file`;
#page or email yourself here - 'Subject: possible virus on $ip'
}
}
}
$g=time()-$f;
if ($g>(24*3599))
{
exit(0);
}
}
--
James Riden / j.riden@massey.ac.nz / Systems Security Engineer
Information Technology Services, Massey University, NZ.
GPG public key available at: http://www.massey.ac.nz/~jriden/
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Snort-sigs mailing list
Snort-sigs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/snort-sigs
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [Snort-sigs] Bleedingsnort.com Daily Update, matt |
|---|---|
| Next by Date: | [Snort-sigs] false positives with SID 1549, Chris Kronberg |
| Previous by Thread: | [Snort-sigs] portscan rule, Benjamin J Paradis |
| Next by Thread: | RE: [Snort-sigs] portscan rule, Adrian Marsden |
| Indexes: | [Date] [Thread] [Top] [All Lists] |