LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   how to set up dummy port as honey pot (https://www.linuxquestions.org/questions/linux-security-4/how-to-set-up-dummy-port-as-honey-pot-650210/)

twlilinux 06-18-2008 10:28 PM

how to set up dummy port as honey pot
 
how would you set up a dummy ssh port 22 that looks like a real ssh port? My real ssh port is hidden and I don't want hackers to search for it, so I'm thinking about setting up a dummy port 22. How would I do that? Thanks in advance.

-------
My favorite websites:
Buy and sell class notes, old exams, papers, lab reports, admission essays.
Ask and answer Linux questions.
Read free books without walking to the library.

pinniped 06-18-2008 11:31 PM

Well, you can make a copy of OpenSSH, then throw out all the useful stuff. Set up OpenSSL to always reject the connections.

Another option is to simply listen on that port with a maximum queue of "0" - I think that's valid and refuses all connections. If I'm mistaken then "0" means "max permissible". In this instance the "connection refused" message at the remote end is suitably vague - there could be any number of reasons for it. Of course someone who actually looks at the packets will see that there is never any SSL traffic and might suspect that there isn't even an SSH server there.

I'm not sure a dummy port would help you in the least; the script kiddies' toys poke at ports until they find something; of course in that case 'snort' might help you out.

jayjwa 06-19-2008 02:52 AM

A few ideas come to mind.

1. Use an iptables TARPIT on connections to tcp/22

2. If you use xinetd, set it as a sensor port. That will at least block them from another other service they might look at:

service ssh
{
flags = SENSOR
type = INTERNAL
socket_type = stream
wait = no
user = nobody
deny_time = 45
}

Then the real one would need a 'secret-ssh' added to /etc/services on the port you want it to be hidden on:

service secret-ssh
{
instances = 10
socket_type = stream
protocol = tcp
wait = no
user = root
server = /usr/sbin/sshd
server_args = -i
}

3. You could write a little script to just echo out some OpenSSH type text when the port is hit. Stick it in inetd/xinetd at the right place.


I moved my ssh port years ago, and never once had it messed with since, so I wouldn't worry a whole lot about someone going looking for it once the usual place turns up fake/empty. Most ssh-scanning is done by automated scripts/tools, as far as I can tell.


All times are GMT -5. The time now is 12:10 AM.