Re:I Use Zip Bombs to Protect My Server
by onethumb on Wednesday April 30, 2025 @12:46PM
(#43847786)
The whole point is for it to cost less (ie, smaller size) for the sender and cost more (ie, larger size) for the receiver.
The compression ratio is the whole point... if you can send something small for next to no $$ which causes the receiver to crash due to RAM, storage, compute, etc constraints, you win.
Re:I Use Zip Bombs to Protect My Server
by JodieBenitez on Wednesday April 30, 2025 @04:27PM
(#43850280)
No, it's not about sending large files over the wire, it's about saturating the RAM of the script that reads the content. If the script is naive enough, a zip bomb will do. Example on my machine, such a snippet will cause the OS to close the python process:
>>> from requests import get
>>> r = get("https://acme.tld/trap/")
>>> r.text
The server doesn't do much (serving a relatively small number of bytes) while the client basically crashes.
Think about it:
Other than that, why serve gzip anyway? I would not set the Content-Length Header and throttle the connection and set the MIME type to something random, hell just octet-stream, and redirect to '/dev/random'.I don't get the 'zip bomb' concept, all you are doing is compressing zeros. Why not compress '/dev/random'? You'll get a much larger file, and if the bot receives it, it'll have a lot more CPU cycles to churn.
Even the OP article states that after creating the '10GB.gzip' that 'The resulting file is 10MB in this case.'.
Is it because it sounds big?
Here is how you don't waste time with 'zip bombs':