Knock Safely With portknocking_v1.0 78
mrdeathgod writes "The Port Knocking project at SourceForge has just released portknocking_v1.0. Based on my undergrad thesis, this client/server package does not use pre-defined knock sequences, but rather utilizes Blowfish in order to encrypt the client data into a sequence of port numbers. This enables a client with the proper password to remotely manipulate firewall rules without fear of replay attacks. While currently designed for FreeBSD+ipfilter, expanded portability is in the works."
Re:It would seem to me that the title of this arti (Score:2, Funny)
Re:It would seem to me that the title of this arti (Score:1)
hrm... (Score:4, Funny)
Re:hrm... (Score:3, Funny)
blackcoot's Latest 24 of 161 Comments
Subject Datestamp Replies Score
hrm... Fri Jun 18, '04 02:30 AM 1 4, Funny
attached to Kock Safely With portknocking_v1.0
hehe
-metric
Offtopic? (Score:2)
(Score:0, Offtopic)
WTF?
the topic is:
"Kock Safely With portknocking_v1.0"
It's not my fault the topic is offtopic..
-metric
Re:Offtopic? (Score:1, Offtopic)
Re:hrm... (Score:2, Funny)
Re:hrm... (Score:3, Funny)
By god (Score:1, Funny)
I'm still not convinced... (Score:4, Interesting)
A list of one-time passwords & a simple daemon, that verifies them & enables ssh access (in some high level language) at the user request would do as fine. Give such daemon some IQ, so it would make brute-force attacks very hard, and you have the same thing. Except for the "cool" part.
You forget (Score:5, Insightful)
And it shows a listening port in the case of the deamon, well, listening, conventionally.
Re:You forget (Score:1)
Missing the point (see other posts below) (Score:5, Insightful)
I would be stupid, though, if *after* the port knock open some door, you get to open a telnet port for instance, instead of a more secure ssh port.
What the topic *is* about is that now you can have OTPs and other types of non-fixed port knocks. Additionally to the security of not being "seen" by port scans, the port knock sequence changes and is more difficult to brute force.
Re:Missing the point (see other posts below) (Score:4, Insightful)
portknocking won't help you keeping your IP hidden. Having a tunnel from your IP to a trusted machine will (so you will appear as another IP and noone administrating that machine will give your "secret" IP to public).
pr0n kiddiez? Man, just change SSH port from 22 to 2222 and you have pr0n kiddiez off your back. In the times of scanner automation (scan IP range, find vulnerable hosts, launch all known exploits, install rootkits) people won't bother trying to hack your sshd if it's not standard anyway - just because in the time they are trying to find, where is your sshd at, they can find & hack all those 5 windows 98 machines, which NEVER saw Windows Update, on the same network.
Re:You forget (Score:1)
Not if you firewall it. I cannot see the point of this (except for academic exercise ofcourse).
Re:You forget (Score:5, Interesting)
The advantage with portknocking is that if someone was scanning IP ranges for computers running exposed services, you won't show up as a valid target. You'll look like an unused IP or a computer that's off (or one that's simply firewalled every port).
Re:You forget (Score:1)
Re:You forget (Score:2, Informative)
DISCLAIMER: No, I do not attend UF, don't send in
Re:You forget (Score:1, Interesting)
Re:You forget (Score:1)
I'd suggest that you incorpaorate something like a RSA-SecureID system -- so that you'd have a [nearly] unlimited supply of one time passwords -- and this method becomes even stronger.
Remember the onion -- layered security.
K.C.
Re:You forget (Score:2)
Same is true if you run SSH on some obscure port, especially if you remove the version number, etc.
Port knocking is obscurity, and obscurity is not security. People forget that a lot.
Re:You forget (Score:2)
Re:You forget (Score:2)
Besides that point, what you say about ssh on an obscure port is much worse that you think. The very moment someone does a portscan, finds a responsive host (remember that a portknock protected computer wouldn't even show up) and then has open ports on s
Re:You forget (Score:2)
Now this is wrong... A machine trying to be stealthy is far worse than a machine that admits it exists, but has no open ports.
I say that because anybody can tell if an IP address is in use. If they find that they don't get any reply from pinging that host, they know they're dealing with a host trying to be stealthy, and will spend much more time working on it.
If a machine just returns th
Re:You forget (Score:2)
Let's change the example into a lock on a door. With a normal door lock, you can look at it and determine the make and model, maybe check if there is a master key floating around. That w
Re:You forget (Score:2)
Re:You forget (Score:3, Interesting)
This is a solution in search of a problem....
Re:I'm still not convinced... (Score:2)
um...
Re:I'm still not convinced... (Score:1)
In Python I could write such daemon in 30 minutes or so. "man ipfw" or "man ipf" would be the part, that would take me most time (not to mention testing, of course) :)
Kock Safely (Score:1, Offtopic)
No, it's a reference to Jerk City. (Score:1)
knock knock (Score:2, Funny)
+1 Funny (Score:1)
I'm confused (Score:3, Insightful)
The "genius" of this approach seems to lie in the fact that the closed machine makes no response whatsoever until a valid doorknock sequence is received, which renders the system more clandistine from a very narrow point of view.
One of the reasons why ssh security negotiation is two sided is to eliminate replay attacks. The doorknock concept is going to have a problem with this.
I find it interesting to imagine that the doorknock sequence is defined as a function of the IP address of the requesting system. This would eliminate a replay attack by an adversary who can snoop traffic, originate traffic under its own identity, but not actively impersonate.
Re:I'm confused (Score:5, Insightful)
And honestly, its a damn good idea with a simple implementation. Because its so simple to implement, there will be more than one portknock server. How would an external attacker know if a broken version of portknock was being used, or if there wasn't even a computer there?
Pay attention to portknock, because you will see it again.
--Cam
Re:I'm confused (Score:4, Insightful)
The code looks like it was designed by some one who just learned C because, well, it was. The code is something called a proof of concept. A proof of concept, for those that are unfamiliar with the idea, is when something is quickly done just to prove that it might work and is feasible. Its usually the first step that leads to larger projects that address concerns like segfaulting.
And NO security measures, short of pulling the plug, is immune to DoS. So ignoring a security messure that is succeptable to an attack that almost all security measures are not immune to is idiotic. Perhaps I should stop using my firewall because my poor 56k modem can get DoSed.
--Cam
Re: Headline typo (Score:4, Funny)
It's nothing major. It's just that Michael's "N" key is worn out from "approving" stories:
That explains why it's so hard to get your stories posted. (wink, wink, nudge, nudge)
three things (Score:4, Interesting)
Kock (Score:3, Funny)
Anyway, dear /. editors, it's a great way to ruin a story. 90% of posts in this discussion are offtopic, just because you did a typo (for those who plan to mod me down - I did posted a serious comment already, have mercy!).
Why so complicated? (Score:3, Insightful)
Re:Why so complicated? (Score:2)
Then there is a daemon which listens on that port and you may feed it with UDP stream trying to DOS it.
Re:Why so complicated? (Score:3, Insightful)
Yeah, that's a point... but if you know the port to DOS, you must have been snooping. If you're snooping, you can just DOS whatever service the knocking opens up regardless of the knock protocol. Port knocking just keeps port scanners from seeing open services, it doesn't guard against a targetted DOS attack.
Re:Why so complicated? (Score:5, Insightful)
I think this is easier to implement and to use than port knocking.
I just realized why portknocking is so good (Score:5, Insightful)
On the other hand, portknocking is handled by a single daemon that is simpler than most applications. Portknocking could even be handled by the OS.
This means that instead of having to trust several net-connected programs with your system security, whose primary focus will probably not be safety, you only have to trust 1 program which IS focused on security. Added to that, a portknocking program is easier to make safe because it's simpler than most other programs which have to handle both network defence AND some other task (Instant Messaging).
Re:I just realized why portknocking is so good (Score:5, Insightful)
has anyone read the thesis? (Score:2, Insightful)
Also, it seems that an ordinary portscan would add 32 random firewall rules, that would never be cleaned up.
I'm not even going to mention that an MD5 hash is
Broken Implementation (Score:4, Interesting)
The IP address makes up 4 bytes of a 7 byte plaintext (which is already small enough to brute force) and the IP address will be that of the knocking host. Wait, it gets worse! The "action" byte is basically "open" or "close" and the port bytes don't quite use the full 2^16 range. In other words I need to brute force a little less than 17 bits. This is only challenging if I want to make like ET and do it with a reprogrammed Speak N Spell.
Back to sleep for me until version 5.0.
Re:Broken Implementation (Score:3, Interesting)
I knew a guy who had ten locks on his door. You had to turn the key the same way to lock and unlock. He usually only locked two or three locks, when he left, simply because he figured, that by the time he gets home, a possible burglar still haven't unlocked the door (probaby by locking some of the unlocked locks).
This is (to me anyway) somewhat the same thing.
It may not be entirely difficult to figure out, what port
Clients? (Score:1)
Let's say I want to access machine X's ssh daemon, which utilizes portknocking, is there any ssh client today that can access it?
Anyhow, I'm gonna name my firewall "Heavens door" when this works.