Scan detection ?

This is a discussion on Scan detection ? within the Linux Security forums, part of the System Security and Security Related category; Greetings, I run a red hat linux box with sshd, ftp, http ports open to the world. Sometimes, people try ...


Go Back   Usenet Forums > System Security and Security Related > Linux Security

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-13-2004
charly
 
Posts: n/a
Default Scan detection ?

Greetings,

I run a red hat linux box with sshd, ftp, http ports open to the world.

Sometimes, people try to log on the ftp server with anonymous in the
hope of finding a warez maybe ?
I try to keep those service up to date.

Everything is logged in /var/log/messages.
I did a little script which does
a
cat /var/log/messages|grep "$dateOfTheDay" | grep "ftp"
cat /var/log/messages|grep "$dateOfTheDay" | grep "ssh"
cat /var/log/messages|grep "$dateOfTheDay" | grep "http"

and which mail me the result (not on the root account but on the user
account I use everyday).

Question n°1 :
Is it a good idea or a waste of time and how could it be bettered ?

Question n°2 :
my iptables script is under construction (I got one of course but not
yet complete, might consider downloading one rather than make one :) )
but how could I log a portscan of my system ?
I suppose I could look for "SYN" packets on different ports followed by
nothing but :
- seems a very crude way of doing this
- Tools must have been made already :)

question : what is your advice regarding a Scan detector with logging ?

many thx for you advice and your time :)

Reply With Quote
  #2 (permalink)  
Old 01-13-2004
DarkSamurai
 
Posts: n/a
Default Re: Scan detection ?

charly wrote:
<snip>
>
> question : what is your advice regarding a Scan detector with logging ?
>
> many thx for you advice and your time :)
>


net-analyzer/portsentry
Latest version available: 1.1-r7
Latest version installed: 1.1-r7
Size of downloaded files: 44 kB
Homepage: http://sourceforge.net/projects/sentrytools/
Description: Automated port scan detector and response tool

Reply With Quote
  #3 (permalink)  
Old 01-13-2004
charly
 
Posts: n/a
Default Re: Scan detection ?

DarkSamurai wrote:

> charly wrote:
> <snip>
>
>>
>> question : what is your advice regarding a Scan detector with logging ?
>>
>> many thx for you advice and your time :)
>>

>
> net-analyzer/portsentry
> Latest version available: 1.1-r7
> Latest version installed: 1.1-r7
> Size of downloaded files: 44 kB
> Homepage: http://sourceforge.net/projects/sentrytools/
> Description: Automated port scan detector and response tool
>

thank you for the link, I'll check it out.

Reply With Quote
  #4 (permalink)  
Old 01-14-2004
NeoSadist
 
Posts: n/a
Default Re: Scan detection ?

charly wrote:

> Greetings,
>
> I run a red hat linux box with sshd, ftp, http ports open to the world.
>
> Sometimes, people try to log on the ftp server with anonymous in the
> hope of finding a warez maybe ?
> I try to keep those service up to date.
>
> Everything is logged in /var/log/messages.
> I did a little script which does
> a
> cat /var/log/messages|grep "$dateOfTheDay" | grep "ftp"
> cat /var/log/messages|grep "$dateOfTheDay" | grep "ssh"
> cat /var/log/messages|grep "$dateOfTheDay" | grep "http"
>
> and which mail me the result (not on the root account but on the user
> account I use everyday).
>
> Question n°1 :
> Is it a good idea or a waste of time and how could it be bettered ?


Uh, use IPTables. If you have to, download someone else's script.

>
> Question n°2 :
> my iptables script is under construction (I got one of course but not
> yet complete, might consider downloading one rather than make one :) )
> but how could I log a portscan of my system ?


http://www.netfilter.org/documentati...O-3.html#ss3.2

# Drop ALL attempted port scans:
iptables -A INPUT -m psd -j DROP

> I suppose I could look for "SYN" packets on different ports followed by
> nothing but :
> - seems a very crude way of doing this
> - Tools must have been made already :)
>
> question : what is your advice regarding a Scan detector with logging ?
>
> many thx for you advice and your time :)


--
I have never been one to sacrifice my appetite on the altar of appearance.
-- A.M. Readyhough

Reply With Quote
  #5 (permalink)  
Old 01-14-2004
James
 
Posts: n/a
Default Re: Scan detection ?

Also consider looking at PortSentry. This has worked well for me to detect
port scans on my Fedora Core 1 box (formally RedHat 9) & my Yellow Dog Linux
3.0 box.
--
James
turajbNOSPAM@hoflink.com
(Remove NOSPAM When Emailing)

"charly" <spam@yahoo.fr> wrote in message
news:40040f12$0$17134$626a54ce@news.free.fr...
> Greetings,
>
> I run a red hat linux box with sshd, ftp, http ports open to the world.
>
> Sometimes, people try to log on the ftp server with anonymous in the
> hope of finding a warez maybe ?
> I try to keep those service up to date.
>
> Everything is logged in /var/log/messages.
> I did a little script which does
> a
> cat /var/log/messages|grep "$dateOfTheDay" | grep "ftp"
> cat /var/log/messages|grep "$dateOfTheDay" | grep "ssh"
> cat /var/log/messages|grep "$dateOfTheDay" | grep "http"
>
> and which mail me the result (not on the root account but on the user
> account I use everyday).
>
> Question n°1 :
> Is it a good idea or a waste of time and how could it be bettered ?
>
> Question n°2 :
> my iptables script is under construction (I got one of course but not
> yet complete, might consider downloading one rather than make one :) )
> but how could I log a portscan of my system ?
> I suppose I could look for "SYN" packets on different ports followed by
> nothing but :
> - seems a very crude way of doing this
> - Tools must have been made already :)
>
> question : what is your advice regarding a Scan detector with logging ?
>
> many thx for you advice and your time :)
>



Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:41 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0