To answer this question, we need to know what a “shell” is in the first place. A shell is basically a command line, whether it’s the windows Command Prompt or Unix or Mac Terminal. Shells let the user give the system commands to execute. A reverse shell is when an attacker gets access to run a shell of their own on your system — that’s bad!
Reverse shells are dangerous because the attacker does not need to infiltrate your network; they work by using your machine on the network. To start a reverse shell, an attacker simply needs for you to establish a connection on the port they’re listening on. This can happen in several ways:
- Phyiscally installed on your machine
- Social engineering – clicking on a bad link, getting phished, plugging in an infected USB, etc.
- Download a legitimate program with a reverse shell hidden inside
Kali has many tools that can help an attacker establish a listener, among them Netcat, Cryptcat, DNS tunnel, etc. You can also easily create your own custom reverse shell.