Software engineer Chris Wellons writes about tar-pitting nefarious SSH probes. Anyone with a publicly-facing SSH server knows that it is probed from the moment it is turned on. Usually, the overwhelming majority of incoming connection attempts are malevolent in nature. There are several ways to deal with these attempts, one method is to drag out the response for as long as possible.
This program opens a socket and pretends to be an SSH server. However, it actually just ties up SSH clients with false promises indefinitely — or at least until the client eventually gives up. After cloning the repository, here’s how you can try it out for yourself (default port 2222):
[...] Your SSH client will hang there and wait for at least several days before finally giving up. Like a mammoth in the La Brea Tar Pits, it got itself stuck and can’t get itself out. As I write, my Internet-facing SSH tarpit currently has 27 clients trapped in it. A few of these have been connected for weeks. In one particular spike it had 1,378 clients trapped at once, lasting about 20 hours.
(Score: 2) by NateMich on Monday March 25 2019, @05:56PM (7 children)
Make sure you use something that isn't also a bunch of 2's. I've seen so many customers servers getting slammed on 222, 2222, and 22222 that it isn't funny. There is almost zero advantage to a port based on 22.
Pick something truly random.
(Score: 5, Funny) by maxwell demon on Monday March 25 2019, @07:24PM (5 children)
I'd just use the port number written backwards. :-)
The Tao of math: The numbers you can count are not the real numbers.
(Score: 0) by Anonymous Coward on Tuesday March 26 2019, @03:43AM (4 children)
you use port 104?
commander data
(Score: 2) by maxwell demon on Tuesday March 26 2019, @05:30AM (3 children)
Off by 2.
The Tao of math: The numbers you can count are not the real numbers.
(Score: 2) by maxwell demon on Tuesday March 26 2019, @05:31AM (2 children)
Err … I shouldn't try to calculate while listening to the news …
The Tao of math: The numbers you can count are not the real numbers.
(Score: 2) by maxwell demon on Tuesday March 26 2019, @05:34AM (1 child)
I forgot to give the correct correction: Off by 5. And yes, this time I'm sure.
The Tao of math: The numbers you can count are not the real numbers.
(Score: 2) by maxwell demon on Tuesday March 26 2019, @05:35AM
Err … no, off by 7 -- off by 5 from my previous wrong result!
The Tao of math: The numbers you can count are not the real numbers.
(Score: 2) by driverless on Tuesday March 26 2019, @10:42AM
I moved my SSH to port 80, and I found I was getting thousands of probing attacks a day there.