Slashdot Log In
Cryptographically Hiding TCP Ports
Posted by
CmdrTaco
on Tue Jan 08, 2008 10:10 AM
from the can't-see-the-ones-for-the-zeros dept.
from the can't-see-the-ones-for-the-zeros dept.
JohnGrahamCumming writes "The shimmer project implements a cryptographically-based system for hiding important (e.g. SSH) open ports in plain sight. By automatically forwarding from a range of ports all but one of which are honeypots and by changing the ports every minute only a user knowing a shared secret can determine the location of the real SSH server."
Related Stories
This discussion has been archived.
No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
Full
Abbreviated
Hidden
Loading... please wait.
Neat in theorey, imho. (Score:4, Interesting)
I manage quite a bunch of remote systems, each one equipped with OpenSSH for adminning and OpenNTP for syncing system clocks, yet their local clocks still drift a little over time; sometimes easily up to quarter a minute or more. So if the interval of changing ports is too narrow, one would eventually lock himself out of the remote system because of unsynced clocks and a wrongly computed destination port. Sucks big time.
At the end of the day, choosing some non-standard port in the 30000+-range for sshd (mostly to save logrotate some work by keeping futile scriptkiddie-login-attempts out, but anyway) and turning off password-authentification in favour of pubkeys still provides enough security for just about anybody. Services that don't allow for such measures may be tunnelled over SSH (or e. g. OpenVPN, for more demanding protocols/apps) with ease, again rendering the project's idea somewhat moot to me.
Re:Neat in theorey, imho. (Score:4, Informative)
Parent
Re:Neat in theorey, imho. (Score:4, Informative)
Parent
Re:Neat in theorey, imho. (Score:4, Interesting)
It should theoretically be impossible to snoop the port not (by virtue of it not being used), but it will be there if and when it is needed.
You could even have it as a seperate 24 hour updating set, long enough that no one should fail it, but still makes snooping it fairly useless.
Of course with up to 3 minutes to used snooped port pattern it is not completely invisible.
If security was super high, and there were a limited number of people needing to access, you could have the login give you an 8 digit code and you would enter that into the client next connection, and it would use that to pick the ports to knock. This would make it impossible to access SSH even after snooping an exchange.
It could also wait 3 minutes before allowing another connection, in the interim running a daemon that accepted and login and spit out "please wait 3 minutes" instead of a real prompt.
Parent
Re:Neat in theorey, imho. (Score:4, Interesting)
Parent
SSH implementations have defects (Score:3, Insightful)
Re:Neat in theorey, imho. (Score:5, Insightful)
Once someone logged into that server using their own key or pass phrase, the only command they could run was ssh. All the other servers in the network only allowed ssh in from that ssh box, and by policy their keys and pass phrases had to be different on the ssh server than on the internal boxes. Each failed attempt at logging in caused a 5-second wait, and after three a 12-hour wait.
Is it as secure as having the real port hop around and synchronizing that with the clients via a shared secret? Well, I guess that depends on just how secret the shared secret is. We never had any problems, though, and the only thing our people had to take with them were the name of the server, their private key or passphrase, and the proper port to use. They usually didn't have much problem remembering three of those, and the you have the same issue with private keys no matter what (that being that they're only as secure as the system on which they are stored).
There's probably some security advantage to the solution presented in TFA, but I'm just not sure it's worth the extra coordination hassle compared to people's home-grown solutions. It seems like every fifth post in the comments is about alternative ways to safeguard ssh ports. Surely not knowing which someone is using provides a bigger hurdle than getting past any single one of them. When you're practicing security by obscurity, which is what this really boils down to, then being more obscure is probably a good thing.
The best fix for brute force is the old idea you mention of an enforced wait between attempts. It's a pain when you're locked out of a server you're legitimately allowed to use, but it's very useful to keep brute-force attacks down. Giving a couple of chances with a short wait and then imposing a much longer once after 2 to 5 tries seems to be a pretty good balance.
Parent
Re: (Score:2)
Re:Neat in theorey, imho. (Score:5, Interesting)
1. An ntpd not only syncs time, but adjusts the running speed of the kernel clock. Otherwise it would be nothing more than a ntpdate cronjob.
2. Under GNU/Linux, the local clock may be used to initialize the kernel clock, but those two run independently of each other until shutdown (or manual set). Only then the local clock is set to the kernel time, regardless of what the local clock was doing all the time.
Parent
Re:Neat in theorey, imho. (Score:5, Funny)
Parent
Re: (Score:3, Informative)
If your ntp-enabled systems are drifting 15 seconds out of whack with each other, you have bigger problems than additional SSH security.
Yes, it's called Linux on VMWare. There are workarounds, but they involve recompiling the kernel, setting boot options, and VMWare tools settings. Without the workarounds, even with ntp enabled, clocks can skew on the order of seconds every minute. I've seen systems get a minute out of whack in under ten minutes. With some settings, ntp actually makes it worse, as ntp and VMware perform dueling clock-skews.
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Re: (Score:3, Insightful)
Honestly, people spend way too much time worrying about hiding their SSH ports. Use public key authenticat
"Obscurity" tag is misleading (Score:5, Insightful)
Still, requires a shared secret plus synchronized clocks, and any mistake automatically blacklists you. Sounds ridiculously impractical IMHO.
Re: (Score:2, Informative)
It's all fun and games till you've locked yourself out from an only remotely accessible server...
Re: (Score:2)
Re: (Score:3, Insightful)
Frequency hopping has a much broader domain to "hop" across.
Frequency hopping requires the communication to keep hopping even after it's established. Not only can't you connect without the key, you can't even keep a conversation going without the key. You can't hear or be heard at all, in fact.
To someone without the key, frequency hopping "looks like" random noise. This works becuse there is random
Re: (Score:3, Informative)
No, it doesn't. It looks pretty much like you'd expect -- spikes in power more-or-less uniformly (but discretely, not continuously) distributed over some part of the spectrum.
Check this link for pictures:
http://www.metageek.net/docs/sample-recordings/video-baby-monitor [metageek.net]
Re:"Obscurity" tag is misleading (Score:5, Interesting)
Parent
Actually, it gets better than that... (Score:3, Insightful)
If you are a competitor of these guys, simply forward people silently to one of their ports in a hidden iframe.
Bingo, permanent ban.
Re:"Obscurity" tag is misleading (Score:5, Interesting)
So to keep this in the same context of the article, what if the hacker picks the correct port right off the bat? No black listing, no honey pot, no security other then what was already there without the system. but better yet, what if there was 1000 ports operated in this manor, Could I effectively find the right port by using 1000 zombie machines to connect and then see the response on a second connect attempt to see when the blacklisting comes about? I'm willing to bet that the first connection that survived the longest without black listing is the correct port. So now I can attempt to exploit the server on that port to gain access.
I would think it adds a level of security and might stop the average script kiddie but I'm not sure that it is a level of security beyond the equivilent of security through obscurity.
Parent
More or less obscure than password encryption? (Score:2)
Re: (Score:2)
Re: (Score:3, Insightful)
Well, this is still security through obscurity.
In that case, isn't cryptography just "security through obscurity" since the real key is buried in known iteration of numbers?
Re:"Obscurity" tag is misleading (Score:4, Insightful)
Now if I am not understanding something correctly and you need the key to even get access to a/the port then I am wrong. I mean if the ports are all blocked and the key opens them for you to attempt authentification? But as I understand it, the port it already there and exposed along with numerous fake ports, you just don't know which one it is without the key and that is obscurity.
If this is how I am thinking, then combining it with something like port knocking where the ports aren't even available until another challenge succeeds might make it better.
Parent
Re: (Score:2)
Isn't this port knocking (Score:5, Insightful)
So while this is a little different, it's inferior.
Re: (Score:2)
Re: (Score:2, Informative)
Re: (Score:3, Interesting)
Excuse me, but I have had enough. (Score:2)
Whatever happened to just plain good passwords (including a little helper for good measure [fail2ban.org]), TCPWrappers, sensible firewalling and ssh private/public keys?
I could understand this type of security with more brittle services, things that can be hacked, but this is IMHO going way oervboard.
What are these passwords, kemo-sabi? (Score:5, Interesting)
Parent
Not so smart, though. (Score:3, Insightful)
In both cases you need to keep a crypto key secret otherwise you'll end with secuity hole. A shuffled one, but still a hole.
Complete Waste of Time (Score:3, Insightful)
1) Another piece of information needed
2) If your SSH server has a buffer overflow or similar in it.
And both seem useless.
1) You are surely going to keep your SSH key in the same place as the code to access this thing. If you wanted a similar level of security, why not hide your SSH key in two pieces?
2) Now we have to completely test two programs instead of one.
Seriously, what security problem is this supposed to fix?
Port knocking? (Score:2)
Interesting... (Score:2)
not as good as port knocking (Score:3, Informative)
stealth (Score:2)
I have an alternative proposal. Have a udp or icmp service where, before connecting to a tcp server port, a client must send
Re: (Score:2)
Distributing Cracking (Score:4, Interesting)
I wonder if the DDoS would bring the server to its knees first, though.
Time to break out infinities (Score:3, Interesting)
Clearly some aspects of computers not as sexy as high speed graphics lag behind, as some examples the number of bots, the number of ports, the number of concurrent connections (10K problem) and the data transfer speeds possible by consumer hardware, especially when divided by storage media size, all seem to be relatively small numbers still. A ton of bots can game this game, etc.
Obviously it is time to break out the heavy math. First imagine if instead of having only measly thousands of ports you could use a floating point number to designate a port. It's not like we have thousands of ports in hardware right? Meaning virtual port addressing. Needs a big botnet to get through that. You could make the system answer on any port, or only answer on those which are being used. Well floating point still may not have a lot of significant bits to hack, so time to break out the math.
I think Rudy Rucker could have some good ideas for computer security. Not that I'm a mathematician or anything, but if you read his latest book minus 1 there are plenty of descriptions of navigating infinities. If you had a transfinite number of ports I think you might even be able to prove that the obscurity is more secure than anything else in the real world. So while it is a bit of a ticklish idea I'd very much like to see a math-minded hacker think about what would be involved in designating such a number or abstract symbol representing it and using that as a destination address. Thank you.
Re: (Score:2, Insightful)
Re: (Score:2, Informative)
It seems too easy to get locked out as one slip blacklists you.
I was shocked to read that even with NTP, some servers' clocks drift so far - I thought it could keep them +/- a fraction of a second worst case (ah, when reality bites)
Re: (Score:2, Informative)
No, no, no! A password is a *key* and has nothing to do with obscurity. The quote you refer to is using obscurity to mean enhancing an algorithm by "keeping its process a secret." That is not the case here.
See Security through obsecurity is no security [blogspot.com] and Security through obscurity [wikipedia.org]
Re: (Score:2)
Re: (Score:2)
You've just reinvented Port knocking [wikipedia.org]. And why bother encoding the reply IP in the payload? The packets themselves have the reply IP on and if the idea is that your payload is encrypted verification for the IP, that'd be a real pain in the arse if you're ISP allocates dynamic addresses - just use public key auth for your SSH endpoint when it uncloaks instead.
Re: (Score:2)
Re:Newbie Question about SSH Security ... (Score:5, Informative)
Passkeys can be relatively secure, or they can be relatively insecure. It depends on the level of security you're implementing in them. Another really easy way to secure it is to make it more trouble than it's worth to break into it. I have my SSH on the standard port of 22 on my server, and am not worried about security at all. I subscribe to the mailing list and it's kept up to date every time a new release comes out. More importantly, my SSH server is configured to only allow one user ID to log in, and to only allow one password attempt before disconnecting. It also doesn't disconnect until after you've entered the password, and will give the same error message no matter what, so you've got no way of knowing why it is that you're not getting through. Finally, the user name in particular that's allowed to log in through SSH doesn't have an e-mail account or home directory, and isn't published anywhere.
No, that isn't going to secure it entirely. It is, however, going to make breaking into it incredibly time consuming and generally not worth it unless you have a personal vendetta or other reason to go after me specifically. Security through obscurity. In this case, get away from Default Pass, and towards Default Reject security model.
Parent