Recipe 11-2: Detecting a Large Number of Files
This recipe shows you how to use ModSecurity to enforce limits on the number of files uploaded in a transaction.
Ingredients
- OWASP ModSecurity Core Rule Set (CRS)
- modsecurity_crs_10_setup.conf
- modsecurity_crs_23_request_limits.conf
- ModSecurity
- FILES variable
- @gt operator
CAPEC-119: Resource Depletion
Sample Attack
If the target web application does not restrict the number of files accepted for a file uploading resource, attackers may be able to cause a denial-of-service condition by filling up the local disk storage on the web server.
Preventing a Large Number of File Uploads
You can implement ...