There’s a zip file titled ’42.zip’. It’s known as a zip bomb or ‘zip of death’ because it’s original size is only 42 kilobytes. But when it’s uncompressed, it expands to 4.5 petabytes (4,500,000 gigabytes), crashing the antivirus program and then the system. Scary part is this file is still available for download on various websites across the Internet.
A zip bomb, also known as a zip of death or decompression bomb, is a malicious archive file designed to crash or render useless the program or system reading it. It is often employed to disable antivirus software, in order to create an opening for more traditional viruses.
Rather than hijacking the normal operation of the program, as normal computer viruses usually do, a decompression bomb actually allows the system to do its job as it’s designed. The only catch is that the zip bomb contains so much compressed data that unpacking it requires excessively massive amounts of memory, disk space and time.
There are also zip files that, when uncompressed, yield identical copies of themselves which is also known as Quine. A quine is a computer program which takes no input and produces a copy of its own source code as its only output. The standard terms for these programs in the computability theory and computer science literature are “self-replicating programs”, “self-reproducing programs”, and “self-copying programs”.
Most modern antivirus programs can detect whether a file is a zip bomb, to avoid unpacking it or simply avoid 42.zip file or delete it.
You can also use different method to know its original size for example in python
import zipfile
z = zipfile.ZipFile('c:/a_zip_file')
print 'total files size=', sum(e.file_size for e in z.infolist())
z.close()
In conclusion, Even though Zip bomb might not steal or use your private data, it still use massive amounts of memory, disk space and time. So its wise to avoid it at all cost.