A reverse shell is a remote-access technique in which a compromised computer initiates an outbound network connection to an address chosen by the attacker and routes the input and output of a command shell over that connection. It is named in contrast to a bind shell, where the attacker connects inward to a port opened on the victim machine.
Because most networks block inbound connections with firewalls or NAT while allowing outbound traffic, reverse shells are widely used to bypass such restrictions. They can be built with tools already present on a system, such as netcat, bash, Python, PowerShell, or SSH. The technique is a basic method for establishing access in penetration testing and is commonly used by malware and in supply chain attacks to give attackers remote control of victim machines.