News for hackers. Stuff that matters.
Re:Ask HN: How to stop an AWS bot sending 2B requests/month by swiftcoder on Friday October 17, 2025 @02:59AM (#45614001)
Making the obviously-abusive bot prohibitively expensive is one way to go, if you control the terminating server.

gzip bomb is good if the bot happens to be vulnerable, but even just slowing down their connection rate is often sufficient - waiting just 10 seconds before responding with your 404 is going to consume ~7,000 ports on their box, which should be enough to crash most linux processes (nginx + mod-http-echo is a really easy way to set this up)

Re:Ask HN: How to stop an AWS bot sending 2B requests/month by mkj on Friday October 17, 2025 @04:15AM (#45614367)
AWS customers have to pay for outbound traffic. Is there a way to get them to send you (or cloudflare) huge volumes of traffic?
Re:Ask HN: How to stop an AWS bot sending 2B requests/month by horseradish7k on Friday October 17, 2025 @04:27AM (#45614423)
yeah, could use a free worker
Re:Ask HN: How to stop an AWS bot sending 2B requests/month by compootr on Friday October 17, 2025 @07:12PM (#45623234)
free workers only get 100k reqs per day or something
Re:Ask HN: How to stop an AWS bot sending 2B requests/month by _pdp_ on Friday October 17, 2025 @04:29AM (#45614438)
A KB zip file can expand to giga / petabytes through recursive nesting - though it depends on their implementation.
Re:Ask HN: How to stop an AWS bot sending 2B requests/month by sim7c00 on Friday October 17, 2025 @05:59AM (#45614913)
thats traffic in the other direction
Re:Ask HN: How to stop an AWS bot sending 2B requests/month by swiftcoder on Friday October 17, 2025 @09:27AM (#45616545)
The main joy of a zip bomb is that it doesn't consume much bandwidth - the transferred compressed file is relatively small, and it only becomes huge when the client tries to decompress it in memory afterwards
Re:Ask HN: How to stop an AWS bot sending 2B requests/month by crazygringo on Friday October 17, 2025 @01:32PM (#45619421)
It's still going in the wrong direction.
Re:Ask HN: How to stop an AWS bot sending 2B requests/month by dns_snek on Friday October 17, 2025 @01:45PM (#45619595)
It doesn't matter either way. OP was thinking about ways to consume someone's bandwidth. A zip bomb doesn't consume bandwidth, it consumes computing resources of its recipient when they try to unpack it.
Re:Ask HN: How to stop an AWS bot sending 2B requests/month by crazygringo on Friday October 17, 2025 @02:20PM (#45620056)
I know. I was pointing out that it doesn't matter what it consumes if it's going the wrong way to begin with.
Re:Ask HN: How to stop an AWS bot sending 2B requests/month by sim7c00 on Saturday October 18, 2025 @04:57AM (#45625962)
i wouldnt assume someone sending 700 req per minute or so to a single domain repeatedly (likely to the same resources) will bother opening zip files.

the bot in the article is likely being tested (as author noted), or its a very bad 'stresser'.

if it was looking for content grabbing it will access differently. (grab resources once and be on its way).

its not bad to host zip bombs tho, for the content grabbers :D nomnom.

saw an article about a guy on here who generated arbitrary pngs or so. also classy haha.

if u have a friendly vps provider who gives unlimited bandwidth these options can be fun. u can make a dashboard which bot has consumed the most junk.

Re:Ask HN: How to stop an AWS bot sending 2B requests/month by mjmas on Saturday October 18, 2025 @08:07AM (#45626681)
This is using the builtin compression in http:

  Transfer-Encoding: gzip
Re:Ask HN: How to stop an AWS bot sending 2B requests/month by ruined on Saturday October 18, 2025 @05:56AM (#45626139)
nearly every http response is gzipped. unpacking automatically is a default feature of every http client.
Re:Ask HN: How to stop an AWS bot sending 2B requests/month by sim7c00 on Sunday October 19, 2025 @08:06AM (#45633622)
Accept-Encoding i think would be logical on scrapers these days but maybe its not helpful idk. server should adhere to what client requests afaik.
Re:Ask HN: How to stop an AWS bot sending 2B requests/month by Orochikaku on Friday October 17, 2025 @03:30AM (#45614138)
Thinking along the same lines a PoW check like like anubis[1] may work for OP as well.

[1] https://github.com/TecharoHQ/anubis

Re:Ask HN: How to stop an AWS bot sending 2B requests/month by hshdhdhehd on Friday October 17, 2025 @05:02AM (#45614636)
Avoid if you dont have to. It is not really good traffic friendly. Especially if current blocking works.
Re:Ask HN: How to stop an AWS bot sending 2B requests/month by CaptainOfCoit on Friday October 17, 2025 @01:56PM (#45619737)
> Especially if current blocking works.

The submission and the context is when current blocking doesn't work...

Re:Ask HN: How to stop an AWS bot sending 2B requests/month by hshdhdhehd on Saturday October 18, 2025 @01:20AM (#45625113)
> Thankfully, CloudFlare is able to handle the traffic with a simple WAF rule and 444 response to reduce the outbound traffic.

That is strictly less resource intensive than serving 200 and some challenge.

Re:Ask HN: How to stop an AWS bot sending 2B requests/month by CaptainOfCoit on Saturday October 18, 2025 @07:38AM (#45626544)
Right, but if you re-read the submission, OP already tried that and found the costs to be potentially be too high, and are looking for alternatives...
Re:Ask HN: How to stop an AWS bot sending 2B requests/month by winnie_ua on Saturday October 18, 2025 @08:58AM (#45626996)
It was blocking me from accessing GNOME's gitlab instance from my cell phone.

So it mistakedly flagged me as bot. IDK. And it forces legitimate users to wait a while. Not great UX.

Re:Ask HN: How to stop an AWS bot sending 2B requests/month by lagosfractal42 on Friday October 17, 2025 @03:49AM (#45614240)
This kind of reasoning assumes the bot continues to be non-stealthy
Re:Ask HN: How to stop an AWS bot sending 2B requests/month by swiftcoder on Friday October 17, 2025 @04:00AM (#45614297)
I mean, forcing them to spend engineering effort the make their bot stealthy (or to be able to maintains 10's of thousands of open ports), is still driving up their costs, so I'd count it as a win. The OP doesn't say why the bot is hitting their endpoints, but I doubt the bot is a profit centre for the operator.
Re:Ask HN: How to stop an AWS bot sending 2B requests/month by lagosfractal42 on Friday October 17, 2025 @08:07AM (#45615789)
You risk flagging real users as bots, which drives down your profits and reputation
Re:Ask HN: How to stop an AWS bot sending 2B requests/month by swiftcoder on Friday October 17, 2025 @08:26AM (#45615960)
In this case I don't think they do - unless the legitimate users are also hitting your site at 700 RPS (in which case, the added load from the bot is going to be negligible)
Re:Ask HN: How to stop an AWS bot sending 2B requests/month by hansvm on Saturday October 18, 2025 @05:35PM (#45630526)
Once the bot is stealthy (the current sub-thread if I haven't misread) they absolutely do. A couple examples where I've been flagged as a bot for normal traffic:

1. Discord's telemetry was broken on my browser, and on failure they immediately retried. It didn't take many actions queued up on the site before my browser was initiating over 100RPS, on their behalf.

2. Target and eBay still flag my sessions as bot traffic (presumably because they don't recognize the user agent or because I use Linux or something). Target allows browsing their site for a few items before heavily rate-limiting me for a day or so, and eBay just resets my password a day or two after I log in, every single bloody time.

The problem is that from time to time normal users will generate large traffic volumes, and if the bot owner uses many IPs then you're forced to use less reliable signals for that ban hammer (i.e., no single user will be near 700 RPS).

Re:Ask HN: How to stop an AWS bot sending 2B requests/month by heavyset_go on Friday October 17, 2025 @12:47PM (#45618883)
If going stealth means not blatantly DDoS'ing the OP then that's a better outcome than what's currently happening
Re:Ask HN: How to stop an AWS bot sending 2B requests/month by somat on Friday October 17, 2025 @01:23PM (#45619322)
xkcd 810 comes to mind. https://xkcd.com/810/

"what if we make the bots go stealthy and indistinguishable from actual human requests?"

"Mission Accomplished"

Re:Ask HN: How to stop an AWS bot sending 2B requests/month by HPsquared on Friday October 17, 2025 @04:21PM (#45621586)
This has pretty much happened now in the internet at large, and it's kinda sad.
Re:Ask HN: How to stop an AWS bot sending 2B requests/month by lotsofpulp on Friday October 17, 2025 @09:24PM (#45624041)
“Constructive” and “Helpful” are unfortunately not out weighed by garbage.
Re:Ask HN: How to stop an AWS bot sending 2B requests/month by lucastech on Friday October 17, 2025 @05:06PM (#45622067)
Yeah, there are some botnets I've been seeing that are much more stealthy, using 900-3000 IP's with rotating user agents to send enormous amounts of traffic.

I've resorted to blocking entire AS routes to prevent it (fortunately I am mostly hosting US sites with US only residential audiences). I'm not sure who's behind it, but one of the later data centers is oxylabs, so they're probably involved somehow.

https://wxp.io/blog/the-bots-that-keep-on-giving

Re:Ask HN: How to stop an AWS bot sending 2B requests/month by gildas on Friday October 17, 2025 @04:51AM (#45614560)
Great idea, some people have already implemented it for the same type of need, it would seem (see the list of user agents in the source code). Implementation seems simple.

https://github.com/0x48piraj/gz-bomb/blob/master/gz-bomb-ser...

Re:Ask HN: How to stop an AWS bot sending 2B requests/month by kijin on Friday October 17, 2025 @07:44PM (#45623447)
Be careful using this if you're behind cloudflare. You might inadvertently bomb your closest ally in the battle.
Re:Ask HN: How to stop an AWS bot sending 2B requests/month by CWuestefeld on Friday October 17, 2025 @01:32PM (#45619426)
We've been a similar situation. One thing we considered doing is to give them bad data.

It was pretty clear in our case that they were scraping our site to get our pricing data. Our master catalog had several million SKUs, priced dynamically based on availability, customer contracts, and other factors. And we tried to add some value to the product pages, with relevant recommendations for cross-sells, alternate choices, etc. This was pretty compute-intensive, and the volume of the scraping could amount to a DoS at times. Like, they could bury us in bursts of requests so quickly that our infrastructure couldn't spin up new virtual servers, and once we were buried, it was difficult to dig back out from under the load. We learned a lot during this period, including some very counterintuitive stuff about how some approaches to queuing and prioritizing that appeared sounded great on paper, actually could have unintended effects that made such situations worse.

One strategy we talked about was that, rather than blocking the bad guys, we'd tag the incoming traffic. We couldn't do this perfect accuracy, but the inaccuracy was such that we could at least ensure that it wasn't affecting real customers (because we could always know when it was a real, logged-in user). We realized that we could at least cache the data in the borderline cases so we wouldn't have to recalculate (it was a particularly stupid bot that was attacking us, re-requesting the same stuff many times over); from that it was a small step to see that we could at the same time add a random fudge factor into any numbers, hoping to get to a state where the data did our attacker more harm than good.

We wound up doing what the OP is now doing, working with CloudFlare to identify and mitigate "attacks" as rapidly as possible. But there's no doubt that it cost us a LOT, in terms of developer time, payments to CF, and customer dissatisfaction.

By the way, this was all the more frustrating because we had circumstantial evidence that the attacker was a service contracted by one of our competitors. And if they'd come straight to us to talk about it, we'd have been much happier (and I think they would have been as well) to offer an API through which they could get the catalog data easily and in a way where we don't have to spend all the compute on the value-added stuff we were doing for humans. But of course they'd never come to us, or even admit it if asked, so we were stuck. And while this was going, there was also a case in the courts that was discussed many times here on HN. It was a question about blocking access to public sites, and the consensus here was something like "if you're going to have a site on the web, then it's up to you to ensure that you can support any requests, and if you can't find a way to withstand DoS-level traffic, it's your own fault for having a bad design". So it's interesting today to see that attitudes have changed.

Re:Ask HN: How to stop an AWS bot sending 2B requests/month by gwbas1c on Friday October 17, 2025 @02:41PM (#45620366)
> rather than blocking the bad guys, we'd tag the incoming traffic

> had circumstantial evidence that the attacker was a service contracted by one of our competitors

> we'd have been much happier ... to offer an API through which they could get the catalog data easily

Why not feed them bad data?

Re:Ask HN: How to stop an AWS bot sending 2B requests/month by CWuestefeld on Saturday October 18, 2025 @09:50AM (#45627381)
We didn't like the ethics of it, especially since we couldn't guarantee that the bogus data was going only to the attacker (rather than to innocent but not-yet-authenticated "general public").
Re:Ask HN: How to stop an AWS bot sending 2B requests/month by IshKebab on Saturday October 18, 2025 @01:35PM (#45629020)
I guess you could have required login to show prices to suspicious requests. Then it shouldn't affect most people and if it accidentally does the worst outcome is they need to log in.
Re:Ask HN: How to stop an AWS bot sending 2B requests/month by miga on Monday October 20, 2025 @01:46PM (#45646848)
Do they change IP numbers so often?
Re:Ask HN: How to stop an AWS bot sending 2B requests/month by CWuestefeld on Monday October 20, 2025 @07:42PM (#45650809)
Oh, lord yes! Frequently they're scraping us from multiple distinct CIDR blocks simultaneously. But we can tell it's the same organization doing it not just because the requests look similar, but it's even possible occasionally to see a request for a search from one CIDR that's followed up immediately by requests for details for the products that had been returned by the search.

While at the same time, because our site is B2B ecommerce, where our typical customer is a decent-sized corporation, it's not uncommon for a single legit user to have consecutive requests originate from different IPs, as their internal proxies use different egress points.

Re:Ask HN: How to stop an AWS bot sending 2B requests/month by kristianp on Friday October 17, 2025 @07:00PM (#45623137)
Stupid question, won't that consume 7000 ports on your own box as well?
Re:Ask HN: How to stop an AWS bot sending 2B requests/month by Neywiny on Friday October 17, 2025 @07:28PM (#45623360)
I think it'll eat 7000 connection objects, maybe threads, but they'll all be on port 80 or 443? So if you can keep the overhead of each connection down, presumably easy because you don't need it to be fast, it'll be fine
Re:Ask HN: How to stop an AWS bot sending 2B requests/month by kijin on Friday October 17, 2025 @07:40PM (#45623415)
Each TCP connection requires a unique combination of (server port, client port). Your server port is fixed: 80 or 443. They need to use a new ephemeral port for each connection.

You will have 7000 sockets (file descriptors), but that's much more manageable than 7000 ports.

Re:Ask HN: How to stop an AWS bot sending 2B requests/month by swiftcoder on Saturday October 18, 2025 @10:58AM (#45627908)
7000 sockets, at any rate, but provided you've anticipated the need, this isn't challenging to support (and nginx is very good at handling large numbers of open sockets)
Re:Ask HN: How to stop an AWS bot sending 2B requests/month by SergeAx on Saturday October 18, 2025 @01:14PM (#45628852)
Wouldn't it consume the same number of connections on my server?