Everything you need to know about Netcat
Netcat is one of the most commonly used anti-hacking tool. Simply stated, Netcat makes and accepts Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) connections. That�s it! Netcat writes and reads data over those connections until they are closed. It provides a basic TCP/UDP networking subsystem that allows users to interact manually or via script with network applications and services on the application layer. It lets us see raw TCP and UDP data before it gets wrapped in the next highest layer such as File Transfer Protocol (FTP), Simple Mail Transfer Protocol (SMTP), or Hypertext Transfer Protocol (HTTP).
Netcat doesn't do anything fancy. It doesn't have a nice graphical user interface (GUI), and it doesn't output its results in a pretty report. It's rough, raw, and ugly, but because it functions at such a basic level, it lends itself to being useful for a whole slew of situations. Because Netcat alone doesn't necessarily obtain any meaningful results without being used in tandem with other tools and techniques, an inexperienced user might overlook Netcat as being nothing more than a glorified telnet client. Others might not be able to see the possibilities through the command-line arguments detailed in the lengthy README file. By the end of this chapter, however, you'll appreciate how Netcat can be one of the most valuable tools in your arsenal.
Because it has so many uses, Netcat has often been referred to as a 'Swiss army knife' for TCP/IP and UDP. Before you can learn to use it, though, you need to download and install it. You may want to check out the Certified Information Systems Manager (CISM) website as well.
Download Netcat can be obtained from many sources, and even though many Unix distributions come with Netcat binaries already installed, it''s not a bad idea to obtain the Netcat source code and compile it yourself. By default, the Netcat source doesn't compile in a few options that you might want. By downloading the source and building it yourself, you can control exactly which Netcat capabilities you'll have at your disposal. The official download site for Netcat for both Unix and Windows platforms is sometimes found at Intense School