News for hackers. Stuff that matters.
Re:Security by obscurity is underrated by crazygringo on Friday September 11, 2020 @04:50PM (#24447204)
But serious question -- what exactly is the benefit? Before, it's not like they were getting in anyways if you were using keys.

So I confess I still don't "get it". Unless you just want cleaner logs or something. I assume you're still getting the same number of initial connection attempts per day, but just not recording them?

Is it something to do with network or CPU consumption related to failed subsequent attempts by the same actor? (Which, the same as port knocking, should be rate limited anyways?)

Re:Security by obscurity is underrated by jeroenhd on Friday September 11, 2020 @05:24PM (#24447476)
There have been bugs found in SSH server implementations that allowed limited remote code execution or even authentication bypasses. Missing an update or two isn't bad when nobody can figure out how to connect to your server.

Of course you have to update at some point. However, if someone drops a zero day on your SSH server while you're asleep you're probably glad that you've got a secret sauce to protect your server, letting the vulnerability bots focus on other servers.

Re:Security by obscurity is underrated by cthalupa on Friday September 11, 2020 @06:15PM (#24447918)
If port knocking existing in a vacuum, sure. It'd be great.

The issue is there are other options that are better - like VPN only access to SSH - that you can use instead of (or in addition to)

If everyone advocating for port knocking was also saying set up VPN only access, sure. It's an additional authorization factor via where ports are used as a proxy for a PIN. But I haven't seen a single person in here saying they use it in addition to a VPN - people are saying it's their primary form of protection.

You can setup a wireguard VPN in as much time as it takes to set up port knocking. Now you have all of the benefits port knocking provides, and more. And you could even still set up port knocking in addition to the VPN if you really wanted to, but I would argue there's not much point.

Re:Security by obscurity is underrated by surfsvammel on Friday September 11, 2020 @06:39PM (#24448061)
Curious, how does this work? I am not very familiar with VPN. Is the VPN connection setup for the SSH session only? What if someone needs to have multiple SSH session, going to different networks altogether?

Im thinking it could be pretty impractical to go onto a whole other network to open an SSH session.

Re:Security by obscurity is underrated by cthalupa on Friday September 11, 2020 @06:46PM (#24448104)
>Curious, how does this work?

It depends on the implementation. For a client <-> server VPN, it creates an interface on your local machine that corresponds to the network address range for the VPN, and tunnels traffic to the remote end.

For a site to site VPN, two appliances create a tunnel between them, and traffic is routed over that tunnel via the same sort of routing rules you normally use.

> Is the VPN connection setup for the SSH session only?

It can be. It can also be configured for all traffic, or some other combination.

> What if someone needs to have multiple SSH session, going to different networks altogether?

You can have multiple VPN connections to multiple networks. It can get complicated if the VPNs are using overlapping IP space.

> Im thinking it could be pretty impractical to go onto a whole other network to open an SSH session.

I'm not entirely sure why. Millions of people use VPNs every day for a variety of reasons, including SSH. I currently have 8 saved VPN configurations in my wireguard client, and connecting to one is as simple clicking on the client and picking the one I need in the dropdown. Then I SSH as normal, except its to the server's private IP and not public.

Re:Security by obscurity is underrated by jameshart on Friday September 11, 2020 @11:21PM (#24449543)
Why aren't you concerned that bugs will be found in your port knocking implementation?

I think the main concern with port knocking is that it's observable. You're effectively sending your password in clear, so if someone can intercept or overhear your traffic then your secret is lost. Cryptographic authentication schemes like SSH itself or VPNs do not have this problem.

Re:Security by obscurity is underrated by jeroenhd on Sunday September 13, 2020 @06:11AM (#24459788)
Port knocking is a way to decrease the amount of random 0day/brute force scripts finding their way into your server. It will only stop automated scripts and attackers that don't know who you are. It's obviously no protection against incentivized attackers.

A VPN has upsides and downsides. It obviously protects your server a lot better against directed attacks, but when you lose your laptop or when your computer gets ransomware'd, you can't get access to the server anymore.

Furthermore, code execution vulnerabilities have been found against VPN servers because of their immense complexity and OpenVPN can consume quite a lot of resources for a daemon doing nothing. WireGuard has changed the VPN landscape with its simplicity, but if you fear your server may not be updated all too often (because it's partially managed by a customer, because your colleagues might not care to do so after you leave), leaving a simple solution behind can have its upsides.

I'm not advocating that everyone should enable port knocking on their servers to make them secure or anything, but the "port knocking is always bad" crowd is often very loud despite the fact that there are small little ways port knocking can improve security with very little effort or increased attack surface.

Re:Security by obscurity is underrated by MrStonedOne on Friday September 11, 2020 @11:49PM (#24449669)
but what does getting past port knocking help with? now they have to find a bug with ssh.
Re:Security by obscurity is underrated by thomasahle on Saturday September 12, 2020 @11:11AM (#24453072)
If OP has a false sense of security due to port knocking the ssh may not have been updated as recently.
Re:Security by obscurity is underrated by e40 on Saturday September 12, 2020 @01:24PM (#24453937)
We update sshd daily, as we are on CentOS and use the official updates. Nice guess, though.
Re:Security by obscurity is underrated by canofbars on Friday September 11, 2020 @06:11PM (#24447880)
From what people have told me is the point is to remove automated attempts from logs so that when someone actually works out how to try to connect it becomes a strong signal that you have a real attack and you can check the logs to see if they are using real usernames or some other info to suggest that they know more than just random spam attempts. Normally dedicated attackers blend in with the random noise of the internet.
Re:Security by obscurity is underrated by e40 on Saturday September 12, 2020 @01:23PM (#24453932)
It is as simple as reducing an attack surface. If attackers can't talk to sshd, then can't try to hack it. In a world where zero days are real, why chance it?

Why is that so hard to grasp. Still boggles my mind.