Bots went after /misc/cookies the most. Just hammering it. It was the most requested path. So I put /misc/cookies in its own custom rule, removing it from the existing rule, so I could monitor it better. I didn't really find out anything I didn't already know, so after a week or so I put it back with the others and removed the extra rule. And to my surprise /misc/cookies is not being hammered anymore. It moved down the list. Looking at the most targeted path it's now at #10. That was unexpected. It seems to indicate that the order within custom rules also matters. /misc/cookies was first in the rule until I took it out. Putting it back in, it is now at the bottom. Does that make sense at all?
It can get weird. Once a rule is triggered, everything else is skipped. Ordering does some weird and wonderful things. I guess it depends how complex the software running the bots is. If it gets blocked by x do y instead. They used to be simple, go do x and the response was either pass or fail, but now... they're pretty sophisticated, and worse when that runs through residential proxy network.
I typically have just one rule activated:
(starts_with(http.request.uri.path, "/whats-new") or starts_with(http.request.uri.path, "/search"))
and not cf.client.bot
and not http.cookie contains "xf_user="
That gets maybe 20k to 30k daily challenges with like 50 - 100 solved.
When I start getting hit with rubbish, the browser impersonator rule is activated: (((http.user_agent contains "Chrome/1" and not any(lower(http.request.headers.names[*])[*] == "sec-ch-ua"))) or (((http.user_agent contains "Mozilla/5.0" and (http.user_agent contains "Chrome/1" or http.user_agent contains "Firefox/1")) and not any(lower(http.request.headers.names[*])[*] == "sec-fetch-mode"))) or (((http.user_agent contains "Mozilla/5.0" and (http.user_agent contains "Chrome/1" or http.user_agent contains "Firefox/1")) and not any(lower(http.request.headers.names[*])[*] == "accept-language")))) and (not cf.client.bot) and (not http.cookie contains "xf_user")
(That is possibly the best rule I have ever used - 300k with 2 solved - that is an effective, targeted rule)
That is first, so it catches hundreds of thousands, the search rule stays the same. If I leave that there for a few days, the search rule gets activated more and goes over 100k.
A percentage get caught in one, so they stop using what they use to trigger it, and start getting caught in the search rule, or if things get bad, the residential proxies rule gets activated.
For me, I don't try and block everything, I opted towards a well tuned server, so I just need to keep the absolute worst offenders in check so they can't crash the server.
The best part, its all automated, a small script and timer turning rules on/off depending on server load. Makes this hands off management.