Live data from Hacker News

Zip Bomb

en.wikipedia.org

71–80 of 113 posts

Re: Zip Bomb

#71
post #18

Here are some other compression curiosities: ( http://www.maximumcompression.com/compression_fun.php ) It includes a 115 byte rar file that expands to 5 Mb. (That 115 bytes can be squashed down further; one compressor gets it to 39 bytes.); a file that compresses with one software but ends up bigger with another software; etc. some say that file compression is linked to AI - good general purpose compression relies on…

Very relevant: https://en.wikipedia.org/wiki/Kolmogorov_complexity#Incomput...

Re: Zip Bomb

#72

I found a similar file to this (a zip file that contains itself) and e-mailed it to a friend at work. He never received it, but I thought nothing of it (I assumed the email filters just destroyed it). A days later the mail server stops working and the sysadmin turns up at my desk. Turns out the anti-virus scanner had been unzipping and scanning repeatedly. It eventually filled up the entire disk and bad things happen…

That reminds me of an incident when I was in year 8: seeing how deeply nested I could get directories on Windows. H:\a\a\a\a\..., eventually it stopped working. (I played the game with my friend... he went for creating a new directory at each level, after a little I became sensible and went for copying and pasting, thus multiplying the depth by two each level which of course achieves the goal pretty quickly - so I wo…

My brother did this exact same thing (competing with his friend to try to make as many folders as possible), only he got a 1 week suspension for "hacking". The IT manager was really pissed and pressed the school administrators to make an example out of them.

I was outraged. Basically, the IT manager preferred to use punishment as his means of security, rather than actually doing his job.

Re: Zip Bomb

#74

Earlier quoted context omitted.

So I should just place my malicious software deeper than n levels or put it in a huge file? Or are those scanners just rejecting files that are too large or deep?

"The Grugq: I’m not joking. You don’t even need to do that. You just send an e-mail which says, you can literally just say, "Run this code." Some of the anti-phishing guys I’ve worked with are just shocked at what happens. I had some friends who worked in corporate security who had to do a cleanup after they got hit with e-mails which said literally, "click on this" and they had 10 or 20 people who did. It was less t…

That was how RSA was breached, which led to the eventual loss of the SecureID master key (and follow-on breeches at DoD suppliers).

Re: Zip Bomb

#75
post #51
post #49

Detection of compression bimbs has improved alot as apposed to over 10 years ago when they realy did cause problems on mail servers. Home AV software detects them, crazily enough my install of GoLang on a windows box has a file that gets flagged as a compression bomb every full system scan. But examples like this happen in many forms, heck windows on some file types/sizes doing thumbnails has done wonderous things li…

> crazily enough my install of GoLang on a windows box has a file that gets flagged as a compression bomb every full system scan. This may have something to do with Russ Cox's blog post on recursive zip-archives "Zip Files All The Way Down" in Go: http://research.swtch.com/zip Baseless speculation mode: There is a possibility that the recursive zip file was part of the Go test cases for the gzip package at some point…

I just had to dig out my logs and see what it was - file in question is located in (default install):

C:\Go\src\pkg\regexp\testdata\re2-exhaustive.txt.bz2 385KB in size though opening shows a .txt file that is 58MB in size. Basicily Avast being picky and a non-positive. Probably so crompessed that it hit whatever limit on decompressing per file in avast and avast then things its a compression bomb. Opens and extracts fine, though hardly fun reading.

Re: Zip Bomb

#76

I found a similar file to this (a zip file that contains itself) and e-mailed it to a friend at work. He never received it, but I thought nothing of it (I assumed the email filters just destroyed it). A days later the mail server stops working and the sysadmin turns up at my desk. Turns out the anti-virus scanner had been unzipping and scanning repeatedly. It eventually filled up the entire disk and bad things happen…

That reminds me of an incident when I was in year 8: seeing how deeply nested I could get directories on Windows. H:\a\a\a\a\..., eventually it stopped working. (I played the game with my friend... he went for creating a new directory at each level, after a little I became sensible and went for copying and pasting, thus multiplying the depth by two each level which of course achieves the goal pretty quickly - so I wo…

Do that, but then rename each folder to a very long name, and go back one directory up in the tree e.g. d:\h\h\h becomes d:\h\h\very_long_h then d:\h\verl_long_h\very_long_h, etc.

It was "simple" way to hide files, by making their names very long indeed.

Re: Zip Bomb

#77

Comp sci folks: Is predicting whether a compressed file will produce a finite (or, better, reasonably-sized) output roughly equivalent to the halting problem?

No, because run-length encoding encodes the - well - run lengths in the file header. You can read those and know how big the resulting file will be without having to actually decompress the file.

Re: Zip Bomb

#78
post #71
post #18

Here are some other compression curiosities: ( http://www.maximumcompression.com/compression_fun.php ) It includes a 115 byte rar file that expands to 5 Mb. (That 115 bytes can be squashed down further; one compressor gets it to 39 bytes.); a file that compresses with one software but ends up bigger with another software; etc. some say that file compression is linked to AI - good general purpose compression relies on…

Very relevant: https://en.wikipedia.org/wiki/Kolmogorov_complexity#Incomput...

> By definition, the Kolmogorov complexity K of a string x is defined as the length of the shortest program (self-extracting archive) computing x. K(x) itself cannot be computed, only approximated from above, namely by finding better and better compressions, but even if we reach K(x) will never know whether we have done so. For a text string like enwik8, Shannon's estimate suggests that enwik8 should be compressible down to 12MB.

The current record is 15,949,688 bytes.

Re: Zip Bomb

#79

I found a similar file to this (a zip file that contains itself) and e-mailed it to a friend at work. He never received it, but I thought nothing of it (I assumed the email filters just destroyed it). A days later the mail server stops working and the sysadmin turns up at my desk. Turns out the anti-virus scanner had been unzipping and scanning repeatedly. It eventually filled up the entire disk and bad things happen…

That reminds me of an incident when I was in year 8: seeing how deeply nested I could get directories on Windows. H:\a\a\a\a\..., eventually it stopped working. (I played the game with my friend... he went for creating a new directory at each level, after a little I became sensible and went for copying and pasting, thus multiplying the depth by two each level which of course achieves the goal pretty quickly - so I wo…

Difference between hackers and coders -

Rule: "You can have at most 50 sub-directories."

coder-action:

     #define MAX_SUB_DIRECTORY_NUM 50
hacker-action:

    main(int argc, char *argv[]) {
      int i;
      for (i = 0; i 
Plus experiments.

The difference is that the coder is just doing their job so they note the limitation and move on, the hacker is curious and trys to test to see if its a hard limit, a soft limit, a big problem, a little problem.

Re: Zip Bomb

#80

Earlier quoted context omitted.

Most UNIX systems have a PATH_MAX. It's not just Windows.

Perhaps, but Windows's is a bit too low.

While MAX_PATH is 260, most of the Unicode variants of the API functions allow for paths of 32,767 characters [1]. That seems like a decent length.

[1] http://msdn.microsoft.com/en-us/library/windows/desktop/aa36...

Post reply on HN