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.
How can we recognize (detect) such files on our servers (without extracting)?
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.