File http-passwd
Download: http://nmap.org/svn/scripts/http-passwd.nse
User Summary
Checks if a web server is vulnerable to directory traversal by attempting to
retrieve /etc/passwd using various traversal methods such as
requesting ../../../../etc/passwd.
Script Arguments
http-max-cache-size, http.useragent, pipeline
See the documentation for the http library.Requires
author Kris Katterjohn
copyright © Same as Nmap--See http://nmap.org/book/man-legal.html
Functions
| hexify (str) | Transforms a string with ".", "/" and "\" converted to their URL-formatted hex equivalents |
| output (passwd, dir) | Formats output. |
| truncatePasswd (passwd) |
Truncates the |
| validate (response) |
Validates the HTTP response code and checks for a |
Functions
- hexify (str)
-
Transforms a string with ".", "/" and "\" converted to their URL-formatted hex equivalents
Parameters
- str: String to hexify.
Return value:
Transformed string. - output (passwd, dir)
-
Formats output.
Parameters
-
passwd:
passwdfile. - dir: Formatted request which elicited the good reponse.
Return value:
String description for output -
passwd:
- truncatePasswd (passwd)
-
Truncates the
passwdfile.Parameters
-
passwd:
passwdfile.
Return value:
Truncated passwd file and truncated length. -
passwd:
- validate (response)
-
Validates the HTTP response code and checks for a
validpasswd format in the body.Parameters
- response: The HTTP response from the server.
Return value:
The body of the HTTP response.




