News for hackers. Stuff that matters.
Re:Recon and Attack Vectors from My Logs by quesera on Sunday October 02, 2022 @11:49AM (#33056983)
I think I see at least this many unique hostile requests every day. These are just random scanning noise.

My favorite mitigation is to reject all HTTP/1.0 requests. If they don't send HTTP/1.1 or newer, with the Hostname I'm expecting, I 404 them. This cuts down on substantially all of the random noise. (Could be 401 or other, but 404 seems to encourage a "try more but don't try harder" reaction, which is easier to handle than the converse).

Targeted attacks are more difficult. I use a WAF and path permit lists at the reverse proxy level. This is trivial, but still stops 99% of the rest.

The last and hardest thing to block is distributed brute force authorization attempts. I've built a list of hundreds of thousands of IPs that have been used in these attempts. Sometimes thousands of requests come in per second.

I use rate limiting on the auth request endpoint. Too much limiting will affect real users, so I have to be somewhat gentle here.

Known-exploited IP addresses get just one attempt before a long block. This means that real humans whose machines are part of a botnet are sometimes blocked from the service. This is not a great compromise.

Re:Recon and Attack Vectors from My Logs by ynbl_ on Tuesday October 04, 2022 @04:42PM (#33086502)
a waf doesnt stop 99%. updating software does that. wafs are bad. stop using them.

imagine a blog with a comments section with a check box that says "bypass security check". if you click this, the admin scolds you saying "how dare you try and bypass security" and bans you. if you _dont_ click it, the admin laughs at you when you complain about too many captchas because "all you had to do was click the check box", idiot. either case can happen depending on which ideology the admin so happens to follow. thats the problem with wafs, they are ideological and opinion based but at the protocol level (but most wafs are such low quality that accidentally typing ' can get your ip banned).

Re:Recon and Attack Vectors from My Logs by quesera on Wednesday October 05, 2022 @03:25PM (#33100166)
WAFs can be used poorly, but zero of my experience with them aligns with your complaints.

If "WAF" bothers you, call it ingress/egress filtering (at the content level instead of packet level) instead.

Re:Recon and Attack Vectors from My Logs by ynbl_ on Thursday October 06, 2022 @12:21PM (#33110262)
but its not comparable to egress filtering _at all_
Re:Recon and Attack Vectors from My Logs by quesera on Friday October 07, 2022 @10:13AM (#33121622)
OK, sure. The WAF does ingress filtering though. It's useful, and ingress filtering is what we were talking about.

In my architecture, the same services also perform egress filtering. It's also useful, but not the WAF or the topic of conversation.

I think people get upset about the term "WAF". It's just a new label for the longstanding practice of upper-layer ingress filtering (i.e. DPI and reverse-proxy filtering). But it's often a dedicated service now, so it needs a name of some kind.

A poorly-configured WAF breaks things, just like a poorly-configured (any other network service).

Re:Recon and Attack Vectors from My Logs by bornfreddy on Sunday October 02, 2022 @01:58PM (#33058470)
If you are in position to do so (i.e. not a public API), you can also turn on captcha when under attack. Regular users will be annoyed (or not even that, if invisible) but everything still works for them and you are mostly safe. When not needed, just turn it off again.

You can also allow many more attempts from the known IP addresses for the user, as most users don't change their IP too much. Still, some do, but they will probably authenticate correctly within one or max. two requests.

Re:Recon and Attack Vectors from My Logs by GoblinSlayer on Monday October 03, 2022 @11:05AM (#33068501)
Can't you accept the previous session id from the client so it would allow an authentication attempt?
Re:Recon and Attack Vectors from My Logs by quesera on Friday October 07, 2022 @10:22AM (#33121735)
I do give some preference to requests that come in with a well-formed session ID. I can't check whether it's real prior to granting the preference (the round trip is too expensive to justify in a high-load scenario, but I can check the signature validity at least.

But of course lots of legit authentication attempts come from new users, or new sessions. So I need to allow that case as well, and then we're back at square one.

Re:Recon and Attack Vectors from My Logs by nn3 on Sunday October 02, 2022 @01:36PM (#33058211)
it's not necessarily the same machine but just the same proxy or nat gateways which can aggregate very large numbers of machines. I don't know if it's still true but at some point all of Saudi Arabia came from the same handful of IP addresses.

especially as more and more of the world ends behind cgnat for ipv6 ip blocking will work less and less