Finds out what options are supported by an HTTP server by sending an OPTIONS request. Lists potentially risky methods. Optionally tests each method individually to see if they are subject to e.g. IP address restrictions.
In this script, "potentially risky" methods are anything except GET, HEAD, POST, and OPTIONS. If the script reports potentially risky methods, they may not all be security risks, but you should check to make sure. This page lists the dangers of some common methods:
The list of supported methods comes from the contents of the Allow and Public header fields. In verbose mode, a list of all methods is printed, followed by the list of potentially risky methods. Without verbose mode, only the potentially risky methods are shown.
If defined, do a request using each method
individually and show the response code. Use of this argument can
make this script unsafe; for example
DELETE / is
The path to request. Defaults to
smbdomain, smbhash, smbnoguest, smbpassword, smbtype, smbusernameSee the documentation for the smbauth library.
http.max-cache-size, http.max-pipeline, http.pipeline, http.useragentSee the documentation for the http library.
nmap --script=http-methods.nse --script-args http-methods.retest=1 <target> nmap --script=http-methods.nse --script-args http-methods.url-path=/website <target>
80/tcp open http | http-methods: GET HEAD POST OPTIONS TRACE | Potentially risky methods: TRACE | See http://nmap.org/nsedoc/scripts/http-methods.html | GET / -> HTTP/1.1 200 OK | HEAD / -> HTTP/1.1 200 OK | POST / -> HTTP/1.1 200 OK | OPTIONS / -> HTTP/1.1 200 OK |_TRACE / -> HTTP/1.1 200 OK
Author: Bernd Stroessenreuther <firstname.lastname@example.org>
License: Same as Nmap--See http://nmap.org/book/man-legal.html