Citing from the Wikipedia page:
One example of a Zip bomb is the file
45.1.zip which was 45.1 kilobytes of compressed data, containing nine
layers of nested zip files in sets of
10, each bottom layer archive
containing a 1.30 gigabyte file for a
total of 1.30 exabytes of uncompressed
data.
So all you need is one single 1.3GB file full of zeroes, compress that into a ZIP file, make 10 copies, pack those into a ZIP file, and repeat this process 9 times.
This way, you get a file which, when uncompressed completely, produces an absurd amount of data without requiring you to start out with that amount.
Additionally, the nested archives make it much harder for programs like virus scanners (the main target of these "bombs") to be smart and refuse to unpack archives that are "too large", because until the last level the total amount of data is not that much, you don't "see" how large the files at the lowest level are until you have reached that level, and each individual file is not "too large" - only the huge number is problematic.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…