Netcat

Last updated
netcat
Original author(s) *Hobbit*
Developer(s) Avian Research
Initial releaseOctober 28, 1995;28 years ago (1995-10-28) [1]
Final release
1.10 / March 1996;28 years ago (1996-03)
Operating system Unix and Unix-like, DOS, Microsoft Windows, Windows CE
Type Network utility
License Original version: custom, permissive license
GNU version: GPL
OpenBSD version: BSD
Website nc110.sourceforge.io

netcat (often abbreviated to nc) is a computer networking utility for reading from and writing to network connections using TCP or UDP. The command is designed to be a dependable back-end that can be used directly or easily driven by other programs and scripts. At the same time, it is a feature-rich network debugging and investigation tool, since it can produce almost any kind of connection its user could need and has a number of built-in capabilities.

Contents

It is able to perform port scanning, file transferring and port listening.

Features

The original netcat's features include: [2]

Rewrites like GNU's and OpenBSD's support additional features. For example, OpenBSD's nc supports TLS, and GNU netcat natively supports a tunneling mode supporting UDP and TCP (optionally allowing one to be tunneled over the other) in a single command, [3] where other versions may require piping data from one netcat instance to another.

Ports and reimplementations

The original version of netcat was a Unix program. The last version (1.10) was released in March 1996. [4]

There are several implementations on POSIX systems, including rewrites from scratch like GNU netcat [5] or OpenBSD netcat, [6] the latter of which supports IPv6 and TLS. The OpenBSD version has been ported to the FreeBSD base, [7] Windows/Cygwin, [8] and Linux. [9] Mac OS X comes with netcat installed as of OSX 10.13 or users can use MacPorts to install a variant. [10]

A DOS version of netcat called NTOOL is included in the FreeDOS Package group Networking. [11] It is based on the WatTCP stack and licensed under the European Union Public Licence Version 1.1. [12]

Known ports for embedded systems includes versions for Windows CE (named "Netcat 4 wince" [13] ) or for the iPhone. [14]

BusyBox includes by default a lightweight version of netcat.

Solaris 11 includes netcat implementation based on OpenBSD netcat.

Socat [15] is a more complex variant of netcat. It is larger and more flexible and has more options that must be configured for a given task. On February 1, 2016, Santiago Zanella-Beguelin and Microsoft Vulnerability Research issued a security advisory regarding a composite Diffie-Hellman parameter which had been hard-coded into the OpenSSL implementation of socat. [16] The implausibility that a composite might have been unintentionally introduced where a prime number is required has led to the suspicion of sabotage to introduce a backdoor software vulnerability. [17] This socat bug affected version 1.7.3.0 and 2.0.0-b8 it was corrected in following releases from 1.7.3.1 and 2.0.0-b9. [16]

Cryptcat [18] is a version of netcat with integrated transport encryption capabilities.

In the middle of 2005, Nmap announced another netcat incarnation called Ncat. [19] It features new possibilities such as "Connection Brokering", TCP/UDP Redirection, SOCKS4 client and server support, ability to "Chain" Ncat processes, HTTP CONNECT proxying (and proxy chaining), SSL connect/listen support and IP address/connection filtering. Like Nmap, Ncat is cross-platform.

On some systems, modified versions or similar netcat utilities go by the command name(s) nc, ncat, pnetcat, socat, sock, socket, sbd.

ncat

Ncat is a similar tool to netcat provided by Nmap suite. [19] "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." [20]

Ncat features includes: ability to chain Ncats together, redirect both TCP and UDP ports to other sites, SSL support, and proxy connections via SOCKS4 or HTTP (CONNECT method) proxies (with optional proxy authentication as well). [21]

See also

Related Research Articles

<span class="mw-page-title-main">Cygwin</span> Unix-like environment for Windows

Cygwin is a Unix-like environment and command-line interface for Microsoft Windows.

Stunnel is an open-source multi-platform application used to provide a universal TLS/SSL tunneling service.

SOCKS is an Internet protocol that exchanges network packets between a client and server through a proxy server. SOCKS5 optionally provides authentication so only authorized users may access a server. Practically, a SOCKS server proxies TCP connections to an arbitrary IP address, and provides a means for UDP packets to be forwarded. A SOCKS server accepts incoming client connection on TCP port 1080, as defined in RFC 1928.

In computer networking, Layer 2 Tunneling Protocol (L2TP) is a tunneling protocol used to support virtual private networks (VPNs) or as part of the delivery of services by ISPs. It uses encryption ('hiding') only for its own control messages, and does not provide any encryption or confidentiality of content by itself. Rather, it provides a tunnel for Layer 2, and the tunnel itself may be passed over a Layer 3 encryption protocol such as IPsec.

<span class="mw-page-title-main">Wget</span> Computer command line program

GNU Wget is a computer program that retrieves content from web servers. It is part of the GNU Project. Its name derives from "World Wide Web" and "get". It supports downloading via HTTP, HTTPS, and FTP.

<span class="mw-page-title-main">Nmap</span> Network scanner

Nmap is a network scanner created by Gordon Lyon. Nmap is used to discover hosts and services on a computer network by sending packets and analyzing the responses.

A port scanner is an application designed to probe a server or host for open ports. Such an application may be used by administrators to verify security policies of their networks and by attackers to identify network services running on a host and exploit vulnerabilities.

OpenVPN is a virtual private network (VPN) system that implements techniques to create secure point-to-point or site-to-site connections in routed or bridged configurations and remote access facilities. It implements both client and server applications.

netstat Command line network statistics tool

In computing, netstat is a command-line network utility that displays network connections for Transmission Control Protocol, routing tables, and a number of network interface and network protocol statistics. It is available on Unix, Plan 9, Inferno, and Unix-like operating systems including macOS, Linux, Solaris and BSD. It is also available on IBM OS/2 and on Microsoft Windows NT-based operating systems including Windows XP, Windows Vista, Windows 7, Windows 8 and Windows 10.

In computer networks, a tunneling protocol is a communication protocol which allows for the movement of data from one network to another. It can, for example, allow private network communications to be sent across a public network, or for one network protocol to be carried over an incompatible network, through a process called encapsulation.

Datagram Transport Layer Security (DTLS) is a communications protocol providing security to datagram-based applications by allowing them to communicate in a way designed to prevent eavesdropping, tampering, or message forgery. The DTLS protocol is based on the stream-oriented Transport Layer Security (TLS) protocol and is intended to provide similar security guarantees. The DTLS protocol datagram preserves the semantics of the underlying transport—the application does not suffer from the delays associated with stream protocols, but because it uses UDP or SCTP, the application has to deal with packet reordering, loss of datagram and data larger than the size of a datagram network packet. Because DTLS uses UDP or SCTP rather than TCP, it avoids the "TCP meltdown problem", when being used to create a VPN tunnel.

<span class="mw-page-title-main">Ettercap (software)</span> Network traffic analysis and interception software

Ettercap is a free and open source network security tool for man-in-the-middle attacks on a LAN. It can be used for computer network protocol analysis and security auditing. It runs on various Unix-like operating systems including Linux, Mac OS X, BSD and Solaris, and on Microsoft Windows. It is capable of intercepting traffic on a network segment, capturing passwords, and conducting active eavesdropping against a number of common protocols. Its original developers later founded Hacking Team.

A network socket is a software structure within a network node of a computer network that serves as an endpoint for sending and receiving data across the network. The structure and properties of a socket are defined by an application programming interface (API) for the networking architecture. Sockets are created only during the lifetime of a process of an application running in the node.

Secure Socket Tunneling Protocol (SSTP) is a form of virtual private network (VPN) tunnel that provides a mechanism to transport PPP traffic through an SSL/TLS channel. SSL/TLS provides transport-level security with key negotiation, encryption and traffic integrity checking. The use of SSL/TLS over TCP port 443 allows SSTP to pass through virtually all firewalls and proxy servers except for authenticated web proxies.

<span class="mw-page-title-main">OpenSSH</span> Set of computer programs providing encrypted communication sessions

OpenSSH is a suite of secure networking utilities based on the Secure Shell (SSH) protocol, which provides a secure channel over an unsecured network in a client–server architecture.

ngrep Packet analyser

ngrep is a network packet analyzer written by Jordan Ritter. It has a command-line interface, and relies upon the pcap library and the GNU regex library.

<span class="mw-page-title-main">Mosh (software)</span> Remote terminal

In computing, Mosh is a tool used to connect from a client computer to a server over the Internet, to run a remote terminal. Mosh is similar to SSH, with additional features meant to improve usability for mobile users. The major features are:

<span class="mw-page-title-main">SoftEther VPN</span> Open-source VPN client and server software

SoftEther VPN is free open-source, cross-platform, multi-protocol VPN client and VPN server software, developed as part of Daiyuu Nobori's master's thesis research at the University of Tsukuba. VPN protocols such as SSL VPN, L2TP/IPsec, OpenVPN, and Microsoft Secure Socket Tunneling Protocol are provided in a single VPN server. It was released using the GPLv2 license on January 4, 2014. The license was switched to Apache License 2.0 on January 21, 2019.

<span class="mw-page-title-main">Packet Sender</span>

Packet Sender is an open source utility to allow sending and receiving TCP and UDP packets. It also supports TCP connections using SSL, intense traffic generation, HTTP(S) GET/POST requests, and panel generation. It is available for Windows, Mac, and Linux. It is licensed GNU General Public License v2 and is free software. Packet Sender's web site says "It's designed to be very easy to use while still providing enough features for power users to do what they need.".

References

  1. Hobbit (1995-10-28). "New tool available: Netcat". Bugtraq mailing list. Retrieved 2019-06-05.
  2. Vacca, John R. (2006). Guide to Wireless Network Security. Springer Publishing. p. 266. ISBN   978-0387954257.
  3. Giovanni Giacobbi (2006-11-01). "The GNU Netcat project" . Retrieved 2020-03-22.
  4. "Netcat 1.10". nc110.sourceforge.net. 2008-02-14. Retrieved 2019-06-05.
  5. Giovanni Giacobbi (2006-11-01). "The GNU Netcat project" . Retrieved 2019-06-05.
  6. "OpenBSD CVSWeb: /src/usr.bin/nc/". OpenBSD . Retrieved 2019-06-05.
  7. delphij (2005-02-06). "Contents of /release/5.4.0/usr.bin/nc/Makefile". FreeBSD . Retrieved 2019-06-05.
  8. Thomas Linden (2011-03-02). "Netcat OpenBSD Cygwin Port 1.10.2.3". Daemon.de. Retrieved 2019-06-05.
  9. Debian netcat-openbsd
  10. "MacPorts Portfiles: netcat". MacPorts . Retrieved 2019-06-05.
  11. "ibiblio.org FreeDOS Group -- Networking". ibiblio. 2019-03-03. Retrieved 2019-06-05.
  12. Jürgen Hoffmann (2018-11-03). "various tools" . Retrieved 2019-06-05.
  13. Andreas Bischoff (2010-06-07). "Netcat 4 wince" . Retrieved 2019-06-05.
  14. "Revision 835: /trunk/data/netcat". 2008-08-18. Retrieved 2019-06-05.
  15. "socat - Multipurpose relay". 2019-04-06. Retrieved 2019-06-05.
  16. 1 2 "Socat security advisory 7". 2016-02-01. Retrieved 2019-06-05.
  17. Chirgwin, Richard (2016-02-03). "Socat slams backdoor, sparks thrilling whodunit". The Register . Retrieved 2019-06-05.
  18. "CryptCat Project". 2005-10-18. Retrieved 2019-06-05.
  19. 1 2 "Ncat - Netcat for the 21st Century". Nmap. 2009-07-08. Retrieved 2019-06-05.
  20. "ncat(1) - Ncat Reference Guide". manpages.debian.org. 2016-12-18. Retrieved 2019-06-05.
  21. "Ncat - Netcat for the 21st Century".