12 ms·
Port-knocking mainly mitigates slow distributed-brute-force login attacks, and works best when ports are interleaved with several tripwire black-hole and knock-
by Joel_Mckay 1y ago
Port-knocking mainly mitigates slow distributed-brute-force login attacks, and works best when ports are interleaved with several tripwire black-hole and knock-port-close firewall rules.
Use-cases:
1. helps auto-ban hosts doing port-scans or using online vulnerability scanners
2. helps reduce further ingress for a few minutes as the hostile sees the site is "down". Generally, try to waste as much of a problem users time as possible, as it changes the economics of breaking networked systems.
3. the firewall rule-trigger delay means hostiles have a harder time guessing which action triggered a IP ban. If every login attempt costs 3 days, folks would have to be pretty committed to breaking into a simple website.
4. keeps failed login log noise to a minimum, so spotting actual problems is easier
5. Easier to forensically analyze the remote packet stream when doing a packet dump tap, as only the key user traffic is present
6. buys time to patch vulnerable code when zero day exploits hits other hosts exposed services
7. most administrative ssh password-less key traffic should be tunneled over SSL web services, and thus attackers have a greater challenge figuring out if dynamic service-switching is even active
People that say it isn't a "security policy" are somewhat correct, but are also naive when it comes to the reality of dealing with nuisance web traffic.
Fail2ban is slightly different in that it is for setting up tripwires for failed email logins, and known web-vulnerability scanners etc. Then whispering that IP ban period to the firewall (must override the default config.)
Finally, if the IP address for some application login session changes more than 5 times an hour, one should also whisper a ban to the firewalls. These IP ban rules are often automatically shared between groups to reduce forum spam, VoIP attacks, and problem users. Popular cloud-based VPN/proxies/Tor-exit-nodes run out of unique IPs faster than most assume.
Have a nice day, =3
- akerl_ 1y agoIf a slow brute force attack is working on your system, all the port knocking and tripwires and whatever are just gimmicks. Don’t waste resources putting lipstick on the pig.
- Joel_Mckay 1y agoStolen password-less key bots are also common these days, and again it is more about reducing log noise. "Don’t waste resources putting lipstick on the pig." I would never kink-shame someone that ignored the recent CVE-2025-48416, that proved exposing unprotected services is naive =3
- akerl_ 1y agoIf somebody has a stolen credential, they aren’t going to be brute forcing at all. Likewise that CVE wouldn’t be attacked by a brute force attack. But I see you’ve backpedaled to this being about log noise, not security.
- Joel_Mckay 1y agoThreat detection is a higher security priority than prevention in my experience. One may believe whatever they like, as both our intentions are clear friend. Have a wonderful day =3
- akerl_ 1y agoIt's weird to assign them comparatively like that but also, what does that have to do with fail2ban? The roving spam it blocks are not threats, and stolen credentials aren't going to be detected by it.
- Joel_Mckay 1y agoIn general, bots/worms/clowns will first check if a host/router is already infected or vulnerable to a shim. Thus, tripwires on those checks or URI often auto-ban infected/hostile hosts before a scan fully escalates to a successful payload. Note, people don't want a VM delta-snapshot of their zero-day around for automated analysis. 99.98% of hostile traffic simply reuse already published testing tools, or services like Shodan to target hosts. One shouldn't waste resources guessing the motives behind problem traffic. =3
- 1y ago
- frumplestlatz 1y agoThis is a metric ton of completely pointless theater. Your services should simply be unreachable over anything but wireguard (or another secure VPN option).
- Joel_Mckay 1y agoDepends on the use-case, IPsec is often not supported by many LANs. Also, network crossing is 1 badly configured client away from full infrastructure worming. At some point, the idealism of white-listed pears and VPN will fail due to maintenance service costs. Two things may be true at the same time friend. =3 https://www.poetry.com/poem/101535/the-blind-men-and-the-elephant https://www.poetry.com/poem/101535/the-blind-men-and-the-ele...
- frumplestlatz 1y agoYes, and those two true things are: - You should be using WireGuard. - “Port knocking” is pointless theater.
- Joel_Mckay 1y agoCVE-2024-26950 is also true, and while I respect your opinion... a VPN has a lot of additional links in the chain trivially broken by competent hostiles or incompetent client installations. IPSec is simply a luxury unavailable on some LANs =3
- tptacek 1y agoI don't understand what you think CVE-2024-26950 has to do with this thread. Do you understand what that vulnerability actually is, or did you just go search "WireGuard CVE" to find ammunition?
- Joel_Mckay 1y agoFirewall administrative network port traffic priority is important for systems under abnormal stress.
- mdhb 1y agoI recently wrote a deception / honeypot service that does some similar stuff so that all makes sense to me and I think the general strategy of impose costs on attackers by making them expose more of their infrastructure etc are actually a really good move especially in the context of developing an early warning signal. I had some additional logic that gave me a really easy but unintuitive way to tell with an incredibly high degree of confidence the difference between a bot and a human on keyboard scenario and for what it’s worth I think that is the specific thing that makes it worth the effort. If I have reasons to suspect it’s a bot I just drop the request and move on with my day. The signal to noise ratio isn’t worth it to me.
- Joel_Mckay 1y agoI would simply bounce these users to a video game site, that paid us for referrals. So we made coffee-money wasting spammers time, and attacks stayed rudimentary. =3