Netcat is one of the best and important tool that plays an important role in the field of IT security, Penetration testing or ethical hacking, it is also called Swiss-army knife for TCP/IP. Here TCP/IP does not show that netcat works for TCP only, it can be use for UPD also. The importance of Netcat is not a hidden truth you can use Ncat for many purposes.
If you are using some Linux distribution like Backtrack, Gnacktrack, Backbox or others than you can find Netcat on this, open terminal and type Netcat if it will response than you don’t need to install it.
In this article I will cover some basic and advance usage of Netcat but before going to actual tutorial I want to explain some background.
What Is Netcat ?
Netcat is a featured networking utility which reads and writes data across network connections, using the TCP/IP protocol. Unix has a CAT command and netcat has been designed to achieve the goal of Cat command you can use netcat on various operating system, Nmap team has been designed Ncat on the concept of Netcat, so it is primely the same thing.
What Netcat Can Do?
This is the most important and simplest question you might be wonder about it, the answer is that netcat can do various things but here is the most important stuffs.
You can use ncat on your Windows box too but for this tutorial I am using backtrack 5 Linux, so here is the tutorial from basic to advance. The basic command is as follows
# ncat <options> <hostname> <port>
The default port for Netcat is 31337, you can use some other ports as well to connect to the server, remember this a ncat tutorial so in the command I will type ncat instead of netcat. You can find help by using this command.
# ncat -h
If you want to learn banner (the process called banner grabbing) of a server software than use the simplest command of ncat.
# ncat google.com 80
You might wonder that why I have used port number 80, port 80 is for HTTP and sometimes a large server uses firewalls or IDS so the other port might be closed.
So by banner grabbing you can get valuable information.
You can upload any file to any server or client computer here is the main command replace the IP address to your desired IP.
# ncat -l 127.0.0.1 80 < test.txt
Note: If you want to learn more about Linux and Windows based Penetration testing, you might want to subscribe our RSS feed and Email Subscription or become our Facebook fan! You will get all the latest updates at both the places.