Script http-method-tamper

Script types: portrule
Categories: auth, vuln

Script Summary

Attempts to bypass password protected resources (HTTP 401 status) by performing HTTP verb tampering. If an array of paths to check is not set, it will crawl the web server and perform the check against any password protected resource that it finds.

The script determines if the protected URI is vulnerable by performing HTTP verb tampering and monitoring the status codes. First, it uses a HEAD request, then a POST request and finally a random generated string ( This last one is useful when web servers treat unknown request methods as a GET request. This is the case for PHP servers ).

If the table paths is set, it will attempt to access the given URIs. Otherwise, a web crawler is initiated to try to find protected resources. Note that in a PHP environment with .htaccess files you need to specify a path to a file rather than a directory to find misconfigured .htaccess files.


Script Arguments


Web crawler timeout. Default: 10s


Base URI to crawl. Not applicable if http-method-tamper.paths is set.


Array of paths to check. If not set, the script will crawl the web server.

httpspider.doscraping, httpspider.maxdepth, httpspider.maxpagecount, httpspider.noblacklist, httpspider.url, httpspider.useheadfornonwebfiles, httpspider.withindomain, httpspider.withinhost

See the documentation for the httpspider library.

vulns.short, vulns.showall

See the documentation for the vulns library.


See the documentation for the slaxml library.

smbdomain, smbhash, smbnoguest, smbpassword, smbtype, smbusername

See the documentation for the smbauth library., http.max-body-size, http.max-cache-size, http.max-pipeline, http.pipeline, http.truncated-ok, http.useragent

See the documentation for the http library.

Example Usage

  • nmap -sV --script http-method-tamper <target>
  • nmap -p80 --script http-method-tamper --script-args 'http-method-tamper.paths={/protected/db.php,/protected/index.php}' <target>

Script Output

80/tcp open  http    syn-ack
| http-method-tamper:
|   Authentication bypass by HTTP verb tampering
|     State: VULNERABLE (Exploitable)
|     Description:
|       This web server contains password protected resources vulnerable to authentication bypass
|       vulnerabilities via HTTP verb tampering. This is often found in web servers that only limit access to the
|        common HTTP methods and in misconfigured .htaccess files.
|     Extra information:
|   URIs suspected to be vulnerable to HTTP verb tampering:
|     /method-tamper/protected/pass.txt [POST]
|     References:



  • Paulino Calderon <>

License: Same as Nmap--See