This project provides a Bash script to download, extract, and manage Apache or NGINX WAF rules from Atomicorp. The script allows users to select rule classes, list available rules, and customize which rules to download based on their needs for both open source and commercial projects. To sign up and create an account to download the rules, visit Atomicorp WAF Rule Subscription.
- Download Apache or NGINX WAF rules.
- Select specific WAF rule classes to download.
- List available rule classes from the configuration.
- Handle missing files gracefully by skipping them.
- Default to predefined rule classes if no custom classes are provided.
- Bash Shell (on Linux or macOS)
- curl installed
- Atomicorp username and password for access
./atomicorp_waf_downloader.sh [OPTIONS]-
-c
Check the latest MODSEC version. -
-d
Download WAF rules for the selected rule classes. -
-t
Select the rule type:apacheornginx(default: apache). -
-u
Provide the username for authentication. -
-p
Provide the password for authentication. -
-o
Set the output directory to store the extracted contents (default: current directory). -
-r
Provide a comma-separated list of WAF rule classes to download (default: predefined set). -
-l
List all available rule classes from the configuration. -
-h
Show the help message.
If no rule classes are specified with the -r option, the following default rule classes will be used:
MODSEC_00_ANTIEVASIONMODSEC_03_DOSMODSEC_10_ANTIMALWAREMODSEC_10_RULESMODSEC_11_ADV_RULESMODSEC_12_ADV_XSS_RULESMODSEC_12_BRUTEMODSEC_20_USERAGENTSMODSEC_30_ANTISPAMMODSEC_50_ROOTKITSMODSEC_60_RECONSMODSEC_61_RECONS_DLPMODSEC_99_JITPMODSEC_99_MALWARE_OUTPUT
-
Check the latest MODSEC version:
./atomicorp_waf_downloader.sh -c
-
Download Apache WAF rules using predefined classes:
./atomicorp_waf_downloader.sh -d -t apache -u your_username -p 'your_password' -o /path/to/output -
Download NGINX WAF rules with custom rule classes:
./atomicorp_waf_downloader.sh -d -t nginx -u your_username -p 'your_password' -o /path/to/output -r MODSEC_10_RULES,MODSEC_12_BRUTE -
List all available rule classes:
./atomicorp_waf_downloader.sh -l