Live data from Hacker News

I use zip bombs to protect my server

idiallo.com

261–270 of 467 posts

Re: I use zip bombs to protect my server

#261

Earlier quoted context omitted.

>User-agent: * >Disallow: /zipbomb.html Legitimate crawlers would skip it this way only scum ignores robots.txt

I’m not sure that’s enough, robots.txt isn’t really legally binding so if the zip bomb somehow would be illegal, guarding it behind a robots.txt rule probably wouldn’t make it fine.

The law generally rewards good faith attempts, and robots.txt is an established commercial standard.

Re: I use zip bombs to protect my server

#262
post #27

I am ignorant as to how most bots work. Could you have a second line of defense for bots that avoid this bomb: Dynamically generate a file from /dev/random and trickle stream it to them, or would they just keep spawning parallel requests? They would never finish streaming it, and presumably give up at some point. The idea would be to make it more difficult for them to detect it was never going to be valid content.

> [...] and trickle stream it to them [...]

See https://en.wikipedia.org/wiki/Slowloris_(cyber_attack)

Re: I use zip bombs to protect my server

#263
post #245

Earlier quoted context omitted.

The word "accessed" is used multiple times throughout the law. A client accesses a server. A server does not access a client. It responds to a client. Also, the protected computer has to be involved in commerce. Unless they are accessing the website with the zip bomb using a computer that also is uses for interstate or foreign commerce, it won't qualify.

> The word "accessed" is used multiple times throughout the law. So what? It isn't in the section I quoted above. I could be wrong, but my reading is that transmitting information that can cause damage with the intent of causing damage is a violation, regardless of if you "access" another system. > Also, the protected computer has to be involved in commerce Or communication . Now, from an ethics standpoint, I don't t…

> So what? It isn't in the section I quoted above.

You can't read laws in sections like that. They sections go together. The entire law is about causing damage through malicious access. But servers don't access clients.

The section you quoted isn't relevant because the entire law is about clients accessing servers, not servers responding to clients.

Re: I use zip bombs to protect my server

#264
post #166

Earlier quoted context omitted.

I made a 64kx64k JPEG once by feeding the encoder the same line of macro blocks until it produce the entire image. Years later I was finally able to open it.

I had a ton of trouble opening a 10MB or so png a few weeks back. It was stitched together screenshots forming a map of some areas in a game, so it was quite large. Some stuff refused to open it at all as if the file was invalid, some would hang for minutes, some opened blurry. My first semi-success was Fossify Gallery on my phone from F-Droid. If I let it chug a bit, it'd show a blurry image, a while longer it'd foc…

Safari on iPhone did a good job with it actually lol

Re: I use zip bombs to protect my server

#265

Earlier quoted context omitted.

There's a lot of essential functionality missing from WordPress, meaning you have to install plugins. Depending on what you need to do. But it's such a bad platform that there really isn't any reason for anybody to use WordPress for anything. No matter your use case, there will be a better alternative to WordPress.

Can you recommend an alternative for a non-technical organization, where there's someone who needs to be able to edit pages and upload documents on a regular basis, so they need as user-friendly an interface as possible for that? Especially when they don't have a budget for it, and you're helping them out as a favor? It's so easy to spin up Wordpress for them, but I'm not a fan either. I've tried Drupal in the past f…

We have a (internally accessible only) WP instance where the content is exported using a plugin as a ZIP file and then deployed to NGINX servers with a bit of scripting/Ansible.

Could be automated better (drop ZIP to a share somewhere where it gets processed and deployed) but best of both worlds.

Re: I use zip bombs to protect my server

#266

Earlier quoted context omitted.

Can you recommend an alternative for a non-technical organization, where there's someone who needs to be able to edit pages and upload documents on a regular basis, so they need as user-friendly an interface as possible for that? Especially when they don't have a budget for it, and you're helping them out as a favor? It's so easy to spin up Wordpress for them, but I'm not a fan either. I've tried Drupal in the past f…

Statamic https://statamic.com/

YES! I have switched to it for professional and personal CMS work and it's great. Incredibly flexible and simplistic in my opinion. I use it both as headful and headless.

Re: I use zip bombs to protect my server

#268
post #248
post #240

Earlier quoted context omitted.

The lesson for any programmers reading this is to always set an upper limit for how much data you accept from someone else. Every request should have both a timeout and a limit on the amounts of data it will consume.

That doesn't necessarily need to be in the request itself. You can also limit the wider process or system your request is part of.

While that is true, I recommend on the request anyway, because it makes it abundantly clear to the programmer that requests can fail, and failure needs to be handled somehow – even if it's by killing and restarting the process.

Re: I use zip bombs to protect my server

#269

Earlier quoted context omitted.

If you nest the gzip inside another gzip it gets even smaller since the blocks of compressed '0' data are themselves low entropy in the first generation gzip. Nested zst reduces the 10G file to 99 bytes.

Can you hand edit to create recursive file structures to make it infinite? I used to use debug in dos to make what appeared to be gigantic floppy discs by editing the fat

https://research.swtch.com/zip

it is basically a quine.

Re: I use zip bombs to protect my server

#270
post #166

Earlier quoted context omitted.

I made a 64kx64k JPEG once by feeding the encoder the same line of macro blocks until it produce the entire image. Years later I was finally able to open it.

I had a ton of trouble opening a 10MB or so png a few weeks back. It was stitched together screenshots forming a map of some areas in a game, so it was quite large. Some stuff refused to open it at all as if the file was invalid, some would hang for minutes, some opened blurry. My first semi-success was Fossify Gallery on my phone from F-Droid. If I let it chug a bit, it'd show a blurry image, a while longer it'd foc…

Loading this on my iPhone on 1gbit took about 5s and I can easily pan and zoom. A desktop should handle it beautifully.
Post reply on HN