diff --git a/CHANGELOG b/CHANGELOG
index ba5a9859c..6e918e739 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,5 +1,65 @@
# Nmap Changelog ($Id$); -*-text-*-
+Nmap 7.60 [2017-07-31]
+
+o [Windows] Updated the bundled Npcap from 0.91 to 0.93, fixing several issues
+ with installation and compatibility with the Windows 10 Creators Update.
+
+o [NSE][GH#910] NSE scripts now have complete SSH support via libssh2,
+ including password brute-forcing and running remote commands, thanks to the
+ combined efforts of three Summer of Code students: [Devin Bjelland, Sergey
+ Khegay, Evangelos Deirmentzoglou]
+
+o [NSE] Added 14 NSE scripts from 6 authors, bringing the total up to 579!
+ They are all listed at https://nmap.org/nsedoc/, and the summaries are below:
+
+ + ftp-syst sends SYST and STAT commands to FTP servers to get system version
+ and connection information. [Daniel Miller]
+
+ + [GH#916] http-vuln-cve2017-8917 checks for an SQL injection vulnerability affecting
+ Joomla! 3.7.x before 3.7.1. [Wong Wai Tuck]
+
+ + iec-identify probes for the IEC 60870-5-104 SCADA protocol. [Aleksandr
+ Timorin, Daniel Miller]
+
+ + [GH#915] openwebnet-discovery retrieves device identifying information and
+ number of connected devices running on openwebnet protocol. [Rewanth Cool]
+
+ + puppet-naivesigning checks for a misconfiguration in the Puppet CA where
+ naive signing is enabled, allowing for any CSR to be automatically signed.
+ [Wong Wai Tuck]
+
+ + [GH#943] smb-protocols discovers if a server supports dialects NT LM 0.12
+ (SMBv1), 2.02, 2.10, 3.00, 3.02 and 3.11. This replaces the old
+ smbv2-enabled script. [Paulino Calderon]
+
+ + [GH#943] smb2-capabilities lists the supported capabilities of SMB2/SMB3
+ servers. [Paulino Calderon]
+
+ + [GH#943] smb2-time determines the current date and boot date of SMB2
+ servers. [Paulino Calderon]
+
+ + [GH#943] smb2-security-mode determines the message signing configuration of
+ SMB2/SMB3 servers. [Paulino Calderon]
+
+ + [GH#943] smb2-vuln-uptime attempts to discover missing critical patches in
+ Microsoft Windows systems based on the SMB2 server uptime. [Paulino Calderon]
+
+ + ssh-auth-methods lists the authentication methods offered by an SSH server.
+ [Devin Bjelland]
+
+ + ssh-brute performs brute-forcing of SSH password credentials. [Devin Bjelland]
+
+ + ssh-publickey-acceptance checks public or private keys to see if they could
+ be used to log in to a target. A list of known-compromised key pairs is
+ included and checked by default. [Devin Bjelland]
+
+ + ssh-run uses user-provided credentials to run commands on targets via SSH.
+ [Devin Bjelland]
+
+o [NSE] Removed smbv2-enabled, which was incompatible with the new SMBv2/3
+ improvements. It was fully replaced by the smb-protocols script.
+
o [Ncat][GH#446] Added Datagram TLS (DTLS) support to Ncat in connect (client)
mode with --udp --ssl. Also added Application Layer Protocol Negotiation
(ALPN) support with the --ssl-alpn option. [Denis Andzakovic, Daniel Miller]
@@ -11,23 +71,11 @@ o Updated the default ciphers list for Ncat and the secure ciphers list for
o [NSE][GH#930] Fix ndmp-version and ndmp-fs-info when scanning Veritas Backup
Exec Agent 15 or 16. [Andrew Orr]
-o [NSE][GH#943] Added new SMB2/3 library and scripts:
- + smb-protocols discovers if a server supports dialects
- NT LM 0.12 (SMBv1), 2.02, 2.10, 3.00, 3.02 and 3.11.
- + smb2-time determines the current date and boot date of SMB2 servers.
- + smb2-capabilities lists the supported capabilities of SMB2/SMB3 servers.
- + smb2-security-mode determines the message signing configuration of
- SMB2/SMB3 servers.
- + smb2-vuln-uptime attempts to discover missing critical
- patches in Microsoft Windows systems based on the SMB2
- server uptime. [Paulino Calderon]
+o [NSE][GH#943] Added new SMB2/3 library and related scripts. [Paulino Calderon]
o [NSE][GH#950] Added wildcard detection to dns-brute. Only hostnames that
resolve to unique addresses will be listed. [Aaron Heesakkers]
-o [NSE] ftp-syst sends SYST and STAT commands to FTP servers to get system
- version and connection information. [Daniel Miller]
-
o [NSE] FTP scripts like ftp-anon and ftp-brute now correctly handle
TLS-protected FTP services and use STARTTLS when necessary. [Daniel Miller]
@@ -43,29 +91,13 @@ o [NSE][GH#934] The HTTP response object has a new member, version, which
contains the HTTP protocol version string returned by the server, e.g. "1.0".
[nnposter]
-o [NSE] openwebnet-discovery retrieves device identifying information and
- number of connected devices running on openwebnet protocol. [Rewanth Cool]
-
o [NSE][GH#938] Fix handling of the objectSID Active Directory attribute
by ldap.lua. [Tom Sellers]
-o [NSE] puppet-naivesigning checks for a misconfiguration in the Puppet CA
- where naive signing is enabled, allowing for any CSR to be automatically
- signed. [Wong Wai Tuck]
-
o [NSE] Fix line endings in the list of Oracle SIDs used by oracle-sid-brute.
Carriage Return characters were being sent in the connection packets, likely
resulting in failure of the script. [Anant Shrivastava]
-o [NSE] iec-identify probes for the IEC 60870-5-104 SCADA protocol.
- [Aleksandr Timorin, Daniel Miller]
-
-o [GH#910] added libssh2 support, ssh-brute, ssh-run, ssh-auth-methods,
- ssh-publickey-acceptance [Evangelos Deirmentzoglou]
-
-o [NSE] http-vuln-cve2017-8917 checks for an SQL injection vulnerability
- affecting Joomla! 3.7.x before 3.7.1. [Wong Wai Tuck]
-
o [NSE][GH#141] http-useragent-checker now checks for changes in HTTP status
(usually 403 Forbidden) in addition to redirects to indicate forbidden User
Agents. [Gyanendra Mishra]
diff --git a/docs/nmap-update.1 b/docs/nmap-update.1
index 993645d59..b0df5b083 100644
--- a/docs/nmap-update.1
+++ b/docs/nmap-update.1
@@ -1,13 +1,13 @@
'\" t
.\" Title: nmap-update
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.78.1
-.\" Date: 06/13/2017
+.\" Generator: DocBook XSL Stylesheets v1.79.1
+.\" Date: 08/01/2017
.\" Manual: nmap-update Reference Guide
.\" Source: nmap-update
.\" Language: English
.\"
-.TH "NMAP\-UPDATE" "1" "06/13/2017" "nmap\-update" "nmap\-update Reference Guide"
+.TH "NMAP\-UPDATE" "1" "08/01/2017" "nmap\-update" "nmap\-update Reference Guide"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/nmap.1 b/docs/nmap.1
index 9cadb2858..f8cadf3ad 100644
--- a/docs/nmap.1
+++ b/docs/nmap.1
@@ -1,13 +1,13 @@
'\" t
.\" Title: nmap
.\" Author: [see the "Author" section]
-.\" Generator: DocBook XSL Stylesheets v1.78.1
-.\" Date: 06/13/2017
+.\" Generator: DocBook XSL Stylesheets v1.79.1
+.\" Date: 08/01/2017
.\" Manual: Nmap Reference Guide
.\" Source: Nmap
.\" Language: English
.\"
-.TH "NMAP" "1" "06/13/2017" "Nmap" "Nmap Reference Guide"
+.TH "NMAP" "1" "08/01/2017" "Nmap" "Nmap Reference Guide"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -33,38 +33,30 @@ nmap \- Network exploration tool and security / port scanner
.HP \w'\fBnmap\fR\ 'u
\fBnmap\fR [\fIScan\ Type\fR...] [\fIOptions\fR] {\fItarget\ specification\fR}
.SH "DESCRIPTION"
-.\" Nmap: description of
.PP
Nmap (\(lqNetwork Mapper\(rq) is an open source tool for network exploration and security auditing\&. It was designed to rapidly scan large networks, although it works fine against single hosts\&. Nmap uses raw IP packets in novel ways to determine what hosts are available on the network, what services (application name and version) those hosts are offering, what operating systems (and OS versions) they are running, what type of packet filters/firewalls are in use, and dozens of other characteristics\&. While Nmap is commonly used for security audits, many systems and network administrators find it useful for routine tasks such as network inventory, managing service upgrade schedules, and monitoring host or service uptime\&.
.PP
The output from Nmap is a list of scanned targets, with supplemental information on each depending on the options used\&. Key among that information is the
\(lqinteresting ports table\(rq\&.
-.\" ports: \(lqinteresting\(rq
That table lists the port number and protocol, service name, and state\&. The state is either
open,
filtered,
closed, or
unfiltered\&.
Open
-.\" open port state
means that an application on the target machine is listening for connections/packets on that port\&.
Filtered
-.\" filtered port state
means that a firewall, filter, or other network obstacle is blocking the port so that Nmap cannot tell whether it is
open
or
closed\&.
Closed
-.\" closed port state
ports have no application listening on them, though they could open up at any time\&. Ports are classified as
unfiltered
-.\" unfiltered port state
when they are responsive to Nmap\*(Aqs probes, but Nmap cannot determine whether they are open or closed\&. Nmap reports the state combinations
open|filtered
-.\" open|filtered port state
and
closed|filtered
-.\" closed|filtered port state
when it cannot determine which of the two states describe a port\&. The port table may also include software version details when version detection has been requested\&. When an IP protocol scan is requested (\fB\-sO\fR), Nmap provides information on supported IP protocols rather than listening ports\&.
.PP
In addition to the interesting ports table, Nmap can provide further information on targets, including reverse DNS names, operating system guesses, device types, and MAC addresses\&.
@@ -76,7 +68,6 @@ Example\ \&1\&. The only Nmap arguments used in this example are
for faster execution; and then the hostname\&.
.PP
\fBExample\ \&1.\ \&A representative Nmap scan\fR
-.\" -A: example of
.sp
.if n \{\
.RS 4
@@ -123,14 +114,12 @@ It is also included as a chapter of Nmap Network Scanning: The Official Nmap Pro
.PP
This options summary is printed when Nmap is run with no arguments, and the latest version is always available at
\m[blue]\fB\%https://svn.nmap.org/nmap/docs/nmap.usage.txt\fR\m[]\&. It helps people remember the most common options, but is no substitute for the in\-depth documentation in the rest of this manual\&. Some obscure options aren\*(Aqt even included here\&.
-.\" summary of options
-.\" command-line options: of Nmap
.sp
.if n \{\
.RS 4
.\}
.nf
-Nmap 7\&.50SVN ( https://nmap\&.org )
+Nmap 7\&.60SVN ( https://nmap\&.org )
Usage: nmap [Scan Type(s)] [Options] {target specification}
TARGET SPECIFICATION:
Can pass hostnames, IP addresses, networks, etc\&.
@@ -248,15 +237,11 @@ SEE THE MAN PAGE (https://nmap\&.org/book/man\&.html) FOR MORE OPTIONS AND EXAMP
.if n \{\
.RE
.\}
-.\"
-.\"
.SH "TARGET SPECIFICATION"
-.\" target specification
.PP
Everything on the Nmap command\-line that isn\*(Aqt an option (or option argument) is treated as a target host specification\&. The simplest case is to specify a target IP address or hostname for scanning\&.
.PP
Sometimes you wish to scan a whole network of adjacent hosts\&. For this, Nmap supports CIDR\-style
-.\" CIDR (Classless Inter-Domain Routing)
addressing\&. You can append
/\fInumbits\fR
to an IPv4 address or hostname and Nmap will scan every IP address for which the first
@@ -268,13 +253,11 @@ would scan the 256 hosts between 192\&.168\&.10\&.0 (binary:
11000000 10101000 00001010 11111111), inclusive\&.
192\&.168\&.10\&.40/24
would scan exactly the same targets\&. Given that the host scanme\&.nmap\&.org
-.\" scanme.nmap.org
is at the IP address 64\&.13\&.134\&.52, the specification
scanme\&.nmap\&.org/16
would scan the 65,536 IP addresses between 64\&.13\&.0\&.0 and 64\&.13\&.255\&.255\&. The smallest allowed value is
/0, which targets the whole Internet\&. The largest value is
/32, which scans just the named host or IP address because all address bits are fixed\&.
-.\" address ranges
.PP
CIDR notation is short but not always flexible enough\&. For example, you might want to scan 192\&.168\&.0\&.0/16 but skip any IPs ending with \&.0 or \&.255 because they may be used as subnet network and broadcast addresses\&. Nmap supports this through octet range addressing\&. Rather than specify a normal IP address, you can specify a comma\-separated list of numbers or ranges for each octet\&. For example,
192\&.168\&.0\-255\&.1\-254
@@ -288,12 +271,8 @@ by itself is the same as
in the first octet so the target specification doesn\*(Aqt look like a command\-line option\&. Ranges need not be limited to the final octets: the specifier
0\-255\&.0\-255\&.13\&.37
will perform an Internet\-wide scan for all IP addresses ending in 13\&.37\&. This sort of broad sampling can be useful for Internet surveys and research\&.
-.\" IPv6
.PP
IPv6 addresses can be specified by their fully qualified IPv6 address or hostname or with CIDR notation for subnets\&. Octet ranges aren\*(Aqt yet supported for IPv6\&.
-.\" link-local IPv6 address
-.\" IPv6 address: link-local
-.\" zone ID (IPv6 address)
.PP
IPv6 addresses with non\-global scope need to have a zone ID suffix\&. On Unix systems, this is a percent sign followed by an interface name; a complete address might be
fe80::a8bb:ccff:fedd:eeff%eth0\&. On Windows, use an interface index number in place of an interface name:
@@ -306,8 +285,7 @@ does what you would expect\&.
.PP
While targets are usually specified on the command lines, the following options are also available to control target selection:
.PP
-\fB\-iL \fR\fB\fIinputfilename\fR\fR (Input from list)
-.\" -iL .\" target specification: from list
+\fB\-iL \fR\fB\fIinputfilename\fR\fR (Input from list)
.RS 4
Reads target specifications from
\fIinputfilename\fR\&. Passing a huge list of hosts is often awkward on the command line, yet it is a common desire\&. For example, your DHCP server might export a list of 10,000 current leases that you wish to scan\&. Or maybe you want to scan all IP addresses
@@ -321,8 +299,7 @@ The input file may contain comments that start with
and extend to the end of the line\&.
.RE
.PP
-\fB\-iR \fR\fB\fInum hosts\fR\fR (Choose random targets)
-.\" -iR .\" random targets .\" target specification: at random
+\fB\-iR \fR\fB\fInum hosts\fR\fR (Choose random targets)
.RS 4
For Internet\-wide surveys and other research, you may want to choose targets at random\&. The
\fInum hosts\fR
@@ -330,18 +307,15 @@ argument tells Nmap how many IPs to generate\&. Undesirable IPs such as those in
0
can be specified for a never\-ending scan\&. Keep in mind that some network administrators bristle at unauthorized scans of their networks and may complain\&. Use this option at your own risk! If you find yourself really bored one rainy afternoon, try the command
\fBnmap \-Pn \-sS \-p 80 \-iR 0 \-\-open\fR
-.\" -sS: example of.\" -PS: example of.\" -iR: example of.\" --open: example of
to locate random web servers for browsing\&.
.RE
.PP
-\fB\-\-exclude \fR\fB\fIhost1\fR\fR\fB[,\fIhost2\fR[,\&.\&.\&.]]\fR (Exclude hosts/networks)
-.\" --exclude .\" excluding targets
+\fB\-\-exclude \fR\fB\fIhost1\fR\fR\fB[,\fIhost2\fR[,\&.\&.\&.]]\fR (Exclude hosts/networks)
.RS 4
Specifies a comma\-separated list of targets to be excluded from the scan even if they are part of the overall network range you specify\&. The list you pass in uses normal Nmap syntax, so it can include hostnames, CIDR netblocks, octet ranges, etc\&. This can be useful when the network you wish to scan includes untouchable mission\-critical servers, systems that are known to react adversely to port scans, or subnets administered by other people\&.
.RE
.PP
-\fB\-\-excludefile \fR\fB\fIexclude_file\fR\fR (Exclude list from file)
-.\" --excludefile
+\fB\-\-excludefile \fR\fB\fIexclude_file\fR\fR (Exclude list from file)
.RS 4
This offers the same functionality as the
\fB\-\-exclude\fR
@@ -354,7 +328,6 @@ The exclude file may contain comments that start with
and extend to the end of the line\&.
.RE
.SH "HOST DISCOVERY"
-.\" host discovery
.PP
One of the very first steps in any network reconnaissance mission is to reduce a (sometimes huge) set of IP ranges into a list of active or interesting hosts\&. Scanning every port of every single IP address is slow and usually unnecessary\&. Of course what makes a host interesting depends greatly on the scan purposes\&. Network administrators may only be interested in hosts running a certain service, while security auditors may care about every single device with an IP address\&. An administrator may be comfortable using just an ICMP ping to locate hosts on his internal network, while an external penetration tester may use a diverse set of dozens of probes in an attempt to evade firewall restrictions\&.
.PP
@@ -365,17 +338,14 @@ tool\&. Users can skip the ping step entirely with a list scan (\fB\-sL\fR) or b
If no host discovery options are given, Nmap sends an ICMP echo request, a TCP SYN packet to port 443, a TCP ACK packet to port 80, and an ICMP timestamp request\&. (For IPv6, the ICMP timestamp request is omitted because it is not part of ICMPv6\&.) These defaults are equivalent to the
\fB\-PE \-PS443 \-PA80 \-PP\fR
options\&. The exceptions to this are the ARP (for IPv4) and Neighbor Discovery
-.\" Neighbor Discovery: for host discovery
(for IPv6) scans which are used for any targets on a local ethernet network\&. For unprivileged Unix shell users, the default probes are a SYN packet to ports 80 and 443 using the
\fBconnect\fR
system call\&.
-.\" unprivileged users: limitations of
This host discovery is often sufficient when scanning local networks, but a more comprehensive set of discovery probes is recommended for security auditing\&.
.PP
The
\fB\-P*\fR
options (which select ping types) can be combined\&. You can increase your odds of penetrating strict firewalls by sending many probe types using different TCP ports/flags and ICMP codes\&. Also note that ARP/Neighbor Discovery (\fB\-PR\fR)
-.\" -PR
is done by default against targets on a local ethernet network even if you specify other
\fB\-P*\fR
options, because it is almost always faster and more effective\&.
@@ -386,13 +356,12 @@ option to learn how to perform only host discovery, or use
\fB\-Pn\fR
to skip host discovery and port scan all target hosts\&. The following options control host discovery:
.PP
-\fB\-sL\fR (List Scan)
-.\" -sL .\" list scan
+\fB\-sL\fR (List Scan)
.RS 4
The list scan is a degenerate form of host discovery that simply lists each host of the network(s) specified, without sending any packets to the target hosts\&. By default, Nmap still does reverse\-DNS resolution on the hosts to learn their names\&. It is often surprising how much useful information simple hostnames give out\&. For example,
fw\&.chi
is the name of one company\*(Aqs Chicago firewall\&.
-.\" DNS: records as source of information
+
Nmap also reports the total number of IP addresses at the end\&. The list scan is a good sanity check to ensure that you have proper IP addresses for your targets\&. If the hosts sport domain names you do not recognize, it is worth investigating further to prevent scanning the wrong company\*(Aqs network\&.
.sp
Since the idea is to simply print a list of target hosts, options for higher level functionality such as port scanning, OS detection, or ping scanning cannot be combined with this\&. If you wish to disable ping scanning while still performing such higher level functionality, read up on the
@@ -400,8 +369,7 @@ Since the idea is to simply print a list of target hosts, options for higher lev
(skip ping) option\&.
.RE
.PP
-\fB\-sn\fR (No port scan)
-.\" -sn .\" ping scan .\" port scan: disabling with -sn
+\fB\-sn\fR (No port scan)
.RS 4
This option tells Nmap not to do a port scan after host discovery, and only print out the available hosts that responded to the host discovery probes\&. This is often known as a
\(lqping scan\(rq, but you can also request that traceroute and NSE host scripts be run\&. This is by default one step more intrusive than the list scan, and can often be used for the same purposes\&. It allows light reconnaissance of a target network without attracting much attention\&. Knowing how many hosts are up is more valuable to attackers than the list provided by list scan of every single IP and host name\&.
@@ -425,11 +393,9 @@ In previous releases of Nmap,
\fB\-sn\fR
was known as
\fB\-sP\fR\&.
-.\" -sP
.RE
.PP
-\fB\-Pn\fR (No ping)
-.\" -Pn .\" host discovery: disabling
+\fB\-Pn\fR (No ping)
.RS 4
This option skips the Nmap discovery stage altogether\&. Normally, Nmap uses this stage to determine active machines for heavier scanning\&. By default, Nmap only performs heavy probing such as port scans, version detection, or OS detection against hosts that are found to be up\&. Disabling host discovery with
\fB\-Pn\fR
@@ -449,21 +415,16 @@ is specified) because Nmap needs MAC addresses to further scan target hosts\&. I
\fB\-Pn\fR
was
\fB\-P0\fR
-.\" -P0
and
\fB\-PN\fR\&.
-.\" -PN
.RE
.PP
-\fB\-PS \fR\fB\fIport list\fR\fR (TCP SYN Ping)
-.\" -PS .\" SYN ping
+\fB\-PS \fR\fB\fIport list\fR\fR (TCP SYN Ping)
.RS 4
This option sends an empty TCP packet with the SYN flag set\&. The default destination port is 80 (configurable at compile time by changing
\fIDEFAULT_TCP_PROBE_PORT_SPEC\fR
-.\" DEFAULT_TCP_PROBE_PORT_SPEC
in
nmap\&.h)\&.
-.\" nmap.h
Alternate ports can be specified as a parameter\&. The syntax is the same as for the
\fB\-p\fR
except that port type specifiers like
@@ -476,18 +437,14 @@ and
and the port list\&. If multiple probes are specified they will be sent in parallel\&.
.sp
The SYN flag suggests to the remote system that you are attempting to establish a connection\&. Normally the destination port will be closed, and a RST (reset) packet sent back\&. If the port happens to be open, the target will take the second step of a TCP three\-way\-handshake
-.\" three-way handshake
by responding with a SYN/ACK TCP packet\&. The machine running Nmap then tears down the nascent connection by responding with a RST rather than sending an ACK packet which would complete the three\-way\-handshake and establish a full connection\&. The RST packet is sent by the kernel of the machine running Nmap in response to the unexpected SYN/ACK, not by Nmap itself\&.
.sp
Nmap does not care whether the port is open or closed\&. Either the RST or SYN/ACK response discussed previously tell Nmap that the host is available and responsive\&.
.sp
On Unix boxes, only the privileged user
root
-.\" privileged users
is generally able to send and receive raw TCP packets\&.
-.\" raw packets
For unprivileged users, a workaround is automatically employed
-.\" unprivileged users: limitations of
whereby the
\fBconnect\fR
system call is initiated against each target port\&. This has the effect of sending a SYN packet to the target host, in an attempt to establish a connection\&. If
@@ -495,8 +452,7 @@ system call is initiated against each target port\&. This has the effect of send
returns with a quick success or an ECONNREFUSED failure, the underlying TCP stack must have received a SYN/ACK or RST and the host is marked available\&. If the connection attempt is left hanging until a timeout is reached, the host is marked as down\&.
.RE
.PP
-\fB\-PA \fR\fB\fIport list\fR\fR (TCP ACK Ping)
-.\" -PA .\" ACK ping
+\fB\-PA \fR\fB\fIport list\fR\fR (TCP ACK Ping)
.RS 4
The TCP ACK ping is quite similar to the just\-discussed SYN ping\&. The difference, as you could likely guess, is that the TCP ACK flag is set instead of the SYN flag\&. Such an ACK packet purports to be acknowledging data over an established TCP connection, but no such connection exists\&. So remote hosts should always respond with a RST packet, disclosing their existence in the process\&.
.sp
@@ -509,7 +465,6 @@ workaround discussed previously is used\&. This workaround is imperfect because
is actually sending a SYN packet rather than an ACK\&.
.sp
The reason for offering both SYN and ACK ping probes is to maximize the chances of bypassing firewalls\&. Many administrators configure routers and other simple firewalls to block incoming SYN packets except for those destined for public services like the company web site or mail server\&. This prevents other incoming connections to the organization, while allowing users to make unobstructed outgoing connections to the Internet\&. This non\-stateful approach takes up few resources on the firewall/router and is widely supported by hardware and software filters\&. The Linux Netfilter/iptables
-.\" iptables
firewall software offers the
\fB\-\-syn\fR
convenience option to implement this stateless approach\&. When stateless firewall rules such as this are in place, SYN ping probes (\fB\-PS\fR) are likely to be blocked when sent to closed target ports\&. In such cases, the ACK probe shines as it cuts right through these rules\&.
@@ -522,13 +477,12 @@ and
\fB\-PA\fR\&.
.RE
.PP
-\fB\-PU \fR\fB\fIport list\fR\fR (UDP Ping)
-.\" -PU .\" UDP ping
+\fB\-PU \fR\fB\fIport list\fR\fR (UDP Ping)
.RS 4
-.\" payloads, protocol-specific
Another host discovery option is the UDP ping, which sends a UDP packet to the given ports\&. For most ports, the packet will be empty, though some use a protocol\-specific payload that is more likely to elicit a response\&.
The payload database is described at \m[blue]\fB\%https://nmap.org/book/nmap-payloads.html\fR\m[]\&.
-.\" protocol-specific payloads: UDP\&. Packet content can also be affected with the
+
+\&. Packet content can also be affected with the
\fB\-\-data\fR,
\fB\-\-data\-string\fR, and
\fB\-\-data\-length\fR
@@ -539,13 +493,10 @@ The port list takes the same format as with the previously discussed
and
\fB\-PA\fR
options\&. If no ports are specified, the default is 40125\&.
-.\" UDP scan: default port of
This default can be configured at compile\-time by changing
\fIDEFAULT_UDP_PROBE_PORT_SPEC\fR
-.\" DEFAULT_UDP_PROBE_PORT_SPEC
in
nmap\&.h\&.
-.\" nmap.h
A highly uncommon port is used by default because sending to open ports is often undesirable for this particular scan type\&.
.sp
Upon hitting a closed port on the target machine, the UDP probe should elicit an ICMP port unreachable packet in return\&. This signifies to Nmap that the machine is up and available\&. Many other types of ICMP errors, such as host/network unreachables or TTL exceeded are indicative of a down or unreachable host\&. A lack of response is also interpreted this way\&. If an open port is reached, most services simply ignore the empty packet and fail to return any response\&. This is why the default probe port is 40125, which is highly unlikely to be in use\&. A few services, such as the Character Generator (chargen) protocol, will respond to an empty UDP packet, and thus disclose to Nmap that the machine is available\&.
@@ -553,12 +504,10 @@ Upon hitting a closed port on the target machine, the UDP probe should elicit an
The primary advantage of this scan type is that it bypasses firewalls and filters that only screen TCP\&. For example, I once owned a Linksys BEFW11S4 wireless broadband router\&. The external interface of this device filtered all TCP ports by default, but UDP probes would still elicit port unreachable messages and thus give away the device\&.
.RE
.PP
-\fB\-PY \fR\fB\fIport list\fR\fR (SCTP INIT Ping)
-.\" -PY .\" SCTP INIT ping
+\fB\-PY \fR\fB\fIport list\fR\fR (SCTP INIT Ping)
.RS 4
This option sends an SCTP packet containing a minimal INIT chunk\&. The default destination port is 80 (configurable at compile time by changing
\fIDEFAULT_SCTP_PROBE_PORT_SPEC\fR
-.\" DEFAULT_SCTP_PROBE_PORT_SPEC
in
nmap\&.h)\&. Alternate ports can be specified as a parameter\&. The syntax is the same as for the
\fB\-p\fR
@@ -572,39 +521,30 @@ and
and the port list\&. If multiple probes are specified they will be sent in parallel\&.
.sp
The INIT chunk suggests to the remote system that you are attempting to establish an association\&. Normally the destination port will be closed, and an ABORT chunk will be sent back\&. If the port happens to be open, the target will take the second step of an SCTP four\-way\-handshake
-.\" four-way handshake
by responding with an INIT\-ACK chunk\&. If the machine running Nmap has a functional SCTP stack, then it tears down the nascent association by responding with an ABORT chunk rather than sending a COOKIE\-ECHO chunk which would be the next step in the four\-way\-handshake\&. The ABORT packet is sent by the kernel of the machine running Nmap in response to the unexpected INIT\-ACK, not by Nmap itself\&.
.sp
Nmap does not care whether the port is open or closed\&. Either the ABORT or INIT\-ACK response discussed previously tell Nmap that the host is available and responsive\&.
.sp
On Unix boxes, only the privileged user
root
-.\" privileged users
is generally able to send and receive raw SCTP packets\&.
-.\" raw packets
Using SCTP INIT Pings is currently not possible for unprivileged users\&.
-.\" unprivileged users: limitations of
.RE
.PP
-\fB\-PE\fR; \fB\-PP\fR; \fB\-PM\fR (ICMP Ping Types)
-.\" -PE .\" -PP .\" -PM .\" ICMP ping
+\fB\-PE\fR; \fB\-PP\fR; \fB\-PM\fR (ICMP Ping Types)
.RS 4
In addition to the unusual TCP, UDP and SCTP host discovery types discussed previously, Nmap can send the standard packets sent by the ubiquitous
ping
program\&. Nmap sends an ICMP type 8 (echo request) packet to the target IP addresses, expecting a type 0 (echo reply) in return from available hosts\&.
-.\" ICMP echo
Unfortunately for network explorers, many hosts and firewalls now block these packets, rather than responding as required by
\m[blue]\fBRFC 1122\fR\m[]\&\s-2\u[2]\d\s+2\&.
-.\" RFC 1122
For this reason, ICMP\-only scans are rarely reliable enough against unknown targets over the Internet\&. But for system administrators monitoring an internal network, they can be a practical and efficient approach\&. Use the
\fB\-PE\fR
option to enable this echo request behavior\&.
.sp
While echo request is the standard ICMP ping query, Nmap does not stop there\&. The ICMP standards (\m[blue]\fBRFC 792\fR\m[]\&\s-2\u[3]\d\s+2
-.\" RFC 792
and
\m[blue]\fBRFC 950\fR\m[]\&\s-2\u[4]\d\s+2
-.\" RFC 950
) also specify timestamp request, information request, and address mask request packets as codes 13, 15, and 17, respectively\&. While the ostensible purpose for these queries is to learn information such as address masks and current times, they can easily be used for host discovery\&. A system that replies is up and available\&. Nmap does not currently implement information request packets, as they are not widely supported\&. RFC 1122 insists that
\(lqa host SHOULD NOT implement these messages\(rq\&. Timestamp and address mask queries can be sent with the
\fB\-PP\fR
@@ -613,15 +553,12 @@ and
options, respectively\&. A timestamp reply (ICMP code 14) or address mask reply (code 18) discloses that the host is available\&. These two queries can be valuable when administrators specifically block echo request packets while forgetting that other ICMP queries can be used for the same purpose\&.
.RE
.PP
-\fB\-PO \fR\fB\fIprotocol list\fR\fR (IP Protocol Ping)
-.\" -PO .\" IP protocol ping
+\fB\-PO \fR\fB\fIprotocol list\fR\fR (IP Protocol Ping)
.RS 4
One of the newer host discovery options is the IP protocol ping, which sends IP packets with the specified protocol number set in their IP header\&. The protocol list takes the same format as do port lists in the previously discussed TCP, UDP and SCTP host discovery options\&. If no protocols are specified, the default is to send multiple IP packets for ICMP (protocol 1), IGMP (protocol 2), and IP\-in\-IP (protocol 4)\&. The default protocols can be configured at compile\-time by changing
\fIDEFAULT_PROTO_PROBE_PORT_SPEC\fR
-.\" DEFAULT_PROTO_PROBE_PORT_SPEC
in
nmap\&.h\&. Note that for the ICMP, IGMP, TCP (protocol 6), UDP (protocol 17) and SCTP (protocol 132), the packets are sent with the proper protocol headers
-.\" protocol-specific payloads: IP
while other protocols are sent with no additional data beyond the IP header (unless any of
\fB\-\-data\fR,
\fB\-\-data\-string\fR, or
@@ -631,8 +568,7 @@ options are specified)\&.
This host discovery method looks for either responses using the same protocol as a probe, or ICMP protocol unreachable messages which signify that the given protocol isn\*(Aqt supported on the destination host\&. Either type of response signifies that the target host is alive\&.
.RE
.PP
-\fB\-PR\fR (ARP Ping)
-.\" -PR .\" ARP ping
+\fB\-PR\fR (ARP Ping)
.RS 4
One of the most common Nmap usage scenarios is to scan an ethernet LAN\&. On most LANs, especially those using private address ranges specified by
\m[blue]\fBRFC 1918\fR\m[]\&\s-2\u[5]\d\s+2, the vast majority of IP addresses are unused at any given time\&. When Nmap tries to send a raw IP packet such as an ICMP echo request, the operating system must determine the destination hardware (ARP) address corresponding to the target IP so that it can properly address the ethernet frame\&. This is often slow and problematic, since operating systems weren\*(Aqt written with the expectation that they would need to do millions of ARP requests against unavailable hosts in a short time period\&.
@@ -648,8 +584,7 @@ For IPv6 (\-6 option),
uses ICMPv6 Neighbor Discovery instead of ARP\&. Neighbor Discovery, defined in RFC 4861, can be seen as the IPv6 equivalent of ARP\&.
.RE
.PP
-\fB\-\-disable\-arp\-ping\fR (No ARP or ND Ping)
-.\" --disable-arp-ping
+\fB\-\-disable\-arp\-ping\fR (No ARP or ND Ping)
.RS 4
Nmap normally does ARP or IPv6 Neighbor Discovery (ND) discovery of locally connected ethernet hosts, even if other host discovery options such as
\fB\-Pn\fR
@@ -662,43 +597,37 @@ option\&.
The default behavior is normally faster, but this option is useful on networks using proxy ARP, in which a router speculatively replies to all ARP requests, making every target appear to be up according to ARP scan\&.
.RE
.PP
-\fB\-\-traceroute\fR (Trace path to host)
-.\" --traceroute .\" traceroute
+\fB\-\-traceroute\fR (Trace path to host)
.RS 4
Traceroutes are performed post\-scan using information from the scan results to determine the port and protocol most likely to reach the target\&. It works with all scan types except connect scans (\fB\-sT\fR) and idle scans (\fB\-sI\fR)\&. All traces use Nmap\*(Aqs dynamic timing model and are performed in parallel\&.
.sp
Traceroute works by sending packets with a low TTL (time\-to\-live) in an attempt to elicit ICMP Time Exceeded messages from intermediate hops between the scanner and the target host\&. Standard traceroute implementations start with a TTL of 1 and increment the TTL until the destination host is reached\&. Nmap\*(Aqs traceroute starts with a high TTL and then decrements the TTL until it reaches zero\&. Doing it backwards lets Nmap employ clever caching algorithms to speed up traces over multiple hosts\&. On average Nmap sends 5\(en10 fewer packets per host, depending on network conditions\&. If a single subnet is being scanned (i\&.e\&. 192\&.168\&.0\&.0/24) Nmap may only have to send two packets to most hosts\&.
.RE
.PP
-\fB\-n\fR (No DNS resolution)
-.\" -n
+\fB\-n\fR (No DNS resolution)
.RS 4
Tells Nmap to
\fInever\fR
do reverse DNS
-.\" reverse DNS: disabling with -n
+
resolution on the active IP addresses it finds\&. Since DNS can be slow even with Nmap\*(Aqs built\-in parallel stub resolver, this option can slash scanning times\&.
.RE
.PP
-\fB\-R\fR (DNS resolution for all targets)
-.\" -R
+\fB\-R\fR (DNS resolution for all targets)
.RS 4
Tells Nmap to
\fIalways\fR
do reverse DNS resolution on the target IP addresses\&. Normally reverse DNS is only performed against responsive (online) hosts\&.
.RE
.PP
-\fB\-\-system\-dns\fR (Use system DNS resolver)
-.\" --system-dns
+\fB\-\-system\-dns\fR (Use system DNS resolver)
.RS 4
By default, Nmap resolves IP addresses by sending queries directly to the name servers configured on your host and then listening for responses\&. Many requests (often dozens) are performed in parallel to improve performance\&. Specify this option to use your system resolver instead (one IP at a time via the
\fBgetnameinfo\fR
call)\&. This is slower and rarely useful unless you find a bug in the Nmap parallel resolver (please let us know if you do)\&. The system resolver is always used for IPv6 scans\&.
-.\" IPv6: limitations of
.RE
.PP
-\fB\-\-dns\-servers \fR\fB\fIserver1\fR\fR\fB[,\fIserver2\fR[,\&.\&.\&.]]\fR\fB \fR (Servers to use for reverse DNS queries)
-.\" --dns-servers
+\fB\-\-dns\-servers \fR\fB\fIserver1\fR\fR\fB[,\fIserver2\fR[,\&.\&.\&.]]\fR\fB \fR (Servers to use for reverse DNS queries)
.RS 4
By default, Nmap determines your DNS servers (for rDNS resolution) from your resolv\&.conf file (Unix) or the Registry (Win32)\&. Alternatively, you may use this option to specify alternate servers\&. This option is not honored if you are using
\fB\-\-system\-dns\fR
@@ -710,7 +639,6 @@ until you find one which works\&.
.sp
This option might not be honored if the DNS response exceeds the size of a UDP packet\&. In such a situation our DNS resolver will make the best effort to extract a response from the truncated packet, and if not successful it will fall back to using the system resolver\&. Also, responses that contain CNAME aliases will fall back to the system resolver\&.
.RE
-.\"
.SH "PORT SCANNING BASICS"
.PP
While Nmap has grown in functionality over the years, it began as an efficient port scanner, and that remains its core function\&. The simple command
@@ -731,51 +659,42 @@ filtered\&.
.PP
\fBThe six port states recognized by Nmap\fR
.PP
-open
-.\" open port state
+open
.RS 4
An application is actively accepting TCP connections, UDP datagrams or SCTP associations on this port\&. Finding these is often the primary goal of port scanning\&. Security\-minded people know that each open port is an avenue for attack\&. Attackers and pen\-testers want to exploit the open ports, while administrators try to close or protect them with firewalls without thwarting legitimate users\&. Open ports are also interesting for non\-security scans because they show services available for use on the network\&.
.RE
.PP
-closed
-.\" closed port state
+closed
.RS 4
A closed port is accessible (it receives and responds to Nmap probe packets), but there is no application listening on it\&. They can be helpful in showing that a host is up on an IP address (host discovery, or ping scanning), and as part of OS detection\&. Because closed ports are reachable, it may be worth scanning later in case some open up\&. Administrators may want to consider blocking such ports with a firewall\&. Then they would appear in the filtered state, discussed next\&.
.RE
.PP
-filtered
-.\" filtered port state
+filtered
.RS 4
Nmap cannot determine whether the port is open because packet filtering prevents its probes from reaching the port\&. The filtering could be from a dedicated firewall device, router rules, or host\-based firewall software\&. These ports frustrate attackers because they provide so little information\&. Sometimes they respond with ICMP error messages such as type 3 code 13 (destination unreachable: communication administratively prohibited), but filters that simply drop probes without responding are far more common\&. This forces Nmap to retry several times just in case the probe was dropped due to network congestion rather than filtering\&. This slows down the scan dramatically\&.
.RE
.PP
-unfiltered
-.\" unfiltered port state
+unfiltered
.RS 4
The unfiltered state means that a port is accessible, but Nmap is unable to determine whether it is open or closed\&. Only the ACK scan, which is used to map firewall rulesets, classifies ports into this state\&. Scanning unfiltered ports with other scan types such as Window scan, SYN scan, or FIN scan, may help resolve whether the port is open\&.
.RE
.PP
-open|filtered
-.\" open|filtered port state
+open|filtered
.RS 4
Nmap places ports in this state when it is unable to determine whether a port is open or filtered\&. This occurs for scan types in which open ports give no response\&. The lack of response could also mean that a packet filter dropped the probe or any response it elicited\&. So Nmap does not know for sure whether the port is open or being filtered\&. The UDP, IP protocol, FIN, NULL, and Xmas scans classify ports this way\&.
.RE
.PP
-closed|filtered
-.\" closed|filtered port state
+closed|filtered
.RS 4
This state is used when Nmap is unable to determine whether a port is closed or filtered\&. It is only used for the IP ID idle scan\&.
.RE
.SH "PORT SCANNING TECHNIQUES"
.PP
As a novice performing automotive repair, I can struggle for hours trying to fit my rudimentary tools (hammer, duct tape, wrench, etc\&.) to the task at hand\&. When I fail miserably and tow my jalopy to a real mechanic, he invariably fishes around in a huge tool chest until pulling out the perfect gizmo which makes the job seem effortless\&. The art of port scanning is similar\&. Experts understand the dozens of scan techniques and choose the appropriate one (or combination) for a given task\&. Inexperienced users and script kiddies,
-.\" script kiddies
on the other hand, try to solve every problem with the default SYN scan\&. Since Nmap is free, the only barrier to port scanning mastery is knowledge\&. That certainly beats the automotive world, where it may take great skill to determine that you need a strut spring compressor, then you still have to pay thousands of dollars for it\&.
.PP
Most of the scan types are only available to privileged users\&.
-.\" privileged users
This is because they send and receive raw packets,
-.\" raw packets
which requires root access on Unix systems\&. Using an administrator account on Windows is recommended, though Nmap sometimes works for unprivileged users on that platform when WinPcap has already been loaded into the OS\&. Requiring root privileges was a serious limitation when Nmap was released in 1997, as many users only had access to shared shell accounts\&. Now, the world is different\&. Computers are cheaper, far more people have always\-on direct Internet access, and desktop Unix systems (including Linux and Mac OS X) are prevalent\&. A Windows version of Nmap is now available, allowing it to run on even more desktops\&. For all these reasons, users have less need to run Nmap from limited shared shell accounts\&. This is fortunate, as the privileged options make Nmap far more powerful and flexible\&.
.PP
While Nmap attempts to produce accurate results, keep in mind that all of its insights are based on packets returned by the target machines (or firewalls in front of them)\&. Such hosts may be untrustworthy and send responses intended to confuse or mislead Nmap\&. Much more common are non\-RFC\-compliant hosts that do not respond as they should to Nmap probes\&. FIN, NULL, and Xmas scans are particularly susceptible to this problem\&. Such issues are specific to certain scan types and so are discussed in the individual scan type entries\&.
@@ -786,8 +705,7 @@ This section documents the dozen or so port scan techniques supported by Nmap\&.
\fIC\fR
is a prominent character in the scan name, usually the first\&. The one exception to this is the deprecated FTP bounce scan (\fB\-b\fR)\&. By default, Nmap performs a SYN Scan, though it substitutes a connect scan if the user does not have proper privileges to send raw packets (requires root access on Unix)\&. Of the scans listed in this section, unprivileged users can only execute connect and FTP bounce scans\&.
.PP
-\fB\-sS\fR (TCP SYN scan)
-.\" -sS .\" SYN scan
+\fB\-sS\fR (TCP SYN scan)
.RS 4
SYN scan is the default and most popular scan option for good reasons\&. It can be performed quickly, scanning thousands of ports per second on a fast network not hampered by restrictive firewalls\&. It is also relatively unobtrusive and stealthy since it never completes TCP connections\&. SYN scan works against any compliant TCP stack rather than depending on idiosyncrasies of specific platforms as Nmap\*(Aqs FIN/NULL/Xmas, Maimon and idle scans do\&. It also allows clear, reliable differentiation between the
open,
@@ -799,8 +717,7 @@ This technique is often referred to as half\-open scanning, because you don\*(Aq
\m[blue]\fB\%https://nmap.org/misc/split-handshake.pdf\fR\m[])\&.
.RE
.PP
-\fB\-sT\fR (TCP connect scan)
-.\" -sT .\" connect scan
+\fB\-sT\fR (TCP connect scan)
.RS 4
TCP connect scan is the default TCP scan type when SYN scan is not an option\&. This is the case when a user does not have raw packet privileges\&. Instead of writing raw packets as most other scan types do, Nmap asks the underlying operating system to establish a connection with the target machine and port by issuing the
\fBconnect\fR
@@ -811,8 +728,7 @@ When SYN scan is available, it is usually a better choice\&. Nmap has less contr
call than with raw packets, making it less efficient\&. The system call completes connections to open target ports rather than performing the half\-open reset that SYN scan does\&. Not only does this take longer and require more packets to obtain the same information, but target machines are more likely to log the connection\&. A decent IDS will catch either, but most machines have no such alarm system\&. Many services on your average Unix system will add a note to syslog, and sometimes a cryptic error message, when Nmap connects and then closes the connection without sending data\&. Truly pathetic services crash when this happens, though that is uncommon\&. An administrator who sees a bunch of connection attempts in her logs from a single system should know that she has been connect scanned\&.
.RE
.PP
-\fB\-sU\fR (UDP scans)
-.\" -sU .\" UDP scan
+\fB\-sU\fR (UDP scans)
.RS 4
While most popular services on the Internet run over the TCP protocol,
\m[blue]\fBUDP\fR\m[]\&\s-2\u[6]\d\s+2
@@ -833,7 +749,6 @@ open\&. If no response is received after retransmissions, the port is classified
open|filtered\&. This means that the port could be open, or perhaps packet filters are blocking the communication\&. Version detection (\fB\-sV\fR) can be used to help differentiate the truly open ports from the filtered ones\&.
.sp
A big challenge with UDP scanning is doing it quickly\&. Open and filtered ports rarely send any response, leaving Nmap to time out and then conduct retransmissions just in case the probe or response were lost\&. Closed ports are often an even bigger problem\&. They usually send back an ICMP port unreachable error\&. But unlike the RST packets sent by closed TCP ports in response to a SYN or connect scan, many hosts rate limit
-.\" rate limiting
ICMP port unreachable messages by default\&. Linux and Solaris are particularly strict about this\&. For example, the Linux 2\&.4\&.20 kernel limits destination unreachable messages to one per second (in
net/ipv4/icmp\&.c)\&.
.sp
@@ -842,8 +757,7 @@ Nmap detects rate limiting and slows down accordingly to avoid flooding the netw
to skip slow hosts\&.
.RE
.PP
-\fB\-sY\fR (SCTP INIT scan)
-.\" -sY .\" SCTP INIT scan
+\fB\-sY\fR (SCTP INIT scan)
.RS 4
\m[blue]\fBSCTP\fR\m[]\&\s-2\u[7]\d\s+2
is a relatively new alternative to the TCP and UDP protocols, combining most characteristics of TCP and UDP, and also adding new features like multi\-homing and multi\-streaming\&. It is mostly being used for SS7/SIGTRAN related services but has the potential to be used for other applications as well\&. SCTP INIT scan is the SCTP equivalent of a TCP SYN scan\&. It can be performed quickly, scanning thousands of ports per second on a fast network not hampered by restrictive firewalls\&. Like SYN scan, INIT scan is relatively unobtrusive and stealthy, since it never completes SCTP associations\&. It also allows clear, reliable differentiation between the
@@ -855,8 +769,7 @@ states\&.
This technique is often referred to as half\-open scanning, because you don\*(Aqt open a full SCTP association\&. You send an INIT chunk, as if you are going to open a real association and then wait for a response\&. An INIT\-ACK chunk indicates the port is listening (open), while an ABORT chunk is indicative of a non\-listener\&. If no response is received after several retransmissions, the port is marked as filtered\&. The port is also marked filtered if an ICMP unreachable error (type 3, code 0, 1, 2, 3, 9, 10, or 13) is received\&.
.RE
.PP
-\fB\-sN\fR; \fB\-sF\fR; \fB\-sX\fR (TCP NULL, FIN, and Xmas scans)
-.\" -sN .\" -sF .\" -sX .\" NULL scan .\" FIN scan .\" Xmas scan
+\fB\-sN\fR; \fB\-sF\fR; \fB\-sX\fR (TCP NULL, FIN, and Xmas scans)
.RS 4
These three scan types (even more are possible with the
\fB\-\-scanflags\fR
@@ -903,8 +816,7 @@ ones, leaving you with the response
open|filtered\&.
.RE
.PP
-\fB\-sA\fR (TCP ACK scan)
-.\" -sA .\" ACK scan
+\fB\-sA\fR (TCP ACK scan)
.RS 4
This scan is different than the others discussed so far in that it never determines
open
@@ -925,8 +837,7 @@ is undetermined\&. Ports that don\*(Aqt respond, or send certain ICMP error mess
filtered\&.
.RE
.PP
-\fB\-sW\fR (TCP Window scan)
-.\" -sW .\" window scan
+\fB\-sW\fR (TCP Window scan)
.RS 4
Window scan is exactly the same as ACK scan except that it exploits an implementation detail of certain systems to differentiate open ports from closed ones, rather than always printing
unfiltered
@@ -945,29 +856,23 @@ but a few common port numbers (such as 22, 25, 53) are
filtered, the system is most likely susceptible\&. Occasionally, systems will even show the exact opposite behavior\&. If your scan shows 1,000 open ports and three closed or filtered ports, then those three may very well be the truly open ones\&.
.RE
.PP
-\fB\-sM\fR (TCP Maimon scan)
-.\" -sM .\" Maimon scan
+\fB\-sM\fR (TCP Maimon scan)
.RS 4
The Maimon scan is named after its discoverer, Uriel Maimon\&.
-.\" Maimon, Uriel
He described the technique in
Phrack
Magazine issue #49 (November 1996)\&.
-.\" Phrack
Nmap, which included this technique, was released two issues later\&. This technique is exactly the same as NULL, FIN, and Xmas scans, except that the probe is FIN/ACK\&. According to
\m[blue]\fBRFC 793\fR\m[]\&\s-2\u[8]\d\s+2
(TCP), a RST packet should be generated in response to such a probe whether the port is open or closed\&. However, Uriel noticed that many BSD\-derived systems simply drop the packet if the port is open\&.
.RE
.PP
-\fB\-\-scanflags\fR (Custom TCP scan)
-.\" --scanflags
+\fB\-\-scanflags\fR (Custom TCP scan)
.RS 4
Truly advanced Nmap users need not limit themselves to the canned scan types offered\&. The
\fB\-\-scanflags\fR
option allows you to design your own scan by specifying arbitrary TCP flags\&.
-.\" TCP flags
Let your creative juices flow, while evading intrusion detection systems
-.\" intrusion detection systems: evading
whose vendors simply paged through the Nmap man page adding specific rules!
.sp
The
@@ -991,8 +896,7 @@ port, while a FIN scan treats the same as
open|filtered\&. Nmap will behave the same way it does for the base scan type, except that it will use the TCP flags you specify instead\&. If you don\*(Aqt specify a base type, SYN scan is used\&.
.RE
.PP
-\fB\-sZ\fR (SCTP COOKIE ECHO scan)
-.\" -sZ .\" SCTP COOKIE ECHO scan
+\fB\-sZ\fR (SCTP COOKIE ECHO scan)
.RS 4
SCTP COOKIE ECHO scan is a more advanced SCTP scan\&. It takes advantage of the fact that SCTP implementations should silently drop packets containing COOKIE ECHO chunks on open ports, but send an ABORT if the port is closed\&. The advantage of this scan type is that it is not as obvious a port scan than an INIT scan\&. Also, there may be non\-stateful firewall rulesets blocking INIT chunks, but not COOKIE ECHO chunks\&. Don\*(Aqt be fooled into thinking that this will make a port scan invisible; a good IDS will be able to detect SCTP COOKIE ECHO scans too\&. The downside is that SCTP COOKIE ECHO scans cannot differentiate between
open
@@ -1003,8 +907,7 @@ open|filtered
in both cases\&.
.RE
.PP
-\fB\-sI \fR\fB\fIzombie host\fR\fR\fB[:\fIprobeport\fR]\fR (idle scan)
-.\" -sI .\" idle scan
+\fB\-sI \fR\fB\fIzombie host\fR\fR\fB[:\fIprobeport\fR]\fR (idle scan)
.RS 4
This advanced scan method allows for a truly blind TCP port scan of the target (meaning no packets are sent to the target from your real IP address)\&. Instead, a unique side\-channel attack exploits predictable IP fragmentation ID sequence generation on the zombie host to glean information about the open ports on the target\&. IDS systems will display the scan as coming from the zombie machine you specify (which must be up and meet certain criteria)\&.
This fascinating scan type is too complex to fully describe in this reference guide, so I wrote and posted an informal paper with full details at \m[blue]\fB\%https://nmap.org/book/idlescan.html\fR\m[]\&.
@@ -1012,28 +915,23 @@ This fascinating scan type is too complex to fully describe in this reference gu
Besides being extraordinarily stealthy (due to its blind nature), this scan type permits mapping out IP\-based trust relationships between machines\&. The port listing shows open ports
\fIfrom the perspective of the zombie host\&.\fR
So you can try scanning a target using various zombies that you think might be trusted
-.\" trust relationships
(via router/packet filter rules)\&.
.sp
You can add a colon followed by a port number to the zombie host if you wish to probe a particular port on the zombie for IP ID changes\&. Otherwise Nmap will use the port it uses by default for TCP pings (80)\&.
.RE
.PP
-\fB\-sO\fR (IP protocol scan)
-.\" -sO .\" IP protocol scan
+\fB\-sO\fR (IP protocol scan)
.RS 4
IP protocol scan allows you to determine which IP protocols (TCP, ICMP, IGMP, etc\&.) are supported by target machines\&. This isn\*(Aqt technically a port scan, since it cycles through IP protocol numbers rather than TCP or UDP port numbers\&. Yet it still uses the
\fB\-p\fR
option to select scanned protocol numbers, reports its results within the normal port table format, and even uses the same underlying scan engine as the true port scanning methods\&. So it is close enough to a port scan that it belongs here\&.
.sp
Besides being useful in its own right, protocol scan demonstrates the power of open\-source software\&. While the fundamental idea is pretty simple, I had not thought to add it nor received any requests for such functionality\&. Then in the summer of 2000, Gerhard Rieger
-.\" Rieger, Gerhard
conceived the idea, wrote an excellent patch implementing it, and sent it to the
announce
mailing list
-.\" announce mailing list
(then called
nmap\-hackers)\&.
-.\" nmap-hackers mailing list
I incorporated that patch into the Nmap tree and released a new version the next day\&. Few pieces of commercial software have users enthusiastic enough to design and contribute their own improvements!
.sp
Protocol scan works in a similar fashion to UDP scan\&. Instead of iterating through the port number field of a UDP packet, it sends IP packet headers and iterates through the eight\-bit IP protocol field\&. The headers are usually empty, containing no data and not even the proper header for the claimed protocol\&. The exceptions are TCP, UDP, ICMP, SCTP, and IGMP\&. A proper protocol header for those is included since some systems won\*(Aqt send them otherwise and because Nmap already has functions to create them\&. Instead of watching for ICMP port unreachable messages, protocol scan is on the lookout for ICMP
@@ -1050,8 +948,7 @@ at the same time)\&. If no response is received after retransmissions, the proto
open|filtered
.RE
.PP
-\fB\-b \fR\fB\fIFTP relay host\fR\fR (FTP bounce scan)
-.\" -b .\" FTP bounce scan
+\fB\-b \fR\fB\fIFTP relay host\fR\fR (FTP bounce scan)
.RS 4
An interesting feature of the FTP protocol (\m[blue]\fBRFC 959\fR\m[]\&\s-2\u[9]\d\s+2) is support for so\-called proxy FTP connections\&. This allows a user to connect to one FTP server, then ask that files be sent to a third\-party server\&. Such a feature is ripe for abuse on many levels, so most servers have ceased supporting it\&. One of the abuses this feature allows is causing the FTP server to port scan other hosts\&. Simply ask the FTP server to send a file to each interesting port of a target host in turn\&. The error message will describe whether the port is open or not\&. This is a good way to bypass firewalls because organizational FTP servers are often placed where they have more access to other internal hosts than any old Internet host would\&. Nmap supports FTP bounce scan with the
\fB\-b\fR
@@ -1067,23 +964,19 @@ is used\&.
.sp
This vulnerability was widespread in 1997 when Nmap was released, but has largely been fixed\&. Vulnerable servers are still around, so it is worth trying when all else fails\&. If bypassing a firewall is your goal, scan the target network for port 21 (or even for any FTP services if you scan all ports with version detection) and use the
ftp\-bounce
-.\" ftp\-bounce script
NSE script\&. Nmap will tell you whether the host is vulnerable or not\&. If you are just trying to cover your tracks, you don\*(Aqt need to (and, in fact, shouldn\*(Aqt) limit yourself to hosts on the target network\&. Before you go scanning random Internet addresses for vulnerable FTP servers, consider that sysadmins may not appreciate you abusing their servers in this way\&.
.RE
.SH "PORT SPECIFICATION AND SCAN ORDER"
-.\" port specification
.PP
In addition to all of the scan methods discussed previously, Nmap offers options for specifying which ports are scanned and whether the scan order is randomized or sequential\&. By default, Nmap scans the most common 1,000 ports for each protocol\&.
-.\" default ports
+
.PP
-\fB\-p \fR\fB\fIport ranges\fR\fR (Only scan specified ports)
-.\" -p
+\fB\-p \fR\fB\fIport ranges\fR\fR (Only scan specified ports)
.RS 4
This option specifies which ports you want to scan and overrides the default\&. Individual port numbers are OK, as are ranges separated by a hyphen (e\&.g\&.
1\-1023)\&. The beginning and/or end values of a range may be omitted, causing Nmap to use 1 and 65535, respectively\&. So you can specify
\fB\-p\-\fR
to scan ports from 1 through 65535\&. Scanning port zero
-.\" port zero
is allowed if you specify it explicitly\&. For IP protocol scanning (\fB\-sO\fR), this option specifies the protocol numbers you wish to scan for (0\(en255)\&.
.sp
When scanning a combination of protocols (e\&.g\&. TCP and UDP), you can specify a particular protocol by preceding the port numbers by
@@ -1102,8 +995,6 @@ and at least one TCP scan type (such as
\fB\-sS\fR,
\fB\-sF\fR, or
\fB\-sT\fR)\&. If no protocol qualifier is given, the port numbers are added to all protocol lists\&.
-.\" port specification: wildcards in
-.\" wildcards
Ports can also be specified by name according to what the port is referred to in the
nmap\-services\&. You can even use the wildcards
*
@@ -1124,8 +1015,7 @@ equal to or below 1024:
if unsure\&.
.RE
.PP
-\fB\-\-exclude\-ports \fR\fB\fIport ranges\fR\fR (Exclude the specified ports from scanning)
-.\" --exclude-ports
+\fB\-\-exclude\-ports \fR\fB\fIport ranges\fR\fR (Exclude the specified ports from scanning)
.RS 4
This option specifies which ports you do want Nmap to exclude from scanning\&. The
\fIport ranges\fR
@@ -1135,8 +1025,7 @@ are specified similar to
When ports are asked to be excluded, they are excluded from all types of scans (i\&.e\&. they will not be scanned under any circumstances)\&. This also includes the discovery phase\&.
.RE
.PP
-\fB\-F\fR (Fast (limited port) scan)
-.\" -F .\" fast scan
+\fB\-F\fR (Fast (limited port) scan)
.RS 4
Specifies that you wish to scan fewer ports than the default\&. Normally Nmap scans the most common 1,000 ports for each scanned protocol\&. With
\fB\-F\fR, this is reduced to 100\&.
@@ -1150,8 +1039,7 @@ file, Nmap scans all named ports plus ports 1\-1024\&. In that case,
means to scan only ports that are named in the services file\&.
.RE
.PP
-\fB\-r\fR (Don\*(Aqt randomize ports)
-.\" -r .\" randomization of ports
+\fB\-r\fR (Don\*(Aqt randomize ports)
.RS 4
By default, Nmap randomizes the scanned port order (except that certain commonly accessible ports are moved near the beginning for efficiency reasons)\&. This randomization is normally desirable, but you can specify
\fB\-r\fR
@@ -1160,7 +1048,6 @@ for sequential (sorted from lowest to highest) port scanning instead\&.
.PP
\fB\-\-port\-ratio \fR\fB\fIratio\fR\fR\fB\fR
.RS 4
-.\" --port-ratio
Scans all ports in
nmap\-services
file with a ratio greater than the one given\&.
@@ -1170,7 +1057,6 @@ must be between 0\&.0 and 1\&.0\&.
.PP
\fB\-\-top\-ports \fR\fB\fIn\fR\fR
.RS 4
-.\" --top-ports
Scans the
\fIn\fR
highest\-ratio ports found in
@@ -1181,7 +1067,6 @@ file after excluding all ports specified by
must be 1 or greater\&.
.RE
.SH "SERVICE AND VERSION DETECTION"
-.\" version detection
.PP
Point Nmap at a remote machine and it might tell you that ports
25/tcp,
@@ -1189,21 +1074,15 @@ Point Nmap at a remote machine and it might tell you that ports
53/udp
are open\&. Using its
nmap\-services
-.\" nmap-services
database of about 2,200 well\-known services,
-.\" well-known ports
Nmap would report that those ports probably correspond to a mail server (SMTP), web server (HTTP), and name server (DNS) respectively\&. This lookup is usually accurate\(emthe vast majority of daemons listening on TCP port 25 are, in fact, mail servers\&. However, you should not bet your security on this! People can and do run services on strange ports\&.
-.\" non-standard ports
.PP
Even if Nmap is right, and the hypothetical server above is running SMTP, HTTP, and DNS servers, that is not a lot of information\&. When doing vulnerability assessments (or even simple network inventories) of your companies or clients, you really want to know which mail and DNS servers and versions are running\&. Having an accurate version number helps dramatically in determining which exploits a server is vulnerable to\&. Version detection helps you obtain this information\&.
.PP
After TCP and/or UDP ports are discovered using one of the other scan methods, version detection interrogates those ports to determine more about what is actually running\&. The
nmap\-service\-probes
-.\" nmap-service-probes
database contains probes for querying various services and match expressions to recognize and parse responses\&. Nmap tries to determine the service protocol (e\&.g\&. FTP, SSH, Telnet, HTTP), the application name (e\&.g\&. ISC BIND, Apache httpd, Solaris telnetd), the version number, hostname, device type (e\&.g\&. printer, router), the OS family (e\&.g\&. Windows, Linux)\&. When possible, Nmap also gets the Common Platform Enumeration (CPE)
-.\" Common Platform Enumeration: service
representation of this information\&. Sometimes miscellaneous details like whether an X server is open to connections, the SSH protocol version, or the KaZaA user name, are available\&. Of course, most services don\*(Aqt provide all of this information\&. If Nmap was compiled with OpenSSL support, it will connect to SSL servers to deduce the service listening behind that encryption layer\&.
-.\" SSL: in version detection
Some UDP ports are left in the
open|filtered
state after a UDP port scan is unable to determine whether the port is open or filtered\&. Version detection will try to elicit a response from these ports (just as it does with open ports), and change the state to open if it succeeds\&.
@@ -1214,31 +1093,25 @@ option enables version detection among other things\&.
A paper documenting the workings, usage, and customization of version detection is available at \m[blue]\fB\%https://nmap.org/book/vscan.html\fR\m[]\&.
.PP
When RPC services are discovered, the Nmap RPC grinder
-.\" RPC grinder
is automatically used to determine the RPC program and version numbers\&. It takes all the TCP/UDP ports detected as RPC and floods them with SunRPC program NULL commands in an attempt to determine whether they are RPC ports, and if so, what program and version number they serve up\&. Thus you can effectively obtain the same info as
\fBrpcinfo \-p\fR
even if the target\*(Aqs portmapper is behind a firewall (or protected by TCP wrappers)\&. Decoys do not currently work with RPC scan\&.
-.\" decoys: which scans use
.PP
When Nmap receives responses from a service but cannot match them to its database, it prints out a special fingerprint and a URL for you to submit if to if you know for sure what is running on the port\&. Please take a couple minutes to make the submission so that your find can benefit everyone\&. Thanks to these submissions, Nmap has about 6,500 pattern matches for more than 650 protocols such as SMTP, FTP, HTTP, etc\&.
-.\" submission of service fingerprints
.PP
Version detection is enabled and controlled with the following options:
.PP
-\fB\-sV\fR (Version detection)
-.\" -sV
+\fB\-sV\fR (Version detection)
.RS 4
Enables version detection, as discussed above\&. Alternatively, you can use
\fB\-A\fR, which enables version detection among other things\&.
.sp
\fB\-sR\fR
-.\" -sR
is an alias for
\fB\-sV\fR\&. Prior to March 2011, it was used to active the RPC grinder separately from version detection, but now these options are always combined\&.
.RE
.PP
-\fB\-\-allports\fR (Don\*(Aqt exclude any ports from version detection)
-.\" --allports
+\fB\-\-allports\fR (Don\*(Aqt exclude any ports from version detection)
.RS 4
By default, Nmap version detection skips TCP port 9100 because some printers simply print anything sent to that port, leading to dozens of pages of HTTP GET requests, binary SSL session requests, etc\&. This behavior can be changed by modifying or removing the
Exclude
@@ -1248,51 +1121,40 @@ nmap\-service\-probes, or you can specify
to scan all ports regardless of any
Exclude
directive\&.
-.\" Exclude directive (nmap-service-probes)
.RE
.PP
-\fB\-\-version\-intensity \fR\fB\fIintensity\fR\fR (Set version scan intensity)
-.\" --version-intensity
+\fB\-\-version\-intensity \fR\fB\fIintensity\fR\fR (Set version scan intensity)
.RS 4
When performing a version scan (\fB\-sV\fR), Nmap sends a series of probes, each of which is assigned a rarity value between one and nine\&. The lower\-numbered probes are effective against a wide variety of common services, while the higher\-numbered ones are rarely useful\&. The intensity level specifies which probes should be applied\&. The higher the number, the more likely it is the service will be correctly identified\&. However, high intensity scans take longer\&. The intensity must be between 0 and 9\&.
-.\" version detection: intensity
The default is 7\&.
-.\" version detection: default intensity
When a probe is registered to the target port via the
-nmap\-service\-probesports
+nmap\-service\-probes
+ports
directive, that probe is tried regardless of intensity level\&. This ensures that the DNS probes will always be attempted against any open port 53, the SSL probe will be done against 443, etc\&.
.RE
.PP
-\fB\-\-version\-light\fR (Enable light mode)
-.\" --version-light
+\fB\-\-version\-light\fR (Enable light mode)
.RS 4
This is a convenience alias for
\fB\-\-version\-intensity 2\fR\&. This light mode makes version scanning much faster, but it is slightly less likely to identify services\&.
.RE
.PP
-\fB\-\-version\-all\fR (Try every single probe)
-.\" --version-all
+\fB\-\-version\-all\fR (Try every single probe)
.RS 4
An alias for
\fB\-\-version\-intensity 9\fR, ensuring that every single probe is attempted against each port\&.
.RE
.PP
-\fB\-\-version\-trace\fR (Trace version scan activity)
-.\" --version-trace
+\fB\-\-version\-trace\fR (Trace version scan activity)
.RS 4
This causes Nmap to print out extensive debugging info about what version scanning is doing\&. It is a subset of what you get with
\fB\-\-packet\-trace\fR\&.
.RE
-.\"
.SH "OS DETECTION"
-.\" OS detection
-.\" CPE
.PP
One of Nmap\*(Aqs best\-known features is remote OS detection using TCP/IP stack fingerprinting\&. Nmap sends a series of TCP and UDP packets to the remote host and examines practically every bit in the responses\&. After performing dozens of tests such as TCP ISN sampling, TCP options support and ordering, IP ID sampling, and the initial window size check, Nmap compares the results to its
nmap\-os\-db
-.\" nmap-os-db
database of more than 2,600 known OS fingerprints and prints out the OS details if there is a match\&. Each fingerprint includes a freeform textual description of the OS, and a classification which provides the vendor name (e\&.g\&. Sun), underlying OS (e\&.g\&. Solaris), OS generation (e\&.g\&. 10), and device type (general purpose, router, switch, game console, etc)\&. Most fingerprints also have a Common Platform Enumeration (CPE)
-.\" Common Platform Enumeration: operating system
representation, like
cpe:/o:linux:linux_kernel:2\&.6\&.
.PP
@@ -1305,7 +1167,6 @@ or
\fB\-O\fR, IP ID sequence generation is also reported\&. Most machines are in the
\(lqincremental\(rq
class, which means that they increment the ID field in the IP header for each packet they send\&. This makes them vulnerable to several advanced information gathering and spoofing attacks\&.
-.\" uptime guess
.PP
Another bit of extra information enabled by OS detection is a guess at a target\*(Aqs uptime\&. This uses the TCP timestamp option (\m[blue]\fBRFC 1323\fR\m[]\&\s-2\u[10]\d\s+2) to guess when a machine was last rebooted\&. The guess can be inaccurate due to the timestamp counter not being initialized to zero or the counter overflowing and wrapping around, so it is printed only in verbose mode\&.
.PP
@@ -1313,16 +1174,14 @@ A paper documenting the workings, usage, and customization of OS detection is av
.PP
OS detection is enabled and controlled with the following options:
.PP
-\fB\-O\fR (Enable OS detection)
-.\" -O
+\fB\-O\fR (Enable OS detection)
.RS 4
Enables OS detection, as discussed above\&. Alternatively, you can use
\fB\-A\fR
to enable OS detection along with other things\&.
.RE
.PP
-\fB\-\-osscan\-limit\fR (Limit OS detection to promising targets)
-.\" --osscan-limit
+\fB\-\-osscan\-limit\fR (Limit OS detection to promising targets)
.RS 4
OS detection is far more effective if at least one open and one closed TCP port are found\&. Set this option and Nmap will not even try OS detection against hosts that do not meet this criteria\&. This can save substantial time, particularly on
\fB\-Pn\fR
@@ -1332,26 +1191,22 @@ or
\fB\-A\fR\&.
.RE
.PP
-\fB\-\-osscan\-guess\fR; \fB\-\-fuzzy\fR (Guess OS detection results)
-.\" --osscan-guess .\" --fuzzy
+\fB\-\-osscan\-guess\fR; \fB\-\-fuzzy\fR (Guess OS detection results)
.RS 4
When Nmap is unable to detect a perfect OS match, it sometimes offers up near\-matches as possibilities\&. The match has to be very close for Nmap to do this by default\&. Either of these (equivalent) options make Nmap guess more aggressively\&. Nmap will still tell you when an imperfect match is printed and display its confidence level (percentage) for each guess\&.
.RE
.PP
-\fB\-\-max\-os\-tries\fR (Set the maximum number of OS detection tries against a target)
-.\" --max-os-tries
+\fB\-\-max\-os\-tries\fR (Set the maximum number of OS detection tries against a target)
.RS 4
When Nmap performs OS detection against a target and fails to find a perfect match, it usually repeats the attempt\&. By default, Nmap tries five times if conditions are favorable for OS fingerprint submission, and twice when conditions aren\*(Aqt so good\&. Specifying a lower
\fB\-\-max\-os\-tries\fR
value (such as 1) speeds Nmap up, though you miss out on retries which could potentially identify the OS\&. Alternatively, a high value may be set to allow even more retries when conditions are favorable\&. This is rarely done, except to generate better fingerprints for submission and integration into the Nmap OS database\&.
.RE
-.\"
.SH "NMAP SCRIPTING ENGINE (NSE)"
-.\" Nmap Scripting Engine (NSE)
.PP
The Nmap Scripting Engine (NSE) is one of Nmap\*(Aqs most powerful and flexible features\&. It allows users to write (and share) simple scripts (using the
\m[blue]\fBLua programming language\fR\m[]\&\s-2\u[11]\d\s+2
-.\" Lua programming language
+
) to automate a wide variety of networking tasks\&. Those scripts are executed in parallel with the speed and efficiency you expect from Nmap\&. Users can rely on the growing and diverse set of scripts distributed with Nmap, or write their own to meet custom needs\&.
.PP
Tasks we had in mind when creating the system include network discovery, more sophisticated version detection, vulnerability detection\&. NSE can even be used for vulnerability exploitation\&.
@@ -1376,17 +1231,16 @@ Scripts are not run in a sandbox and thus could accidentally or maliciously dama
.PP
The Nmap Scripting Engine is described in detail
at \m[blue]\fB\%https://nmap.org/book/nse.html\fR\m[]
+
and is controlled by the following options:
.PP
-\fB\-sC\fR
-.\" -sC
+\fB\-sC\fR
.RS 4
Performs a script scan using the default set of scripts\&. It is equivalent to
\fB\-\-script=default\fR\&. Some of the scripts in this category are considered intrusive and should not be run against a target network without permission\&.
.RE
.PP
-\fB\-\-script \fR\fB\fIfilename\fR\fR\fB|\fR\fB\fIcategory\fR\fR\fB|\fR\fB\fIdirectory\fR\fR\fB|\fR\fB\fIexpression\fR\fR\fB[,\&.\&.\&.]\fR
-.\" --script
+\fB\-\-script \fR\fB\fIfilename\fR\fR\fB|\fR\fB\fIcategory\fR\fR\fB|\fR\fB\fIdirectory\fR\fR\fB|\fR\fB\fIexpression\fR\fR\fB[,\&.\&.\&.]\fR
.RS 4
Runs a script scan using the comma\-separated list of filenames, script categories, and directories\&. Each element in the list may also be a Boolean expression describing a more complex set of scripts\&. Each element is interpreted first as an expression, then as a category, and finally as a file or directory name\&.
.sp
@@ -1399,21 +1253,17 @@ may be used to specify every script in Nmap\*(Aqs database\&. Be cautious with t
File and directory names may be relative or absolute\&. Absolute names are used directly\&. Relative paths are looked for in the
scripts
of each of the following places until found:
-.\" data files: directory search order
-.\" scripts, location of.RS 4
+.RS 4
\fB\-\-datadir\fR
.RE
.RS 4
\fB$NMAPDIR\fR
-.\" NMAPDIR environment variable
.RE
.RS 4
~/\&.nmap (not searched on Windows)
-.\" .nmap directory
.RE
.RS 4
\fIHOME\fR\eAppData\eRoaming\enmap (only on Windows)
-.\" .nmap directory
.RE
.RS 4
the directory containing the nmap
@@ -1425,7 +1275,6 @@ executable, followed by \&.\&./share/nmap
.RE
.RS 4
\fINMAPDATADIR\fR
-.\" NMAPDATADIR
.RE
.RS 4
the current directory\&.
@@ -1435,17 +1284,14 @@ When a directory name is given, Nmap loads every file in the directory whose nam
\&.nse\&. All other files are ignored and directories are not searched recursively\&. When a filename is given, it does not have to have the
\&.nse
extension; it will be added automatically if necessary\&.
-.\" script database
-.\" scripts, location of
Nmap scripts are stored in a
scripts
subdirectory of the Nmap data directory by default
(see \m[blue]\fB\%https://nmap.org/book/data-files.html\fR\m[])\&.
+
For efficiency, scripts are indexed in a database stored in
scripts/script\&.db,
-.\" script.db
which lists the category or categories in which each script belongs\&.
-.\" wildcards: in script selection
When referring to scripts from
script\&.db
by name, you can use a shell\-style \(oq*\(cq wildcard\&.
@@ -1461,7 +1307,6 @@ http\-open\-proxy\&. The argument to
had to be in quotes to protect the wildcard from the shell\&.
.RE
.sp
-.\" Boolean expressions in script selection
More complicated script selection can be done using the
and,
or, and
@@ -1514,8 +1359,7 @@ http\-\&.
.RE
.RE
.PP
-\fB\-\-script\-args \fR\fB\fIn1\fR\fR\fB=\fR\fB\fIv1\fR\fR\fB,\fR\fB\fIn2\fR\fR\fB={\fR\fB\fIn3\fR\fR\fB=\fR\fB\fIv3\fR\fR\fB},\fR\fB\fIn4\fR\fR\fB={\fR\fB\fIv4\fR\fR\fB,\fR\fB\fIv5\fR\fR\fB}\fR
-.\" --script-args .\" script arguments
+\fB\-\-script\-args \fR\fB\fIn1\fR\fR\fB=\fR\fB\fIv1\fR\fR\fB,\fR\fB\fIn2\fR\fR\fB={\fR\fB\fIn3\fR\fR\fB=\fR\fB\fIv3\fR\fR\fB},\fR\fB\fIn4\fR\fR\fB={\fR\fB\fIv4\fR\fR\fB,\fR\fB\fIv5\fR\fR\fB}\fR
.RS 4
Lets you provide arguments to NSE scripts\&. Arguments are a comma\-separated list of
name=value
@@ -1528,15 +1372,13 @@ in this case) to affect all scripts using that argument name\&. A script will fi
lists the arguments that each script accepts\&.
.RE
.PP
-\fB\-\-script\-args\-file \fR\fB\fIfilename\fR\fR
-.\" --script-args-file .\" script arguments from file
+\fB\-\-script\-args\-file \fR\fB\fIfilename\fR\fR
.RS 4
Lets you load arguments to NSE scripts from a file\&. Any arguments on the command line supersede ones in the file\&. The file can be an absolute path, or a path relative to Nmap\*(Aqs usual search path (NMAPDIR, etc\&.) Arguments can be comma\-separated or newline\-separated, but otherwise follow the same rules as for
\fB\-\-script\-args\fR, without requiring special quoting and escaping, since they are not parsed by the shell\&.
.RE
.PP
-\fB\-\-script\-help \fR\fB\fIfilename\fR\fR\fB|\fR\fB\fIcategory\fR\fR\fB|\fR\fB\fIdirectory\fR\fR\fB|\fR\fB\fIexpression\fR\fR\fB|all\fR\fB[,\&.\&.\&.]\fR
-.\" --script-help
+\fB\-\-script\-help \fR\fB\fIfilename\fR\fR\fB|\fR\fB\fIcategory\fR\fR\fB|\fR\fB\fIdirectory\fR\fR\fB|\fR\fB\fIexpression\fR\fR\fB|all\fR\fB[,\&.\&.\&.]\fR
.RS 4
Shows help about scripts\&. For each script matching the given specification, Nmap prints the script name, its categories, and its description\&. The specifications are the same as those accepted by
\fB\-\-script\fR; so for example if you want help about the
@@ -1546,8 +1388,7 @@ script, you would run
\fBnmap \-\-script\-help default\fR\&.
.RE
.PP
-\fB\-\-script\-trace\fR
-.\" --script-trace
+\fB\-\-script\-trace\fR
.RS 4
This option does what
\fB\-\-packet\-trace\fR
@@ -1556,8 +1397,7 @@ does, just one ISO layer higher\&. If this option is specified all incoming and
enables script tracing too\&.
.RE
.PP
-\fB\-\-script\-updatedb\fR
-.\" --script-updatedb
+\fB\-\-script\-updatedb\fR
.RS 4
This option updates the script database found in
scripts/script\&.db
@@ -1566,10 +1406,7 @@ scripts
directory or if you have changed the categories of any script\&. This option is generally used by itself:
\fBnmap \-\-script\-updatedb\fR\&.
.RE
-.\"
.SH "TIMING AND PERFORMANCE"
-.\" timing
-.\" performance
.PP
One of my highest Nmap development priorities has always been performance\&. A default scan (\fBnmap \fR\fB\fIhostname\fR\fR) of a host on my local network takes a fifth of a second\&. That is barely enough time to blink, but adds up when you are scanning hundreds or thousands of hosts\&. Moreover, certain scan options such as UDP scanning and version detection can increase scan times substantially\&. So can certain firewall configurations, particularly response rate limiting\&. While Nmap utilizes parallelism and many advanced algorithms to accelerate these scans, the user has ultimate control over how Nmap runs\&. Expert users carefully craft Nmap commands to obtain only the information they care about while meeting their time constraints\&.
.PP
@@ -1586,8 +1423,7 @@ arguments
15m
all do the same thing\&.
.PP
-\fB\-\-min\-hostgroup \fR\fB\fInumhosts\fR\fR; \fB\-\-max\-hostgroup \fR\fB\fInumhosts\fR\fR (Adjust parallel scan group sizes)
-.\" --min-hostgroup .\" --max-hostgroup
+\fB\-\-min\-hostgroup \fR\fB\fInumhosts\fR\fR; \fB\-\-max\-hostgroup \fR\fB\fInumhosts\fR\fR (Adjust parallel scan group sizes)
.RS 4
Nmap has the ability to port scan or version scan multiple hosts in parallel\&. Nmap does this by dividing the target IP space into groups and then scanning one group at a time\&. In general, larger groups are more efficient\&. The downside is that host results can\*(Aqt be provided until the whole group is finished\&. So if Nmap started out with a group size of 50, the user would not receive any reports (except for the updates offered in verbose mode) until the first 50 hosts are completed\&.
.sp
@@ -1603,8 +1439,7 @@ These options do not have an effect during the host discovery phase of a scan\&.
The primary use of these options is to specify a large minimum group size so that the full scan runs more quickly\&. A common choice is 256 to scan a network in Class C sized chunks\&. For a scan with many ports, exceeding that number is unlikely to help much\&. For scans of just a few port numbers, host group sizes of 2048 or more may be helpful\&.
.RE
.PP
-\fB\-\-min\-parallelism \fR\fB\fInumprobes\fR\fR; \fB\-\-max\-parallelism \fR\fB\fInumprobes\fR\fR (Adjust probe parallelization)
-.\" --min-parallelism .\" --max-parallelism
+\fB\-\-min\-parallelism \fR\fB\fInumprobes\fR\fR; \fB\-\-max\-parallelism \fR\fB\fInumprobes\fR\fR (Adjust probe parallelization)
.RS 4
These options control the total number of probes that may be outstanding for a host group\&. They are used for port scanning and host discovery\&. By default, Nmap calculates an ever\-changing ideal parallelism based on network performance\&. If packets are being dropped, Nmap slows down and allows fewer outstanding probes\&. The ideal probe number slowly rises as the network proves itself worthy\&. These options place minimum or maximum bounds on that variable\&. By default, the ideal parallelism can drop to one if the network proves unreliable and rise to several hundred in perfect conditions\&.
.sp
@@ -1619,8 +1454,7 @@ option is sometimes set to one to prevent Nmap from sending more than one probe
option, discussed later, is another way to do this\&.
.RE
.PP
-\fB\-\-min\-rtt\-timeout \fR\fB\fItime\fR\fR, \fB\-\-max\-rtt\-timeout \fR\fB\fItime\fR\fR, \fB\-\-initial\-rtt\-timeout \fR\fB\fItime\fR\fR (Adjust probe timeouts)
-.\" --min-rtt-timeout .\" --max-rtt-timeout .\" --initial-rtt-timeout
+\fB\-\-min\-rtt\-timeout \fR\fB\fItime\fR\fR, \fB\-\-max\-rtt\-timeout \fR\fB\fItime\fR\fR, \fB\-\-initial\-rtt\-timeout \fR\fB\fItime\fR\fR (Adjust probe timeouts)
.RS 4
Nmap maintains a running timeout value for determining how long it will wait for a probe response before giving up or retransmitting the probe\&. This is calculated based on the response times of previous probes\&.
@@ -1633,7 +1467,6 @@ and
than the defaults can cut scan times significantly\&. This is particularly true for pingless (\fB\-Pn\fR) scans, and those against heavily filtered networks\&. Don\*(Aqt get too aggressive though\&. The scan can end up taking longer if you specify such a low value that many probes are timing out and retransmitting while the response is in transit\&.
.sp
If all the hosts are on a local network, 100 milliseconds (\fB\-\-max\-rtt\-timeout 100ms\fR) is a reasonable aggressive value\&. If routing is involved, ping a host on the network first with the ICMP ping utility, or with a custom packet crafter such as Nping
-.\" Nping
that is more likely to get through a firewall\&. Look at the maximum round trip time out of ten packets or so\&. You might want to double that for the
\fB\-\-initial\-rtt\-timeout\fR
and triple or quadruple it for the
@@ -1643,11 +1476,9 @@ and triple or quadruple it for the
is a rarely used option that could be useful when a network is so unreliable that even Nmap\*(Aqs default is too aggressive\&. Since Nmap only reduces the timeout down to the minimum when the network seems to be reliable, this need is unusual and should be reported as a bug to the
nmap\-dev
mailing list\&.
-.\" nmap-dev mailing list
.RE
.PP
-\fB\-\-max\-retries \fR\fB\fInumtries\fR\fR (Specify the maximum number of port scan probe retransmissions)
-.\" --max-retries
+\fB\-\-max\-retries \fR\fB\fInumtries\fR\fR (Specify the maximum number of port scan probe retransmissions)
.RS 4
When Nmap receives no response to a port scan probe, it could mean the port is filtered\&. Or maybe the probe or response was simply lost on the network\&. It is also possible that the target host has rate limiting enabled that temporarily blocked the response\&. So Nmap tries again by retransmitting the initial probe\&. If Nmap detects poor network reliability, it may try many more times before giving up on a port\&. While this benefits accuracy, it also lengthen scan times\&. When performance is critical, scans may be sped up by limiting the number of retransmissions allowed\&. You can even specify
\fB\-\-max\-retries 0\fR
@@ -1662,8 +1493,7 @@ to a low value such as three\&. Such values can substantially speed scans of slo
expire and losing all information about the target\&.
.RE
.PP
-\fB\-\-host\-timeout \fR\fB\fItime\fR\fR (Give up on slow target hosts)
-.\" --host-timeout
+\fB\-\-host\-timeout \fR\fB\fItime\fR\fR (Give up on slow target hosts)
.RS 4
Some hosts simply take a
\fIlong\fR
@@ -1674,8 +1504,7 @@ with the maximum amount of time you are willing to wait\&. For example, specify
to ensure that Nmap doesn\*(Aqt waste more than half an hour on a single host\&. Note that Nmap may be scanning other hosts at the same time during that half an hour, so it isn\*(Aqt a complete loss\&. A host that times out is skipped\&. No port table, OS detection, or version detection results are printed for that host\&.
.RE
.PP
-\fB\-\-script\-timeout \fR\fB\fItime\fR\fR
-.\" --script-timeout
+\fB\-\-script\-timeout \fR\fB\fItime\fR\fR
.RS 4
Some scripts take
\fIlong\fR
@@ -1684,11 +1513,9 @@ time before they complete their execution, this can happen due to many reasons m
with the maximum amount of time for which script should be run\&. Note that all scripts will have same timeout\&. Once script gets timed out no output for that script will be shown\&. Whether a script has timed out or not, can be seen in debug output\&.
.RE
.PP
-\fB\-\-scan\-delay \fR\fB\fItime\fR\fR; \fB\-\-max\-scan\-delay \fR\fB\fItime\fR\fR (Adjust delay between probes)
-.\" --scan-delay .\" --max-scan-delay
+\fB\-\-scan\-delay \fR\fB\fItime\fR\fR; \fB\-\-max\-scan\-delay \fR\fB\fItime\fR\fR (Adjust delay between probes)
.RS 4
This option causes Nmap to wait at least the given amount of time between each probe it sends to a given host\&. This is particularly useful in the case of rate limiting\&.
-.\" rate limiting
Solaris machines (among many others) will usually respond to UDP scan probe packets with only one ICMP message per second\&. Any more than that sent by Nmap will be wasteful\&. A
\fB\-\-scan\-delay\fR
of
@@ -1704,11 +1531,9 @@ can speed up Nmap, but it is risky\&. Setting this value too low can lead to was
Another use of
\fB\-\-scan\-delay\fR
is to evade threshold based intrusion detection and prevention systems (IDS/IPS)\&.
-.\" intrusion detection systems: evading
.RE
.PP
-\fB\-\-min\-rate \fR\fB\fInumber\fR\fR; \fB\-\-max\-rate \fR\fB\fInumber\fR\fR (Directly control the scanning rate)
-.\" --min-rate .\" --max-rate
+\fB\-\-min\-rate \fR\fB\fInumber\fR\fR; \fB\-\-max\-rate \fR\fB\fInumber\fR\fR (Directly control the scanning rate)
.RS 4
Nmap\*(Aqs dynamic timing does a good job of finding an appropriate speed at which to scan\&. Sometimes, however, you may happen to know an appropriate scanning rate for a network, or you may have to guarantee that a scan will be finished by a certain time\&. Or perhaps you must keep Nmap from scanning too quickly\&. The
\fB\-\-min\-rate\fR
@@ -1740,17 +1565,16 @@ There are two conditions when the actual scanning rate may fall below the reques
Specifying a minimum rate should be done with care\&. Scanning faster than a network can support may lead to a loss of accuracy\&. In some cases, using a faster rate can make a scan take
\fIlonger\fR
than it would with a slower rate\&. This is because Nmap\*(Aqs
+
adaptive retransmission
algorithms will detect the network congestion caused by an excessive scanning rate and increase the number of retransmissions in order to improve accuracy\&. So even though packets are sent at a higher rate, more packets are sent overall\&. Cap the number of retransmissions with the
\fB\-\-max\-retries\fR
option if you need to set an upper limit on total scan time\&.
.RE
.PP
-\fB\-\-defeat\-rst\-ratelimit\fR
-.\" --defeat-rst-ratelimit
+\fB\-\-defeat\-rst\-ratelimit\fR
.RS 4
Many hosts have long used rate limiting
-.\" rate limiting
to reduce the number of ICMP error messages (such as port\-unreachable errors) they send\&. Some systems now apply similar rate limits to the RST (reset) packets they generate\&. This can slow Nmap down dramatically as it adjusts its timing to reflect those rate limits\&. You can tell Nmap to ignore those rate limits (for port scans such as SYN scan which
\fIdon\*(Aqt\fR
treat non\-responsive ports as
@@ -1768,8 +1592,7 @@ filtered
ports isn\*(Aqt worth the extra time\&.
.RE
.PP
-\fB\-\-defeat\-icmp\-ratelimit\fR
-.\" --defeat-icmp-ratelimit
+\fB\-\-defeat\-icmp\-ratelimit\fR
.RS 4
Similar to
\fB\-\-defeat\-rst\-ratelimit\fR, the
@@ -1782,8 +1605,7 @@ open\&. Since many UDP services do not respond in this way, the chance for inacc
\fB\-\-defeat\-rst\-ratelimit\fR\&.
.RE
.PP
-\fB\-\-nsock\-engine epoll|kqueue|poll|select\fR
-.\" --nsock-engine .\" Nsock IO engine
+\fB\-\-nsock\-engine epoll|kqueue|poll|select\fR
.RS 4
Enforce use of a given nsock IO multiplexing engine\&. Only the
select(2)\-based fallback engine is guaranteed to be available on your system\&. Engines are named after the name of the IO management facility they leverage\&. Engines currently implemented are
@@ -1795,15 +1617,8 @@ select, but not all will be present on any platform\&. Use
to see which engines are supported\&.
.RE
.PP
-\fB\-T paranoid|sneaky|polite|normal|aggressive|insane\fR (Set a timing template)
-.\" -T .\" timing templates
+\fB\-T paranoid|sneaky|polite|normal|aggressive|insane\fR (Set a timing template)
.RS 4
-.\" -T0
-.\" -T1
-.\" -T2
-.\" -T3
-.\" -T4
-.\" -T5
While the fine\-grained timing controls discussed in the previous section are powerful and effective, some people find them confusing\&. Moreover, choosing the appropriate values can sometimes take more time than the scan you are trying to optimize\&. So Nmap offers a simpler approach, with six timing templates\&. You can specify them with the
\fB\-T\fR
option and their number (0\(en5) or their name\&. The template names are
@@ -1815,12 +1630,10 @@ option and their number (0\(en5) or their name\&. The template names are
\fBinsane\fR\ \&(\fB5\fR)\&. The first two are for IDS evasion\&. Polite mode slows down the scan to use less bandwidth and target machine resources\&. Normal mode is the default and so
\fB\-T3\fR
does nothing\&. Aggressive mode speeds scans up by making the assumption that you are on a reasonably fast and reliable network\&. Finally insane mode
-.\" insane (-T5) timing template
assumes that you are on an extraordinarily fast network or are willing to sacrifice some accuracy for speed\&.
.sp
These templates allow the user to specify how aggressive they wish to be, while leaving Nmap to pick the exact timing values\&. The templates also make some minor speed adjustments for which fine\-grained control options do not currently exist\&. For example,
\fB\-T4\fR
-.\" aggressive (-T4) timing template
prohibits the dynamic scan delay from exceeding 10\ \&ms for TCP ports and
\fB\-T5\fR
caps that value at 5\ \&ms\&. Templates can be used in combination with fine\-grained controls, and the fine\-grained controls will you specify will take precedence over the timing template default for that parameter\&. I recommend using
@@ -1834,15 +1647,12 @@ though it is too aggressive for my taste\&. People sometimes specify
\fB\-T2\fR
because they think it is less likely to crash hosts or because they consider themselves to be polite in general\&. They often don\*(Aqt realize just how slow
\fB\-T polite\fR
-.\" polite (-T2) timing template
really is\&. Their scan may take ten times longer than a default scan\&. Machine crashes and bandwidth problems are rare with the default timing options (\fB\-T3\fR) and so I normally recommend that for cautious scanners\&. Omitting version detection is far more effective than playing with timing values at reducing these problems\&.
.sp
While
\fB\-T0\fR
-.\" paranoid (-T0) timing template
and
\fB\-T1\fR
-.\" sneaky (-T1) timing template
may be useful for avoiding IDS alerts, they will take an extraordinarily long time to scan thousands of machines or ports\&. For such a long scan, you may prefer to set the exact timing values you need rather than rely on the canned
\fB\-T0\fR
and
@@ -1857,7 +1667,6 @@ and
\fBT2\fR
are similar but they only wait 15 seconds and 0\&.4 seconds, respectively, between probes\&.
\fBT3\fR
-.\" normal (-T3) timing template
is Nmap\*(Aqs default behavior, which includes parallelization\&.
\fB\-T4\fR
does the equivalent of
@@ -1868,11 +1677,7 @@ does the equivalent of
\fB\-\-max\-rtt\-timeout 300ms \-\-min\-rtt\-timeout 50ms \-\-initial\-rtt\-timeout 250ms \-\-max\-retries 2 \-\-host\-timeout 15m\fR
as well as setting the maximum TCP scan delay to 5\ \&ms\&.
.RE
-.\"
-.\"
.SH "FIREWALL/IDS EVASION AND SPOOFING"
-.\" firewalls: bypassing
-.\" intrusion detection systems: evading
.PP
Many Internet pioneers envisioned a global open network with a universal IP address space allowing virtual connections between any two nodes\&. This allows hosts to act as true peers, serving and retrieving information from each other\&. People could access all of their home systems from work, changing the climate control settings or unlocking the doors for early guests\&. This vision of universal connectivity has been stifled by address space shortages and security concerns\&. In the early 1990s, organizations began deploying firewalls for the express purpose of reducing connectivity\&. Huge networks were cordoned off from the unfiltered Internet by application proxies, network address translation, and packet filters\&. The unrestricted flow of information gave way to tight regulation of approved communication channels and the content that passes over them\&.
.PP
@@ -1881,22 +1686,19 @@ Network obstructions such as firewalls can make mapping a network exceedingly di
In addition to restricting network activity, companies are increasingly monitoring traffic with intrusion detection systems (IDS)\&. All of the major IDSs ship with rules designed to detect Nmap scans because scans are sometimes a precursor to attacks\&. Many of these products have recently morphed into intrusion
\fIprevention\fR
systems (IPS)
-.\" intrusion prevention systems
that actively block traffic deemed malicious\&. Unfortunately for network administrators and IDS vendors, reliably detecting bad intentions by analyzing packet data is a tough problem\&. Attackers with patience, skill, and the help of certain Nmap options can usually pass by IDSs undetected\&. Meanwhile, administrators must cope with large numbers of false positive results where innocent activity is misdiagnosed and alerted on or blocked\&.
.PP
Occasionally people suggest that Nmap should not offer features for evading firewall rules or sneaking past IDSs\&. They argue that these features are just as likely to be misused by attackers as used by administrators to enhance security\&. The problem with this logic is that these methods would still be used by attackers, who would just find other tools or patch the functionality into Nmap\&. Meanwhile, administrators would find it that much harder to do their jobs\&. Deploying only modern, patched FTP servers is a far more powerful defense than trying to prevent the distribution of tools implementing the FTP bounce attack\&.
.PP
There is no magic bullet (or Nmap option) for detecting and subverting firewalls and IDS systems\&. It takes skill and experience\&. A tutorial is beyond the scope of this reference guide, which only lists the relevant options and describes what they do\&.
.PP
-\fB\-f\fR (fragment packets); \fB\-\-mtu\fR (using the specified MTU)
-.\" -f .\" --mtu
+\fB\-f\fR (fragment packets); \fB\-\-mtu\fR (using the specified MTU)
.RS 4
The
\fB\-f\fR
option causes the requested scan (including ping scans) to use tiny fragmented IP packets\&. The idea is to split up the TCP header over several packets to make it harder for packet filters, intrusion detection systems, and other annoyances to detect what you are doing\&. Be careful with this! Some programs have trouble handling these tiny packets\&. The old\-school sniffer named Sniffit segmentation faulted immediately upon receiving the first fragment\&. Specify this option once, and Nmap splits the packets into eight bytes or less after the IP header\&. So a 20\-byte TCP header would be split into three packets\&. Two with eight bytes of the TCP header, and one with the final four\&. Of course each fragment also has an IP header\&. Specify
\fB\-f\fR
again to use 16 bytes per fragment (reducing the number of fragments)\&.
-.\" -f: giving twice
Or you can specify your own offset size with the
\fB\-\-mtu\fR
option\&. Don\*(Aqt also specify
@@ -1905,36 +1707,28 @@ if you use
\fB\-\-mtu\fR\&. The offset must be a multiple of eight\&. While fragmented packets won\*(Aqt get by packet filters and firewalls that queue all IP fragments, such as the
\fICONFIG_IP_ALWAYS_DEFRAG\fR
option in the Linux kernel, some networks can\*(Aqt afford the performance hit this causes and thus leave it disabled\&. Others can\*(Aqt enable this because fragments may take different routes into their networks\&. Some source systems defragment outgoing packets in the kernel\&. Linux with the iptables
-.\" iptables
connection tracking module is one such example\&. Do a scan while a sniffer such as
Wireshark
-.\" Wireshark
is running to ensure that sent packets are fragmented\&. If your host OS is causing problems, try the
\fB\-\-send\-eth\fR
-.\" --send-eth
option to bypass the IP layer and send raw ethernet frames\&.
.sp
Fragmentation is only supported for Nmap\*(Aqs raw packet features, which includes TCP and UDP port scans (except connect scan and FTP bounce scan) and OS detection\&. Features such as version detection and the Nmap Scripting Engine generally don\*(Aqt support fragmentation because they rely on your host\*(Aqs TCP stack to communicate with target services\&.
.RE
.PP
-\fB\-D \fR\fB\fIdecoy1\fR\fR\fB[,\fIdecoy2\fR]\fR\fB[,ME]\fR\fB[,\&.\&.\&.]\fR (Cloak a scan with decoys)
-.\" -D .\" decoys
+\fB\-D \fR\fB\fIdecoy1\fR\fR\fB[,\fIdecoy2\fR]\fR\fB[,ME]\fR\fB[,\&.\&.\&.]\fR (Cloak a scan with decoys)
.RS 4
Causes a decoy scan to be performed, which makes it appear to the remote host that the host(s) you specify as decoys are scanning the target network too\&. Thus their IDS might report 5\(en10 port scans from unique IP addresses, but they won\*(Aqt know which IP was scanning them and which were innocent decoys\&. While this can be defeated through router path tracing, response\-dropping, and other active mechanisms, it is generally an effective technique for hiding your IP address\&.
.sp
Separate each decoy host with commas, and you can optionally use
ME
-.\" ME (decoy address)
as one of the decoys to represent the position for your real IP address\&. If you put
ME
in the sixth position or later, some common port scan detectors (such as Solar Designer\*(Aqs
-.\" Solar Designer
excellent Scanlogd)
-.\" Scanlogd
are unlikely to show your IP address at all\&. If you don\*(Aqt use
ME, Nmap will put you in a random position\&. You can also use
RND
-.\" RND (decoy address)
to generate a random, non\-reserved IP address, or
RND:\fInumber\fR
to generate
@@ -1948,8 +1742,7 @@ Decoys are used both in the initial ping scan (using ICMP, SYN, ACK, or whatever
It is worth noting that using too many decoys may slow your scan and potentially even make it less accurate\&. Also, some ISPs will filter out your spoofed packets, but many do not restrict spoofed IP packets at all\&.
.RE
.PP
-\fB\-S \fR\fB\fIIP_Address\fR\fR (Spoof source address)
-.\" -S .\" spoofing source address
+\fB\-S \fR\fB\fIIP_Address\fR\fR (Spoof source address)
.RS 4
In some circumstances, Nmap may not be able to determine your source address (Nmap will tell you if this is the case)\&. In this situation, use
\fB\-S\fR
@@ -1964,14 +1757,12 @@ option and
are generally required for this sort of usage\&. Note that you usually won\*(Aqt receive reply packets back (they will be addressed to the IP you are spoofing), so Nmap won\*(Aqt produce useful reports\&.
.RE
.PP
-\fB\-e \fR\fB\fIinterface\fR\fR (Use specified interface)
-.\" -e .\" interface
+\fB\-e \fR\fB\fIinterface\fR\fR (Use specified interface)
.RS 4
Tells Nmap what interface to send and receive packets on\&. Nmap should be able to detect this automatically, but it will tell you if it cannot\&.
.RE
.PP
-\fB\-\-source\-port \fR\fB\fIportnumber\fR\fR\fB;\fR \fB\-g \fR\fB\fIportnumber\fR\fR (Spoof source port number)
-.\" --source-port .\" -g .\" source port number
+\fB\-\-source\-port \fR\fB\fIportnumber\fR\fR\fB;\fR \fB\-g \fR\fB\fIportnumber\fR\fR (Spoof source port number)
.RS 4
One surprisingly common misconfiguration is to trust traffic based only on the source port number\&. It is easy to understand how this comes about\&. An administrator will set up a shiny new firewall, only to be flooded with complaints from ungrateful users whose applications stopped working\&. In particular, DNS may be broken because the UDP DNS replies from external servers can no longer enter the network\&. FTP is another common example\&. In active FTP transfers, the remote server tries to establish a connection back to the client to transfer the requested file\&.
.sp
@@ -1986,12 +1777,10 @@ and
options (they are equivalent) to exploit these weaknesses\&. Simply provide a port number and Nmap will send packets from that port where possible\&. Most scanning operations that use raw sockets, including SYN and UDP scans, support the option completely\&. The option notably doesn\*(Aqt have an effect for any operations that use normal operating system sockets, including DNS requests, TCP
\fBconnect\fR
scan,
-.\" connect scan
version detection, and script scanning\&. Setting the source port also doesn\*(Aqt work for OS detection, because Nmap must use different port numbers for certain OS detection tests to work properly\&.
.RE
.PP
-\fB\-\-data \fR\fB\fIhex string\fR\fR (Append custom binary data to sent packets)
-.\" --data
+\fB\-\-data \fR\fB\fIhex string\fR\fR (Append custom binary data to sent packets)
.RS 4
This option lets you include binary data as payload in sent packets\&.
\fIhex string\fR
@@ -2007,8 +1796,7 @@ and
no byte\-order conversion is performed\&. Make sure you specify the information in the byte order expected by the receiver\&.
.RE
.PP
-\fB\-\-data\-string \fR\fB\fIstring\fR\fR (Append custom string to sent packets)
-.\" --data-string
+\fB\-\-data\-string \fR\fB\fIstring\fR\fR (Append custom string to sent packets)
.RS 4
This option lets you include a regular string as payload in sent packets\&.
\fIstring\fR
@@ -2018,24 +1806,18 @@ or
\fB\-\-data\-string "Ph34r my l33t skills"\fR\&. Keep in mind that nobody is likely to actually see any comments left by this option unless they are carefully monitoring the network with a sniffer or custom IDS rules\&.
.RE
.PP
-\fB\-\-data\-length \fR\fB\fInumber\fR\fR (Append random data to sent packets)
-.\" --data-length
+\fB\-\-data\-length \fR\fB\fInumber\fR\fR (Append random data to sent packets)
.RS 4
Normally Nmap sends minimalist packets containing only a header\&. So its TCP packets are generally 40 bytes and ICMP echo requests are just 28\&. Some UDP ports
-.\" protocol-specific payloads: UDP
and IP protocols
-.\" protocol-specific payloads: IP
get a custom payload by default\&. This option tells Nmap to append the given number of random bytes to most of the packets it sends, and not to use any protocol\-specific payloads\&. (Use
\fB\-\-data\-length 0\fR
for no random or protocol\-specific payloads\&.
-.\" protocol-specific payloads: disabling with --data-length
OS detection (\fB\-O\fR) packets are not affected
-.\" --data-length: no effect in OS detection
because accuracy there requires probe consistency, but most pinging and portscan packets support this\&. It slows things down a little, but can make a scan slightly less conspicuous\&.
.RE
.PP
-\fB\-\-ip\-options \fR\fB\fIS|R [route]|L [route]|T|U \&.\&.\&. \fR\fR\fB;\fR \fB\-\-ip\-options \fR\fB\fIhex string\fR\fR (Send packets with specified ip options)
-.\" --ip-options .\" IP options
+\fB\-\-ip\-options \fR\fB\fIS|R [route]|L [route]|T|U \&.\&.\&. \fR\fR\fB;\fR \fB\-\-ip\-options \fR\fB\fIhex string\fR\fR (Send packets with specified ip options)
.RS 4
The
\m[blue]\fBIP protocol\fR\m[]\&\s-2\u[13]\d\s+2
@@ -2053,11 +1835,8 @@ R,
T, or
U
to request record\-route,
-.\" record route IP option
record\-timestamp,
-.\" record timestamp IP option
or both options together, respectively\&. Loose or strict source routing
-.\" source routing
may be specified with an
L
or
@@ -2069,39 +1848,31 @@ If you wish to see the options in packets sent and received, specify
\m[blue]\fB\%http://seclists.org/nmap-dev/2006/q3/52\fR\m[]\&.
.RE
.PP
-\fB\-\-ttl \fR\fB\fIvalue\fR\fR (Set IP time\-to\-live field)
-.\" --ttl .\" time to live (TTL)
+\fB\-\-ttl \fR\fB\fIvalue\fR\fR (Set IP time\-to\-live field)
.RS 4
Sets the IPv4 time\-to\-live field in sent packets to the given value\&.
.RE
.PP
-\fB\-\-randomize\-hosts\fR (Randomize target host order)
-.\" --randomize-hosts .\" randomization of hosts
+\fB\-\-randomize\-hosts\fR (Randomize target host order)
.RS 4
Tells Nmap to shuffle each group of up to 16384 hosts before it scans them\&. This can make the scans less obvious to various network monitoring systems, especially when you combine it with slow timing options\&. If you want to randomize over larger group sizes, increase
\fIPING_GROUP_SZ\fR
-.\" PING_GROUP_SZ
in
nmap\&.h
-.\" nmap.h
and recompile\&. An alternative solution is to generate the target IP list with a list scan (\fB\-sL \-n \-oN \fR\fB\fIfilename\fR\fR), randomize it with a Perl script, then provide the whole list to Nmap with
\fB\-iL\fR\&.
-.\" -iL: randomizing hosts with
.RE
.PP
-\fB\-\-spoof\-mac \fR\fB\fIMAC address, prefix, or vendor name\fR\fR (Spoof MAC address)
-.\" --spoof-mac .\" spoofing MAC address
+\fB\-\-spoof\-mac \fR\fB\fIMAC address, prefix, or vendor name\fR\fR (Spoof MAC address)
.RS 4
Asks Nmap to use the given MAC address
-.\" MAC address
+
for all of the raw ethernet frames it sends\&. This option implies
\fB\-\-send\-eth\fR
-.\" --send-eth: implied by --spoof-mac
to ensure that Nmap actually sends ethernet\-level packets\&. The MAC given can take several formats\&. If it is simply the number
0, Nmap chooses a completely random MAC address for the session\&. If the given string is an even number of hex digits (with the pairs optionally separated by a colon), Nmap will use those as the MAC\&. If fewer than 12 hex digits are provided, Nmap fills in the remainder of the six bytes with random values\&. If the argument isn\*(Aqt a zero or hex string, Nmap looks through
nmap\-mac\-prefixes
to find a vendor name containing the given string (it is case insensitive)\&. If a match is found, Nmap uses the vendor\*(Aqs OUI (three\-byte prefix)
-.\" organizationally unique identifier (OUI)
and fills out the remaining three bytes randomly\&. Valid
\fB\-\-spoof\-mac\fR
argument examples are
@@ -2113,11 +1884,10 @@ deadbeefcafe,
Cisco\&. This option only affects raw packet scans such as SYN scan or OS detection, not connection\-oriented features such as version detection or the Nmap Scripting Engine\&.
.RE
.PP
-\fB\-\-proxies \fR\fB\fIComma\-separated list of proxy URLs\fR\fR (Relay TCP connections through a chain of proxies)
-.\" --proxies .\" proxy .\" proxies
+\fB\-\-proxies \fR\fB\fIComma\-separated list of proxy URLs\fR\fR (Relay TCP connections through a chain of proxies)
.RS 4
Asks Nmap to establish TCP connections with a final target through supplied chain of one or more HTTP or SOCKS4
-.\" proxies
+
proxies\&. Proxies can help hide the true source of a scan or evade certain firewall restrictions, but they can hamper scan performance by increasing latency\&. Users may need to adjust Nmap timeouts and other scan parameters accordingly\&. In particular, a lower
\fB\-\-max\-parallelism\fR
may help because some proxies refuse to handle as many concurrent connections as Nmap opens by default\&.
@@ -2131,15 +1901,13 @@ SOCKS4\&.
Warning: this feature is still under development and has limitations\&. It is implemented within the nsock library and thus has no effect on the ping, port scanning and OS discovery phases of a scan\&. Only NSE and version scan benefit from this option so far\(emother features may disclose your true address\&. SSL connections are not yet supported, nor is proxy\-side DNS resolution (hostnames are always resolved by Nmap)\&.
.RE
.PP
-\fB\-\-badsum\fR (Send packets with bogus TCP/UDP checksums)
-.\" --badsum .\" TCP checksum .\" checksums
+\fB\-\-badsum\fR (Send packets with bogus TCP/UDP checksums)
.RS 4
Asks Nmap to use an invalid TCP, UDP or SCTP checksum for packets sent to target hosts\&. Since virtually all host IP stacks properly drop these packets, any responses received are likely coming from a firewall or IDS that didn\*(Aqt bother to verify the checksum\&. For more details on this technique, see
\m[blue]\fB\%https://nmap.org/p60-12.html\fR\m[]
.RE
.PP
-\fB\-\-adler32\fR (Use deprecated Adler32 instead of CRC32C for SCTP checksums)
-.\" --adler32 .\" CRC32C checksum .\" Adler32 checksum .\" SCTP checksum
+\fB\-\-adler32\fR (Use deprecated Adler32 instead of CRC32C for SCTP checksums)
.RS 4
Asks Nmap to use the deprecated Adler32 algorithm for calculating the SCTP checksum\&. If
\fB\-\-adler32\fR
@@ -2149,10 +1917,7 @@ originally defined Adler32 as checksum algorithm for SCTP;
\m[blue]\fBRFC 4960\fR\m[]\&\s-2\u[7]\d\s+2
later redefined the SCTP checksums to use CRC\-32C\&. Current SCTP implementations should be using CRC\-32C, but in order to elicit responses from old, legacy SCTP implementations, it may be preferable to use Adler32\&.
.RE
-.\"
-.\"
.SH "OUTPUT"
-.\" output formats
.PP
Any security tool is only as useful as the output it generates\&. Complex tests and algorithms are of little value if they aren\*(Aqt presented in an organized and comprehensible fashion\&. Given the number of ways Nmap is used by people and other software, no single format can please everyone\&. So Nmap offers several formats, including the interactive mode for humans to read directly and XML for easy parsing by software\&.
.PP
@@ -2160,24 +1925,18 @@ In addition to offering different output formats, Nmap provides options for cont
.PP
Nmap makes output available in five different formats\&. The default is called
interactive output,
-.\" interactive output
and it is sent to standard output (stdout)\&.
-.\" standard output
There is also
normal output,
-.\" normal output
which is similar to interactive except that it displays less runtime information and warnings since it is expected to be analyzed after the scan completes rather than interactively\&.
.PP
XML output
-.\" XML output
is one of the most important output types, as it can be converted to HTML, easily parsed by programs such as Nmap graphical user interfaces, or imported into databases\&.
.PP
The two remaining output types are the simple
grepable output
-.\" grepable output
which includes most information for a target host on a single line, and
sCRiPt KiDDi3 0utPUt
-.\" scR1pT kIddI3 output
for users who consider themselves |<\-r4d\&.
.PP
While interactive output is the default and has no associated command\-line options, the other four format options use the same syntax\&. They take one argument, which is the filename that results should be stored in\&. Multiple formats may be specified, but each format may only be specified once\&. For example, you may wish to save normal output for your own review while saving XML of the same scan for programmatic analysis\&. You might do this with the options
@@ -2194,9 +1953,7 @@ and fills standard output with the same interactive results it would have printe
wasn\*(Aqt specified at all\&. You can change this by passing a hyphen character as the argument to one of the format types\&. This causes Nmap to deactivate interactive output, and instead print results in the format you specified to the standard output stream\&. So the command
\fBnmap \-oX \- target\fR
will send only XML output to stdout\&.
-.\" output: to stdout with -
Serious errors may still be printed to the normal error stream, stderr\&.
-.\" standard error
.PP
Unlike some Nmap arguments, the space between the logfile option flag (such as
\fB\-oX\fR) and the filename or hyphen is mandatory\&. If you omit the flags and give arguments such as
@@ -2212,7 +1969,6 @@ respectively\&.
.PP
All of these arguments support
\fBstrftime\fR\-like
-.\" strftime conversions in filenames
conversions in the filename\&.
%H,
%M,
@@ -2243,25 +1999,21 @@ Nmap also offers options to control scan verbosity and to append to output files
.PP
\fBNmap Output Formats\fR
.PP
-\fB\-oN \fR\fB\fIfilespec\fR\fR (normal output)
-.\" -oN .\" normal output
+\fB\-oN \fR\fB\fIfilespec\fR\fR (normal output)
.RS 4
Requests that normal output be directed to the given filename\&. As discussed above, this differs slightly from
interactive output\&.
.RE
.PP
-\fB\-oX \fR\fB\fIfilespec\fR\fR (XML output)
-.\" -oX .\" XML output
+\fB\-oX \fR\fB\fIfilespec\fR\fR (XML output)
.RS 4
Requests that XML output be directed to the given filename\&. Nmap includes a document type definition (DTD) which allows XML parsers to validate Nmap XML output\&. While it is primarily intended for programmatic use, it can also help humans interpret Nmap XML output\&. The DTD defines the legal elements of the format, and often enumerates the attributes and values they can take on\&. The latest version is always available from
\m[blue]\fB\%https://svn.nmap.org/nmap/docs/nmap.dtd\fR\m[]\&.
.sp
XML offers a stable format that is easily parsed by software\&. Free XML parsers are available for all major computer languages, including C/C++, Perl, Python, and Java\&. People have even written bindings for most of these languages to handle Nmap output and execution specifically\&. Examples are
\m[blue]\fBNmap::Scanner\fR\m[]\&\s-2\u[15]\d\s+2
-.\" Nmap::Scanner
and
\m[blue]\fBNmap::Parser\fR\m[]\&\s-2\u[16]\d\s+2
-.\" Nmap::Parser
in Perl CPAN\&. In almost all cases that a non\-trivial application interfaces with Nmap, XML is the preferred format\&.
.sp
The XML output references an XSL stylesheet which can be used to format the results as HTML\&. The easiest way to use this is simply to load the XML output in a web browser such as Firefox or IE\&. By default, this will only work on the machine you ran Nmap on (or a similarly configured one) due to the hard\-coded
@@ -2273,22 +2025,19 @@ or
options to create portable XML files that render as HTML on any web\-connected machine\&.
.RE
.PP
-\fB\-oS \fR\fB\fIfilespec\fR\fR (ScRipT KIdd|3 oUTpuT)
-.\" -oS .\" scR1pT kIddI3 output
+\fB\-oS \fR\fB\fIfilespec\fR\fR (ScRipT KIdd|3 oUTpuT)
.RS 4
Script kiddie output is like interactive output, except that it is post\-processed to better suit the l33t HaXXorZ who previously looked down on Nmap due to its consistent capitalization and spelling\&. Humor impaired people should note that this option is making fun of the script kiddies before flaming me for supposedly
\(lqhelping them\(rq\&.
.RE
.PP
-\fB\-oG \fR\fB\fIfilespec\fR\fR (grepable output)
-.\" -oG .\" grepable output
+\fB\-oG \fR\fB\fIfilespec\fR\fR (grepable output)
.RS 4
This output format is covered last because it is deprecated\&. The XML output format is far more powerful, and is nearly as convenient for experienced users\&. XML is a standard for which dozens of excellent parsers are available, while grepable output is my own simple hack\&. XML is extensible to support new Nmap features as they are released, while I often must omit those features from grepable output for lack of a place to put them\&.
.sp
Nevertheless, grepable output is still quite popular\&. It is a simple format that lists each host on one line and can be trivially searched and parsed with standard Unix tools such as grep, awk, cut, sed, diff, and Perl\&. Even I usually use it for one\-off tests done at the command line\&. Finding all the hosts with the SSH port open or that are running Solaris takes only a simple grep to identify the hosts, piped to an awk or cut command to print the desired fields\&.
.sp
Grepable output consists of comments (lines starting with a pound (#))
-.\" grepable output: comments in
and target lines\&. A target line includes a combination of six labeled fields, separated by tabs and followed with a colon\&. The fields are
Host,
Ports,
@@ -2313,8 +2062,7 @@ As with XML output, this man page does not allow for documenting the entire form
from \m[blue]\fB\%https://nmap.org/book/output-formats-grepable-output.html\fR\m[]\&.
.RE
.PP
-\fB\-oA \fR\fB\fIbasename\fR\fR (Output to all formats)
-.\" -oA
+\fB\-oA \fR\fB\fIbasename\fR\fR (Output to all formats)
.RS 4
As a convenience, you may specify
\fB\-oA \fR\fB\fIbasename\fR\fR
@@ -2330,22 +2078,18 @@ on Windows\&.
.PP
\fBVerbosity and debugging options\fR
.PP
-\fB\-v\fR (Increase verbosity level)
-.\" -v .\" verbosity, \fB\-v\fR\fB\fIlevel\fR\fR (Set verbosity level)
+\fB\-v\fR (Increase verbosity level), \fB\-v\fR\fB\fIlevel\fR\fR (Set verbosity level)
.RS 4
Increases the verbosity level, causing Nmap to print more information about the scan in progress\&. Open ports are shown as they are found and completion time estimates are provided when Nmap thinks a scan will take more than a few minutes\&. Use it twice or more for even greater verbosity:
\fB\-vv\fR, or give a verbosity level directly, for example
\fB\-v3\fR\&.
-.\" -v: giving more than once
.sp
Most changes only affect interactive output, and some also affect normal and script kiddie output\&. The other output types are meant to be processed by machines, so Nmap can give substantial detail by default in those formats without fatiguing a human user\&. However, there are a few changes in other modes where output size can be reduced substantially by omitting some detail\&. For example, a comment line in the grepable output that provides a list of all ports scanned is only printed in verbose mode because it can be quite long\&.
.RE
.PP
-\fB\-d\fR (Increase debugging level)
-.\" -d .\" debugging, \fB\-d\fR\fB\fIlevel\fR\fR (Set debugging level)
+\fB\-d\fR (Increase debugging level), \fB\-d\fR\fB\fIlevel\fR\fR (Set debugging level)
.RS 4
When even verbose mode doesn\*(Aqt provide sufficient data for you, debugging is available to flood you with much more! As with the verbosity option (\fB\-v\fR), debugging is enabled with a command\-line flag (\fB\-d\fR) and the debug level can be increased by specifying it multiple times,
-.\" -d: giving more than once
as in
\fB\-dd\fR, or by setting a level directly\&. For example,
\fB\-d9\fR
@@ -2353,12 +2097,10 @@ sets level nine\&. That is the highest effective level and will produce thousand
.sp
Debugging output is useful when a bug is suspected in Nmap, or if you are simply confused as to what Nmap is doing and why\&. As this feature is mostly intended for developers, debug lines aren\*(Aqt always self\-explanatory\&. You may get something like:
Timeout vals: srtt: \-1 rttvar: \-1 to: 1000000 delta 14987 ==> srtt: 14987 rttvar: 14987 to: 100000\&. If you don\*(Aqt understand a line, your only recourses are to ignore it, look it up in the source code, or request help from the development list (nmap\-dev)\&.
-.\" nmap-dev mailing list
Some lines are self explanatory, but the messages become more obscure as the debug level is increased\&.
.RE
.PP
-\fB\-\-reason\fR (Host and port state reasons)
-.\" --reason .\" reason reporting
+\fB\-\-reason\fR (Host and port state reasons)
.RS 4
Shows the reason each port is set to a specific state and the reason each host is up or down\&. This option displays the type of the packet that determined a port or hosts state\&. For example, A
RST
@@ -2367,12 +2109,10 @@ and
\fB\-PS\fR) are very detailed, but the TCP connect scan (\fB\-sT\fR) is limited by the implementation of the
\fBconnect\fR
system call\&. This feature is automatically enabled by the debug option (\fB\-d\fR)
-.\" --reason: implied by -d
and the results are stored in XML log files even if this option is not specified\&.
.RE
.PP
-\fB\-\-stats\-every \fR\fB\fItime\fR\fR (Print periodic timing stats)
-.\" --stats-every
+\fB\-\-stats\-every \fR\fB\fItime\fR\fR (Print periodic timing stats)
.RS 4
Periodically prints a timing status message after each interval of
\fItime\fR\&. The time is a specification of the kind described in
@@ -2381,8 +2121,7 @@ the section called \(lqTIMING AND PERFORMANCE\(rq; so for example, use
to get a status update every 10 seconds\&. Updates are printed to interactive output (the screen) and XML output\&.
.RE
.PP
-\fB\-\-packet\-trace\fR (Trace packets and data sent and received)
-.\" --packet-trace
+\fB\-\-packet\-trace\fR (Trace packets and data sent and received)
.RS 4
Causes Nmap to print a summary of every packet sent or received\&. This is often used for debugging, but is also a valuable way for new users to understand exactly what Nmap is doing under the covers\&. To avoid printing thousands of lines, you may want to specify a limited number of ports to scan, such as
\fB\-p20\-30\fR\&. If you only care about the goings on of the version detection subsystem, use
@@ -2392,8 +2131,7 @@ instead\&. If you only care about script tracing, specify
\fB\-\-packet\-trace\fR, you get all of the above\&.
.RE
.PP
-\fB\-\-open\fR (Show only open (or possibly open) ports)
-.\" --open
+\fB\-\-open\fR (Show only open (or possibly open) ports)
.RS 4
Sometimes you only care about ports you can actually connect to (open
ones), and don\*(Aqt want results cluttered with
@@ -2416,16 +2154,14 @@ unfiltered
may be condensed into counts if there are an overwhelming number of them\&.
.RE
.PP
-\fB\-\-iflist\fR (List interfaces and routes)
-.\" --iflist
+\fB\-\-iflist\fR (List interfaces and routes)
.RS 4
Prints the interface list and system routes as detected by Nmap\&. This is useful for debugging routing problems or device mischaracterization (such as Nmap treating a PPP connection as ethernet)\&.
.RE
.PP
\fBMiscellaneous output options\fR
.PP
-\fB\-\-append\-output\fR (Append to rather than clobber output files)
-.\" --append-output
+\fB\-\-append\-output\fR (Append to rather than clobber output files)
.RS 4
When you specify a filename to an output format flag such as
\fB\-oX\fR
@@ -2435,8 +2171,7 @@ or
option\&. All output filenames specified in that Nmap execution will then be appended to rather than clobbered\&. This doesn\*(Aqt work well for XML (\fB\-oX\fR) scan data as the resultant file generally won\*(Aqt parse properly until you fix it up by hand\&.
.RE
.PP
-\fB\-\-resume \fR\fB\fIfilename\fR\fR (Resume aborted scan)
-.\" --resume .\" resuming scans
+\fB\-\-resume \fR\fB\fIfilename\fR\fR (Resume aborted scan)
.RS 4
Some extensive Nmap runs take a very long time\(emon the order of days\&. Such scans don\*(Aqt always run to completion\&. Restrictions may prevent Nmap from being run during working hours, the network could go down, the machine Nmap is running on might suffer a planned or unplanned reboot, or Nmap itself could crash\&. The administrator running Nmap could cancel it for any other reason as well, by pressing
ctrl\-C\&. Restarting the whole scan from the beginning may be undesirable\&. Fortunately, if normal (\fB\-oN\fR) or grepable (\fB\-oG\fR) logs were kept, the user can ask Nmap to resume scanning with the target it was working on when execution ceased\&. Simply specify the
@@ -2445,25 +2180,19 @@ option and pass the normal/grepable output file as its argument\&. No other argu
\fBnmap \-\-resume \fR\fB\fIlogfilename\fR\fR\&. Nmap will append new results to the data files specified in the previous execution\&. Resumption does not support the XML output format because combining the two runs into one valid XML file would be difficult\&.
.RE
.PP
-\fB\-\-stylesheet \fR\fB\fIpath or URL\fR\fR (Set XSL stylesheet to transform XML output)
-.\" --stylesheet
+\fB\-\-stylesheet \fR\fB\fIpath or URL\fR\fR (Set XSL stylesheet to transform XML output)
.RS 4
Nmap ships with an XSL
-.\" XSL
stylesheet
-.\" stylesheet
named
nmap\&.xsl
-.\" nmap.xsl
for viewing or translating XML output to HTML\&.
-.\" HTML from XML output
The XML output includes an
xml\-stylesheet
directive which points to
nmap\&.xml
where it was initially installed by Nmap\&. Run the XML file through an XSLT processor such as
\m[blue]\fBxsltproc\fR\m[]\&\s-2\u[17]\d\s+2
-.\" xsltproc
to produce an HTML file\&. Directly opening the XML file in a browser no longer works well because modern browsers limit the locations a stylesheet may be loaded from\&. If you wish to use a different stylesheet, specify it as the argument to
\fB\-\-stylesheet\fR\&. You must pass the full pathname or URL\&. One common invocation is
\fB\-\-stylesheet https://nmap\&.org/svn/docs/nmap\&.xsl\fR\&. This tells an XSLT processor to load the latest version of the stylesheet from Nmap\&.Org\&. The
@@ -2474,27 +2203,23 @@ nmap\&.xsl
is used by default for privacy reasons\&.
.RE
.PP
-\fB\-\-webxml\fR (Load stylesheet from Nmap\&.Org)
-.\" --webxml
+\fB\-\-webxml\fR (Load stylesheet from Nmap\&.Org)
.RS 4
This is a convenience option, nothing more than an alias for
\fB\-\-stylesheet https://nmap\&.org/svn/docs/nmap\&.xsl\fR\&.
.RE
.PP
-\fB\-\-no\-stylesheet\fR (Omit XSL stylesheet declaration from XML)
-.\" --no-stylesheet
+\fB\-\-no\-stylesheet\fR (Omit XSL stylesheet declaration from XML)
.RS 4
Specify this option to prevent Nmap from associating any XSL stylesheet with its XML output\&. The
xml\-stylesheet
directive is omitted\&.
.RE
-.\"
.SH "MISCELLANEOUS OPTIONS"
.PP
This section describes some important (and not\-so\-important) options that don\*(Aqt really fit anywhere else\&.
.PP
-\fB\-6\fR (Enable IPv6 scanning)
-.\" -6 .\" IPv6
+\fB\-6\fR (Enable IPv6 scanning)
.RS 4
Nmap has IPv6 support for its most popular features\&. Ping scanning, port scanning, version detection, and the Nmap Scripting Engine all support IPv6\&. The command syntax is the same as usual except that you also add the
\fB\-6\fR
@@ -2504,32 +2229,26 @@ option\&. Of course, you must use IPv6 syntax if you specify an address rather t
line being the only IPv6 giveaway\&.
.sp
While IPv6 hasn\*(Aqt exactly taken the world by storm, it gets significant use in some (usually Asian) countries and most modern operating systems support it\&. To use Nmap with IPv6, both the source and target of your scan must be configured for IPv6\&. If your ISP (like most of them) does not allocate IPv6 addresses to you, free tunnel brokers are widely available and work fine with Nmap\&. I use the free IPv6 tunnel broker
-.\" IPv6 tunnel broker
service at
\m[blue]\fB\%http://www.tunnelbroker.net\fR\m[]\&. Other tunnel brokers are
\m[blue]\fBlisted at Wikipedia\fR\m[]\&\s-2\u[18]\d\s+2\&. 6to4 tunnels are another popular, free approach\&.
.sp
On Windows, raw\-socket IPv6 scans are supported only on ethernet devices (not tunnels), and only on Windows Vista
-.\" Windows Vista
and later\&. Use the
\fB\-\-unprivileged\fR
-.\" --unprivileged
option in other situations\&.
.RE
.PP
-\fB\-A\fR (Aggressive scan options)
-.\" -A
+\fB\-A\fR (Aggressive scan options)
.RS 4
This option enables additional advanced and aggressive options\&. Presently this enables OS detection (\fB\-O\fR), version scanning (\fB\-sV\fR), script scanning (\fB\-sC\fR) and traceroute (\fB\-\-traceroute\fR)\&.
-.\" -A: features enabled by
More features may be added in the future\&. The point is to enable a comprehensive set of scan options without people having to remember a large set of flags\&. However, because script scanning with the default set is considered intrusive, you should not use
\fB\-A\fR
against target networks without permission\&. This option only enables features, and not timing options (such as
\fB\-T4\fR) or verbosity options (\fB\-v\fR) that you might want as well\&. Options which require privileges (e\&.g\&. root access) such as OS detection and traceroute will only be enabled if those privileges are available\&.
.RE
.PP
-\fB\-\-datadir \fR\fB\fIdirectoryname\fR\fR (Specify custom Nmap data file location)
-.\" --datadir
+\fB\-\-datadir \fR\fB\fIdirectoryname\fR\fR (Specify custom Nmap data file location)
.RS 4
Nmap obtains some special data at runtime in files named
nmap\-service\-probes,
@@ -2545,10 +2264,8 @@ options), that location is used for that file\&. After that, Nmap searches these
\fB\-\-datadir\fR
option (if any)\&. Any files not found there, are searched for in the directory specified by the
\fBNMAPDIR\fR
-.\" NMAPDIR environment variable
environment variable\&. Next comes
~/\&.nmap
-.\" .nmap directory
for real and effective UIDs; or on Windows,
\fIHOME\fR\eAppData\eRoaming\enmap
(where
@@ -2564,8 +2281,7 @@ or
/usr/share/nmap\&.
.RE
.PP
-\fB\-\-servicedb \fR\fB\fIservices file\fR\fR (Specify custom services file)
-.\" --servicedb
+\fB\-\-servicedb \fR\fB\fIservices file\fR\fR (Specify custom services file)
.RS 4
Asks Nmap to use the specified services file rather than the
nmap\-services
@@ -2574,8 +2290,7 @@ data file that comes with Nmap\&. Using this option also causes a fast scan (\fB
for more information on Nmap\*(Aqs data files\&.
.RE
.PP
-\fB\-\-versiondb \fR\fB\fIservice probes file\fR\fR (Specify custom service probes file)
-.\" --versiondb
+\fB\-\-versiondb \fR\fB\fIservice probes file\fR\fR (Specify custom service probes file)
.RS 4
Asks Nmap to use the specified service probes file rather than the
nmap\-service\-probes
@@ -2584,63 +2299,52 @@ data file that comes with Nmap\&. See the description for
for more information on Nmap\*(Aqs data files\&.
.RE
.PP
-\fB\-\-send\-eth\fR (Use raw ethernet sending)
-.\" --send-eth
+\fB\-\-send\-eth\fR (Use raw ethernet sending)
.RS 4
Asks Nmap to send packets at the raw ethernet (data link) layer rather than the higher IP (network) layer\&. By default, Nmap chooses the one which is generally best for the platform it is running on\&. Raw sockets (IP layer)
-.\" raw sockets
are generally most efficient for Unix machines, while ethernet frames are required for Windows operation since Microsoft disabled raw socket support\&. Nmap still uses raw IP packets on Unix despite this option when there is no other choice (such as non\-ethernet connections)\&.
.RE
.PP
-\fB\-\-send\-ip\fR (Send at raw IP level)
-.\" --send-ip
+\fB\-\-send\-ip\fR (Send at raw IP level)
.RS 4
Asks Nmap to send packets via raw IP sockets rather than sending lower level ethernet frames\&. It is the complement to the
\fB\-\-send\-eth\fR
option discussed previously\&.
.RE
.PP
-\fB\-\-privileged\fR (Assume that the user is fully privileged)
-.\" --privileged
+\fB\-\-privileged\fR (Assume that the user is fully privileged)
.RS 4
Tells Nmap to simply assume that it is privileged enough to perform raw socket sends, packet sniffing, and similar operations that usually require root privileges
-.\" privileged users.\" authorized users
on Unix systems\&. By default Nmap quits if such operations are requested but
\fBgeteuid\fR
is not zero\&.
\fB\-\-privileged\fR
is useful with Linux kernel capabilities and similar systems that may be configured to allow unprivileged users to perform raw\-packet scans\&. Be sure to provide this option flag before any flags for options that require privileges (SYN scan, OS detection, etc\&.)\&. The
\fBNMAP_PRIVILEGED\fR
-.\" NMAP_PRIVILEGED environment variable
environment variable may be set as an equivalent alternative to
\fB\-\-privileged\fR\&.
.RE
.PP
-\fB\-\-unprivileged\fR (Assume that the user lacks raw socket privileges)
-.\" --unprivileged .\" unprivileged users
+\fB\-\-unprivileged\fR (Assume that the user lacks raw socket privileges)
.RS 4
This option is the opposite of
\fB\-\-privileged\fR\&. It tells Nmap to treat the user as lacking network raw socket and sniffing privileges\&. This is useful for testing, debugging, or when the raw network functionality of your operating system is somehow broken\&. The
\fBNMAP_UNPRIVILEGED\fR
-.\" NMAP_UNPRIVILEGED environment variable
environment variable may be set as an equivalent alternative to
\fB\-\-unprivileged\fR\&.
.RE
.PP
-\fB\-\-release\-memory\fR (Release memory before quitting)
-.\" --release-memory
+\fB\-\-release\-memory\fR (Release memory before quitting)
.RS 4
This option is only useful for memory\-leak debugging\&. It causes Nmap to release allocated memory just before it quits so that actual memory leaks are easier to spot\&. Normally Nmap skips this as the OS does this anyway upon process termination\&.
.RE
.PP
-\fB\-V\fR; \fB\-\-version\fR (Print version number)
-.\" -V .\" --version
+\fB\-V\fR; \fB\-\-version\fR (Print version number)
.RS 4
Prints the Nmap version number and exits\&.
.RE
.PP
-\fB\-h\fR; \fB\-\-help\fR (Print help summary page)
-.\" -h .\" --help
+\fB\-h\fR; \fB\-\-help\fR (Print help summary page)
.RS 4
Prints a short help screen with the most common command flags\&. Running Nmap without any arguments does the same thing\&.
.RE
@@ -2693,12 +2397,10 @@ Here are some Nmap usage examples, from the simple and routine to a little more
\fIyour own network\fR\&. While I don\*(Aqt think port scanning other networks is or should be illegal, some network administrators don\*(Aqt appreciate unsolicited scanning of their networks and may complain\&. Getting permission first is the best approach\&.
.PP
For testing purposes, you have permission to scan the host scanme\&.nmap\&.org\&.
-.\" scanme.nmap.org
This permission only includes scanning via Nmap and not testing exploits or denial of service attacks\&. To conserve bandwidth, please do not initiate more than a dozen scans against that host per day\&. If this free scanning target service is abused, it will be taken down and Nmap will report
Failed to resolve given hostname/IP: scanme\&.nmap\&.org\&. These permissions also apply to the hosts scanme2\&.nmap\&.org, scanme3\&.nmap\&.org, and so on, though those hosts do not currently exist\&.
.PP
\fBnmap \-v scanme\&.nmap\&.org\fR
-.\" -v: example of
.PP
This option scans all reserved TCP ports on the machine
scanme\&.nmap\&.org
@@ -2707,24 +2409,23 @@ scanme\&.nmap\&.org
option enables verbose mode\&.
.PP
\fBnmap \-sS \-O scanme\&.nmap\&.org/24\fR
-.\" -sS: example of.\" -O: example of
+
.PP
Launches a stealth SYN scan against each machine that is up out of the 256 IPs on the class C sized network where Scanme resides\&. It also tries to determine what operating system is running on each host that is up and running\&. This requires root privileges because of the SYN scan and OS detection\&.
.PP
\fBnmap \-sV \-p 22,53,110,143,4564 198\&.116\&.0\-255\&.1\-127\fR
-.\" -p: example of
.PP
Launches host enumeration and a TCP scan at the first half of each of the 255 possible eight\-bit subnets in the 198\&.116 class B address space\&. This tests whether the systems run SSH, DNS, POP3, or IMAP on their standard ports, or anything on port 4564\&. For any of these ports found open, version detection is used to determine what application is running\&.
.PP
\fBnmap \-v \-iR 100000 \-Pn \-p 80\fR
-.\" -iR: example of.\" -Pn: example of
+
.PP
Asks Nmap to choose 100,000 hosts at random and scan them for web servers (port 80)\&. Host enumeration is disabled with
\fB\-Pn\fR
since first sending a couple probes to determine whether a host is up is wasteful when you are only probing one port on each target host anyway\&.
.PP
\fBnmap \-Pn \-p80 \-oX logs/pb\-port80scan\&.xml \-oG logs/pb\-port80scan\&.gnmap 216\&.163\&.128\&.20/20\fR
-.\" -oX: example of.\" -oG: example of
+
.PP
This scans 4096 IPs for any web servers (without pinging them) and saves the output in grepable and XML formats\&.
.SH "NMAP BOOK"
@@ -2735,7 +2436,6 @@ Topics include subverting firewalls and intrusion detection systems, optimizing
\m[blue]\fB\%https://nmap.org/book\fR\m[]
for more information\&.
.SH "BUGS"
-.\" bugs, reporting
.PP
Like its author, Nmap isn\*(Aqt perfect\&. But you can help make it better by sending bug reports or even writing patches\&. If Nmap doesn\*(Aqt behave the way you expect, first upgrade to the latest version available from
\m[blue]\fB\%https://nmap.org\fR\m[]\&. If the problem persists, do some research to determine whether it has already been discovered and addressed\&. Try searching for the error message on our search page at
@@ -2744,7 +2444,6 @@ or at Google\&. Also try browsing the
nmap\-dev
archives at
\m[blue]\fB\%http://seclists.org/\fR\m[]\&.
-.\" nmap-dev mailing list
Read this full manual page as well\&. If nothing comes of this, mail a bug report to
\&. Please include everything you have learned about the problem, as well as what version of Nmap you are running and what operating system version it is running on\&. Problem reports and Nmap usage questions sent to
@@ -2765,13 +2464,10 @@ Lyon
.PP
Hundreds of people have made valuable contributions to Nmap over the years\&. These are detailed in the
CHANGELOG
-.\" changelog
file which is distributed with Nmap and also available from
\m[blue]\fB\%https://nmap.org/changelog.html\fR\m[]\&.
.SH "LEGAL NOTICES"
.SS "Nmap Copyright and Licensing"
-.\" copyright
-.\" GNU General Public License
.PP
The Nmap Security Scanner is (C) 1996\(en2016 Insecure\&.Com LLC ("The Nmap Project")\&. Nmap is also a registered trademark of the Nmap Project\&. This program free software; you may redistribute and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; Version 2 (\(lqGPL\(rq), BUT ONLY WITH ALL OF THE CLARIFICATIONS AND EXCEPTIONS DESCRIBED HEREIN\&. This guarantees your right to use, modify, and redistribute this software under certain conditions\&. If you wish to embed Nmap technology into proprietary software, we sell alternative licenses (contact
)\&. Dozens of software vendors already license Nmap technology such as host discovery, port scanning, OS detection, version detection, and the Nmap Scripting Engine\&.
@@ -2853,7 +2549,6 @@ This list is not exclusive, but is meant to clarify our interpretation of derive
As another special exception to the GPL terms, the Nmap Project grants permission to link the code of this program with any version of the OpenSSL library which is distributed under a license identical to that listed in the included
docs/licenses/OpenSSL\&.txt
file, and distribute linked combinations including the two\&.
-.\" OpenSSL: linking exception
.PP
The Nmap Project has permission to redistribute Npcap, a packet capturing driver and library for the Microsoft Windows platform\&. Npcap is a separate work with it\*(Aqs own license rather than this Nmap license\&. Since the Npcap license does not permit redistribution without special permission, our Nmap Windows binary packages which contain Npcap may not be redistributed without special permission\&.
.PP
@@ -2879,10 +2574,8 @@ Source is provided to this software because we believe users have a right to kno
Source code also allows you to port Nmap to new platforms, fix bugs, and add new features\&. You are highly encouraged to send your changes to
for possible incorporation into the main distribution\&. By sending these changes to Fyodor or one of the Insecure\&.Org development mailing lists, it is assumed that you are offering the Nmap Project the unlimited, non\-exclusive right to reuse, modify, and relicense the code\&. Nmap will always be available open source,
-.\" open source
but this is important because the inability to relicense code has caused devastating problems for other Free Software projects (such as KDE and NASM)\&. We also occasionally relicense the code to third parties as discussed above\&. If you wish to specify special license conditions of your contributions, just say so when you send them\&.
-.SS "No Warranty
-.\" warranty (lack of)"
+.SS "No Warranty"
.PP
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE\&. See the GNU General Public License v2\&.0 for more details at
\m[blue]\fB\%http://www.gnu.org/licenses/gpl-2.0.html\fR\m[], or in the
@@ -2890,7 +2583,6 @@ COPYING
file included with Nmap\&.
.PP
It should also be noted that Nmap has occasionally been known to crash poorly written applications, TCP/IP stacks, and even operating systems\&.
-.\" crashing targets
While this is extremely rare, it is important to keep in mind\&.
\fINmap should never be run against mission critical systems\fR
unless you are prepared to suffer downtime\&. We acknowledge here that Nmap may crash your systems or networks and we disclaim all liability for any damage or problems Nmap could cause\&.
@@ -2899,37 +2591,29 @@ unless you are prepared to suffer downtime\&. We acknowledge here that Nmap may
Because of the slight risk of crashes and because a few black hats like to use Nmap for reconnaissance prior to attacking systems, there are administrators who become upset and may complain when their system is scanned\&. Thus, it is often advisable to request permission before doing even a light scan of a network\&.
.PP
Nmap should never be installed with special privileges (e\&.g\&. suid root)\&.
-.\" setuid, why Nmap shouldn't be.\" suid
That would open up a major security vulnerability as other users on the system (or attackers) could use it for privilege escalation\&.
.SS "Third\-Party Software and Funding Notices"
.PP
This product includes software developed by the
\m[blue]\fBApache Software Foundation\fR\m[]\&\s-2\u[20]\d\s+2\&. A modified version of the
\m[blue]\fBLibpcap portable packet capture library\fR\m[]\&\s-2\u[21]\d\s+2
-.\" libpcap
is distributed along with Nmap\&. The Windows version of Nmap utilized the Libpcap\-derived
\m[blue]\fBWinPcap library\fR\m[]\&\s-2\u[22]\d\s+2
-.\" WinPcap
instead\&. Regular expression support is provided by the
\m[blue]\fBPCRE library\fR\m[]\&\s-2\u[23]\d\s+2,
-.\" Perl Compatible Regular Expressions (PCRE)
which is open\-source software, written by Philip Hazel\&.
-.\" Hazel, Philip
Certain raw networking functions use the
\m[blue]\fBLibdnet\fR\m[]\&\s-2\u[24]\d\s+2
-.\" libdnet
networking library, which was written by Dug Song\&.
-.\" Song, Dug
A modified version is distributed with Nmap\&. Nmap can optionally link with the
\m[blue]\fBOpenSSL cryptography toolkit\fR\m[]\&\s-2\u[25]\d\s+2
-.\" OpenSSL
for SSL version detection support\&. The Nmap Scripting Engine uses an embedded version of the
\m[blue]\fBLua programming language\fR\m[]\&\s-2\u[26]\d\s+2\&.
-.\" Lua programming language
The
\m[blue]\fBLiblinear linear classification library\fR\m[]\&\s-2\u[27]\d\s+2
is used for our
\m[blue]\fBIPv6 OS detection machine learning techniques\fR\m[]\&\s-2\u[28]\d\s+2\&.
+
All of the third\-party software described in this paragraph is freely redistributable under BSD\-style software licenses\&.
.PP
Binary packages for Windows and Mac OS X include support libraries necessary to run Zenmap and Ndiff with Python and PyGTK\&. (Unix platforms commonly make these libraries easy to install, so they are not part of the packages\&.) A listing of these support libraries and their licenses is included in the
@@ -2941,8 +2625,7 @@ This software was supported in part through the
and the
\m[blue]\fBDARPA CINDER program\fR\m[]\&\s-2\u[30]\d\s+2
(DARPA\-BAA\-10\-84)\&.
-.SS "United States Export Control
-.\" export control"
+.SS "United States Export Control"
.PP
Nmap only uses encryption when compiled with the optional OpenSSL support and linked with OpenSSL\&. When compiled without OpenSSL support, the Nmap Project believes that Nmap is not subject to U\&.S\&.
\m[blue]\fBExport Administration Regulations (EAR)\fR\m[]\&\s-2\u[31]\d\s+2
diff --git a/docs/nmap.usage.txt b/docs/nmap.usage.txt
index 22020ac07..9e8f8a9e3 100644
--- a/docs/nmap.usage.txt
+++ b/docs/nmap.usage.txt
@@ -1,4 +1,4 @@
-Nmap 7.50SVN ( https://nmap.org )
+Nmap 7.60SVN ( https://nmap.org )
Usage: nmap [Scan Type(s)] [Options] {target specification}
TARGET SPECIFICATION:
Can pass hostnames, IP addresses, networks, etc.
diff --git a/docs/zenmap.1 b/docs/zenmap.1
index 1beba43b2..1208f4a4b 100644
--- a/docs/zenmap.1
+++ b/docs/zenmap.1
@@ -1,13 +1,13 @@
'\" t
.\" Title: zenmap
.\" Author: [see the "Authors" section]
-.\" Generator: DocBook XSL Stylesheets v1.78.1
-.\" Date: 06/13/2017
+.\" Generator: DocBook XSL Stylesheets v1.79.1
+.\" Date: 08/01/2017
.\" Manual: Zenmap Reference Guide
.\" Source: Zenmap
.\" Language: English
.\"
-.TH "ZENMAP" "1" "06/13/2017" "Zenmap" "Zenmap Reference Guide"
+.TH "ZENMAP" "1" "08/01/2017" "Zenmap" "Zenmap Reference Guide"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/mswin32/nmap.rc b/mswin32/nmap.rc
index fa60b74aa..d079acecd 100644
--- a/mswin32/nmap.rc
+++ b/mswin32/nmap.rc
@@ -13,7 +13,7 @@
//
VS_VERSION_INFO VERSIONINFO
-FILEVERSION 7,0,50,100
+FILEVERSION 7,0,60,100
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x21L
@@ -30,7 +30,7 @@ BEGIN
BEGIN
VALUE "CompanyName", "Insecure.Org\0"
VALUE "FileDescription", "Nmap\0"
- VALUE "FileVersion", "7.50SVN\0"
+ VALUE "FileVersion", "7.60SVN\0"
VALUE "InternalName", "Nmap\0"
VALUE "LegalCopyright", "Copyright (c) Insecure.Com LLC (fyodor@insecure.org)\0"
VALUE "LegalTrademarks", "NMAP\0"
diff --git a/ncat/docs/ncat.1 b/ncat/docs/ncat.1
index 926a2da96..b7a702835 100644
--- a/ncat/docs/ncat.1
+++ b/ncat/docs/ncat.1
@@ -1,13 +1,13 @@
'\" t
.\" Title: Ncat
.\" Author: [see the "Authors" section]
-.\" Generator: DocBook XSL Stylesheets v1.78.1
-.\" Date: 06/13/2017
+.\" Generator: DocBook XSL Stylesheets v1.79.1
+.\" Date: 08/01/2017
.\" Manual: Ncat Reference Guide
.\" Source: Ncat
.\" Language: English
.\"
-.TH "NCAT" "1" "06/13/2017" "Ncat" "Ncat Reference Guide"
+.TH "NCAT" "1" "08/01/2017" "Ncat" "Ncat Reference Guide"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -43,7 +43,7 @@ Among Ncat\*(Aqs vast number of features there is the ability to chain Ncats tog
.RS 4
.\}
.nf
-Ncat 7\&.50SVN ( https://nmap\&.org/ncat )
+Ncat 7\&.60SVN ( https://nmap\&.org/ncat )
Usage: ncat [options] [hostname] [port]
Options taking a time assume seconds\&. Append \*(Aqms\*(Aq for milliseconds,
@@ -92,6 +92,7 @@ Options taking a time assume seconds\&. Append \*(Aqms\*(Aq for milliseconds,
\-\-ssl\-verify Verify trust and domain name of certificates
\-\-ssl\-trustfile PEM file containing trusted SSL certificates
\-\-ssl\-ciphers Cipherlist containing SSL ciphers to use
+ \-\-ssl\-alpn ALPN protocol list to use\&.
\-\-version Display Ncat\*(Aqs version information and exit
See the ncat(1) manpage for full options, descriptions and usage examples
@@ -101,10 +102,6 @@ See the ncat(1) manpage for full options, descriptions and usage examples
.\}
.sp
.SH "CONNECT MODE AND LISTEN MODE"
-.\" connect mode (Ncat)
-.\" client mode (Ncat)
-.\" listen mode (Ncat)
-.\" server mode (Ncat)
.PP
Ncat operates in one of two primary modes: connect mode and listen mode\&. Other modes, such as the HTTP proxy server, act as special cases of these two\&. In connect mode, Ncat works as a client\&. In listen mode it is a server\&.
.PP
@@ -117,7 +114,6 @@ arguments tell what to connect to\&.
is required, and may be a hostname or IP address\&. If
\fB\fIport\fR\fR
is supplied, it must be a decimal port number\&. If omitted, it defaults to 31337\&.
-.\" default port of Ncat.\" 31337
.PP
In listen mode,
\fB\fIhostname\fR\fR
@@ -130,20 +126,17 @@ is omitted, it defaults to listening on all available addresses over IPv4 and IP
is omitted, it defaults to 31337\&.
.SH "PROTOCOL OPTIONS"
.PP
-\fB\-4\fR (IPv4 only)
-.\" -4 (Ncat option)
+\fB\-4\fR (IPv4 only)
.RS 4
Force the use of IPv4 only\&.
.RE
.PP
-\fB\-6\fR (IPv6 only)
-.\" -6 (Ncat option)
+\fB\-6\fR (IPv6 only)
.RS 4
Force the use of IPv6 only\&.
.RE
.PP
-\fB\-U\fR, \fB\-\-unixsock\fR (Use Unix domain sockets)
-.\" --unixsock (Ncat option) .\" -U (Ncat option)
+\fB\-U\fR, \fB\-\-unixsock\fR (Use Unix domain sockets)
.RS 4
Use Unix domain sockets rather than network sockets\&. This option may be used on its own for stream sockets, or combined with
\fB\-\-udp\fR
@@ -153,21 +146,18 @@ mode is in
the section called \(lqUNIX DOMAIN SOCKETS\(rq\&.
.RE
.PP
-\fB\-u\fR, \fB\-\-udp\fR (Use UDP)
-.\" -u (Ncat option) .\" --udp (Ncat option)
+\fB\-u\fR, \fB\-\-udp\fR (Use UDP)
.RS 4
Use UDP for the connection (the default is TCP)\&.
.RE
.PP
-\fB\-\-sctp\fR (Use SCTP)
-.\" --sctp (Ncat option)
+\fB\-\-sctp\fR (Use SCTP)
.RS 4
Use SCTP for the connection (the default is TCP)\&. SCTP support is implemented in TCP\-compatible mode\&.
.RE
.SH "CONNECT MODE OPTIONS"
.PP
-\fB\-g \fR\fB\fIhop1\fR\fR\fB[,\fIhop2\fR,\&.\&.\&.]\fR (Loose source routing)
-.\" -g (Ncat option)
+\fB\-g \fR\fB\fIhop1\fR\fR\fB[,\fIhop2\fR,\&.\&.\&.]\fR (Loose source routing)
.RS 4
Sets hops for IPv4 loose source routing\&. You can use
\fB\-g\fR
@@ -176,8 +166,7 @@ once with a comma\-separated list of hops, use
multiple times with single hops to build the list, or combine the two\&. Hops can be given as IP addresses or hostnames\&.
.RE
.PP
-\fB\-G \fR\fB\fIptr\fR\fR (Set source routing pointer)
-.\" -G (Ncat option)
+\fB\-G \fR\fB\fIptr\fR\fR (Set source routing pointer)
.RS 4
Sets the IPv4 source route
\(lqpointer\(rq
@@ -185,14 +174,12 @@ for use with
\fB\-g\fR\&. The argument must be a multiple of 4 and no more than 28\&. Not all operating systems support setting this pointer to anything other than four\&.
.RE
.PP
-\fB\-p \fR\fB\fIport\fR\fR, \fB\-\-source\-port \fR\fB\fIport\fR\fR (Specify source port)
-.\" --source-port (Ncat option) .\" -p (Ncat option)
+\fB\-p \fR\fB\fIport\fR\fR, \fB\-\-source\-port \fR\fB\fIport\fR\fR (Specify source port)
.RS 4
Set the port number for Ncat to bind to\&.
.RE
.PP
-\fB\-s \fR\fB\fIhost\fR\fR, \fB\-\-source \fR\fB\fIhost\fR\fR (Specify source address)
-.\" --source (Ncat option) .\" -s (Ncat option)
+\fB\-s \fR\fB\fIhost\fR\fR, \fB\-\-source \fR\fB\fIhost\fR\fR (Specify source address)
.RS 4
Set the address for Ncat to bind to\&.
.RE
@@ -202,27 +189,23 @@ See
the section called \(lqACCESS CONTROL OPTIONS\(rq
for information on limiting the hosts that may connect to the listening Ncat process\&.
.PP
-\fB\-l\fR, \fB\-\-listen\fR (Listen for connections)
-.\" --listen (Ncat option) .\" -l (Ncat option)
+\fB\-l\fR, \fB\-\-listen\fR (Listen for connections)
.RS 4
Listen for connections rather than connecting to a remote machine
.RE
.PP
-\fB\-m \fR\fB\fInumconns\fR\fR, \fB\-\-max\-conns \fR\fB\fInumconns\fR\fR (Specify maximum number of connections)
-.\" --max-conns (Ncat option) .\" -m (Ncat option)
+\fB\-m \fR\fB\fInumconns\fR\fR, \fB\-\-max\-conns \fR\fB\fInumconns\fR\fR (Specify maximum number of connections)
.RS 4
The maximum number of simultaneous connections accepted by an Ncat instance\&. 100 is the default (60 on Windows)\&.
.RE
.PP
-\fB\-k\fR, \fB\-\-keep\-open\fR (Accept multiple connections)
-.\" --keep-open (Ncat option) .\" -k (Ncat option)
+\fB\-k\fR, \fB\-\-keep\-open\fR (Accept multiple connections)
.RS 4
Normally a listening server accepts only one connection and then quits when the connection is closed\&. This option makes it accept multiple simultaneous connections and wait for more connections after they have all been closed\&. It must be combined with
\fB\-\-listen\fR\&. In this mode there is no way for Ncat to know when its network input is finished, so it will keep running until interrupted\&. This also means that it will never close its output stream, so any program reading from Ncat and looking for end\-of\-file will also hang\&.
.RE
.PP
-\fB\-\-broker\fR (Connection brokering)
-.\" --broker (Ncat option)
+\fB\-\-broker\fR (Connection brokering)
.RS 4
Allow multiple parties to connect to a centralised Ncat server and communicate with each other\&. Ncat can broker communication between systems that are behind a NAT or otherwise unable to directly connect\&. This option is used in conjunction with
\fB\-\-listen\fR, which causes the
@@ -230,8 +213,7 @@ Allow multiple parties to connect to a centralised Ncat server and communicate w
port to have broker mode enabled\&.
.RE
.PP
-\fB\-\-chat\fR (Ad\-hoc \(lqchat server\(rq)
-.\" --chat (Ncat option)
+\fB\-\-chat\fR (Ad\-hoc \(lqchat server\(rq)
.RS 4
The
\fB\-\-chat\fR
@@ -239,16 +221,16 @@ option enables chat mode, intended for the exchange of text between several user
.RE
.SH "SSL OPTIONS"
.PP
-\fB\-\-ssl\fR (Use SSL)
-.\" --ssl (Ncat option)
+\fB\-\-ssl\fR (Use SSL)
.RS 4
In connect mode, this option transparently negotiates an SSL session with an SSL server to securely encrypt the connection\&. This is particularly handy for talking to SSL enabled HTTP servers, etc\&.
.sp
In server mode, this option listens for incoming SSL connections, rather than plain untunneled traffic\&.
+.sp
+In UDP connect mode, this option enables Datagram TLS (DTLS)\&. This is not supported in server mode\&.
.RE
.PP
-\fB\-\-ssl\-verify\fR (Verify server certificates)
-.\" --ssl-verify (Ncat option)
+\fB\-\-ssl\-verify\fR (Verify server certificates)
.RS 4
In client mode,
\fB\-\-ssl\-verify\fR
@@ -256,52 +238,48 @@ is like
\fB\-\-ssl\fR
except that it also requires verification of the server certificate\&. Ncat comes with a default set of trusted certificates in the file
ca\-bundle\&.crt\&.
-.\" ca-bundle.crt
Some operating systems provide a default list of trusted certificates; these will also be used if available\&. Use
\fB\-\-ssl\-trustfile\fR
to give a custom list\&. Use
\fB\-v\fR
one or more times to get details about verification failures\&.
-.\" revoked certificates
Ncat does not check for revoked certificates\&.
-.\" certification revocation
.sp
This option has no effect in server mode\&.
.RE
.PP
-\fB\-\-ssl\-cert \fR\fB\fIcertfile\&.pem\fR\fR (Specify SSL certificate)
-.\" --ssl-cert (Ncat option)
+\fB\-\-ssl\-cert \fR\fB\fIcertfile\&.pem\fR\fR (Specify SSL certificate)
.RS 4
This option gives the location of a PEM\-encoded certificate files used to authenticate the server (in listen mode) or the client (in connect mode)\&. Use it in combination with
\fB\-\-ssl\-key\fR\&.
.RE
.PP
-\fB\-\-ssl\-key \fR\fB\fIkeyfile\&.pem\fR\fR (Specify SSL private key)
-.\" --ssl-key (Ncat option)
+\fB\-\-ssl\-key \fR\fB\fIkeyfile\&.pem\fR\fR (Specify SSL private key)
.RS 4
This option gives the location of the PEM\-encoded private key file that goes with the certificate named with
\fB\-\-ssl\-cert\fR\&.
.RE
.PP
-\fB\-\-ssl\-trustfile \fR\fB\fIcert\&.pem\fR\fR (List trusted certificates)
-.\" --ssl-trustfile (Ncat option)
+\fB\-\-ssl\-trustfile \fR\fB\fIcert\&.pem\fR\fR (List trusted certificates)
.RS 4
This option sets a list of certificates that are trusted for purposes of certificate verification\&. It has no effect unless combined with
\fB\-\-ssl\-verify\fR\&. The argument to this option is the name of a PEM
-.\" PEM (Privacy Enhanced Mail)
file containing trusted certificates\&. Typically, the file will contain certificates of certification authorities, though it may also contain server certificates directly\&. When this option is used, Ncat does not use its default certificates\&.
.RE
.PP
-\fB\-\-ssl\-ciphers \fR\fB\fIcipherlist\fR\fR (Specify SSL ciphersuites)
-.\" --ssl-ciphers (Ncat option)
+\fB\-\-ssl\-ciphers \fR\fB\fIcipherlist\fR\fR (Specify SSL ciphersuites)
.RS 4
This option sets the list of ciphersuites that Ncat will use when connecting to servers or when accepting SSL connections from clients\&. The syntax is described in the OpenSSL ciphers(1) man page, and defaults to
-ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH
+ALL:!aNULL:!eNULL:!LOW:!EXP:!MD5:@STRENGTH
+.RE
+.PP
+\fB\-\-ssl\-alpn \fR\fB\fIALPN list\fR\fR (Specify ALPN protocol list)
+.RS 4
+This option allows you to specify a comma\-separated list of protocols to send via the Application\-Layer Protocol Negotiation (ALPN) TLS extension\&. Not supported by all versions of OpenSSL\&.
.RE
.SH "PROXY OPTIONS"
.PP
-\fB\-\-proxy \fR\fB\fIhost\fR\fR\fB[:\fR\fB\fIport\fR\fR\fB]\fR (Specify proxy address)
-.\" --proxy (Ncat option)
+\fB\-\-proxy \fR\fB\fIhost\fR\fR\fB[:\fR\fB\fIport\fR\fR\fB]\fR (Specify proxy address)
.RS 4
Requests proxying through
\fIhost\fR:\fIport\fR, using the protocol specified by
@@ -311,8 +289,7 @@ If no port is specified, the proxy protocol\*(Aqs well\-known port is used (1080
\fB\-\-proxy\-auth\fR\&.
.RE
.PP
-\fB\-\-proxy\-type \fR\fB\fIproto\fR\fR (Specify proxy protocol)
-.\" --proxy-type (Ncat option)
+\fB\-\-proxy\-type \fR\fB\fIproto\fR\fR (Specify proxy protocol)
.RS 4
In connect mode, this option requests the protocol
\fIproto\fR
@@ -328,8 +305,7 @@ http\&. If this option is not used, the default protocol is
http\&.
.RE
.PP
-\fB\-\-proxy\-auth \fR\fB\fIuser\fR\fR\fB[:\fIpass\fR]\fR (Specify proxy credentials)
-.\" --proxy-auth (Ncat option)
+\fB\-\-proxy\-auth \fR\fB\fIuser\fR\fR\fB[:\fIpass\fR]\fR (Specify proxy credentials)
.RS 4
In connect mode, gives the credentials that will be used to connect to the proxy server\&. In listen mode, gives the credentials that will be required of connecting clients\&. For use with
\fB\-\-proxy\-type http\fR, the form should be user:pass\&. For
@@ -337,8 +313,7 @@ In connect mode, gives the credentials that will be used to connect to the proxy
.RE
.SH "COMMAND EXECUTION OPTIONS"
.PP
-\fB\-e \fR\fB\fIcommand\fR\fR, \fB\-\-exec \fR\fB\fIcommand\fR\fR (Execute command)
-.\" --exec (Ncat option) .\" -e (Ncat option)
+\fB\-e \fR\fB\fIcommand\fR\fR, \fB\-\-exec \fR\fB\fIcommand\fR\fR (Execute command)
.RS 4
Execute the specified command after a connection has been established\&. The command must be specified as a full pathname\&. All input from the remote client will be sent to the application and responses sent back to the remote client over the socket, thus making your command\-line application interactive over a socket\&. Combined with
\fB\-\-keep\-open\fR, Ncat will handle multiple simultaneous connections to your specified port/application like inetd\&. Ncat will only accept a maximum, definable, number of simultaneous connections controlled by the
@@ -346,16 +321,14 @@ Execute the specified command after a connection has been established\&. The com
option\&. By default this is set to 100 (60 on Windows)\&.
.RE
.PP
-\fB\-c \fR\fB\fIcommand\fR\fR, \fB\-\-sh\-exec \fR\fB\fIcommand\fR\fR (Execute command via sh)
-.\" --sh-exec (Ncat option) .\" -c (Ncat option)
+\fB\-c \fR\fB\fIcommand\fR\fR, \fB\-\-sh\-exec \fR\fB\fIcommand\fR\fR (Execute command via sh)
.RS 4
Same as
\fB\-e\fR, except it tries to execute the command via
/bin/sh\&. This means you don\*(Aqt have to specify the full path for the command, and shell facilities like environment variables are available\&.
.RE
.PP
-\fB\-\-lua\-exec \fR\fB\fIfile\fR\fR (Execute a \&.lua script)
-.\" --lua-exec (Ncat option)
+\fB\-\-lua\-exec \fR\fB\fIfile\fR\fR (Execute a \&.lua script)
.RS 4
Runs the specified file as a Lua script after a connection has been established, using a built\-in interpreter\&. Both the script\*(Aqs standard input and the standard output are redirected to the connection data streams\&.
.RE
@@ -364,21 +337,16 @@ All exec options add the following variables to the child\*(Aqs environment:
.PP
\fBNCAT_REMOTE_ADDR\fR, \fBNCAT_REMOTE_PORT\fR
.RS 4
-.\" NCAT_REMOTE_ADDR> environment variable
-.\" NCAT_REMOTE_PORT> environment variable
The IP address and port number of the remote host\&. In connect mode, it\*(Aqs the target\*(Aqs address; in listen mode, it\*(Aqs the client\*(Aqs address\&.
.RE
.PP
\fBNCAT_LOCAL_ADDR\fR, \fBNCAT_LOCAL_PORT\fR
.RS 4
-.\" NCAT_LOCAL_ADDR> environment variable
-.\" NCAT_LOCAL_PORT> environment variable
The IP address and port number of the local end of the connection\&.
.RE
.PP
\fBNCAT_PROTO\fR
.RS 4
-.\" NCAT_PROTO> environment variable
The protocol in use: one of
TCP,
UDP, and
@@ -386,8 +354,7 @@ SCTP\&.
.RE
.SH "ACCESS CONTROL OPTIONS"
.PP
-\fB\-\-allow \fR\fB\fIhost\fR\fR\fB[,\fIhost\fR,\&.\&.\&.]\fR (Allow connections)
-.\" --allow (Ncat option)
+\fB\-\-allow \fR\fB\fIhost\fR\fR\fB[,\fIhost\fR,\&.\&.\&.]\fR (Allow connections)
.RS 4
The list of hosts specified will be the only hosts allowed to connect to the Ncat process\&. All other connection attempts will be disconnected\&. In case of a conflict between
\fB\-\-allow\fR
@@ -397,15 +364,13 @@ and
takes precedence\&. Host specifications follow the same syntax used by Nmap\&.
.RE
.PP
-\fB\-\-allowfile \fR\fB\fIfile\fR\fR (Allow connections from file)
-.\" --allowfile (Ncat option)
+\fB\-\-allowfile \fR\fB\fIfile\fR\fR (Allow connections from file)
.RS 4
This has the same functionality as
\fB\-\-allow\fR, except that the allowed hosts are provided in a new\-line delimited allow file, rather than directly on the command line\&.
.RE
.PP
-\fB\-\-deny \fR\fB\fIhost\fR\fR\fB[,\fIhost\fR,\&.\&.\&.]\fR (Deny connections)
-.\" --deny (Ncat option)
+\fB\-\-deny \fR\fB\fIhost\fR\fR\fB[,\fIhost\fR,\&.\&.\&.]\fR (Deny connections)
.RS 4
Issue Ncat with a list of hosts that will not be allowed to connect to the listening Ncat process\&. Specified hosts will have their session silently terminated if they try to connect\&. In case of a conflict between
\fB\-\-allow\fR
@@ -415,8 +380,7 @@ and
takes precedence\&. Host specifications follow the same syntax used by Nmap\&.
.RE
.PP
-\fB\-\-denyfile \fR\fB\fIfile\fR\fR (Deny connections from file)
-.\" --denyfile (Ncat option)
+\fB\-\-denyfile \fR\fB\fIfile\fR\fR (Deny connections from file)
.RS 4
This is the same functionality as
\fB\-\-deny\fR, except that excluded hosts are provided in a new\-line delimited deny file, rather than directly on the command line\&.
@@ -432,41 +396,35 @@ m, or
h
to the value to specify milliseconds, seconds, minutes, or hours\&.
.PP
-\fB\-d \fR\fB\fItime\fR\fR, \fB\-\-delay \fR\fB\fItime\fR\fR (Specify line delay)
-.\" --delay (Ncat option) .\" -d (Ncat option)
+\fB\-d \fR\fB\fItime\fR\fR, \fB\-\-delay \fR\fB\fItime\fR\fR (Specify line delay)
.RS 4
Set the delay interval for lines sent\&. This effectively limits the number of lines that Ncat will send in the specified period\&. This may be useful for low\-bandwidth sites, or have other uses such as coping with annoying
\fBiptables \-\-limit\fR
options\&.
.RE
.PP
-\fB\-i \fR\fB\fItime\fR\fR, \fB\-\-idle\-timeout \fR\fB\fItime\fR\fR (Specify idle timeout)
-.\" --idle-timeout (Ncat option) .\" -i (Ncat option)
+\fB\-i \fR\fB\fItime\fR\fR, \fB\-\-idle\-timeout \fR\fB\fItime\fR\fR (Specify idle timeout)
.RS 4
Set a fixed timeout for idle connections\&. If the idle timeout is reached, the connection is terminated\&.
.RE
.PP
-\fB\-w \fR\fB\fItime\fR\fR, \fB\-\-wait \fR\fB\fItime\fR\fR (Specify connect timeout)
-.\" --wait (Ncat option) .\" -w (Ncat option)
+\fB\-w \fR\fB\fItime\fR\fR, \fB\-\-wait \fR\fB\fItime\fR\fR (Specify connect timeout)
.RS 4
Set a fixed timeout for connection attempts\&.
.RE
.SH "OUTPUT OPTIONS"
.PP
-\fB\-o \fR\fB\fIfile\fR\fR, \fB\-\-output \fR\fB\fIfile\fR\fR (Save session data)
-.\" --output (Ncat option) .\" -o (Ncat option)
+\fB\-o \fR\fB\fIfile\fR\fR, \fB\-\-output \fR\fB\fIfile\fR\fR (Save session data)
.RS 4
Dump session data to a file
.RE
.PP
-\fB\-x \fR\fB\fIfile\fR\fR, \fB\-\-hex\-dump \fR\fB\fIfile\fR\fR (Save session data in hex)
-.\" --hex-dump (Ncat option) .\" -x (Ncat option)
+\fB\-x \fR\fB\fIfile\fR\fR, \fB\-\-hex\-dump \fR\fB\fIfile\fR\fR (Save session data in hex)
.RS 4
Dump session data in hex to a file\&.
.RE
.PP
-\fB\-\-append\-output\fR (Append output)
-.\" --append-output (Ncat option)
+\fB\-\-append\-output\fR (Append output)
.RS 4
Issue Ncat with
\fB\-\-append\-ouput\fR
@@ -477,8 +435,7 @@ and/or
and it will append the resulted output rather than truncating the specified output files\&.
.RE
.PP
-\fB\-v\fR, \fB\-\-verbose\fR (Be verbose)
-.\" --verbose (Ncat option) .\" -v (Ncat option)
+\fB\-v\fR, \fB\-\-verbose\fR (Be verbose)
.RS 4
Issue Ncat with
\fB\-v\fR
@@ -487,50 +444,40 @@ and it will be verbose and display all kinds of useful connection based informat
.RE
.SH "MISC OPTIONS"
.PP
-\fB\-C\fR, \fB\-\-crlf\fR (Use CRLF as EOL)
-.\" --crlf (Ncat option) .\" -C (Ncat option)
+\fB\-C\fR, \fB\-\-crlf\fR (Use CRLF as EOL)
.RS 4
This option tells Ncat to convert LF
-.\" LF line ending
line endings to CRLF
-.\" CRLF line ending
when taking input from standard input\&.
-.\" standard input
This is useful for talking to some stringent servers directly from a terminal in one of the many common plain\-text protocols that use CRLF for end\-of\-line\&.
.RE
.PP
-\fB\-h\fR, \fB\-\-help\fR (Help screen)
-.\" --help (Ncat option) .\" -h (Ncat option)
+\fB\-h\fR, \fB\-\-help\fR (Help screen)
.RS 4
Displays a short help screen with common options and parameters, and then exits\&.
.RE
.PP
-\fB\-\-recv\-only\fR (Only receive data)
-.\" --recv-only (Ncat option)
+\fB\-\-recv\-only\fR (Only receive data)
.RS 4
If this option is passed, Ncat will only receive data and will not try to send anything\&.
.RE
.PP
-\fB\-\-send\-only\fR (Only send data)
-.\" --send-only (Ncat option)
+\fB\-\-send\-only\fR (Only send data)
.RS 4
If this option is passed, then Ncat will only send data and will ignore anything received\&. This option also causes Ncat to close the network connection and terminate after EOF is received on standard input\&.
.RE
.PP
-\fB\-\-no\-shutdown\fR (Do not shutdown into half\-duplex mode)
-.\" --no-shutdown (Ncat option)
+\fB\-\-no\-shutdown\fR (Do not shutdown into half\-duplex mode)
.RS 4
If this option is passed, Ncat will not invoke shutdown on a socket aftering seeing EOF on stdin\&. This is provided for backward\-compatibility with OpenBSD netcat, which exhibits this behavior when executed with its \*(Aq\-d\*(Aq option\&.
.RE
.PP
-\fB\-t\fR, \fB\-\-telnet\fR (Answer Telnet negotiations)
-.\" -t (Ncat option)
+\fB\-t\fR, \fB\-\-telnet\fR (Answer Telnet negotiations)
.RS 4
Handle DO/DONT WILL/WONT Telnet negotiations\&. This makes it possible to script Telnet sessions with Ncat\&.
.RE
.PP
-\fB\-\-version\fR (Display version)
-.\" --version (Ncat option)
+\fB\-\-version\fR (Display version)
.RS 4
Displays the Ncat version number and exits\&.
.RE
@@ -623,7 +570,7 @@ Like its authors, Ncat isn\*(Aqt perfect\&. But you can help make it better by s
nmap\-dev
archives at
\m[blue]\fB\%http://seclists.org/\fR\m[]\&.
-.\" nmap-dev mailing list
+
Read this full manual page as well\&. If nothing comes of this, mail a bug report to
\&. Please include everything you have learned about the problem, as well as what version of Ncat you are running and what operating system version it is running on\&. Problem reports and Ncat usage questions sent to dev@nmap\&.org are far more likely to be answered than those sent to Fyodor directly\&.
.PP
@@ -688,8 +635,6 @@ The original Netcat was written by *Hobbit*
Netcat (or any other implementation), Ncat is most definitely based on Netcat in spirit and functionality\&.
.SH "LEGAL NOTICES"
.SS "Ncat Copyright and Licensing"
-.\" copyright
-.\" GNU General Public License
.PP
Ncat is (C) 2005\(en2012 Insecure\&.Com LLC\&. It is distributed as free and open source software under the same license terms as our Nmap software\&. Precise terms and further details are available
from \m[blue]\fB\%https://nmap.org/man/man-legal.html\fR\m[]\&.
@@ -706,10 +651,8 @@ Source is provided to this software because we believe users have a right to kno
Source code also allows you to port Nmap (which includes Ncat) to new platforms, fix bugs, and add new features\&. You are highly encouraged to send your changes to
for possible incorporation into the main distribution\&. By sending these changes to Fyodor or one of the Insecure\&.Org development mailing lists, it is assumed that you are offering the Nmap Project (Insecure\&.Com LLC) the unlimited, non\-exclusive right to reuse, modify, and relicense the code\&. Nmap will always be available open source,
-.\" open source
but this is important because the inability to relicense code has caused devastating problems for other Free Software projects (such as KDE and NASM)\&. We also occasionally relicense the code to third parties as discussed in the Nmap man page\&. If you wish to specify special license conditions of your contributions, just say so when you send them\&.
-.SS "No Warranty
-.\" warranty (lack of)"
+.SS "No Warranty"
.PP
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE\&. See the GNU General Public License v2\&.0 for more details at
\m[blue]\fB\%http://www.gnu.org/licenses/gpl-2.0.html\fR\m[], or in the
@@ -718,25 +661,19 @@ file included with Nmap\&.
.SS "Inappropriate Usage"
.PP
Ncat should never be installed with special privileges (e\&.g\&. suid root)\&.
-.\" suid
That would open up a major security vulnerability as other users on the system (or attackers) could use it for privilege escalation\&.
.SS "Third\-Party Software"
.PP
This product includes software developed by the
\m[blue]\fBApache Software Foundation\fR\m[]\&\s-2\u[2]\d\s+2\&. A modified version of the
\m[blue]\fBLibpcap portable packet capture library\fR\m[]\&\s-2\u[3]\d\s+2
-.\" libpcap
is distributed along with Ncat\&. The Windows version of Ncat utilized the Libpcap\-derived
\m[blue]\fBWinPcap library\fR\m[]\&\s-2\u[4]\d\s+2
-.\" WinPcap
instead\&. Certain raw networking functions use the
\m[blue]\fBLibdnet\fR\m[]\&\s-2\u[5]\d\s+2
-.\" libdnet
networking library, which was written by Dug Song\&.
-.\" Song, Dug
A modified version is distributed with Ncat\&. Ncat can optionally link with the
\m[blue]\fBOpenSSL cryptography toolkit\fR\m[]\&\s-2\u[6]\d\s+2
-.\" OpenSSL
for SSL version detection support\&. All of the third\-party software described in this paragraph is freely redistributable under BSD\-style software licenses\&.
.SH "NOTES"
.IP " 1." 4
diff --git a/ncat/docs/ncat.usage.txt b/ncat/docs/ncat.usage.txt
index f0a727a4d..fc416b5fd 100644
--- a/ncat/docs/ncat.usage.txt
+++ b/ncat/docs/ncat.usage.txt
@@ -1,4 +1,4 @@
-Ncat 7.50SVN ( https://nmap.org/ncat )
+Ncat 7.60SVN ( https://nmap.org/ncat )
Usage: ncat [options] [hostname] [port]
Options taking a time assume seconds. Append 'ms' for milliseconds,
@@ -47,6 +47,7 @@ Options taking a time assume seconds. Append 'ms' for milliseconds,
--ssl-verify Verify trust and domain name of certificates
--ssl-trustfile PEM file containing trusted SSL certificates
--ssl-ciphers Cipherlist containing SSL ciphers to use
+ --ssl-alpn ALPN protocol list to use.
--version Display Ncat's version information and exit
See the ncat(1) manpage for full options, descriptions and usage examples
diff --git a/ncat/ncat.h b/ncat/ncat.h
index 5151dd4e9..a8b9f39ff 100644
--- a/ncat/ncat.h
+++ b/ncat/ncat.h
@@ -152,7 +152,7 @@
/* Ncat information for output, etc. */
#define NCAT_NAME "Ncat"
#define NCAT_URL "https://nmap.org/ncat"
-#define NCAT_VERSION "7.50SVN"
+#define NCAT_VERSION "7.60SVN"
#ifndef __GNUC__
#ifndef __attribute__
diff --git a/ndiff/docs/ndiff.1 b/ndiff/docs/ndiff.1
index 55c0a69e0..1f7833e5e 100644
--- a/ndiff/docs/ndiff.1
+++ b/ndiff/docs/ndiff.1
@@ -1,13 +1,13 @@
'\" t
.\" Title: ndiff
.\" Author: [see the "Authors" section]
-.\" Generator: DocBook XSL Stylesheets v1.78.1
-.\" Date: 06/13/2017
+.\" Generator: DocBook XSL Stylesheets v1.79.1
+.\" Date: 08/01/2017
.\" Manual: User Commands
.\" Source: Ndiff
.\" Language: English
.\"
-.TH "NDIFF" "1" "06/13/2017" "Ndiff" "User Commands"
+.TH "NDIFF" "1" "08/01/2017" "Ndiff" "User Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/nmap.h b/nmap.h
index f56d9a523..488dbd699 100644
--- a/nmap.h
+++ b/nmap.h
@@ -129,7 +129,7 @@
* *
***************************************************************************/
-/* $Id$ */
+/* $Id: nmap.h 36906 2017-07-31 22:29:24Z dmiller $ */
#ifndef NMAP_H
#define NMAP_H
@@ -190,13 +190,13 @@
#ifndef NMAP_VERSION
/* Edit this definition only within the quotes, because it is read from this
file by the makefiles. */
-#define NMAP_VERSION "7.50SVN"
-#define NMAP_NUM_VERSION "7.0.50.100"
+#define NMAP_VERSION "7.60SVN"
+#define NMAP_NUM_VERSION "7.0.60.100"
#endif
/* The version number of updates retrieved by the nmap-update
program. It can be different (but should always be the same or
earlier) than NMAP_VERSION. */
-#define NMAP_UPDATE_CHANNEL "7.40"
+#define NMAP_UPDATE_CHANNEL "7.60"
#define NMAP_XMLOUTPUTVERSION "1.04"
diff --git a/nping/docs/nping.1 b/nping/docs/nping.1
index 6547a7479..ec1f824c2 100644
--- a/nping/docs/nping.1
+++ b/nping/docs/nping.1
@@ -1,13 +1,13 @@
'\" t
.\" Title: nping
.\" Author: [see the "Authors" section]
-.\" Generator: DocBook XSL Stylesheets v1.78.1
-.\" Date: 06/13/2017
+.\" Generator: DocBook XSL Stylesheets v1.79.1
+.\" Date: 08/01/2017
.\" Manual: Nping Reference Guide
.\" Source: Nping
.\" Language: English
.\"
-.TH "NPING" "1" "06/13/2017" "Nping" "Nping Reference Guide"
+.TH "NPING" "1" "08/01/2017" "Nping" "Nping Reference Guide"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -33,7 +33,6 @@ nping \- Network packet generation tool / ping utility
.HP \w'\fBnping\fR\ 'u
\fBnping\fR [\fIOptions\fR] {\fItargets\fR}
.SH "DESCRIPTION"
-.\" Nping: description of
.PP
Nping is an open\-source tool for network packet generation, response analysis and response time measurement\&. Nping allows users to generate network packets of a wide range of protocols, letting them tune virtually any field of the protocol headers\&. While Nping can be used as a simple ping utility to detect active hosts, it can also be used as a raw packet generator for network stack stress tests, ARP poisoning, Denial of Service attacks, route tracing, and other purposes\&.
.PP
@@ -50,9 +49,6 @@ to specify TCP Probe Mode,
to specify the target ports; and then the two target hostnames\&.
.PP
\fBExample\ \&1.\ \&A representative Nping execution\fR
-.\" -c (Nping option): example of
-.\" --tcp (Nping option): example of
-.\" -p (Nping option): example of
.sp
.if n \{\
.RS 4
@@ -85,8 +81,6 @@ Nping done: 2 IP addresses pinged in 4\&.01 seconds
.SH "OPTIONS SUMMARY"
.PP
This options summary is printed when Nping is run with no arguments\&. It helps people remember the most common options, but is no substitute for the in\-depth documentation in the rest of this manual\&. Some obscure options aren\*(Aqt even included here\&.
-.\" summary of options (Nping)
-.\" command-line options: of Nping
.sp
.if n \{\
.RS 4
@@ -215,15 +209,11 @@ SEE THE MAN PAGE FOR MANY MORE OPTIONS, DESCRIPTIONS, AND EXAMPLES
.if n \{\
.RE
.\}
-.\"
-.\"
.SH "TARGET SPECIFICATION"
-.\" target specification: in Nping
.PP
Everything on the Nping command line that isn\*(Aqt an option or an option argument is treated as a target host specification\&. Nping uses the same syntax for target specifications that Nmap does\&. The simplest case is a single target given by IP address or hostname\&.
.PP
Nping supports CIDR\-style
-.\" CIDR (Classless Inter-Domain Routing)
addressing\&. You can append
/\fInumbits\fR
to an IPv4 address or hostname and Nping will send probes to every IP address for which the first
@@ -235,13 +225,11 @@ would send probes to the 256 hosts between 192\&.168\&.10\&.0 (binary:
11000000 10101000 00001010 11111111), inclusive\&.
192\&.168\&.10\&.40/24
would ping exactly the same targets\&. Given that the host scanme\&.nmap\&.org
-.\" scanme.nmap.org
is at the IP address 64\&.13\&.134\&.52, the specification
scanme\&.nmap\&.org/16
would send probes to the 65,536 IP addresses between 64\&.13\&.0\&.0 and 64\&.13\&.255\&.255\&. The smallest allowed value is
/0, which targets the whole Internet\&. The largest value is
/32, which targets just the named host or IP address because all address bits are fixed\&.
-.\" address ranges
.PP
CIDR notation is short but not always flexible enough\&. For example, you might want to send probes to 192\&.168\&.0\&.0/16 but skip any IPs ending with \&.0 or \&.255 because they may be used as subnet network and broadcast addresses\&. Nping supports this through octet range addressing\&. Rather than specify a normal IP address, you can specify a comma\-separated list of numbers or ranges for each octet\&. For example,
192\&.168\&.0\-255\&.1\-254
@@ -289,7 +277,6 @@ or
bcast
sets ff:ff:ff:ff:ff:ff\&.
.SH "GENERAL OPERATION"
-.\" general operation
.PP
Unlike other ping and packet generation tools, Nping supports multiple target host and port specifications\&. While this provides great flexibility, it is not obvious how Nping handles situations where there is more than one host and/or more than one port to send probes to\&. This section explains how Nping behaves in these cases\&.
.PP
@@ -372,56 +359,46 @@ SENT (4\&.0330s) TCP 192\&.168\&.0\&.21 > 3\&.3\&.3\&.3:139
.\}
.RE
.SH "PROBE MODES"
-.\" probe modes
.PP
Nping supports a wide variety of protocols\&. Although in some cases Nping can automatically determine the mode from the options used, it is generally a good idea to specify it explicitly\&.
.PP
-\fB\-\-tcp\-connect\fR (TCP Connect mode)
-.\" --tcp-connect (Nping option) .\" TCP connect: in Nping .\" TCP connect
+\fB\-\-tcp\-connect\fR (TCP Connect mode)
.RS 4
TCP connect mode is the default mode when a user does not have raw packet privileges\&. Instead of writing raw packets as most other modes do, Nping asks the underlying operating system to establish a connection with the target machine and port by issuing the
connect
system call\&. This is the same high\-level system call that web browsers, P2P clients, and most other network\-enabled applications use to establish a connection\&. It is part of a programming interface known as the Berkeley Sockets API\&. Rather than read raw packet responses off the wire, Nping uses this API to obtain status information on each connection attempt\&. For this reason, you will not be able to see the contents of the packets that are sent or received but only status information about the TCP connection establishment taking place\&.
.RE
.PP
-\fB\-\-tcp\fR (TCP mode)
-.\" --tcp (Nping option)
+\fB\-\-tcp\fR (TCP mode)
.RS 4
TCP is the mode that lets users create and send any kind of TCP packet\&. TCP packets are sent embedded in IP packets that can also be tuned\&. This mode can be used for many different purposes\&. For example you could try to discover open ports by sending TCP SYN messages without completing the three\-way handshake\&. This technique is often referred to as half\-open scanning, because you don\*(Aqt open a full TCP connection\&. You send a SYN packet, as if you are going to open a real connection and then wait for a response\&. A SYN/ACK indicates the port is open, while a RST indicates it\*(Aqs closed\&. If no response is received one could assume that some intermediate network device is filtering the responses\&. Another use could be to see how a remote TCP/IP stack behaves when it receives a non\-RFC\-compliant packet, like one with both SYN and RST flags set\&. One could also do some evil by creating custom RST packets using an spoofed IP address with the intent of closing an active TCP connection\&.
.RE
.PP
-\fB\-\-udp\fR (UDP mode)
-.\" --udp (Nping option)
+\fB\-\-udp\fR (UDP mode)
.RS 4
UDP mode can have two different behaviours\&. Under normal circumstances, it lets users create custom IP/UDP packets\&. However, if Nping is run by a user without raw packet privileges and no changes to the default protocol headers are requested, then Nping enters the unprivileged UDP mode which basically sends UDP packets to the specified target hosts and ports using the
sendto
system call\&. Note that in this unprivileged mode it is not possible to see low\-level header information of the packets on the wire but only status information about the amount of bytes that are being transmitted and received\&. UDP mode can be used to interact with any UDP\-based server\&. Examples are DNS servers, streaming servers, online gaming servers, and port knocking/single\-packet
-.\" port knocking
authorization daemons\&.
.RE
.PP
-\fB\-\-icmp\fR (ICMP mode)
-.\" --icmp (Nping option)
+\fB\-\-icmp\fR (ICMP mode)
.RS 4
ICMP mode is the default mode when the user runs Nping with raw packet privileges\&. Any kind of ICMP message can be created\&. The default ICMP type is Echo, i\&.e\&., ping\&. ICMP mode can be used for many different purposes, from a simple request for a timestamp or a netmask to the transmission of fake destination unreachable messages, custom redirects, and router advertisements\&.
.RE
.PP
-\fB\-\-arp\fR (ARP/RARP mode)
-.\" --arp (Nping option)
+\fB\-\-arp\fR (ARP/RARP mode)
.RS 4
ARP lets you create and send a few different ARP\-related packets\&. These include ARP, RARP, DRARP, and InARP requests and replies\&. This mode can ban be used to perform low\-level host discovery, and conduct ARP\-cache poisoning attacks\&.
.RE
.PP
-\fB\-\-traceroute\fR (Traceroute mode)
-.\" --tcp-connect (Nping option)
+\fB\-\-traceroute\fR (Traceroute mode)
.RS 4
Traceroute is not a mode by itself but a complement to TCP, UDP, and ICMP modes\&. When this option is specified Nping will set the IP TTL value of the first probe to 1\&. When the next router receives the packet it will drop it due to the expiration of the TTL and it will generate an ICMP destination unreachable message\&. The next probe will have a TTL of 2 so now the first router will forward the packet while the second router will be the one that drops the packet and generates the ICMP message\&. The third probe will have a TTL value of 3 and so on\&. By examining the source addresses of all those ICMP Destination Unreachable messages it is possible to determine the path that the probes take until they reach their final destination\&.
.RE
-.\"
.SH "TCP CONNECT MODE"
.PP
-\fB\-p \fR\fB\fIport_spec\fR\fR, \fB\-\-dest\-port \fR\fB\fIport_spec\fR\fR (Target ports)
-.\" --dest-port (Nping option) .\" -p (Nping option)
+\fB\-p \fR\fB\fIport_spec\fR\fR, \fB\-\-dest\-port \fR\fB\fIport_spec\fR\fR (Target ports)
.RS 4
This option specifies which ports you want to try to connect to\&. It can be a single port, a comma\-separated list of ports (e\&.g\&.
80,443,8080), a range (e\&.g\&.
@@ -431,8 +408,7 @@ This option specifies which ports you want to try to connect to\&. It can be a s
to target ports from 1 through 65535\&. Using port zero is allowed if you specify it explicitly\&.
.RE
.PP
-\fB\-g \fR\fB\fIportnumber\fR\fR, \fB\-\-source\-port \fR\fB\fIportnumber\fR\fR (Spoof source port)
-.\" --source-port (Nping option) .\" -g (Nping option)
+\fB\-g \fR\fB\fIportnumber\fR\fR, \fB\-\-source\-port \fR\fB\fIportnumber\fR\fR (Spoof source port)
.RS 4
This option asks Nping to use the specified port as source port for the TCP connections\&. Note that this might not work on all systems or may require root privileges\&. Specified value must be an integer in the range [0\(en65535]\&.
.RE
@@ -453,16 +429,14 @@ to target ports from 1 through 65535\&. Using port zero is allowed if you specif
This option asks Nping to use the specified port as source port for the TCP connections\&. Note that this might not work on all systems or may require root privileges\&. Specified value must be an integer in the range [0\(en65535]\&.
.RE
.PP
-\fB\-\-seq \fR\fB\fIseqnumber\fR\fR (Sequence Number)
-.\" --seq (Nping option)
+\fB\-\-seq \fR\fB\fIseqnumber\fR\fR (Sequence Number)
.RS 4
Specifies the TCP sequence number\&. In SYN packets this is the initial sequence number (ISN)\&. In a normal transmission this corresponds to the sequence number of the first byte of data in the segment\&.
\fIseqnumber\fR
must be a number in the range [0\(en4294967295]\&.
.RE
.PP
-\fB\-\-flags \fR\fB\fIflags\fR\fR (TCP Flags)
-.\" --flags (Nping option)
+\fB\-\-flags \fR\fB\fIflags\fR\fR (TCP Flags)
.RS 4
This option specifies which flags should be set in the TCP packet\&.
\fIflags\fR
@@ -522,75 +496,63 @@ means to set all flags\&.
NONE
means to set no flags\&. It is important that if you don\*(Aqt want any flag to be set, you request it explicitly because in some cases the SYN flag may be set by default\&. Here is a brief description of the meaning of each flag:
.PP
-CWR (Congestion Window Reduced)
-.\" CWR (TCP flag)
+CWR (Congestion Window Reduced)
.RS 4
Set by an ECN\-Capable sender when it reduces its congestion window (due to a retransmit timeout, a fast retransmit or in response to an ECN notification\&.
.RE
.PP
-ECN (Explicit Congestion Notification)
-.\" ECN (TCP flag)
+ECN (Explicit Congestion Notification)
.RS 4
During the three\-way handshake it indicates that sender is capable of performing explicit congestion notification\&. Normally it means that a packet with the IP Congestion Experienced flag set was received during normal transmission\&. See RFC 3168
-.\" RFC 3168
for more information\&.
.RE
.PP
-URG (Urgent)
-.\" URG (TCP flag)
+URG (Urgent)
.RS 4
Segment is urgent and the urgent pointer field carries valid information\&.
.RE
.PP
-ACK (Acknowledgement)
-.\" ACK (TCP flag)
+ACK (Acknowledgement)
.RS 4
The segment carries an acknowledgement and the value of the acknowledgement number field is valid and contains the next sequence number that is expected from the receiver\&.
.RE
.PP
-PSH (Push)
-.\" PSH (TCP flag)
+PSH (Push)
.RS 4
The data in this segment should be immediately pushed to the application layer on arrival\&.
.RE
.PP
-RST (Reset)
-.\" RST (TCP flag)
+RST (Reset)
.RS 4
There was some problem and the sender wants to abort the connection\&.
.RE
.PP
-SYN (Synchronize)
-.\" SYN (TCP flag)
+SYN (Synchronize)
.RS 4
The segment is a request to synchronize sequence numbers and establish a connection\&. The sequence number field contains the sender\*(Aqs initial sequence number\&.
.RE
.PP
-FIN (Finish)
-.\" FIN (TCP flag)
+FIN (Finish)
.RS 4
The sender wants to close the connection\&.
.RE
.RE
.PP
-\fB\-\-win \fR\fB\fIsize\fR\fR (Window Size)
-.\" --win (Nping option)
+\fB\-\-win \fR\fB\fIsize\fR\fR (Window Size)
.RS 4
Specifies the TCP window size, this is, the number of octets the sender of the segment is willing to accept from the receiver at one time\&. This is usually the size of the reception buffer that the OS allocates for a given connection\&.
\fIsize\fR
must be a number in the range [0\(en65535]\&.
.RE
.PP
-\fB\-\-badsum\fR (Invalid Checksum)
-.\" --badsum (Nping option)
+\fB\-\-badsum\fR (Invalid Checksum)
.RS 4
Asks Nping to use an invalid TCP checksum for the packets sent to target hosts\&. Since virtually all host IP stacks properly drop these packets, any responses received are likely coming from a firewall or an IDS that didn\*(Aqt bother to verify the checksum\&. For more details on this technique, see
\m[blue]\fB\%https://nmap.org/p60-12.html\fR\m[]\&.
.RE
.SH "UDP MODE"
.PP
-\fB\-p \fR\fB\fIport_spec\fR\fR, \fB\-\-dest\-port \fR\fB\fIport_spec\fR\fR (Target ports)
-.\" --dest-port (Nping option)
+\fB\-p \fR\fB\fIport_spec\fR\fR, \fB\-\-dest\-port \fR\fB\fIport_spec\fR\fR (Target ports)
.RS 4
This option specifies which ports you want UDP datagrams to be sent to\&. It can be a single port, a comma\-separated list of ports (e\&.g\&.
80,443,8080), a range (e\&.g\&.
@@ -600,8 +562,7 @@ This option specifies which ports you want UDP datagrams to be sent to\&. It can
to target ports from 1 through 65535\&. Using port zero is allowed if you specify it explicitly\&.
.RE
.PP
-\fB\-g \fR\fB\fIportnumber\fR\fR, \fB\-\-source\-port \fR\fB\fIportnumber\fR\fR (Spoof source port)
-.\" --source-port (Nping option)
+\fB\-g \fR\fB\fIportnumber\fR\fR, \fB\-\-source\-port \fR\fB\fIportnumber\fR\fR (Spoof source port)
.RS 4
This option asks Nping to use the specified port as source port for the transmitted datagrams\&. Note that this might not work on all systems or may require root privileges\&. Specified value must be an integer in the range [0\(en65535]\&.
.RE
@@ -613,8 +574,7 @@ Asks Nping to use an invalid UDP checksum for the packets sent to target hosts\&
.RE
.SH "ICMP MODE"
.PP
-\fB\-\-icmp\-type \fR\fB\fItype\fR\fR (ICMP type)
-.\" --icmp-type (Nping option)
+\fB\-\-icmp\-type \fR\fB\fItype\fR\fR (ICMP type)
.RS 4
This option specifies which type of ICMP messages should be generated\&.
\fItype\fR
@@ -626,8 +586,7 @@ for ICMP Echo Request), or you can use any of the mnemonics listed in
the section called \(lqICMP Types\(rq\&.
.RE
.PP
-\fB\-\-icmp\-code \fR\fB\fIcode\fR\fR (ICMP code)
-.\" --icmp-code (Nping option)
+\fB\-\-icmp\-code \fR\fB\fIcode\fR\fR (ICMP code)
.RS 4
This option specifies which ICMP code should be included in the generated ICMP messages\&.
\fIcode\fR
@@ -639,48 +598,42 @@ for Fragment Reassembly Time Exceeded), or you can use any of the mnemonics list
the section called \(lqICMP Codes\(rq\&.
.RE
.PP
-\fB\-\-icmp\-id \fR\fB\fIid\fR\fR (ICMP identifier)
-.\" --icmp-id (Nping option)
+\fB\-\-icmp\-id \fR\fB\fIid\fR\fR (ICMP identifier)
.RS 4
This option specifies the value of the identifier used in some of the ICMP messages\&. In general it is used to match request and reply messages\&.
\fIid\fR
must be a number in the range [0\(en65535]\&.
.RE
.PP
-\fB\-\-icmp\-seq \fR\fB\fIseq\fR\fR (ICMP sequence)
-.\" --icmp-seq (Nping option)
+\fB\-\-icmp\-seq \fR\fB\fIseq\fR\fR (ICMP sequence)
.RS 4
This option specifies the value of the sequence number field used in some ICMP messages\&. In general it is used to match request and reply messages\&.
\fIid\fR
must be a number in the range [0\(en65535]\&.
.RE
.PP
-\fB\-\-icmp\-redirect\-addr \fR\fB\fIaddr\fR\fR (ICMP Redirect address)
-.\" --icmp-redirect-addr (Nping option)
+\fB\-\-icmp\-redirect\-addr \fR\fB\fIaddr\fR\fR (ICMP Redirect address)
.RS 4
This option sets the address field in ICMP Redirect messages\&. In other words, it sets the IP address of the router that should be used when sending IP datagrams to the original destination\&.
\fIaddr\fR
can be either an IPv4 address or a hostname\&.
.RE
.PP
-\fB\-\-icmp\-param\-pointer \fR\fB\fIpointer\fR\fR (ICMP Parameter Problem pointer)
-.\" --icmp-param-pointer (Nping option)
+\fB\-\-icmp\-param\-pointer \fR\fB\fIpointer\fR\fR (ICMP Parameter Problem pointer)
.RS 4
This option specifies the pointer that indicates the location of the problem in ICMP Parameter Problem messages\&.
\fIpointer\fR
should be a number in the range [0\(en255]\&. Normally this option is only used when ICMP code is set to 0 ("Pointer indicates the error")\&.
.RE
.PP
-\fB\-\-icmp\-advert\-lifetime \fR\fB\fIttl\fR\fR (ICMP Router Advertisement Lifetime)
-.\" --icmp-advert-lifetime (Nping option)
+\fB\-\-icmp\-advert\-lifetime \fR\fB\fIttl\fR\fR (ICMP Router Advertisement Lifetime)
.RS 4
This option specifies the router advertisement lifetime, this is, the number of seconds the information carried in an ICMP Router Advertisement can be considered valid for\&.
\fIttl\fR
must be a positive integer in the range [0\(en65535]\&.
.RE
.PP
-\fB\-\-icmp\-advert\-entry \fR\fB\fIaddr\fR\fR\fB,\fR\fB\fIpref\fR\fR (ICMP Router Advertisement Entry)
-.\" --icmp-advert-entry (Nping option)
+\fB\-\-icmp\-advert\-entry \fR\fB\fIaddr\fR\fR\fB,\fR\fB\fIpref\fR\fR (ICMP Router Advertisement Entry)
.RS 4
This option adds a Router Advertisement entry to an ICMP Router Advertisement message\&. The parameter must be two values separated by a comma\&.
\fIaddr\fR
@@ -690,8 +643,7 @@ is the preference level for the specified IP\&. It must be a number in the range
\fB\-\-icmp\-advert\-entry 192\&.168\&.128\&.1,3\fR\&.
.RE
.PP
-\fB\-\-icmp\-orig\-time \fR\fB\fItimestamp\fR\fR (ICMP Originate Timestamp)
-.\" --icmp-orig-time (Nping option)
+\fB\-\-icmp\-orig\-time \fR\fB\fItimestamp\fR\fR (ICMP Originate Timestamp)
.RS 4
This option sets the Originate Timestamp in ICMP Timestamp messages\&. The Originate Timestamp is expressed as the number of milliseconds since midnight UTC and it corresponds to the time the sender last touched the Timestamp message before its transmission\&.
\fItimestamp\fR
@@ -706,8 +658,7 @@ now, for example
\fB\-\-icmp\-orig\-time now+200ms\fR\&.
.RE
.PP
-\fB\-\-icmp\-recv\-time \fR\fB\fItimestamp\fR\fR (ICMP Receive Timestamp)
-.\" --icmp-recv-time (Nping option)
+\fB\-\-icmp\-recv\-time \fR\fB\fItimestamp\fR\fR (ICMP Receive Timestamp)
.RS 4
This option sets the Receive Timestamp in ICMP Timestamp messages\&. The Receive Timestamp is expressed as the number of milliseconds since midnight UTC and it corresponds to the time the echoer first touched the Timestamp message on receipt\&.
\fItimestamp\fR
@@ -715,8 +666,7 @@ is as with
\fB\-\-icmp\-orig\-time\fR\&.
.RE
.PP
-\fB\-\-icmp\-trans\-time \fR\fB\fItimestamp\fR\fR (ICMP Transmit Timestamp)
-.\" --icmp-trans-time (Nping option)
+\fB\-\-icmp\-trans\-time \fR\fB\fItimestamp\fR\fR (ICMP Transmit Timestamp)
.RS 4
This option sets the Transmit Timestamp in ICMP Timestamp messages\&. The Transmit Timestamp is expressed as the number of milliseconds since midnight UTC and it corresponds to the time the echoer last touched the Timestamp message before its transmission\&.
\fItimestamp\fR
@@ -724,11 +674,9 @@ is as with
\fB\-\-icmp\-orig\-time\fR\&.
.RE
.SS "ICMP Types"
-.\" ICMP types: mnemonics of, in Nping
.PP
These identifiers may be used as mnemonics for the ICMP type numbers given to the
\fB\-\-icmp\-type\fR
-.\" --icmp-type (Nping option)
option\&. In general there are three forms of each identifier: the full name (e\&.g\&.
destination\-unreachable), the short name (e\&.g\&.
dest\-unr), or the initials (e\&.g\&.
@@ -821,16 +769,12 @@ Address Mask Reply (type 18)\&. This message contains a subnet mask and is sent
traceroute, trace, tc
.RS 4
Traceroute (type 30)\&. This message is normally sent by an intermediate device when it receives an IP datagram with a traceroute option\&. ICMP Traceroute messages are still experimental, see RFC 1393
-.\" RFC 1393
for more information\&.
.RE
-.\"
.SS "ICMP Codes"
-.\" ICMP codes: mnemonics of, in Nping
.PP
These identifiers may be used as mnemonics for the ICMP code numbers given to the
\fB\-\-icmp\-code\fR
-.\" --icmp-code (Nping option)
option\&. They are listed by the ICMP type they correspond to\&.
.sp
.it 1 an-trap
@@ -933,7 +877,6 @@ Code 15\&. Precedence value in the IP TOS field is lower than the minimum allowe
redirect\-network, redi\-net, net
.RS 4
Code 0\&. Redirect all future datagrams with the same destination network as the original datagram, to the router specified in the Address field\&. The use of this code is prohibited by RFC 1812\&.
-.\" RFC 1812
.RE
.PP
redirect\-host, redi\-host, host
@@ -1015,11 +958,9 @@ bad\-length, bad\-len, badlen
Code 2\&. The length of the IP datagram is incorrect\&.
.RE
.RE
-.\"
.SH "ARP MODE"
.PP
-\fB\-\-arp\-type \fR\fB\fItype\fR\fR (ICMP Type)
-.\" --arp-type (Nping option)
+\fB\-\-arp\-type \fR\fB\fItype\fR\fR (ICMP Type)
.RS 4
This option specifies which type of ARP messages should be generated\&.
\fItype\fR
@@ -1031,8 +972,7 @@ for ARP Request), or you can use one of the mnemonics from
the section called \(lqARP Types\(rq\&.
.RE
.PP
-\fB\-\-arp\-sender\-mac \fR\fB\fImac\fR\fR (Sender MAC address)
-.\" --arp-sender-mac (Nping option)
+\fB\-\-arp\-sender\-mac \fR\fB\fImac\fR\fR (Sender MAC address)
.RS 4
This option sets the Sender Hardware Address field of the ARP header\&. Although ARP supports many types of link layer addresses, currently Nping only supports MAC addresses\&.
\fImac\fR
@@ -1041,31 +981,26 @@ must be specified using the traditional MAC notation (e\&.g\&.
00\-0a\-8a\-32\-f4\-ae)\&.
.RE
.PP
-\fB\-\-arp\-sender\-ip \fR\fB\fIaddr\fR\fR (Sender IP address)
-.\" --arp-sender-ip (Nping option)
+\fB\-\-arp\-sender\-ip \fR\fB\fIaddr\fR\fR (Sender IP address)
.RS 4
This option sets the Sender IP field of the ARP header\&.
\fIaddr\fR
can be given as an IPv4 address or a hostname\&.
.RE
.PP
-\fB\-\-arp\-target\-mac \fR\fB\fImac\fR\fR (target MAC address)
-.\" --arp-target-mac (Nping option)
+\fB\-\-arp\-target\-mac \fR\fB\fImac\fR\fR (target MAC address)
.RS 4
This option sets the Target Hardware Address field of the ARP header\&.
.RE
.PP
-\fB\-\-arp\-target\-ip \fR\fB\fIaddr\fR\fR (target ip address)
-.\" --arp-target-ip (Nping option)
+\fB\-\-arp\-target\-ip \fR\fB\fIaddr\fR\fR (target ip address)
.RS 4
This option sets the Target IP field of the ARP header\&.
.RE
.SS "ARP Types"
-.\" ARP types: mnemonics of, in Nping
.PP
These identifiers may be used as mnemonics for the ARP type numbers given to the
\fB\-\-arp\-type\fR
-.\" --arp-type (Nping option)
option\&.
.PP
arp\-request, arp, a
@@ -1081,7 +1016,6 @@ ARP Reply (type 2)\&. An ARP reply is a message that a host sends in response to
rarp\-request, rarp, r
.RS 4
RARP Requests (type 3)\&. RARP requests are used to translate a link layer address (normally a MAC address) to a network layer address (usually an IP address)\&. Basically a RARP request is a broadcasted message sent by a host that wants to know his own IP address because it doesn\*(Aqt have any\&. It was the first protocol designed to solve the bootstrapping problem\&. However, RARP is now obsolete and DHCP is used instead\&. For more information about RARP see RFC 903\&.
-.\" RFC 903
.RE
.PP
rarp\-reply, rarp\-rep, rr
@@ -1092,7 +1026,6 @@ RARP Reply (type 4)\&. A RARP reply is a message sent in response to a RARP requ
drarp\-request, drarp, d
.RS 4
Dynamic RARP Request (type 5)\&. Dynamic RARP is an extension to RARP used to obtain or assign a network layer address from a fixed link layer address\&. DRARP was used mainly in Sun Microsystems platforms in the late 90\*(Aqs but now it\*(Aqs no longer used\&. See RFC 1931
-.\" RFC 1931
for more information\&.
.RE
.PP
@@ -1109,7 +1042,6 @@ DRARP Error (type 7)\&. DRARP Error messages are usually sent in response to DRA
inarp\-request, inarp, i
.RS 4
Inverse ARP Request (type 8)\&. InARP requests are used to translate a link layer address to a network layer address\&. It is similar to RARP request but in this case, the sender of the InARP request wants to know the network layer address of another node, not its own address\&. InARP is mainly used in Frame Relay and ATM networks\&. For more information see RFC 2390\&.
-.\" RFC 2390
.RE
.PP
inarp\-reply, inarp\-rep, ir
@@ -1120,73 +1052,61 @@ Inverse ARP Reply (type 9)\&. InARP reply messages are sent in response to InARP
arp\-nak, an
.RS 4
ARP NAK (type 10)\&. ARP NAK messages are an extension to the ATMARP protocol and they are used to improve the robustness of the ATMARP server mechanism\&. With ARP NAK, a client can determine the difference between a catastrophic server failure and an ATMARP table lookup failure\&. See RFC 1577
-.\" RFC 1577
for more information\&.
.RE
-.\"
.SH "IPV4 OPTIONS"
.PP
-\fB\-S \fR\fB\fIaddr\fR\fR, \fB\-\-source\-ip \fR\fB\fIaddr\fR\fR (Source IP Address)
-.\" --source-ip (Nping option) .\" -S (Nping option)
+\fB\-S \fR\fB\fIaddr\fR\fR, \fB\-\-source\-ip \fR\fB\fIaddr\fR\fR (Source IP Address)
.RS 4
Sets the source IP address\&. This option lets you specify a custom IP address to be used as source IP address in sent packets\&. This allows spoofing the sender of the packets\&.
\fIaddr\fR
can be an IPv4 address or a hostname\&.
.RE
.PP
-\fB\-\-dest\-ip \fR\fB\fIaddr\fR\fR (Destination IP Address)
-.\" --dest-ip (Nping option)
+\fB\-\-dest\-ip \fR\fB\fIaddr\fR\fR (Destination IP Address)
.RS 4
Adds a target to Nping\*(Aqs target list\&. This option is provided for consistency but its use is deprecated in favor of plain target specifications\&. See
the section called \(lqTARGET SPECIFICATION\(rq\&.
.RE
.PP
-\fB\-\-tos \fR\fB\fItos\fR\fR (Type of Service)
-.\" --tos (Nping option)
+\fB\-\-tos \fR\fB\fItos\fR\fR (Type of Service)
.RS 4
Sets the IP TOS field\&. The TOS field is used to carry information to provide quality of service features\&. It is normally used to support a technique called Differentiated Services\&. See RFC 2474
-.\" RFC 2474
for more information\&.
\fItos\fR
must be a number in the range [0\(en255]\&.
.RE
.PP
-\fB\-\-id \fR\fB\fIid\fR\fR (Identification)
-.\" --id (Nping option)
+\fB\-\-id \fR\fB\fIid\fR\fR (Identification)
.RS 4
Sets the IPv4 Identification field\&. The Identification field is a 16\-bit value that is common to all fragments belonging to a particular message\&. The value is used by the receiver to reassemble the original message from the fragments received\&.
\fIid\fR
must be a number in the range [0\(en65535]\&.
.RE
.PP
-\fB\-\-df\fR (Don\*(Aqt Fragment)
-.\" --df (Nping option)
+\fB\-\-df\fR (Don\*(Aqt Fragment)
.RS 4
Sets the Don\*(Aqt Fragment bit in sent packets\&. When an IP datagram has its DF flag set, intermediate devices are not allowed to fragment it so if it needs to travel across a network with a MTU smaller that datagram length the datagram will have to be dropped\&. Normally an ICMP Destination Unreachable message is generated and sent back to the sender\&.
.RE
.PP
-\fB\-\-mf\fR (More Fragments)
-.\" --mf (Nping option)
+\fB\-\-mf\fR (More Fragments)
.RS 4
Sets the More Fragments bit in sent packets\&. The MF flag is set to indicate the receiver that the current datagram is a fragment of some larger datagram\&. When set to zero it indicates that the current datagram is either the last fragment in the set or that it is the only fragment\&.
.RE
.PP
-\fB\-\-ttl \fR\fB\fIhops\fR\fR (Time To Live)
-.\" --ttl (Nping option)
+\fB\-\-ttl \fR\fB\fIhops\fR\fR (Time To Live)
.RS 4
Sets the IPv4 Time\-To\-Live (TTL) field in sent packets to the given value\&. The TTL field specifies how long the datagram is allowed to exist on the network\&. It was originally intended to represent a number of seconds but it actually represents the number of hops a packet can traverse before being dropped\&. The TTL tries to avoid a situation in which undeliverable datagrams keep being forwarded from one router to another endlessly\&.
\fIhops\fR
must be a number in the range [0\(en255]\&.
.RE
.PP
-\fB\-\-badsum\-ip\fR (Invalid IP checksum)
-.\" --badsum-ip (Nping option)
+\fB\-\-badsum\-ip\fR (Invalid IP checksum)
.RS 4
Asks Nping to use an invalid IP checksum for packets sent to target hosts\&. Note that some systems (like most Linux kernels), may fix the checksum before placing the packet on the wire, so even if Nping shows the incorrect checksum in its output, the packets may be transparently corrected by the kernel\&.
.RE
.PP
-\fB\-\-ip\-options \fR\fB\fIS|R [route]|L [route]|T|U \&.\&.\&.\fR\fR, \fB\-\-ip\-options \fR\fB\fIhex string\fR\fR (IP Options)
-.\" --ip-options (Nping option)
+\fB\-\-ip\-options \fR\fB\fIS|R [route]|L [route]|T|U \&.\&.\&.\fR\fR, \fB\-\-ip\-options \fR\fB\fIhex string\fR\fR (IP Options)
.RS 4
The IP protocol offers several options which may be placed in packet headers\&. Unlike the ubiquitous TCP options, IP options are rarely seen due to practicality and security concerns\&. In fact, many Internet routers block the most dangerous options such as source routing\&. Yet options can still be useful in some cases for determining and manipulating the network route to target machines\&. For example, you may be able to use the record route option to determine a path to a target even when more traditional traceroute\-style approaches fail\&. Or if your packets are being dropped by a certain firewall, you may be able to specify a different route with the strict or loose source routing options\&.
.sp
@@ -1209,8 +1129,7 @@ For more information and examples of using IP options with Nping, see the mailin
\m[blue]\fB\%http://seclists.org/nmap-dev/2006/q3/0052.html\fR\m[]\&.
.RE
.PP
-\fB\-\-mtu \fR\fB\fIsize\fR\fR (Maximum Transmission Unit)
-.\" --mtu (Nping option)
+\fB\-\-mtu \fR\fB\fIsize\fR\fR (Maximum Transmission Unit)
.RS 4
This option sets a fictional MTU in Nping so IP datagrams larger than
\fIsize\fR
@@ -1220,8 +1139,7 @@ must be specified in bytes and corresponds to the number of octets that can be c
.RE
.SH "IPV6 OPTIONS"
.PP
-\fB\-6\fR, \fB\-\-ipv6\fR (Use IPv6)
-.\" --ipv6 (Nping option) .\" -6 (Nping option)
+\fB\-6\fR, \fB\-\-ipv6\fR (Use IPv6)
.RS 4
Tells Nping to use IP version 6 instead of the default IPv4\&. It is generally a good idea to specify this option as early as possible in the command line so Nping can parse it soon and know in advance that the rest of the parameters refer to IPv6\&. The command syntax is the same as usual except that you also add the
\fB\-6\fR
@@ -1234,45 +1152,38 @@ While IPv6 hasn\*(Aqt exactly taken the world by storm, it gets significant use
Please note that IPv6 support is still highly experimental and many modes and options may not work with it\&.
.RE
.PP
-\fB\-S \fR\fB\fIaddr\fR\fR, \fB\-\-source\-ip \fR\fB\fIaddr\fR\fR (Source IP Address)
-.\" --source-ip (Nping option)
+\fB\-S \fR\fB\fIaddr\fR\fR, \fB\-\-source\-ip \fR\fB\fIaddr\fR\fR (Source IP Address)
.RS 4
Sets the source IP address\&. This option lets you specify a custom IP address to be used as source IP address in sent packets\&. This allows spoofing the sender of the packets\&.
\fIaddr\fR
can be an IPv6 address or a hostname\&.
.RE
.PP
-\fB\-\-dest\-ip \fR\fB\fIaddr\fR\fR (Destination IP Address)
-.\" --dest-ip (Nping option)
+\fB\-\-dest\-ip \fR\fB\fIaddr\fR\fR (Destination IP Address)
.RS 4
Adds a target to Nping\*(Aqs target list\&. This option is provided for consistency but its use is deprecated in favor of plain target specifications\&. See
the section called \(lqTARGET SPECIFICATION\(rq\&.
.RE
.PP
-\fB\-\-flow \fR\fB\fIlabel\fR\fR (Flow Label)
-.\" --flow (Nping option)
+\fB\-\-flow \fR\fB\fIlabel\fR\fR (Flow Label)
.RS 4
Sets the IPv6 Flow Label\&. The Flow Label field is 20 bits long and is intended to provide certain quality\-of\-service properties for real\-time datagram delivery\&. However, it has not been widely adopted, and not all routers or endpoints support it\&. Check RFC 2460
-.\" RFC 2560
for more information\&.
\fIlabel\fR
must be an integer in the range [0\(en1048575]\&.
.RE
.PP
-\fB\-\-traffic\-class \fR\fB\fIclass\fR\fR (Traffic Class)
-.\" --traffic-class (Nping option)
+\fB\-\-traffic\-class \fR\fB\fIclass\fR\fR (Traffic Class)
.RS 4
Sets the IPv6 Traffic Class\&. This field is similar to the TOS field in IPv4, and is intended to provide the Differentiated Services method, enabling scalable service discrimination in the Internet without the need for per\-flow state and signaling at every hop\&. Check RFC 2474
-.\" RFC 2474
for more information\&.
\fIclass\fR
must be an integer in the range [0\(en255]\&.
.RE
.PP
-\fB\-\-hop\-limit \fR\fB\fIhops\fR\fR (Hop Limit)
-.\" --hop-limit (Nping option)
+\fB\-\-hop\-limit \fR\fB\fIhops\fR\fR (Hop Limit)
.RS 4
-.\" hop limit (IPv6)
+
Sets the IPv6 Hop Limit field in sent packets to the given value\&. The Hop Limit field specifies how long the datagram is allowed to exist on the network\&. It represents the number of hops a packet can traverse before being dropped\&. As with the TTL in IPv4, IPv6 Hop Limit tries to avoid a situation in which undeliverable datagrams keep being forwarded from one router to another endlessly\&.
\fIhops\fR
must be a number in the range [0\(en255]\&.
@@ -1281,8 +1192,7 @@ must be a number in the range [0\(en255]\&.
.PP
In most cases Nping sends packets at the raw IP level\&. This means that Nping creates its own IP packets and transmits them through a raw socket\&. However, in some cases it may be necessary to send packets at the raw Ethernet level\&. This happens, for example, when Nping is run under Windows (as Microsoft has disabled raw socket support since Windows XP SP2), or when Nping is asked to send ARP packets\&. Since in some cases it is necessary to construct ethernet frames, Nping offers some options to manipulate the different fields\&.
.PP
-\fB\-\-dest\-mac \fR\fB\fImac\fR\fR (Ethernet Destination MAC Address)
-.\" --dest-mac (Nping option)
+\fB\-\-dest\-mac \fR\fB\fImac\fR\fR (Ethernet Destination MAC Address)
.RS 4
This option sets the destination MAC address that should be set in outgoing Ethernet frames\&. This is useful in case Nping can\*(Aqt determine the next hop\*(Aqs MAC address or when you want to route probes through a router other than the configured default gateway\&. The MAC address should have the usual format of six colon\-separated bytes, e\&.g\&.
00:50:56:d4:01:98\&. Alternatively, hyphens may be used instead of colons\&. Use the word
@@ -1296,15 +1206,13 @@ bcast
to use ff:ff:ff:ff:ff:ff\&. If you set up a bogus destination MAC address your probes may not reach the intended targets\&.
.RE
.PP
-\fB\-\-source\-mac \fR\fB\fImac\fR\fR (Ethernet Source MAC Address)
-.\" --source-mac (Nping option)
+\fB\-\-source\-mac \fR\fB\fImac\fR\fR (Ethernet Source MAC Address)
.RS 4
This option sets the source MAC address that should be set in outgoing Ethernet frames\&. This is useful in case Nping can\*(Aqt determine your network interface MAC address or when you want to inject traffic into the network while hiding your network card\*(Aqs real address\&. The syntax is the same as for
\-\-dest\-mac\&. If you set up a bogus source MAC address you may not receive probe replies\&.
.RE
.PP
-\fB\-\-ether\-type \fR\fB\fItype\fR\fR (Ethertype)
-.\" --ether-type (Nping option)
+\fB\-\-ether\-type \fR\fB\fItype\fR\fR (Ethertype)
.RS 4
This option sets the Ethertype field of the ethernet frame\&. The Ethertype is used to indicate which protocol is encapsulated in the payload\&.
\fItype\fR
@@ -1316,11 +1224,9 @@ for IP version 4), or one of the mnemonics from
the section called \(lqEthernet Types\(rq\&.
.RE
.SS "Ethernet Types"
-.\" Ethernet types: mnemonics of, in Nping
.PP
These identifiers may be used as mnemonics for the Ethertype numbers given to the
\fB\-\-arp\-type\fR
-.\" --arp-type (Nping option)
option\&.
.PP
ipv4, ip, 4
@@ -1447,11 +1353,9 @@ frrr
.RS 4
Fast Roaming Remote Request (type 0x890D)\&.
.RE
-.\"
.SH "PAYLOAD OPTIONS"
.PP
-\fB\-\-data \fR\fB\fIhex string\fR\fR (Append custom binary data to sent packets)
-.\" --data (Nping option)
+\fB\-\-data \fR\fB\fIhex string\fR\fR (Append custom binary data to sent packets)
.RS 4
This option lets you include binary data as payload in sent packets\&.
\fIhex string\fR
@@ -1467,8 +1371,7 @@ and
no byte\-order conversion is performed\&. Make sure you specify the information in the byte order expected by the receiver\&.
.RE
.PP
-\fB\-\-data\-string \fR\fB\fIstring\fR\fR (Append custom string to sent packets)
-.\" --data-string (Nping option)
+\fB\-\-data\-string \fR\fB\fIstring\fR\fR (Append custom string to sent packets)
.RS 4
This option lets you include a regular string as payload in sent packets\&.
\fIstring\fR
@@ -1476,8 +1379,7 @@ can contain any string\&. However, note that some characters may depend on your
\fB\-\-data\-string "Jimmy Jazz\&.\&.\&."\fR\&.
.RE
.PP
-\fB\-\-data\-length \fR\fB\fIlen\fR\fR (Append random data to sent packets)
-.\" --data-length (Nping option)
+\fB\-\-data\-length \fR\fB\fIlen\fR\fR (Append random data to sent packets)
.RS 4
This option lets you include
\fIlen\fR
@@ -1498,8 +1400,7 @@ Internally, client and server communicate over an encrypted and authenticated ch
.PP
The following paragraphs describe the different options available in Nping\*(Aqs Echo mode\&.
.PP
-\fB\-\-ec \fR\fB\fIpassphrase\fR\fR, \fB\-\-echo\-client \fR\fB\fIpassphrase\fR\fR (Run Echo client)
-.\" --echo-client (Nping option) .\" --ec (Nping option)
+\fB\-\-ec \fR\fB\fIpassphrase\fR\fR, \fB\-\-echo\-client \fR\fB\fIpassphrase\fR\fR (Run Echo client)
.RS 4
This option tells Nping to run as an Echo client\&.
\fIpassphrase\fR
@@ -1515,8 +1416,7 @@ or
\fB\-\-icmp\-type\fR, etc\&.)\&. The only exceptions are ARP\-related flags, which are not supported in Echo mode, as protocols like ARP are closely related to the data link layer and its probes can\*(Aqt pass through different network segments\&.
.RE
.PP
-\fB\-\-es \fR\fB\fIpassphrase\fR\fR, \fB\-\-echo\-server \fR\fB\fIpassphrase\fR\fR (Run Echo server)
-.\" --echo-server (Nping option) .\" --es (Nping option)
+\fB\-\-es \fR\fB\fIpassphrase\fR\fR, \fB\-\-echo\-server \fR\fB\fIpassphrase\fR\fR (Run Echo server)
.RS 4
This option tells Nping to run as an Echo server\&.
\fIpassphrase\fR
@@ -1525,16 +1425,14 @@ is a sequence of ASCII characters that is used used to generate the cryptographi
\fB\-\-no\-crypto\fR\&. See below for details\&.
.RE
.PP
-\fB\-\-ep \fR\fB\fIport\fR\fR, \fB\-\-echo\-port \fR\fB\fIport\fR\fR (Set Echo TCP port number)
-.\" --echo-port (Nping option) .\" --ep (Nping option)
+\fB\-\-ep \fR\fB\fIport\fR\fR, \fB\-\-echo\-port \fR\fB\fIport\fR\fR (Set Echo TCP port number)
.RS 4
This option asks Nping to use the specified TCP port number for the Echo side channel connection\&. If this option is used with
\fB\-\-echo\-server\fR, it specifies the port on which the server listens for connections\&. If it is used with
\fB\-\-echo\-client\fR, it specifies the port to connect to on the remote host\&. By default, port number 9929 is used\&.
.RE
.PP
-\fB\-\-nc\fR, \fB\-\-no\-crypto\fR (Disable encryption and authentication)
-.\" --no-crypto (Nping option) .\" --nc (Nping option)
+\fB\-\-nc\fR, \fB\-\-no\-crypto\fR (Disable encryption and authentication)
.RS 4
This option asks Nping not to use any cryptographic operations during an Echo session\&. In practical terms, this means that the Echo side channel session data will be transmitted in the clear, and no authentication will be performed by the server or client during the session establishment phase\&. When
\fB\-\-no\-crypto\fR
@@ -1549,14 +1447,12 @@ This option must be specified if Nping was compiled without openSSL support\&. N
The \-\-no\-crypto flag might be useful when setting up a public Echo server, because it allows users to connect to the Echo server without the need for any passphrase or shared secret\&. However, it is strongly recommended to not use \-\-no\-crypto unless absolutely necessary\&. Public Echo servers should be configured to use the passphrase "public" or the empty passphrase (\-\-echo\-server "") as the use of cryptography does not only provide confidentiality and authentication but also message integrity\&.
.RE
.PP
-\fB\-\-once\fR (Serve one client and quit)
-.\" --once (Nping option)
+\fB\-\-once\fR (Serve one client and quit)
.RS 4
This option asks the Echo server to quit after serving one client\&. This is useful when only a single Echo session wants to be established as it eliminates the need to access the remote host to shutdown the server\&.
.RE
.PP
-\fB\-\-safe\-payloads\fR (Zero application data before echoing a packet)
-.\" --safe-payloads (Nping option)
+\fB\-\-safe\-payloads\fR (Zero application data before echoing a packet)
.RS 4
This option asks the Echo server to erase any application layer data found in client packets before echoing them\&. When the option is enabled, the Echo server parses the packets received from Echo clients and tries to determine if they contain data beyond the transport layer\&. If such data is found, it is overwritten with zeroes before transmitting the packets to the appropriate Echo client\&.
.sp
@@ -1566,7 +1462,6 @@ Echo servers can handle multiple simultaneous clients running multiple echo sess
The following examples illustrate how Nping\*(Aqs Echo mode can be used to discover intermediate devices\&.
.PP
\fBExample\ \&2.\ \&Discovering NAT devices\fR
-.\" --echo-client (Nping option): example of
.sp
.if n \{\
.RS 4
@@ -1626,8 +1521,7 @@ The output clearly shows the presence of a NAT device in the client\*(Aqs local
In this example, the output is a bit more tricky\&. The absence of error messages shows that the Echo client has successfully established an Echo session with the server\&. However, no CAPT packets can be seen in the output\&. This means that none of the transmitted packets reached the server\&. Interestingly, a TCP SYN\-ACK packet was received in response to the first TCP\-SYN packet (and also, it is known that the target host does not have port 80 open)\&. This behavior reveals the presence of a transparent web proxy cache server (which in this case is an old MS ISA server)\&.
.SH "TIMING AND PERFORMANCE OPTIONS"
.PP
-\fB\-\-delay \fR\fB\fItime\fR\fR (Delay between probes)
-.\" --delay (Nping option)
+\fB\-\-delay \fR\fB\fItime\fR\fR (Delay between probes)
.RS 4
This option lets you control for how long will Nping wait before sending the next probe\&. Like in many other ping tools, the default delay is one second\&.
\fItime\fR
@@ -1645,8 +1539,7 @@ for hours (e\&.g\&.
2h)\&.
.RE
.PP
-\fB\-\-rate \fR\fB\fIrate\fR\fR (Send probes at a given rate)
-.\" --rate (Nping option)
+\fB\-\-rate \fR\fB\fIrate\fR\fR (Send probes at a given rate)
.RS 4
This option specifies the number of probes that Nping should send per second\&. This option and
\fB\-\-delay\fR
@@ -1657,94 +1550,79 @@ is the same as
.RE
.SH "MISCELLANEOUS OPTIONS"
.PP
-\fB\-h\fR, \fB\-\-help\fR (Display help)
-.\" --help (Nping option) .\" --h (Nping option)
+\fB\-h\fR, \fB\-\-help\fR (Display help)
.RS 4
Displays help information and exits\&.
.RE
.PP
-\fB\-V\fR, \fB\-\-version\fR (Display version)
-.\" --version (Nping option) .\" -V (Nping option)
+\fB\-V\fR, \fB\-\-version\fR (Display version)
.RS 4
Displays the program\*(Aqs version number and quits\&.
.RE
.PP
-\fB\-c \fR\fB\fIrounds\fR\fR, \fB\-\-count \fR\fB\fIrounds\fR\fR (Stop after a given number of rounds)
-.\" --count (Nping option) .\" -c (Nping option)
+\fB\-c \fR\fB\fIrounds\fR\fR, \fB\-\-count \fR\fB\fIrounds\fR\fR (Stop after a given number of rounds)
.RS 4
This option lets you specify the number of times that Nping should loop over target hosts (and in some cases target ports)\&. Nping calls these
\(lqrounds\(rq\&. In a basic execution with only one target (and only one target port in TCP/UDP modes), the number of rounds matches the number of probes sent to the target host\&. However, in more complex executions where Nping is run against multiple targets and multiple ports, the number of rounds is the number of times that Nping sends a complete set of probes that covers all target IPs and all target ports\&. For example, if Nping is asked to send TCP SYN packets to hosts 192\&.168\&.1\&.0\-255 and ports 80 and 433, then 256 \(mu 2\ \&=\ \&512 packets are sent in one round\&. So if you specify
\fB\-c 100\fR, Nping will loop over the different target hosts and ports 100 times, sending a total of 256 \(mu 2 \(mu 100\ \&=\ \&51200 packets\&. By default Nping runs for 5 rounds\&. If a value of 0 is specified, Nping will run continuously\&.
.RE
.PP
-\fB\-e \fR\fB\fIname\fR\fR, \fB\-\-interface \fR\fB\fIname\fR\fR (Set the network interface to be used)
-.\" --interface (Nping option) .\" -e (Nping option)
+\fB\-e \fR\fB\fIname\fR\fR, \fB\-\-interface \fR\fB\fIname\fR\fR (Set the network interface to be used)
.RS 4
This option tells Nping what interface should be used to send and receive packets\&. Nping should be able to detect this automatically, but it will tell you if it cannot\&.
\fIname\fR
must be the name of an existing network interface with an assigned IP address\&.
.RE
.PP
-\fB\-\-privileged\fR (Assume that the user is fully privileged)
-.\" --privileged (Nping option)
+\fB\-\-privileged\fR (Assume that the user is fully privileged)
.RS 4
Tells Nping to simply assume that it is privileged enough to perform raw socket sends, packet sniffing, and similar operations that usually require special privileges\&. By default Nping quits if such operations are requested by a user that has no root or administrator privileges\&. This option may be useful on Linux, BSD or similar systems that can be configured to allow unprivileged users to perform raw\-packet transmissions\&. The
\fBNPING_PRIVILEGED\fR
-.\" NPING_PRIVILEGED environment variable
environment variable may be set as an alternative to using
\fB\-\-privileged\fR\&.
.RE
.PP
-\fB\-\-unprivileged\fR (Assume that the user lacks raw socket privileges)
-.\" --unprivileged (Nping option)
+\fB\-\-unprivileged\fR (Assume that the user lacks raw socket privileges)
.RS 4
This option is the opposite of
\fB\-\-privileged\fR\&. It tells Nping to treat the user as lacking network raw socket and sniffing privileges\&. This is useful for testing, debugging, or when the raw network functionality of your operating system is somehow broken\&. The
\fBNPING_UNPRIVILEGED\fR
-.\" NPING_UNPRIVILEGED environment variable
environment variable may be set as an alternative to using
\fB\-\-unprivileged\fR\&.
.RE
.PP
-\fB\-\-send\-eth\fR (Use raw ethernet sending)
-.\" --send-eth (Nping option)
+\fB\-\-send\-eth\fR (Use raw ethernet sending)
.RS 4
Asks Nping to send packets at the raw ethernet (data link) layer rather than the higher IP (network) layer\&. By default, Nping chooses the one which is generally best for the platform it is running on\&. Raw sockets (IP layer) are generally most efficient for Unix machines, while ethernet frames are required for Windows operation since Microsoft disabled raw socket support\&. Nping still uses raw IP packets despite this option when there is no other choice (such as non\-ethernet connections)\&.
.RE
.PP
-\fB\-\-send\-ip\fR (Send at raw IP level)
-.\" --send-ip (Nping option)
+\fB\-\-send\-ip\fR (Send at raw IP level)
.RS 4
Asks Nping to send packets via raw IP sockets rather than sending lower level ethernet frames\&. It is the complement to the
\fB\-\-send\-eth\fR
option\&.
.RE
.PP
-\fB\-\-bpf\-filter \fR\fB\fIfilter spec\fR\fR \fB\-\-filter \fR\fB\fIfilter spec\fR\fR (Set custom BPF filter)
-.\" --bpf-filter (Nping option) .\" --filter (Nping option)
+\fB\-\-bpf\-filter \fR\fB\fIfilter spec\fR\fR \fB\-\-filter \fR\fB\fIfilter spec\fR\fR (Set custom BPF filter)
.RS 4
This option lets you use a custom BPF filter\&. By default Nping chooses a filter that is intended to capture most common responses to the particular probes that are sent\&. For example, when sending TCP packets, the filter is set to capture packets whose destination port matches the probe\*(Aqs source port or ICMP error messages that may be generated by the target or any intermediate device as a result of the probe\&. If for some reason you expect strange packets in response to sent probes or you just want to sniff a particular kind of traffic, you can specify a custom filter using the BPF syntax used by tools like tcpdump\&.
-.\" tcpdump
See the documentation at
\m[blue]\fB\%http://www.tcpdump.org/\fR\m[]
for more information\&.
.RE
.PP
-\fB\-H\fR, \fB\-\-hide\-sent\fR (Do not display sent packets)
-.\" --hide-sent (Nping option) .\" -H (Nping option)
+\fB\-H\fR, \fB\-\-hide\-sent\fR (Do not display sent packets)
.RS 4
This option tells Nping not to print information about sent packets\&. This can be useful when using very short inter\-probe delays (i\&.e\&., when flooding), because printing information to the standard output has a computational cost and disabling it can probably speed things up a bit\&. Also, it may be useful when using Nping to detect active hosts or open ports (e\&.g\&. sending probes to all TCP ports in a /24 subnet)\&. In that case, users may not want to see thousands of sent probes but just the replies generated by active hosts\&.
.RE
.PP
-\fB\-N\fR, \fB\-\-no\-capture\fR (Do not attempt to capture replies)
-.\" --no-capture (Nping option) .\" -N (Nping option)
+\fB\-N\fR, \fB\-\-no\-capture\fR (Do not attempt to capture replies)
.RS 4
This option tells Nping to skip packet capture\&. This means that packets in response to sent probes will not be processed or displayed\&. This can be useful when doing flooding and network stack stress tests\&. Note that when this option is specified, most of the statistics shown at the end of the execution will be useless\&. This option does not work with TCP Connect mode\&.
.RE
.SH "OUTPUT OPTIONS"
.PP
-\fB\-v\fR\fB[\fIlevel\fR]\fR, \fB\-\-verbose \fR\fB[\fIlevel\fR]\fR (Increase or set verbosity level)
-.\" --verbose (Nping option) .\" -v (Nping option)
+\fB\-v\fR\fB[\fIlevel\fR]\fR, \fB\-\-verbose \fR\fB[\fIlevel\fR]\fR (Increase or set verbosity level)
.RS 4
Increases the verbosity level, causing Nping to print more information during its execution\&. There are 9 levels of verbosity (\-4 to 4)\&. Every instance of
\fB\-v\fR
@@ -1754,7 +1632,6 @@ decrements the verbosity level by one\&. Alternatively you can specify the level
\fB\-v3\fR
or
\fB\-v\-1\fR\&. These are the available levels:
-.\" verbosity levels of Nping
.PP
Level \-4
.RS 4
@@ -1802,14 +1679,12 @@ Same as level 3\&.
.RE
.RE
.PP
-\fB\-q\fR\fB[\fIlevel\fR]\fR, \fB\-\-reduce\-verbosity \fR\fB[\fIlevel\fR]\fR (Decrease verbosity level)
-.\" --reduce-verbosity (Nping option) .\" -q (Nping option)
+\fB\-q\fR\fB[\fIlevel\fR]\fR, \fB\-\-reduce\-verbosity \fR\fB[\fIlevel\fR]\fR (Decrease verbosity level)
.RS 4
Decreases the verbosity level, causing Nping to print less information during its execution\&.
.RE
.PP
-\fB\-d\fR\fB[\fIlevel\fR]\fR (Increase or set debugging level)
-.\" -d (Nping option)
+\fB\-d\fR\fB[\fIlevel\fR]\fR (Increase or set debugging level)
.RS 4
When even verbose mode doesn\*(Aqt provide sufficient data for you, debugging is available to flood you with much more! As with the
\fB\-v\fR, debugging is enabled with a command\-line flag
@@ -1822,7 +1697,7 @@ to set the level directly; for example
\fB\-d4\fR\&.
.sp
Debugging output is useful when you suspect a bug in Nping, or if you are simply confused as to what Nping is doing and why\&. As this feature is mostly intended for developers, debug lines aren\*(Aqt always self\-explanatory\&. You may get something like
-.\" Nsock: debug output of
+
.sp
.if n \{\
.RS 4
@@ -1835,7 +1710,6 @@ NSOCK (1\&.0000s) Callback: TIMER SUCCESS for EID 12; tcpconnect_event_handler()
.\}
.sp
If you don\*(Aqt understand a line, your only recourses are to ignore it, look it up in the source code, or request help from the development list (nmap\-dev)\&. Some lines are self\-explanatory, but the messages become more obscure as the debug level is increased\&. These are the available levels:
-.\" debug levels of Nping
.PP
Level 0
.RS 4
@@ -1865,7 +1739,6 @@ Like level 3 but also displays messages only a real Nping freak would want to se
Level 5
.RS 4
Like level 4 but it enables basic debug information related to external libraries like Nsock\&.
-.\" Nsock
.RE
.PP
Level 6
@@ -1874,7 +1747,6 @@ Like level 5 but it enables full, very detailed, debug information related to ex
.RE
.RE
.SH "BUGS"
-.\" bugs, reporting
.PP
Like its author, Nping isn\*(Aqt perfect\&. But you can help make it better by sending bug reports or even writing patches\&. If Nping doesn\*(Aqt behave the way you expect, first upgrade to the latest Nmap version available from
\m[blue]\fB\%https://nmap.org/download.html\fR\m[]\&. If the problem persists, do some research to determine whether it has already been discovered and addressed\&. Try searching for the error message on our search page at
@@ -1883,7 +1755,6 @@ or at Google\&. Also try browsing the
nmap\-dev
archives at
\m[blue]\fB\%http://seclists.org/\fR\m[]
-.\" nmap-dev mailing list
Read this full manual page as well\&. If nothing comes out of this, mail a bug report to
\&. Please include everything you have learned about the problem, as well as what version of Nping you are running and what operating system version it is running on\&. Problem reports and Nping usage questions sent to
diff --git a/nping/nping.h b/nping/nping.h
index 067ed1351..9b5794f86 100644
--- a/nping/nping.h
+++ b/nping/nping.h
@@ -342,7 +342,7 @@
/* General tunable defines **************************************************/
#define NPING_NAME "Nping"
#define NPING_URL "https://nmap.org/nping"
-#define NPING_VERSION "0.7.50SVN"
+#define NPING_VERSION "0.7.60SVN"
#define DEFAULT_VERBOSITY VB_0
diff --git a/zenmap/share/zenmap/config/zenmap_version b/zenmap/share/zenmap/config/zenmap_version
index 363786c11..c77711dc2 100644
--- a/zenmap/share/zenmap/config/zenmap_version
+++ b/zenmap/share/zenmap/config/zenmap_version
@@ -1 +1 @@
-7.50SVN
+7.60SVN
diff --git a/zenmap/zenmapCore/Version.py b/zenmap/zenmapCore/Version.py
index 0d1d0abff..0751d6b0a 100644
--- a/zenmap/zenmapCore/Version.py
+++ b/zenmap/zenmapCore/Version.py
@@ -1 +1 @@
-VERSION = "7.50SVN"
+VERSION = "7.60SVN"