Combining Port Knocking With OS Fingerprinting
michaelrash writes "Port knocking implementations are on the rise. I have just released fwknop; (the Firewall Knock Operator) at DEF CON 12. Fwknop implements both shared and encrypted knock sequences, but with a twist; it combines knock sequences with passive operating system fingerprints derived from p0f. This makes it possible to allow, say, only Linux systems to connect to your SSH daemon. Fwknop is based entirely around iptables log messages and so does not require a separate packet capture library. Also, at the Black Hat Briefings, David Worth has released a cryptographic port knock implementation based around one-time pads."
but is anyone out there using port knocking for serious security?
LK
"Hi. This is my friend, Jack Shit, and you don't know him." - Lord Kano
With a large port knock routine say 20 ports or more, can't you be sure it's YOUR box that's comming in? More defense and limitations are good, sure, but why filter by OS? Is it in case someone gets by the knock?
thank goodness, if there's one thing a hacker can't get his hands on, it's a copy of Linux!
yuk yuk yuk
1. TCPWrappers (has to be be right IP and/or daemon)
2. Portknocking (has to have the right sequence)
3. Passive Fingerprinting (only Linux and BSD systems can connect)
4. Keys Only (you must have the correct DSA private key)
Usually unnecessary, yet very interesting - much like Slashdot itself....
dmiessler.com -- grep understanding knowledge
the bigger is the chance of screwing up. The point of port knocking is to have a simple and therefore less bug prone layer around real authentication systems like ssh, so that when a bug in ssh is found, portscanners don't find your vulnerable service. Complicated port knocking systems defeat the purpose of port knocking.
While port knocking is by now an established technique, I do not think OS fingerprinting adds anything useful, because the ease of static replay attacks is left unchanged by OS fingerprinting.
Though not that easy, OS spoofing is not remarkably labour intensive, and setting up a "OS generator" who will replay the static attack with every known OS is a distinct possibility.
In other words, though a nice intellectual possibility, it is perhaps of rather limited application.
Now, mixing instead knocking and a cryptographic application seems to me instead more promising.
Thufir Hawat
Part-time Mentat
are techniques I've seen appearing for the last 10 years that are designed to compartment sections of the net. They make me sad, because that's definitely not what the net was intended to be, i.e. a global interconected network of machines to freely communicate. Instead, the net is slowly being segregated, and you'll soon have to show some sort of proof of identity to do anything other than HTTP. If you don't believe me, just consider how hard it is to do something as mundane as a DCC CHAT on IRC today, as opposed to, say, in 1994.
I realize the need for these things, basically forced upon us by the combination of commercial interests, shitty insecure OS, script kiddies and greedy crackers (not hackers), but all the same, I can't help realize that the internet of today is a far cry from what it was intended to be in terms of freedom of communication...
"A door is what a dog is perpetually on the wrong side of" - Ogden Nash
Not more - not less. All that portknocking does is shifting the security to a layer where it doesn't belong.
And even if you don't want others to see that there are services running on your host there are better solutions. e.g. sending a special string to some UDP port.
If someone can sniff your traffic and he knows about portknocking it's trivial for him to detect it. If someone can't sniff your traffic there's no advantage in using portknocking.
and that's just what they'll do
one of these days these ports
are gonna walk all over you........
Am I the only one to wonder why the author made a deamon that watches iptable-logs and then modify the ruleset when a matching knock sequence is found instead of implementing a iptables match module instead?
Same goes for psad (by same author) -- I thought the purpose of iptables was to allow plug-in modules to be COMBINED.
This is a one-time password system, which uses hashes, just like S/Key does. This is NOT a one-time pad system.
I thought port knocking was definitively debunked as security through obscurity.
Use the recent match module and something like the following for requiring ports 1000, 2000 and 3000 to be knocked in order and within 30 seconds before allowing ssh from a particular host:Now you don't have to clutter the system with logs and a daemon that may run into trouble.
Would this if further developed simply allow a company say, like Microsoft to prevent people who are not using Windows to visit websites? If put on servers that would be trouble for many Linux users. Microsoft could just try to shrug it off saying that its not a "trusted" operating system. Anyone using say, frontpage or Windows Server could effectively just by using those products prevent "those dirty Open Source infidels" from viewing big websites. ...just a thought.
The passive operating system fingerprints are going to prove to be useless in preventing abuse. It boils down to this -- you can't trust any information gained exclusively from the user (even passively).
Writing software to spoof OS characteristics won't prove to be a challenge, esp. when you know what characteristics the other side is trying to detect. I just can't really see this system as bringing any added value at all.
Would be to implement invisible port knocking, that is one where there is no preceeding magic packet that would hint the attacker about the presence of port knocker.
You can encode plenty of bits of data into the initial sequence number, TTL, window size, timestamp options and so forth (you can probably stuff a TCP packet with up to 128 bits of data with no effort).
The port knocking daemon could then only allow connections for which this 128 footprint matches the one-time cryptographically generated password, silently dropping all other traffic.
OS detection combined with firewall rules is already implemented in OpenBSD.
That did happen before, didn't it?
/. story handy nor could I find it with a quick search, though...
I don't have the
I mean it seems cute and all, but what does it buy you that, for example, sending a UDP packet with an access code in it (perhaps specific to the time of day and other parameters) doesn't get you?
Has it been over a year since you last donated to the Electronic Frontier Foundation
One-time password systems make some sense here. One-time pads are operationally awkward and total overkill for the cryptographic needs of this application.
Bill Stewart
New Fast-Compression-only CPR http://preview.tinyurl.com/dy575ks
Install portsentry. Wait until corporate Nazi scanned your machine and got added to hosts.deny. Enjoy the freedom.
Oh well, what the hell...
This makes it possible to allow, say, only Linux systems to connect to your SSH daemon.
You mean you could block all the leet blackhat Windows users from your box? You could really be in trouble if they were able to reach it...
Hey baby, you ever had your port knocked by a black hat?
We are one consciousness experiencing itself subjectively. Back to you with the weather, Bob!
How long before someone comes up with a port knocker called "Cypher Operated Combination Key Knocker"?
And wasn't he played by Mark Hamill?
We do not live in the 21st century. We live in the 20 second century.
Protecting a service with port knocking is only practical if gaining access to the service does not have to happen quickly. Protecting a web server with a port knocking scheme is not practical. However, if Microsoft wanted to build an extra layer into their OS so that their tcp stack would simply not allow a session to be established from any non-Microsoft OS, that is a different matter.
Also, at the Black Hat Briefings, David Worth has released a cryptographic port knock implementation based around one-time pads.
The summary is incorrect: David Worth's tool uses one-time passwords, not one-time pads. That's a good thing, because one-time pads would make the system really inconvenient to use.
Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
...as I say every time this comes up. The more complicated the knock sequence, the less reliable it will be.
PHEM - party like it's 1997-2003!
I personally would prefer a PGP public key encrypted token with the token being what ever is in the one time pad.
8 86 4815
Here are some methods from an earlier discussion, mine and some others.
http://slashdot.org/comments.pl?sid=104064&cid=
I'd go on a Vegan diet but the delivery time from Vega is too long. --brownkitty
They will never know.
Unless... they see their logs.
Your ISP may not be able to directly open your ports but they have to receive, handle and send every single inbound and outbound IP packet of yours, each of them containing source and destination port numbers.
If they don't know the easiest way to see whether you run any servers by just observing port numbers in your traffic, then, if I were you, I wouldn't want such imbeciles for my ISP.
Sincerely,
Pan Tarhei Hosé, PhD.
"Homo sum et cogito ergo odi profanum vulgus et libido."
Comment removed based on user account deletion
You're sorta missing the point.
Port knocking is used to protect private services, such as SSH, where the general public has no use for the service except for cracking, and the Port Knocking adds an extra layer of security. Adding OS Fingerprinting to this adds an extra layer of security in turn to the Port Knocking.
HTTP, on the other hand, is designed for public access, and for that reason neither Port Knocking nor OS Fingerprinting would be used on it. (Unless you're running an intranet server and you don't want people's home laptops connected, or something like that, but that is again a private service since it's on your local network and not designed to be used by everyone.)
Tired of free iPod sigs? Subscribe to my blacklist