News for hackers. Stuff that matters.
Re:I Use Zip Bombs to Protect My Server by M95D on Wednesday April 30, 2025 @03:37AM (#43842249)
I wonder if I could create a 500TB html file with proper headers on a squashfs, an endless <div><div><div>... with no closing tags, and if I could instruct the server to not report file size before download.

Any ideeas?

Re:I Use Zip Bombs to Protect My Server by CobrastanJorji on Wednesday April 30, 2025 @03:44AM (#43842300)
Yes, servers can respond without specifying the size by using chunked encoding. And you can do the rest with a custom web server that just handles request by returning "<div>" in a loop. I have no idea if browsers are vulnerable to such a thing.
Re:I Use Zip Bombs to Protect My Server by M95D on Wednesday April 30, 2025 @04:05AM (#43842424)
I would make it an invisible link from the main page (hidden behind a logo or something). Users won't click it, but bots will.
Re:I Use Zip Bombs to Protect My Server by stefs on Wednesday April 30, 2025 @05:05AM (#43842790)
the problem with this is that for a tarpit, you just don't want to make it expensive for bots, you also want to make it cheap for yourself. this isn't cheap for you. a zip bomb is.
Re:I Use Zip Bombs to Protect My Server by ku1ik on Thursday May 01, 2025 @04:29AM (#43855010)
Right, so an invisible link + a zipbomb is da bomb.
Re:I Use Zip Bombs to Protect My Server by stefs on Friday May 02, 2025 @06:12AM (#43867972)
maybe, maybe not. it's one tool at your disposal. it's easy to guard against zip bombs if you know about them - the question is, how thorough are the bot devs you're targeting?

there are other techniques. for example: hold a connection open and only push out a few bytes every few seconds - whether that's cheap for you or not depends on your servers concurrency model (if it's 1 OS thread per connection, then you'd DOS yourself with this - but with an evented model you should be good). if the bot analyzes images or pdfs you could try toxic files that exploit known weaknesses which lead to memory corruption to crash them; depends on the bots capabilities and used libraries of course.

Re:I Use Zip Bombs to Protect My Server by konata390 on Wednesday April 30, 2025 @04:25AM (#43842545)
I just tested it via a small python script sending divs at a rate of ~900mb (as measured by curl) and firefox just kills the request after 1-2 gb received (~2 seconds) with an "out of memory" error, while chrome seems to only receive around 1mb/s, uses 1 cpu core 100%, and grows infinitely in memory use. I killed it after 3 mins and consuming ca. 6GB (additionally, on top of the memory it used at startup)
Re:I Use Zip Bombs to Protect My Server by M95D on Wednesday April 30, 2025 @05:09AM (#43842810)
What did the bots do?
Re:I Use Zip Bombs to Protect My Server by Ugohcet on Wednesday April 30, 2025 @05:38AM (#43842956)
Why use squashfs when you can do the same OP did and serve a compressed version, so that the client is overwhelmed by both the uncompression and the DOM depth:

yes "<div>"|dd bs=1M count=10240 iflag=fullblock|gzip | pv > zipdiv.gz

Resulting file is about 15 mib long and uncompresses into a 10 gib monstrosity containing 1789569706 unclosed nested divs

Re:I Use Zip Bombs to Protect My Server by M95D on Wednesday April 30, 2025 @08:04AM (#43844017)
I like it. :)
Re:I Use Zip Bombs to Protect My Server by sroussey on Wednesday April 30, 2025 @11:45AM (#43846847)
You can also just use code to endlessly serve up something.

Also you can reverse many DoD vectors depending on how you are setup and costs. For example reverse Slowloris attack and use up their connections.

Re:I Use Zip Bombs to Protect My Server by imron on Thursday May 01, 2025 @06:44AM (#43855954)
This is beautiful