A Zip Bomb is a Zip file which may have size in Kilobytes but when we Unzip that File it's size can in Petabyte(1000 Terabytes) or Exabytes, which our Operating System cannot Handle.Yes Stuffing Exabytes of Data into Kilobytes that is What we will Learn in this Article.
Understanding How a Zip Bomb Works ::
There are many Compression software and tools which uses the Lossless Compression Algorithm to Compress the Files.As the Name Suggests these Software Compress Files by using this Algorithm without Loss of Any Data.And When we Decompress the File we get the Same File Again in the Original Shape and Size.These Algorithms uses Statistical Redundancy so that they can Represent the Sender's Data More Concisely without Error.We Know that Computer only Understand 0 and 1.So Every Program or Data Stored in your System is a Combination of 0's and 1's.
Let's take an Example --> Suppose we have a File which we want to Convert into a Zip File and this File is Represented as 1111000001100 in Binary Language.Statistical Redundancy means that the Same thing is Repeated again and again.In the Above Binary Code of the File can be Represented as 41502120 in the Compressed Way.We can Simply write the program for that,which Codes and Decodes File as Shown above.If the Program find Repeating Pattern like lot's of 1's and 0's Together we can replace with another Number.Like we have six one's Together 111111 we can write it as 61. Make Sure that this Example is Perfectly Accurate as Lossless Algorithms will Always fail to Compress files which have no Similar Pattern.This is Why you have ever tried to Zip a File you have Noticed that in Some Cases it Works but in Other Cases it may not Even Reduce the Size to 6%.
Follow the Below Steps To Create a Zip Bomb ::
1)Take a New Text File and write '1' a 10000 times.Now our File Size be Around 10kb. Do it Until the File size become 50GB. In Some Cases the Notepad will begin to lag it has huge amount of 1 open in the Window.
2)Now Compress it using a Compression Software like Winrar and you will notice that the Size of the Compressed file is Under 10 Megabyte.
3) Repeat Steps 1 and 2 until you have a total of 5GB of the Compressed Files it means when you will uncompress it the File will have Size around 25000 GB.
4)Now Compress all the Compressed File again in Zip file.
5)Now your Zip Bomb is ready.
The Most Famous Zip Bomb is 42.zip.It is a Zip file Consisting of 42 Kilobytes of Compressed Data,Containing Five Layers of Nested Zip Files in a set of 16 each bottom layer Archive Containing a 4.3 Gigabyte of Data.It Contains a Total of 4.5 Petabytes of Data when you Uncompress it.And For Uncompressing the File Password is 42.
Don't forget to like our YouTube and Facebook Page.