Jump to content

netcat

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 160.83.32.14 (talk) at 08:33, 3 April 2009 (Undid revision 281463698 by 160.83.32.14 (talk)). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

netcat
Developer(s)*Hobbit*[1]
Stable release
1.10 / March 20, 1996
Operating systemUNIX
TypeNetwork utility
LicensePermissive free software[2]
Websitehttp://www.vulnwatch.org/netcat/

netcat is a computer networking utility for reading from and writing to network connections on either TCP or UDP. It goes by the tag-line of "The Swiss-army knife for TCP/IP."

Netcat was voted the second most useful network security tool in a 2000 poll conducted by insecure.org on the nmap users mailing list.[3] In 2003, it gained fourth place,[4] a position it also held in the 2006 poll.[1]

Examples

Copy files from machine foo to bar on port 3333 (-l, listen):

 user@bar$ nc -l -p 3333 > backup.iso
 user@foo$ nc bar 3333 < backup.iso 

Open a raw connection to port 25 (like telnet):

 nc mail.server.net 25

Check if UDP ports (-u) 80-90 are open on 192.168.0.1 using zero mode I/O (-z):

 nc -vzu 192.168.0.1 80-90

Pipe via UDP (-u) with a wait time (-w) of 1 second to 'loggerhost' on port 514

 echo '<0>message' | nc -w 1 -u loggerhost 514

Variants

The original version of netcat is a UNIX program. Its author is known as *Hobbit*. He released version 1.1 in March 1996.

Netcat is fully POSIX compatible and there exist several implementations, including a rewrite from scratch known as GNU netcat, which is maintained by Giovanni Giacobbi and an MS-Windows version of netcat created by Chris Wysopal. Andreas Bischoff has ported the Windows version to Windows CE (now known as Windows Mobile).

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

socat is a more complex cousin of netcat. It is larger and more flexible than netcat, and has more options that must be configured for a given task.

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

References

  1. ^ a b "Top 100 Security Tools". 2006. Retrieved 2008-02-18.
  2. ^ "Copyright file". Debian. Retrieved 2008-09-06.
  3. ^ "Top 50 Security Tools". 2000. Retrieved 2007-09-30.
  4. ^ "Top 75 Security Tools". 2003. Retrieved 2007-09-30.

See also