Ncat- Netcat Windows and Linux Tutorial

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.
  • Banner grabbing
  • File transferring
  • Telnet usage
  • Shell backdoor

Download

Tutorial

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.
Ehacking Staff
With more than 50 global partners, we are proud to count the world’s leading cybersecurity training provider. EH Academy is the brainchild of Ehacking, which has been involved in the field of training since the past Five years and continues to help in creating professional IT experts.

Most Popular

The Complete OSINT Tutorial to Find Personal Information About Anyone

This article mainly focuses on how to discover a person's digital footprint and gather personal data by using open-source intelligence (OSINT). So, in its...

How to find the password of hacked email addresses using OSINT

Open-source intelligence or OSINT is a potent technique, and it can give a lot of valuable information, if implemented correctly with the right strategy...

How to Identify Company’s Hacked Email Addresses Using Maltego & HaveIbeenPawned

This article is part of the Maltego OSINT tutorial, where you will learn to identify the already hacked account, and it’s password using the...

5 Key Vulnerabilities in Global Payroll

The cyber threat against payroll is growing in sophistication and frequency, according to the latest FBI cybercrime report. Many of these attacks exploit fixable...