Skip to main content
2 of 8
added 23 characters in body
T.Todua
  • 2.7k
  • 4
  • 22
  • 32

zip bomb - how to guard our websites?

Zip-bomb (concept here), seems quite a "smart" and easy vulnerability to the websites (where upload of .zip files are allowed), so such sites are under a threat (at least to make some degree of damage to them) - someone dark-guy uploads i.e. 100 kb file to your site, and your site (or whoever opens that) runs out of resources (causing the consequent possible vulnerabilities and damages).

Anti-viruses are said to detect such zip-bombs, according the recursion depth and common patterns, but I think that someone might just create 1 text file (without recursive compression) of 1000 GB, and compress it directly into 100kb .zip file.

  1. How can we recognize (detect) such files on our servers (without extracting)?

  2. Another layer of attack seems sending the "REQUEST" with GZIP-BOMB . How to protect against it?

Note: solutions for PHP, JAVA, ASP will be welcomed.

T.Todua
  • 2.7k
  • 4
  • 22
  • 32