<br><tt><font size=2>kwlug-disc-bounces@kwlug.org wrote on 05/14/2009 11:10:27
AM:<br>
> If you want ssh/sftp remote access for a small number of people, disable<br>
> password authentication on their accounts and securely deliver each
of<br>
> them a key generated by ssh-keygen Eg.<br>
</font></tt>
<br><tt><font size=2>I'd also recommend you use the "AllowUsers"
sshd_config option to explicitly state who can login. And if you can, restrict
firewall access to port 22.</font></tt>
<br>
<br><tt><font size=2>Password dictionary attacks are common on SSH ports,
just check the logs of any system with ssh exposed to the Internet. We
have put throttling in place to tarpit these attacks and reduce the impact
on our logs. IPTables can be used for it but the rules are a little complicated
and can impact how you interact as well. The throttling works like this:
if an IP address connects more than x times in y minutes the block access
by this user for z minutes. Be careful not to choose too small of a number
for x/y or you'll lock yourself out. Don't forget automated SSH connections.</font></tt>
<br><tt><font size=2> <br>
> Detection:<br>
> <br>
> Turn on all logging on the system.  Disk space is cheap. Install<br>
> logwatch on all servers and have it send reports to an external e-mail<br>
> account daily.  Read the logs and look for anything out of the
ordinary,<br>
> especially network activity.  Look for numerous failed logon
attempts, etc.<br>
> <br>
> Here is a snippet of an entertaining log from my home trixbox:<br>
> <br>
> > [Feb 16 07:59:14] NOTICE[17157] chan_sip.c: Registration from
<br>
> '"112"<sip:112@76.64.107.18>' failed for '212.174.78.60'
- No <br>
> matching peer found<br>
> <br>
> Someone connecting from Turkey wanted to make a free phone call.<br>
</font></tt>
<br><tt><font size=2>My logwatch is sometimes so large it hangs my email
client. Do you write your own logwatch configs to collapse reports (e.g.
212.174.78.60 failed SIP registration x time(s))?</font></tt>
<br><tt><font size=2> <br>
> You can also install rkhunter - a rootkit hunter and configure it
to<br>
> mail daily reports.  It does a superficial check if the state
of various<br>
> system files have changed.  rkhunter would probably be the first
thing<br>
> to be hacked by a savvy intruder.<br>
</font></tt>
<br><tt><font size=2>I've recommended tripwire a lot but rarely put it
in place myself. It signs its database of check sums so that changes are
recognized and it can detect changes in any file, binary, config or data.</font></tt>
<br>
<table>
<tr>
<td><font size=1 face="Arial"><b>John Van Ostrand</b></font>
<td>
<div align=right><font size=1 face="Arial"><b>Net Direct Inc.</b></font></div>
<td><font size=1 face="Arial"> </font>
<tr>
<td><font size=1 face="Arial">CTO, co-CEO</font>
<td>
<div align=right><font size=1 face="Arial">564 Weber St. N. Unit 12</font></div>
<td><a href="http://maps.google.ca/maps?q=564+Weber+Street+North+Unit+12,+Waterloo,+ON+N2L+5C6,+Canada&ll=43.494599,-80.548222&spn=0.038450,0.073956&iwloc=A&hl=en"><font size=1 color=blue face="Arial"><u>map</u></font></a>
<tr>
<td><font size=1 face="Arial"> </font>
<td>
<div align=right><font size=1 face="Arial">Waterloo, ON N2L 5C6</font></div>
<td><font size=1 face="Arial"> </font>
<tr>
<td><font size=1 face="Arial">john@netdirect.ca</font>
<td>
<div align=right><font size=1 face="Arial">Ph: 866-883-1172</font></div>
<td><font size=1 face="Arial">ext.5102</font>
<tr>
<td><font size=1 face="Arial"><b>Linux Solutions / IBM Hardware</b></font>
<td>
<div align=right><font size=1 face="Arial">Fx: 519-883-8533</font></div>
<td><font size=1 face="Arial"> </font></table>
<br>