NCAT(1)
๐ NAME ๐
ncat โ Concatenate and redirect sockets
โจ SYNOPSIS โจ
ncat [OPTIONS...] [hostname] [port]
๐ธ DESCRIPTION ๐ธ
Okay bestie, gather round: Ncat is a feature-packed networking utility that reads and writes data across networks straight from the command line. It was written for the Nmap Project and is literally the culmination of the currently splintered family of Netcat incarnations. Iconic origin story, no cap.
Itโs designed to be a reliable back-end tool that instantly gives network connectivity to other applications and users. Ncat works with IPv4 and IPv6, and it gives you a virtually limitless number of potential uses. The range? Unhinged. The utility? Real.
Among Ncatโs vast number of features, thereโs the ability to chain Ncats together; redirect TCP, UDP, and SCTP ports to other sites; SSL support; and proxy connections via SOCKS4, SOCKS5 or HTTP proxies (with optional proxy authentication too, fancy). Some general principles apply to most applications, which gives you the capability of instantly adding networking support to software that would normally never support it. Itโs giving โglow-up for programs that were not built for this.โ
๐ OPTIONS SUMMARY ๐
Hereโs the exact cheat-sheet block, bestie โ copied character for character because we do not play with command-line details:
Ncat 7.993 ( https://nmap.org/ncat )
Usage: ncat [options] [hostname] [port]
Options taking a time assume seconds. Append 'ms' for milliseconds,
's' for seconds, 'm' for minutes, or 'h' for hours (e.g. 500ms).
-4 Use IPv4 only
-6 Use IPv6 only
-U, --unixsock Use Unix domain sockets only
--vsock Use vsock sockets only
-C, --crlf Use CRLF for EOL sequence
-c, --sh-exec <command> Executes the given command via /bin/sh
-e, --exec <command> Executes the given command
--lua-exec <filename> Executes the given Lua script
-g hop1[,hop2,...] Loose source routing hop points (8 max)
-G <n> Loose source routing hop pointer (4, 8, 12, ...)
-m, --max-conns <n> Maximum <n> simultaneous connections
-h, --help Display this help screen
-d, --delay <time> Wait between read/writes
-o, --output <filename> Dump session data to a file
-x, --hex-dump <filename> Dump session data as hex to a file
-i, --idle-timeout <time> Idle read/write timeout
-p, --source-port port Specify source port to use
-s, --source addr Specify source address to use (doesn't affect -l)
-l, --listen Bind and listen for incoming connections
-k, --keep-open Accept multiple connections in listen mode
-n, --nodns Do not resolve hostnames via DNS
-t, --telnet Answer Telnet negotiations
-u, --udp Use UDP instead of default TCP
--sctp Use SCTP instead of default TCP
-v, --verbose Set verbosity level (can be used several times)
-w, --wait <time> Connect timeout
-z Zero-I/O mode, report connection status only
--append-output Append rather than clobber specified output files
--send-only Only send data, ignoring received; quit on EOF
--recv-only Only receive data, never send anything
--no-shutdown Continue half-duplex when receiving EOF on stdin
-q <time> After EOF on stdin, wait <time> then quit.
--allow Allow only given hosts to connect to Ncat
--allowfile A file of hosts allowed to connect to Ncat
--deny Deny given hosts from connecting to Ncat
--denyfile A file of hosts denied from connecting to Ncat
--broker Enable Ncat's connection brokering mode
--chat Start a simple Ncat chat server
--proxy <addr[:port]> Specify address of host to proxy through
--proxy-type <type> Specify proxy type ("http", "socks4", "socks5")
--proxy-auth <auth> Authenticate with HTTP or SOCKS proxy server
--proxy-dns <type> Specify where to resolve proxy destination
--ssl Connect or listen with SSL
--ssl-cert Specify SSL certificate file (PEM) for listening
--ssl-key Specify SSL private key (PEM) for listening
--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-servername Request distinct server name (SNI)
--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
๐ฅ CONNECT MODE AND LISTEN MODE ๐ฅ
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. Very main character duality.
In connect mode, the hostname and port arguments tell what to connect to. hostname is required, and may be a hostname or IP address. If port is supplied, it must be a decimal port number. If omitted, it defaults to 31337.
In listen mode, hostname and port control the address the server will bind to. Both arguments are optional in listen mode. If hostname is omitted, it defaults to listening on all available addresses over IPv4 and IPv6. If port is omitted, it defaults to 31337.
๐ฆ PROTOCOL OPTIONS ๐ฆ
-4(IPv4 only) โ Force the use of IPv4 only. IPv6 can take a nap.-6(IPv6 only) โ Force the use of IPv6 only. IPv4 can take a nap.-U,--unixsock(Use Unix domain sockets) โ Use Unix domain sockets rather than network sockets. This option may be used on its own for stream sockets, or combined with--udpfor datagram sockets. A description of-Umode is in the section called โUNIX DOMAIN SOCKETSโ.-u,--udp(Use UDP) โ Use UDP for the connection (the default is TCP).--sctp(Use SCTP) โ Use SCTP for the connection (the default is TCP). SCTP support is implemented in TCP-compatible mode.--vsock(UseAF_VSOCKsockets) โ UseAF_VSOCKsockets rather than the default TCP sockets (Linux only). This option may be used on its own for stream sockets or combined with--udpfor datagram sockets. A description of--vsockmode is in the section called โAF_VSOCK SOCKETSโ.
๐ CONNECT MODE OPTIONS ๐
-g hop1[,hop2,...](Loose source routing) โ Sets hops for IPv4 loose source routing. You can use-gonce with a comma-separated list of hops, use-gmultiple times with single hops to build the list, or combine the two. Hops can be given as IP addresses or hostnames.-G ptr(Set source routing pointer) โ Sets the IPv4 source route โpointerโ for use with-g. The argument must be a multiple of4and no more than28. Not all operating systems support setting this pointer to anything other than four.-p port,--source-port port(Specify source port) โ Set the port number for Ncat to bind to.-s host,--source host(Specify source address) โ Set the address for Ncat to bind to.-z(Zero-I/O mode) โ Causes Ncat to quit immediately after establishing a connection. This is provided for compatibility with other netcat implementations which use it as a test for connectivity or for port scanning. Ncat does not allow specifying multiple target ports.
๐ LISTEN MODE OPTIONS ๐
See the section called โACCESS CONTROL OPTIONSโ for information on limiting the hosts that may connect to the listening Ncat process.
-l,--listen(Listen for connections) โ Listen for connections rather than connecting to a remote machine.-m numconns,--max-conns numconns(Specify maximum number of connections) โ The maximum number of simultaneous connections accepted by an Ncat instance.100is the default (60on Windows).-k,--keep-open(Accept multiple connections, do not quit on socket EOF) โ 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--listen. 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.
In connect mode, the -k option has a different meaning: when the remote end of a TCP connection shuts down its side of the connection, Ncat will keep running and sending any available data. This was the default behavior in Ncat 7.95 and earlier, but it was changed to better align with existing netcat implementations. TCP is the only transport that supports this option in connect mode.
--broker(Connection brokering) โ 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--listen, which causes the--listenport to have broker mode enabled.--chat(Ad-hoc โchat serverโ) โ The--chatoption enables chat mode, intended for the exchange of text between several users. In chat mode, connection brokering is turned on. Ncat prefixes each message received with an ID before relaying it to the other connections. The ID is unique for each connected client. This helps distinguish who sent what. Additionally, non-printing characters such as control characters are escaped to keep them from doing damage to a terminal.
โจ SSL OPTIONS โจ
okay bestie, this whole section is the encrypted-glow-up zone โ TLS/SSL everything, no cap. ๐
--sslโ Use SSL. 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. In server mode, this option listens for incoming SSL connections, rather than plain untunneled traffic. In UDP mode, this option enables Datagram TLS (DTLS). ๐ฆ--ssl-verifyโ Verify server certificates. In client mode,--ssl-verifyis like--sslexcept that it also requires verification of the server certificate. Ncat comes with a default set of trusted certificates in the fileca-bundle.crt. Some operating systems provide a default list of trusted certificates; these will also be used if available. Use--ssl-trustfileto give a custom list. Use-vone or more times to get details about verification failures. Ncat does not check for revoked certificates. This option has no effect in server mode. ๐ญ--ssl-certcertfile.pem โ Specify SSL certificate. 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--ssl-key. ๐--ssl-keykeyfile.pem โ Specify SSL private key. This option gives the location of the PEM-encoded private key file that goes with the certificate named with--ssl-cert. ๐--ssl-trustfilecert.pem โ List trusted certificates. This option sets a list of certificates that are trusted for purposes of certificate verification. It has no effect unless combined with--ssl-verify. The argument to this option is the name of a PEM 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. ๐--ssl-cipherscipherlist โ Specify SSL ciphersuites. 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 OpenSSLciphers(1)man page, and defaults toALL:!aNULL:!eNULL:!LOW:!EXP:!RC4:!MD5:@STRENGTH. ๐ธ--ssl-servernamename โ Request distinct server name. In client mode, this option sets the TLS SNI (Server Name Indication) extension, which tells the server the name of the logical server Ncat is contacting. This is important when the target server hosts multiple virtual servers at a single underlying network address. If the option is not provided, the TLS SNI extension will be populated with the target server hostname. โจ--ssl-alpnALPN list โ Specify ALPN protocol list. 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. ๐ซถ
๐ PROXY OPTIONS ๐
proxy era!! routing through another host is giving main character energy, and these flags are the whole vibe check. ๐
--proxyhost[:port] โ Specify proxy address. Requests proxying through host:port, using the protocol specified by--proxy-type. If no port is specified, the proxy protocol's well-known port is used (1080for SOCKS and3128for HTTP). When specifying an IPv6 HTTP proxy server using the IP address rather than the hostname, the square-bracket notation (for example[2001:db8::1]:8080) MUST be used to separate the port from the IPv6 address. If the proxy requires authentication, use--proxy-auth. ๐--proxy-typeproto โ Specify proxy protocol. In connect mode, this option requests the protocol proto to connect through the proxy host specified by--proxy. In listen mode, this option has Ncat act as a proxy server using the specified protocol. The currently available protocols in connect mode arehttp(CONNECT),socks4(SOCKSv4), andsocks5(SOCKSv5). The only server currently supported ishttp. If this option is not used, the default protocol ishttp. ๐ฅ--proxy-authuser[:pass] โ Specify proxy credentials. 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--proxy-type httpor--proxy-type socks5, the form should beusername:password. For--proxy-type socks4, it should be a username only. These credentials can be alternatively passed onto Ncat by setting environment variableNCAT_PROXY_AUTH, which reduces the risk of the credentials being captured in process logs. (Option--proxy-authtakes precedence.) ๐--proxy-dnstype โ Specify where to resolve proxy destination. In connect mode, it provides control over whether proxy destination hostnames are resolved by the remote proxy server or locally, by Ncat itself. Possible values for type are:localโ Hostnames are resolved locally on the Ncat host. Ncat exits with error if the hostname cannot be resolved. ๐remoteโ Hostnames are passed directly onto the remote proxy server. This is the default behavior. โญbothโ Hostname resolution is first attempted on the Ncat host. Unresolvable hostnames are passed onto the remote proxy server. ๐ฆnoneโ Hostname resolution is completely disabled. Only a literal IPv4 or IPv6 address can be used as the proxy destination. ๐ซ
Local hostname resolution generally respects IP version specified with options -4 or -6, except for SOCKS4, which is incompatible with IPv6. ๐
๐ COMMAND EXECUTION OPTIONS ๐
bestie, this is where Ncat stops just chatting and starts doing stuff โ running commands over the socket like it's inetd's cooler younger sister. ๐
-ecommand,--execcommand โ Execute command. 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--keep-open, 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-moption. By default this is set to100(60on Windows). ๐ฅ-ccommand,--sh-execcommand โ Execute command via sh. Same as-e, except it tries to execute the command via/bin/sh. This means you don't have to specify the full path for the command, and shell facilities like environment variables are available. ๐--lua-execfile โ Execute a .lua script. Runs the specified file as a Lua script after a connection has been established, using a built-in interpreter. Both the script's standard input and the standard output are redirected to the connection data streams. ๐
All exec options add the following variables to the child's environment:
NCAT_REMOTE_ADDR,NCAT_REMOTE_PORTโ The IP address and port number of the remote host. In connect mode, it's the target's address; in listen mode, it's the client's address. ๐NCAT_LOCAL_ADDR,NCAT_LOCAL_PORTโ The IP address and port number of the local end of the connection. ๐NCAT_PROTOโ The protocol in use: one ofTCP,UDP, andSCTP. ๐ก
๐ ACCESS CONTROL OPTIONS ๐
vibe check for who gets to connect โ allow list and deny list, and yes, --allow wins every conflict. periodt. ๐
--allowhost[,host,...] โ Allow connections. 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--allowand--deny,--allowtakes precedence. Host specifications follow the same syntax used by Nmap. โ--allowfilefile โ Allow connections from file. This has the same functionality as--allow, except that the allowed hosts are provided in a new-line delimited allow file, rather than directly on the command line. ๐--denyhost[,host,...] โ Deny connections. 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--allowand--deny,--allowtakes precedence. Host specifications follow the same syntax used by Nmap. โ--denyfilefile โ Deny connections from file. This is the same functionality as--deny, except that excluded hosts are provided in a new-line delimited deny file, rather than directly on the command line. ๐
โฐ TIMING OPTIONS โฐ
okay so timing is literally everything, and these options are how you control the pace. These options accept a time parameter. This is specified in seconds by default, though you can append ms, s, m, or h to the value to specify milliseconds, seconds, minutes, or hours. โณ
-dtime,--delaytime โ Specify line delay. 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 annoyingiptables --limitoptions. ๐ข-itime,--idle-timeouttime โ Specify idle timeout. Set a fixed timeout for idle connections. If the idle timeout is reached, the connection is terminated. ๐ค-qtime โ Delay quit after EOF on stdin. After EOF on stdin, wait the specified amount of time, then quit. If time is negative, wait forever. Ncat may still quit based on idle timeout or EOF on the socket. ๐ฐ๏ธ-wtime,--waittime โ Specify connect timeout. Set a fixed timeout for connection attempts. โฑ๏ธ
๐ธ OUTPUT OPTIONS ๐ธ
saving the receipts!! these options dump your session data so you can obsess over it later. ๐พ
-ofile,--outputfile โ Save session data. Dump session data to a file. ๐-xfile,--hex-dumpfile โ Save session data in hex. Dump session data in hex to a file. ๐ข--append-outputโ Append output. Issue Ncat with--append-ouputalong with-oand/or-xand it will append the resulted output rather than truncating the specified output files. ๐งพ-v,--verboseโ Be verbose. Issue Ncat with-vand it will be verbose and display all kinds of useful connection based information. Use more than once (-vv,-vvv...) for greater verbosity. ๐ฃ๏ธ
๐ MISC OPTIONS ๐
-C,--crlf(Use CRLF as EOL) โ bestie, this one makes Ncat turn LF line endings into CRLF while it's taking input from standard input. Super useful when you're talking to one of those stringent servers straight from your terminal, in literally any of the many common plain-text protocols that use CRLF for end-of-line. It's giving "old protocol, new me" โจ-h,--help(Help screen) โ pops up a short help screen with the common options and parameters, then dips. Quick lil vibe check, no commitment ๐ซถ--recv-only(Only receive data) โ with this one passed, Ncat will only receive data and will not try to send anything. Listen-only main character energy ๐--send-only(Only send data) โ with this one passed, Ncat only sends data and ignores anything received. Heads up: this option also causes Ncat to close the network connection and terminate after EOF is received on standard input. So it's a "say your piece and leave" situation ๐--no-shutdown(Do not shutdown into half-duplex mode) โ tells Ncat not to invokeshutdownon a socket after seeing EOF on stdin. It exists purely for backward-compatibility with OpenBSD netcat, which does this exact thing when you run it with its-doption. Nostalgia, but make it a flag ๐-n,--nodns(Do not resolve hostnames) โ completely disables hostname resolution across all Ncat options โ the destination, source address, source routing hops, and the proxy. Every address must be specified numerically. (Little note tho: resolution of proxy destinations is controlled separately via option--proxy-dns.) No DNS, no delays, no thoughts, just numbers ๐ข-t,--telnet(Answer Telnet negotiations) โ handles DO/DONT WILL/WONT Telnet negotiations. Which slaps, because it makes it possible to script Telnet sessions with Ncat ๐ฆ--version(Display version) โ shows the Ncat version number and exits. Short, sweet, iconic ๐
๐ธ UNIX DOMAIN SOCKETS ๐ธ
So the -U option (same as --unixsock) makes Ncat use Unix domain sockets instead of network sockets. These bad boys exist as an entry in the filesystem, which means you must give the name of a socket to connect to or to listen on. No hostname, no port, just a path, iykyk ๐
To make a connection:
ncat -U ~/unixsock
To listen on a socket:
ncat -l -U ~/unixsock
Listen mode will create the socket if it doesn't exist. And heads up โ the socket will continue to exist after the program ends. It does not clean up after itself, it's not that kind of girl ๐
Both stream and datagram domain sockets are supported. Use -U on its own for stream sockets, or combine it with --udp for datagram sockets. Datagram sockets require a source socket to connect from โ by default, a source socket with a random filename will be created as needed, and deleted when the program ends. Want a specific name? Use the --source with a path to use a source socket with a specific name. Cute and custom ๐
๐ฆ AF_VSOCK SOCKETS ๐ฆ
The --vsock option makes Ncat use AF_VSOCK sockets instead of network sockets โ very hypervisor-chic of it. You gotta give a CID instead of a hostname or IP address. For example, to make a connection to the host:
ncat --vsock 2 1234
To listen on a socket:
ncat -l --vsock 1234
Both stream and datagram domain sockets are supported, but socket type availability depends on the hypervisor. So like, don't come for Ncat if your hypervisor doesn't support it ๐ Use --vsock on its own for stream sockets, or combine it with --udp for datagram sockets.
โจ EXAMPLES โจ
Connect to example.org on TCP port 8080.
ncat example.org 8080
Listen for connections on TCP port 8080.
ncat -l 8080
Redirect TCP port 8080 on the local machine to host on port 80.
ncat --sh-exec "ncat example.org 80" -l 8080 --keep-open
Bind to TCP port 8081 and attach /bin/bash for the world to access freely.
ncat --exec "/bin/bash" -l 8081 --keep-open
Ngl bestie, "for the world to access freely" is doing a LOT of heavy lifting in that sentence. Please read the ACCESS CONTROL OPTIONS and think about --allow before you ship a shell to the entire internet. ๐ญ
Bind a shell to TCP port 8081, limit access to hosts on a local network, and limit the maximum number of simultaneous connections to 3.
ncat --exec "/bin/bash" --max-conns 3 --allow 192.168.0.0/24 -l 8081
--keep-open
Connect to smtphost:25 through a SOCKS4 server on port 1080.
ncat --proxy socks4host --proxy-type socks4 --proxy-auth joe
smtphost 25
Connect to smtphost:25 through a SOCKS5 server on port 1080.
ncat --proxy socks5host --proxy-type socks5 --proxy-auth joe:secret
smtphost 25
Create an HTTP proxy server on localhost port 8888.
ncat -l --proxy-type http localhost 8888
Send a file over TCP port 9899 from host2 (client) to host1 (server).
HOST1$ ncat -l 9899 > outputfile
HOST2$ ncat HOST1 9899 < inputfile
Transfer in the other direction, turning Ncat into a "one file" server.
HOST1$ ncat -l 9899 < inputfile
HOST2$ ncat HOST1 9899 > outputfile
๐ EXIT CODE ๐
The exit code reflects whether a connection was made and completed successfully. Real talk:
0means there was no error. Slay. ๐1means there was a network error of some kind โ for example "Connection refused" or "Connection reset". We've all been there bestie ๐ญ2is reserved for all other errors, like an invalid option or a nonexistent file.
๐ BUGS ๐
Like its authors, Ncat isn't perfect. But you can help make it better by sending bug reports or even writing patches โ glow-up via community contributions, we love to see it ๐
If Ncat doesn't behave the way you expect, first upgrade to the latest version available from https://nmap.org. If the problem persists, do some research to determine whether it has already been discovered and addressed. Try Googling the error message or browsing the nmap-dev archives at https://seclists.org/. Literally search first, bestie, it's free ๐
Read this full manual page as well. If nothing comes of this, mail a bug report to <dev@nmap.org>. 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. (No offense Fyodor, the mailing list is just built different ๐ซถ)
Code patches to fix bugs are even better than bug reports. Basic instructions for creating patch files with your changes are available at https://svn.nmap.org/nmap/HACKING. Patches may be sent to nmap-dev (recommended) or to Fyodor directly. Fix it AND flex it, we stan a contributor ๐
๐ AUTHORS ๐
- Chris Gibson
<chris@linuxops.net> - Gordon Lyon (Fyodor)
<fyodor@nmap.org>(http://insecure.org) - Kris Katterjohn
<katterjohn@gmail.com> - Mixter
<mixter@gmail.com>
The original Netcat was written by Hobbit <hobbit@avian.org>. While Ncat isn't built on any code from the "traditional" Netcat (or any other implementation), Ncat is most definitely based on Netcat in spirit and functionality. Respect the ancestors ๐ซก
๐ LEGAL NOTICES ๐
Ncat Copyright and Licensing
Ncat is (C) 2005โ2022 Nmap Software 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 https://nmap.org/man/man-legal.html. Free and open, the way it should be ๐ฆ
Creative Commons License for this Ncat Guide
This Ncat Reference Guide is (C) 2005โ2022 Nmap Software LLC. It is hereby placed under version 3.0 of the Creative Commons Attribution License[1]. This allows you redistribute and modify the work as you desire, as long as you credit the original source. Alternatively, you may choose to treat this document as falling under the same license as Ncat itself (discussed previously). Credit where credit is due, always ๐
Source Code Availability and Community Contributions
Source is provided to this software because we believe users have a right to know exactly what a program is going to do before they run it. This also allows you to audit the software for security holes (none have been found so far). Transparency = main character energy โจ
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 <dev@nmap.org> 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 (Nmap Software LLC) the unlimited, non-exclusive right to reuse, modify, and relicense the code. Nmap will always be available 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. Say it with your chest ๐ฃ
No Warranty
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 Nmap Public Source License for more details at https://nmap.org/npsl/, or in the LICENSE file included with Nmap.
Yes, that's the scary all-caps part. It's real, it matters, and you should read it. No cap. ๐
Inappropriate Usage
Ncat should never be installed with special privileges (e.g. suid root). That would open up a major security vulnerability as other users on the system (or attackers) could use it for privilege escalation.
Like, genuinely, do not do this. This is the biggest red flag in the whole page. ๐ฉ
Third-Party Software
This product includes software developed by the Apache Software Foundation[2]. A modified version of the Libpcap portable packet capture library[3] is distributed along with Ncat. The Windows version of Ncat utilized the Libpcap-derived Npcap library[4] instead. Certain raw networking functions use the Libdnet[5] networking library, which was written by Dug Song. A modified version is distributed with Ncat. Ncat can optionally link with the OpenSSL cryptography toolkit[6] for SSL version detection support. All of the third-party software described in this paragraph is freely redistributable under BSD-style software licenses. All of them, every single one, credited and licensed properly ๐ธ
โญ NOTES โญ
- Creative Commons Attribution License โ
http://creativecommons.org/licenses/by/3.0/ - Apache Software Foundation โ
http://www.apache.org - Libpcap portable packet capture library โ
http://www.tcpdump.org - Npcap library โ
https://npcap.com - Libdnet โ
http://libdnet.sourceforge.net - OpenSSL cryptography toolkit โ
http://www.openssl.org
And that's the whole page, bestie!! ๐ You made it to the end, which honestly is iconic of you. This one's from Ncat, dated 10/23/2026, and it's page NCAT(1) in the manual set โ so if you need to find it again, that's your girl. Now go forth and ncat responsibly, pls don't bind a shell to the open internet, and remember: with great sockets comes great responsibility. muah ๐โจ๐ฆ
๐ฆ where this page comes from
- arch rolling: nmap 7.993-1 ยท LicenseRef-Nmap-Public-Source-License-Version-0.95
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms