https://www.techtarget.com/searchsecurity/tip/What-reverse-shell-attacks-are-and-how-to-prevent-them
Attackers infiltrate target environments in a variety of ways. One common method is a direct attack. Another, called a reverse shell, uses a remote device to deploy an attack.
Let's look at what a reverse shell attack is, how it differs from a direct attack and how to prevent it.
When people hear "cyber attack," they often think of a direct, brute-force attack where the attacker gains access to a server, workstation, wireless device, etc. To penetrate a device in a direct attack, the malicious actor exploits vulnerabilities or security gaps and then deploys a malicious payload, as illustrated in Figure 1.
Many cyber attacks are direct attacks.
In the more roundabout reverse shell attacks, malicious actors use remote devices to connect to the target's host. All command and control takes place on the attacker's device, but the remote device executes all commands and directives to the host. This is illustrated in Figure 2.
This approach is used for the following reasons:
The following two shells exist:
In reverse shell attacks, malicious actors wait for the host to request a connection to the outside, thus giving the attack the name reverse shell. Through remote devices, attackers can configure the host and request connections outside the target's network.
Once this happens, attackers can execute a suite of commands via the remote device, for example, to deliver a malicious payload to the host. The attackers then can gain a foothold into the host and wreak havoc.
Malicious actors usually want to remain unnoticed in reverse shell attacks. Their goal is often to stay inside the environment as long as possible to move laterally within infrastructure. Once attackers find what they want, the data exfiltration process starts. Attackers often move stolen data to the hacked remote device for temporary storage.
Organizations should do the following to prevent attackers from setting up reverse shells:
01 Feb 2023