schenklklopfer, to random German
@schenklklopfer@chaos.social avatar

Kaum hat eins nen SSH Server irgendwo laufen schon klopfen die Hacksors an...

benzucker,
@benzucker@maly.io avatar

@schenklklopfer Ist doch nur Hintergrundrauschen. und gut.

lenzgr, to security
@lenzgr@mastodon.social avatar

I find it somewhat annoying and concerning that an essential #security tool like #fail2ban is broken on #ubuntu #linux 24.04 #noble since the end of February and there still is no update in sight.

https://bugs.launchpad.net/ubuntu/+source/fail2ban/+bug/2055114

jwildeboer, to random
@jwildeboer@social.wildeboer.net avatar

Someone is using Amazon EC2 instances to try to flood my little Forgejo server with bogus and repeating requests. Added these IP addresses to my firewall. Le sigh.

r1w1s1,

@jwildeboer can help on this case ?

ricci, to security
@ricci@discuss.systems avatar

Hey! Let's talk about #SSH and #security!

If you've ever looked at SSH server logs you know what I'm about to say: Any SSH server connected to the public Internet is getting bombarded by constant attempts to log in. Not just a few of them. A lot of them. Sometimes even dozens per second. And this problem is not going away; it is, in fact, getting worse. And attackers' behavior is changing.

The graph attached to this post shows the number of attempted SSH logins per day to one of @cloudlab s clusters over a four-year period. It peaks at about 3.4 million login attempts per day.

This is part of a study we did on our production system, using logs of more than 640 million login attempts, covering more than 1,500 hosts on our side and observing more than 840 thousand incoming IP addresses.

A paper presenting our analysis and a new, highly effective means to block SSH brute force attacks ("Where The Wild Things Are: Brute-Force SSH Attacks In The Wild And How To Stop Them") will be presented next week at #NSDI24 by @sachindhke . The full paper is at https://www.flux.utah.edu/paper/singh-nsdi24

Let's dive in. 🧵

ricci,
@ricci@discuss.systems avatar

OK, so what can we do about all these SSH brute force attacks?

We have a plan - actually, not just a plan, we run this in production on one of the @cloudlab clusters.

Let's start with this observation: if attackers are using a broad set of usernames, then we can use these username sets as a sort of signature. About half of attacking IP addresses only try one username, but that also means that about half are trying more than one - in fact some individual IP addresses tried more than 10,000 usernames!

What we do is this: we find sets of usernames that are used by more than one attacking IP address (actually it's a bit more complicated that this, details in the paper). This gives us "dictionaries" of usernames that are only used by attackers, and not any of our real users. We collect these dictionaries from the logfiles of a bunch of SSH servers, and combine them to form a Username Block List (UBL).

Now, all we have to do is: as soon as we see an IP address try a username from this UBL, we block it. That simple. We call this Dictionary Based Blocking (DBB).

How well does this work? We used logs from our clusters containing a total of 213 million login attempts, and it blocked 99.5% of all attempts, generating a false positives (accidentally locking out a real user) at a rate of just one about every five days.

But what about , you might ask? That's another method people use to block attacks against SSH (and other services) by locking out addresses that fail to log in more than X times in Y minutes. Well, with it's default settings, it only blocks about 66% of attacks, and it generates more than 5x as many false positives (graph attached). As it turns out, there is no way to tune fail2ban to get DBB's accuracy without a false positive rate that's orders of magnitude higher.

I said we run this in production - how well does that work? We run it on one of of CloudLab clusters that already had a firewall - subscribing to popular blocklists and running something very much like fail2ban. It's catching four-fifths of the attacks that were not already getting caught by these measures, and so far it hasn't caused a single false positive.

foxmask, to random French
@foxmask@framapiaf.org avatar

savez vous comment configurer pour qu'il ne banisse pas les IP des utilisateurs définis dans /etc/passwd
Autrement dit : ne pas bannir le utilisateurs locaux.
Ou est-ce intrinsèque ?

Tealk, to mastodon German
@Tealk@rollenspiel.social avatar

Ich finde es toll, dass das mittlerweile zuverlässig die IP's meldet. Täglich um die 1000 Einträge laut API.

https://www.abuseipdb.com/user/90603

Irgendwie wäre es noch toll wenn man das an alle möglichen Dienste z.B. anbinden könnte, so dass Account's die von gemeldeten IP's erstellt werden, manuell geprüft werden müssen.

Norore, to php French
@Norore@social.zdx.fr avatar

Protéger ses formulaires des Spams en créant un HoneyPot avec Symfony et Fail2ban - Yann-Elias Bellagnech
https://www.yann-elias.com/blog/proteger-ses-formulaires-des-spams-en-creant-un-honeypot-avec-symfony-et-fail2ban

shalien, to random
@shalien@projetretro.io avatar

Filter is up for 30s and already tripped >>

ppom, to random
@ppom@mamot.fr avatar

🇬🇧 Likes far-left memes, constructed languages, IT trends, digital alternatives.

Looking for the open-source licence that does its best to ban predator uses of IT.

I'm developing , a modern alternative to .

Public account, don't hesitate to boost & interact!

housepanther, to random

Project implemented on my cloud server! I currently have 101 IP addresses on that ban list and I have the list set to expire in 6 months for any of the bots that try to log in as root, admin, or administrator. That'll keep 'em out.

governa, to random
@governa@fosstodon.org avatar
framasky, to random French
@framasky@framapiaf.org avatar

J’ai testé https://framagit.org/ppom/reaction à la place de

Constats :

  • c’est pas compliqué à installer
  • c’est bien plus simple à configurer
  • ça fonctionne bien
  • la configuration est très versatile : la doc ne parle que d’iptables mais j’ai utilisé firewalld sans aucune difficulté, c’est vraiment très, très simple.
RxBrad, to random

Tunneled through my ISP's CGNAT, and did some magic on the other end to give it a URL. Then sprinkled some in there for good measure.

Neat.

jhx, to linux
@jhx@fosstodon.org avatar
jhx, to debian
@jhx@fosstodon.org avatar

If anyone else wonders how to use on 12 without logging:
(Since rsyslog is not installed anymore - journalctl provides that part now):

Create a jail.local file under /etc/fail2ban/ and make sure to add "backend = systemd" to make use journalctl.

Example config:

[sshd]
enabled = true
backend = systemd
port = 22
maxretry = 3
findtime = 10m
bantime = 30d
ignoreip = 127.0.0.0/8

Restart and all will be fine 😎

jasonnab, to random

Blocked IPs by country, , 2023-10-27
sshd current banned: 195

Banned | ISO 3166-1 alpha-2 Country Code

64 | US
21 | SG
12 | AU
7 | KR
7 | IN
5 | VN
5 | NL
5 | FR
5 | DE
4 | UY
4 | JP
4 | CA
3 | MU
3 | ID
3 | HK
2 | TR
2 | IR
2 | GB
2 | ES
1 | ZA
1 | UA
1 | TW
1 | TN
1 | TJ
1 | RW
1 | PT
1 | NP
1 | MA
1 | KE
1 | IT
1 | GR
1 | FI
1 | EU

AGMS00, to random
@AGMS00@ruby.social avatar

Was wondering about how to make (a tool that peruses web server, SSH and other log files and adds offenders to firewall blocks) increase the block time for frequent offenders.

Found a hint that it's actually implemented, and found example settings in the jail.conf file as comments. Now I've got it doubling time (plus a randomiser) for repeated break-in attempts!

NOTICE [sshd] Ban 185.209.161.107
NOTICE [sshd] Increase Ban 185.209.161.107 (2 # 2h 13m -> 2023-10-26 17:29:42)

governa, to random
@governa@fosstodon.org avatar
jasonnab, to random

Just setup , seems I forgot to do that on my website server...

Status for the jail: sshd
|- Filter
| |- Currently failed: 2
| |- Total failed: 117
| - Journal matches: _SYSTEMD_UNIT=sshd.service + _COMM=sshd - Actions
|- Currently banned: 49
|- Total banned: 49

People REALLY want to get in. Thank goodness for key-only based auth!

linuxiac, to linux
@linuxiac@mastodon.social avatar

How To Protect SSH with Fail2Ban: A Beginner’s Guide
https://linuxiac.com/how-to-protect-ssh-with-fail2ban/

Dive into our beginner’s guide on securing SSH with Fail2Ban to safeguard your server from unauthorized access and brute-force attacks.

governa, to linux
@governa@fosstodon.org avatar
Ozzy, to random
gerowen, to privacy
@gerowen@mastodon.social avatar

Disabled the default "Allow ping" rule in on my router. Let's see if that reduces the amount of people that go poking around and get banned by .

ButterflyOfFire, to mastodon French
@ButterflyOfFire@mstdn.fr avatar

deleted_by_author

  • Loading...
  • ghose,
    @ghose@mastodon.gal avatar

    @ButterflyOfFire new (default) settings for and media cache

    👌 (great job from @CyberSaloperie keeping up to date 🤗 ) Thank you

    dbdemon, to random

    DDoS attacks appear to have become increasingly more commonplace, and the other day the miscreants decided to target my Internet forum. I don't use CloudFlare or other third-party DDoS protection services since I try to avoid dependency on external services as much as possible. However, even an old CentOS7 server will have various tools available to protect against or mitigate such attacks. You just need to know how to use them! Here is the true story of how I fought and won!

    https://dbdemon.com/fighting_a_ddos_attack/

    AGMS00,
    @AGMS00@ruby.social avatar

    @dbdemon Thanks for the blog - useful to know that nginx has some rate limiting capabilities (well, it is modular), and that they spit out log entries, and can trigger off that.

    I'll probably study them frantically the next time there's a DDOS attack on my server. :-)

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • mdbf
  • ngwrru68w68
  • modclub
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • InstantRegret
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • DreamBathrooms
  • JUstTest
  • GTA5RPClips
  • tacticalgear
  • normalnudes
  • tester
  • osvaldo12
  • everett
  • cubers
  • ethstaker
  • anitta
  • Leos
  • cisconetworking
  • provamag3
  • lostlight
  • All magazines