File http-waf-detect

脚本使用类型: portrule
脚本所属分类: discovery, intrusive
脚本下载地址: http://nmap.org/svn/scripts/http-waf-detect.nse

User Summary

Attempts to determine whether a web server is protected by an IPS (Intrusion Prevention System), IDS (Intrusion Detection System) or WAF (Web Application Firewall) by probing the web server with malicious payloads and detecting changes in the response code and body.

To do this the script will send a "good" request and record the response, afterwards it will match this response against new requests containing malicious payloads. In theory, web applications shouldn't react to malicious requests because we are storing the payloads in a variable that is not used by the script/file and only WAF/IDS/IPS should react to it. If aggro mode is set, the script will try all attack vectors (More noisy)

This script can detect numerous IDS, IPS, and WAF products since they often protect web applications in the same way. But it won't detect products which don't alter the http traffic. Results can vary based on product configuration, but this script has been tested to work against various configurations of the following products:

* Apache ModSecurity * Barracuda Web Application Firewall * PHPIDS * dotDefender * Imperva Web Firewall * Blue Coat SG 400

Script Arguments


Target URI. Use a path that does not redirect to a different page


If aggro mode is set, the script will try all attack vectors to trigger the IDS/IPS/WAF


If set it also checks for changes in the document's body

Other useful args when running this script http.useragent User Agent for HTTP requests http.pipeline Number of requests sent in the single request

smbdomain, smbhash, smbnoguest, smbpassword, smbtype, smbusername

See the documentation for the smbauth library.

http.max-cache-size, http.max-pipeline, http.pipeline, http.useragent

See the documentation for the http library.

Example Usage


nmap -p80 --script http-waf-detect <host>
nmap -p80 --script http-waf-detect --script-args="http-waf-detect.aggro,http-waf-detect.uri=/testphp.vulnweb.com/artists.php" www.modsecurity.org

Script Output

80/tcp open  http
|_http-waf-detect: IDS/IPS/WAF detected


Author: Paulino Calderon

License: VER007 整理 http://www.ver007.com