Decompression Bomb
The thing is, if you carefully construct an example document, you can get a compression ratio much higher. How much higher? MUCH, MUCH higher. For example, if you created a PNG image containing just one colour repeated over and over then you could easily get a 1000:1 ratio. For a text document containing 1 character repeated over and over, it’s possible to shrink 100Gb to about 6k. Think about that, it is a huge difference: 1.7e7:1.
That’s all well and good as an interesting experiment, but what does it mean for an average user? Imagine I had constructed one of those zip files that had shrunk 100Gb down to 6k and I sent you that file. If you trusted me, you might try to open it. There inlies the problem: while you can readily accept the zipped file, the chances that you have the 100Gb of free memory (including virtual memory) to accomodate the decompressed file are bloody slim. When you try to open one of these files, your computer will quickly become overwhelmed and stop responding; all of the free memory having been used up, it can’t do anything else. You effectively suffer a denial of service attack.
That is what we call a decompression bomb.


February 12th, 2007 at 11:18 am
Don’t you need 100Gb to make the file in the first place?
February 12th, 2007 at 12:14 pm
sure, but I have over 400Gb of disc space on my computer at home..
February 12th, 2007 at 2:43 pm
Sweet!! Oh… no, that’s terrible that people do this kinda’ crap and that there are still these vulnerabilities in our vital technologies. Hey, Platypus, I’m gonna’ be sending you an awesome movie of my nekkid ex-girlfriend. It’s kinda’ big, so I’ll probably ZIP it.
February 12th, 2007 at 3:07 pm
thanks doood! i’ll be sure to check it out and unzip it as soon as I get it
I know that most zip/compression tools will show you how much it is compressed in a percentage. I wonder if looking at that would save you any heart ache.
December 12th, 2007 at 2:33 am
I heard you only need 6k of disc space to make a compressed file 100gb big. possible because in a file everything is stored in binary blahblahblah and compression apps shrink it blahblahblah e.g:
1 2 4 1 7 1 6 6 2 7 7 8 2 2 2 7 3
becomes:
1 2 4 1 7 1 26 2 27 8 32 7 3 or something
then you could make a file like:
100 9
meaning 100 9’s in a row
99999999999999999 9
a lot of nines in a row-billions
now that is a lot of bits wasted, repeating the number nine over 10,000,000,000,000,000 times
December 20th, 2007 at 1:10 pm
IT IS HARD TO MAKE A 1 gb txt file.
try to make a 100 gb txt file!
tell me if you can
December 20th, 2007 at 1:58 pm
I just DID!!! If you actually LOOKED at my EXAMPLE I showed you how compressed files are compressed. You don’t NEED a 100gb file, all you need is a hex-editor or something. Then you create an empty archive. Then you write something like:
99999999999999999999999 0
and that is your huge file. It only takes 24 bytes of disc space to write, but when decompressed it takes up 93132257461547.85gb of memory (The remainder was so huge I had it shortened to .85)
and if i only had 6kb of disc space i could still make a HUGE decompression bomb. And with 24kb of disc space, well, that is totally unbelievable. And there you have it, YoDavid.
(BTW in my previous post i rushed and my name was misspelt. My name isn’t dannt, it is Danny)
December 20th, 2007 at 2:36 pm
Jwelch Says:
February 12th, 2007 at 11:18 am
Don’t you need 100Gb to make the file in the first place?
MILITANTPLATYPUS Says:
February 12th, 2007 at 12:14 pm
sure, but I have over 400Gb of disc space on my computer at home..
Thanks for the reply!i have this problem (Decompression bomb )with some torrent fille.no harm so far, but my disk drives are geeting full when bitcomet is downloadig this torrents files.i’m not decompressesing any data.
please geveme some advice ,if you cann and want,how cann i avoid downloading this kainds of torrents or ader fille
thanks again!!!
December 20th, 2007 at 4:59 pm
A torrent doesn’t decompress files, nor should it take up huge amounts of memory. BitTorrents are usually large files that are stored in tiny bits, and are stored on many computers. The torrent file (usually *.torrent) is a small file telling your torrent application where to find the bits I think. Anyway it downloads those bits and stores them in the files, then it downloads more bits. It should only hold in memory the bits that it is downloading and the .torrent file, so I don’t see how torrents could be decompression bombs.
I don’t know how you could avoid them, just make sure you are downloading from a trusted scource. Anybody could make one with a bit of knowledge with hex-editors.
December 20th, 2007 at 9:48 pm
It pays to know who is sending you a file..
December 20th, 2007 at 10:18 pm
I think I was just hit with a denial of service attack, but not a decompression bomb. IE kept opening pop-ups every second. I couldn’t close the windows and they just kept opening. I probably had at least 40 pop-ups before I re-booted. Windows task manager wouldn’t even work, and my computer was running so slow that it would have taken a minute to calculate 1+1. Is there a name for this type of pop-up denial of service?
December 21st, 2007 at 9:34 am
yep, adware. Try one of these (or all of them) to get rid of it.
http://www.sofotex.com/Bazooka-Adware-and-Spyware-Scanner-download_L14249.html
http://www.download.com/Ad-Aware-2007-Free/3000-8022_4-10045910.html?part=dl-ad-aware&subj=dl&tag=top5
http://www.webroot.com/En_US/consumer-downloads.html?WRSID=b2aba0be39280932992fa4c53444539f
December 21st, 2007 at 10:56 am
Danny Says:
December 20th, 2007 at 10:18 pm
I think I was just hit with a denial of service attack, but not a decompression bomb. IE kept opening pop-ups every second. I couldn’t close the windows and they just kept opening. I probably had at least 40 pop-ups before I re-booted. Windows task manager wouldn’t even work, and my computer was running so slow that it would have taken a minute to calculate 1+1. Is there a name for this type of pop-up denial of service?
it happen me to ,a week ago,and he it’s right :
MILITANTPLATYPUS Says:
December 21st, 2007 at 9:34 am
yep, adware. Try one of these (or all of them) to get rid of it.
December 21st, 2007 at 1:37 pm
Well I went looking around the internet and found out that it is what they call a ‘fork bomb’. One process starts another, which then starts another and another etc. until RAM/CPU is taken up.
And the bad thing is, they are extremely easy to make, it only takes 2+ lines in DOS (the more lines the more new windows), or 3+ lines in BASIC* (again, the more lines the more windows)
*I use a compiler/library called PureBasic
December 21st, 2007 at 1:39 pm
Oops and I forgot, with PureBasic, your operations don’t need an opened window, so most ordinary users won’t know what is going on as it runs invisibly on the desktop.