Scripts
| afp-brute |
Performs password guessing against Apple Filing Protocol (AFP) |
| afp-path-vuln |
Detects the Mac OS X AFP directory traversal vulnerability, CVE-2010-0533. |
| afp-serverinfo |
Shows AFP server information. This information includes the server's
hostname, IPv4 and IPv6 addresses, and hardware type (for example
|
| afp-showmount |
Shows AFP shares and ACLs. |
| asn-query |
Maps IP addresses to autonomous system (AS) numbers. |
| auth-owners |
Attempts to find the owner of an open TCP port by querying an auth daemon which must also be open on the target system. The auth service, also known as identd, normally runs on port 113. |
| auth-spoof |
Checks for an identd (auth) server which is spoofing its replies. |
| banner |
A simple banner grabber which connects to an open TCP port and prints out anything sent by the listening service within five seconds. |
| citrix-brute-xml |
Attempts to guess valid credentials for the Citrix PN Web Agent XML Service. The XML service authenticates against the local Windows server or the Active Directory. |
| citrix-enum-apps |
Extracts a list of published applications from the ICA Browser service. |
| citrix-enum-apps-xml |
Extracts a list of applications, ACLs, and settings from the Citrix XML service. |
| citrix-enum-servers |
Extracts a list of Citrix servers from the ICA Browser service. |
| citrix-enum-servers-xml |
Extracts the name of the server farm and member servers from Citrix XML service. |
| couchdb-databases |
Gets database tables from a CouchDB database. |
| couchdb-stats |
Gets database statistics from a CouchDB database. |
| daap-get-library |
Retrieves a list of music from a DAAP server. The list includes artist names and album and song titles. |
| daytime |
Retrieves the day and time from the Daytime service. |
| db2-das-info |
Connects to the IBM DB2 Administration Server (DAS) on TCP or UDP port 523 and exports the server profile. No authentication is required for this request. |
| dhcp-discover |
Sends a DHCPDISCOVER request to a host on UDP port 67. The response comes back to UDP port 68, and is read using pcap (due to the inability for a script to choose its source port at the moment). |
| dns-cache-snoop |
Performs DNS cache snooping against a DNS server. |
| dns-fuzz |
This script launches a DNS fuzzing attack against any DNS server. |
| dns-random-srcport |
Checks a DNS server for the predictable-port recursion vulnerability. Predictable source ports can make a DNS server vulnerable to cache poisoning attacks (see CVE-2008-1447). |
| dns-random-txid |
Checks a DNS server for the predictable-TXID DNS recursion vulnerability. Predictable TXID values can make a DNS server vulnerable to cache poisoning attacks (see CVE-2008-1447). |
| dns-recursion |
Checks if a DNS server allows queries for third-party names. It is expected that recursion will be enabled on your own internal nameservers. |
| dns-service-discovery |
Attempts to discover a hosts services using the DNS Service Discovery protocol. |
| dns-zone-transfer |
Requests a zone transfer (AXFR) from a DNS server. |
| drda-brute |
Performs password guessing against databases supporting the IBM DB2 protocol such as Informix, DB2 and Derby |
| drda-info |
Attempts to extract information from database servers supporting the DRDA protocol. The script sends a DRDA EXCSAT (exchange server attributes) command packet and parses the response. |
| finger |
Attempts to retrieve a list of usernames using the finger service. |
| ftp-anon |
Checks if an FTP server allows anonymous logins. |
| ftp-bounce |
Checks to see if an FTP server allows port scanning using the FTP bounce method. |
| ftp-brute |
Tries to get FTP login credentials by guessing usernames and passwords. |
| ftp-libopie |
Checks if an FTPd is prone to CVE-2010-1938 (OPIE off-by-one stack overflow), a vulnerability discovered by Maksymilian Arciemowicz and Adam "pi3" Zabrocki. See the advisory at http://nmap.org/r/fbsd-sa-opie. Be advised that, if launched against a vulnerable host, this script will crash the FTPd. |
| html-title |
Shows the title of the default page of a web server. |
| http-auth |
Retrieves the authentication scheme and realm of a web service that requires authentication. |
| http-date |
Gets the date from HTTP-like services. Also prints how much the date differs from local time. Local time is the time the HTTP request was sent, so the difference includes at least the duration of one RTT. |
| http-enum |
Enumerates directories used by popular web applications and servers. |
| http-favicon |
Gets the favicon ("favorites icon") from a web page and matches it against a database of the icons of known web applications. If there is a match, the name of the application is printed; otherwise the MD5 hash of the icon data is printed. |
| http-headers |
Performs a GET request for the root folder ("/") of a web server and displays the HTTP headers returned. |
| http-iis-webdav-vuln |
Checks for a vulnerability in IIS 5.1/6.0 that allows arbitrary users to access secured WebDAV folders by searching for a password-protected folder and attempting to access it. This vulnerability was patched in Microsoft Security Bulletin MS09-020, http://nmap.org/r/ms09-020. |
| http-malware-host |
Looks for signature of known server compromises. |
| http-methods |
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. |
| http-open-proxy |
Checks if an HTTP proxy is open. |
| http-passwd |
Checks if a web server is vulnerable to directory traversal by attempting to
retrieve |
| http-php-version |
Attempts to retrieve the PHP version from a web server. PHP has a number of magic queries that return images or text that can vary with the PHP version. This script uses the following queries:
|
| http-trace |
Sends an HTTP TRACE request and shows header fields that were modified in the response. |
| http-userdir-enum |
Attempts to enumerate valid usernames on web servers running with the mod_userdir module or similar enabled. |
| http-vmware-path-vuln |
Checks for a path-traversal vulnerability in VMWare ESX, ESXi, and Server (CVE-2009-3733). |
| iax2-version |
Detects the UDP IAX2 service. |
| imap-capabilities |
Retrieves IMAP email server capabilities. |
| ipidseq |
Classifies a host's IP ID sequence (test for susceptibility to idle scan). |
| irc-info |
Gathers information from an IRC server. |
| irc-unrealircd-backdoor |
Checks if an IRC server is backdoored by running a time-based command (ping) and checking how long it takes to respond. |
| jdwp-version |
Detects the Java Debug Wire Protocol. This protocol is used by Java programs to be debugged via the network. It should not be open to the public Internet, as it does not provide any security against malicious attackers who can inject their own bytecode into the debugged process. |
| ldap-brute |
Attempts to brute-force LDAP authentication. By default
it uses the built-in username and password lists. In order to use your
own lists use the |
| ldap-rootdse |
Retrieves the LDAP root DSA-specific Entry (DSE) |
| ldap-search |
Attempts to perform an LDAP search and returns all matches. |
| lexmark-config |
Retrieves configuration information from a Lexmark S300-S400 printer. |
| mongodb-databases |
Attempts to get a list of tables from a MongoDB database. |
| mongodb-info |
Attempts to get build info and server status from a MongoDB database. |
| ms-sql-brute |
Performs password guessing against Microsoft SQL Server (ms-sql). |
| ms-sql-config |
Queries Microsoft SQL Server (ms-sql) for a list of databases, linked servers, and configuration settings. |
| ms-sql-empty-password |
Attempts to authenticate using an empty password for the sysadmin (sa) account. |
| ms-sql-hasdbaccess |
Queries Microsoft SQL Server (ms-sql) for a list of databases a user has access to. |
| ms-sql-info |
Attempts to extract information from Microsoft SQL Server instances. |
| ms-sql-query |
Runs a query against Microsoft SQL Server (ms-sql). |
| ms-sql-tables |
Queries Microsoft SQL Server (ms-sql) for a list of tables per database. |
| ms-sql-xp-cmdshell |
Attempts to run a command using the command shell of Microsoft SQL Server (ms-sql). |
| mysql-brute |
Performs password guessing against MySQL |
| mysql-databases |
Attempts to list all databases on a MySQL server. |
| mysql-empty-password |
Checks for MySQL servers with an empty password for |
| mysql-info |
Connects to a MySQL server and prints information such as the protocol and version numbers, thread ID, status, capabilities, and the password salt. |
| mysql-users |
Attempts to list all users on a MySQL server. |
| mysql-variables |
Attempts to show all variables on a MySQL server. |
| nbstat |
Attempts to retrieve the target's NetBIOS names and MAC address. |
| nfs-ls |
Attempts to get useful information about files from NFS exports.
The output is intended to resemble the output of |
| nfs-showmount |
Shows NFS exports, like the |
| nfs-statfs |
Retrieves disk space statistics and information from a remote NFS share.
The output is intended to resemble the output of |
| ntp-info |
Gets the time and configuration variables from an NTP server. We send two
requests: a time request and a "read variables" (opcode 2) control message.
Without verbosity, the script shows the time and the value of the
|
| ntp-monlist |
Obtains and prints an NTP server's monitor data. |
| oracle-sid-brute |
Guesses Oracle instance/SID names against the TNS-listener. |
| p2p-conficker |
Checks if a host is infected with Conficker.C or higher, based on Conficker's peer to peer communication. |
| pgsql-brute |
Performs password guessing against PostgreSQL. |
| pjl-ready-message |
Retrieves or sets the ready message on printers that support the Printer
Job Language. This includes most PostScript printers that listen on port
9100. Without an argument, displays the current ready message. With the
|
| pop3-brute |
Tries to log into a POP3 account by guessing usernames and passwords. |
| pop3-capabilities |
Retrieves POP3 email server capabilities. |
| pptp-version |
Attempts to extract system information from the point-to-point tunneling protocol (PPTP) service. |
| qscan |
Repeatedly probe open and/or closed ports on a host to obtain a series of round-trip time values for each port. These values are used to group collections of ports which are statistically different from other groups. Ports being in different groups (or "families") may be due to network mechanisms such as port forwarding to machines behind a NAT. |
| realvnc-auth-bypass |
Checks if a VNC server is vulnerable to the RealVNC authentication bypass (CVE-2006-2369). |
| robots.txt |
Checks for disallowed entries in |
| rpcinfo |
Connects to portmapper and fetches a list of all registered programs. |
| skypev2-version |
Detects the Skype version 2 service. |
| smb-brute |
Attempts to guess username/password combinations over SMB, storing discovered combinations
for use in other scripts. Every attempt will be made to get a valid list of users and to
verify each username before actually using them. When a username is discovered, besides
being printed, it is also saved in the Nmap registry so other Nmap scripts can use it. That
means that if you're going to run |
| smb-check-vulns |
Checks for vulnerabilities:
|
| smb-enum-domains |
Attempts to enumerate domains on a system, along with their policies. This generally requires credentials, except against Windows 2000. In addition to the actual domain, the "Builtin" domain is generally displayed. Windows returns this in the list of domains, but its policies don't appear to be used anywhere. |
| smb-enum-groups |
Obtains a list of groups from the remote Windows system, as well as a list of the group's users.
This works similarly to |
| smb-enum-processes |
Pulls a list of processes from the remote server over SMB. This will determine all running processes, their process IDs, and their parent processes. It is done by querying the remote registry service, which is disabled by default on Vista; on all other Windows versions, it requires Administrator privileges. |
| smb-enum-sessions |
Enumerates the users logged into a system either locally or through an SMB share. The local users can be logged on either physically on the machine, or through a terminal services session. Connections to a SMB share are, for example, people connected to fileshares or making RPC calls. Nmap's connection will also show up, and is generally identified by the one that connected "0 seconds ago". |
| smb-enum-shares |
Attempts to list shares using the |
| smb-enum-users |
Attempts to enumerate the users on a remote Windows system, with as much
information as possible, through two different techniques (both over MSRPC,
which uses port 445 or 139; see |
| smb-os-discovery |
Attempts to determine the operating system, computer name, domain, and current time over the SMB protocol (ports 445 or 139). This is done by starting a session with the anonymous account (or with a proper user account, if one is given; it likely doesn't make a difference); in response to a session starting, the server will send back all this information. |
| smb-psexec |
This script implements remote process execution similar to the Sysinternals' psexec tool, allowing a user to run a series of programs on a remote machine and read the output. This is great for gathering information about servers, running the same tool on a range of system, or even installing a backdoor on a collection of computers. |
| smb-security-mode |
Returns information about the SMB security level determined by SMB. |
| smb-server-stats |
Attempts to grab the server's statistics over SMB and MSRPC, which uses TCP ports 445 or 139. |
| smb-system-info |
Pulls back information about the remote system from the registry. Getting all of the information requires an administrative account, although a user account will still get a lot of it. Guest probably won't get any, nor will anonymous. This goes for all operating systems, including Windows 2000. |
| smbv2-enabled |
Checks whether or not a server is running the SMBv2 protocol. |
| smtp-commands |
Attempts to use EHLO and HELP to gather the Extended commands supported by an SMTP server. |
| smtp-enum-users |
Attempts to enumerate the users on a SMTP server by issuing the VRFY, EXPN or RCPT TO commands. The goal of this script is to discover all the user accounts in the remote system. |
| smtp-open-relay |
Attempts to relay mail by issuing a predefined combination of SMTP commands. The goal of this script is to tell if a SMTP server is vulnerable to mail relaying. |
| smtp-strangeport |
Checks if SMTP is running on a non-standard port. |
| sniffer-detect |
Checks if a target on a local Ethernet has its network card in promiscuous mode. |
| snmp-brute |
Attempts to find an SNMP community string by brute force guessing. |
| snmp-interfaces |
Attempts to enumerate network interfaces through SNMP. |
| snmp-netstat |
Attempts to query SNMP for a netstat like output. |
| snmp-processes |
Attempts to enumerate running processes through SNMP. |
| snmp-sysdescr |
Attempts to extract system information from an SNMP version 1 service. |
| snmp-win32-services |
Attempts to enumerate Windows services through SNMP. |
| snmp-win32-shares |
Attempts to enumerate Windows Shares through SNMP. |
| snmp-win32-software |
Attempts to enumerate installed software through SNMP. |
| snmp-win32-users |
Attempts to enumerate Windows user accounts through SNMP |
| socks-open-proxy |
Checks if an open socks proxy is running on the target. |
| sql-injection |
Spiders an HTTP server looking for URLs containing queries vulnerable to an SQL injection attack. |
| ssh-hostkey |
Shows SSH hostkeys. |
| sshv1 |
Checks if an SSH server supports the obsolete and less secure SSH Protocol Version 1. |
| ssl-cert |
Retrieves a server's SSL certificate. The amount of information printed about the certificate depends on the verbosity level. With no extra verbosity, the script prints the validity period and the commonName, organizationName, stateOrProvinceName, and countryName of the subject. |
| ssl-enum-ciphers |
This script repeatedly initiates SSL/TLS connections, each time trying a new cipher or compressor while recording whether a host accepts or rejects it. The end result is a list of all the ciphers and compressors that a server accepts. |
| sslv2 |
Determines whether the server supports obsolete and less secure SSLv2, and discovers which ciphers it supports. |
| telnet-brute |
Tries to get Telnet login credentials by guessing usernames and passwords. |
| upnp-info |
Attempts to extract system information from the UPnP service. |
| vnc-brute |
Performs password guessing against VNC |
| vnc-info |
Queries a VNC server for the supported security types |
| wdb-version |
Gathers information from a Wind DeBug Agent on VxWorks |
| whois |
Queries the WHOIS services of Regional Internet Registries (RIR) and attempts to retrieve information about the IP Address Assignment which contains the Target IP Address. |
| x11-access |
Checks if you're allowed to connect to the X server. |
Libraries
| afp |
This library was written by Patrik Karlsson <patrik@cqure.net> to facilitate communication with the Apple AFP Service. It is not feature complete and still missing several functions. |
| asn1 |
ASN.1 functions. |
| base64 |
Base64 encoding and decoding. Follows RFC 4648. |
| bin |
Pack and unpack binary data. |
| bit |
Bitwise operations on integers. |
| brute |
The brute library is an attempt to create a common framework for performing password guessing against remote services. |
| citrixxml |
This module was written by Patrik Karlsson and facilitates communication with the Citrix XML Service. It is not feature complete and is missing several functions and parameters. |
| comm |
Common communication functions for network discovery tasks like banner grabbing and data exchange. |
| datafiles |
Read and parse some of Nmap's data files: |
| dns |
Simple DNS library supporting packet creation, encoding, decoding, and querying. |
| drda |
DRDA Library supporting a very limited subset of operations. |
| http |
Client-side HTTP library. |
| imap |
IMAP functions. |
| ipOps |
Utility functions for manipulating and comparing IP addresses. |
| json |
Library methods for handling JSON data. It handles JSON encoding and decoding according to RFC 4627. |
| ldap |
Library methods for handling LDAP. |
| listop |
Functional-style list operations. |
| match |
Buffered network I/O helper functions. |
| mongodb |
Library methods for handling MongoDB, creating and parsing packets. |
| msrpc |
By making heavy use of the |
| msrpcperformance |
This module is designed to parse the |
| msrpctypes |
This module was written to marshall parameters for Microsoft RPC (MSRPC) calls. The values passed in and out are based
on structs defined by the protocol, and documented by Samba developers. For detailed breakdowns of the types, take a
look at Samba 4.0's |
| mssql |
MSSQL Library supporting a very limited subset of operations. |
| mysql |
Simple MySQL Library supporting a very limited subset of operations. |
| netbios |
Creates and parses NetBIOS traffic. The primary use for this is to send NetBIOS name requests. |
| nmap |
Interface with Nmap internals. |
| nsedebug |
Debugging functions for Nmap scripts. |
| openssl |
OpenSSL bindings. |
| packet |
Facilities for manipulating raw packets. |
| pcre |
Perl Compatible Regular Expressions. |
| pgsql |
PostgreSQL library supporting both version 2 and version 3 of the protocol. The library currently contains the bare minimum to perform authentication. Authentication is supported with or without SSL enabled and using the plain-text or MD5 authentication mechanisms. |
| pop3 |
POP3 functions. |
| proxy |
Functions for proxy testing. |
| rpc |
RPC Library supporting a very limited subset of operations. |
| shortport |
Functions for building short portrules. |
| smb |
Implements functionality related to Server Message Block (SMB, also known as CIFS) traffic, which is a Windows protocol. |
| smbauth |
This module takes care of the authentication used in SMB (LM, NTLM, LMv2, NTLMv2). |
| snmp |
SNMP functions. |
| ssh1 |
Functions for the SSH-1 protocol. This module also contains functions for formatting key fingerprints. |
| ssh2 |
Functions for the SSH-2 protocol. |
| stdnse |
Standard Nmap Scripting Engine functions. This module contains various handy functions that are too small to justify modules of their own. |
| strbuf |
String buffer facilities. |
| strict |
Strict declared global library. Checks for undeclared global variables during runtime execution. |
| tab |
Arrange output into tables. |
| unpwdb |
Username/password database library. |
| url |
URI parsing, composition, and relative URL resolution. |
| vnc |
Connects the VNC socket |




