Gentoo Archives: gentoo-security

From: "Paweł Goleń" <pawel.golen@××××××××××××××.pl>
To: gentoo-security@l.g.o
Subject: Re: [gentoo-security] new ssh worm?
Date: Tue, 27 Jul 2004 19:53:29
Message-Id: 4106B291.5010708@cryptotech.com.pl
In Reply to: Re: [gentoo-security] new ssh worm? by Gary Nichols
1 Gary Nichols wrote:
2
3 > Another part of good strategy would be to use SSH on a different port -
4 > most of the tools/scripts in use now do a quick scan on known services and
5 > then move on if nothing is found. If someone is directly targeting your
6 > box, this won't help much of course. :-) Sometimes it's good to maintain
7 > a low profile on management services.
8
9 Well, I use "port-knocking" for ssh:
10
11 -A INPUT -i ppp0 -m recent --set --name IN_KNOCK_SSH -m icmp -p icmp
12 --icmp-type echo-request -j DROP
13
14 Drop echo-request, but update (create) IN_KNOCK_SSH table. When I recive
15 a connection attempt another rule checks IN_KNOCK_SSH, and than
16 optionally open port 22. Of course you can change first rule (for
17 example icmp packet must be xxx in size).
18
19 -A INPUT -i ppp0 -m recent --rcheck --hitcount 4 --seconds 30 --name
20 IN_KNOCK_SSH -m state --state NEW -p tcp -m tcp --dport 2
21 2 -j ACCEPT
22
23 No port is visible during normal portscans. Of course this is method is
24 not perfect.
25
26 --
27 Pawe³ Goleñ
28 mailto:pawel.golen@××××××××××××××.pl
29
30 --
31 gentoo-security@g.o mailing list

Replies

Subject Author
Re: [gentoo-security] new ssh worm? Andrew Gaffney <agaffney@×××××××××××.com>