Steps to create a reverse shell tool
Reverse Shell
– The victim machine sends an outbound request to the attacker machine via TCP
– This allows the attacker to perform remote execution on the victim’s machine at the user level
How does this work?
– A reverse shell is created by establishing a socket connection from the victim’s machine to the attacker’s machine
How do I do that?
– Utilize Metasploit Framework
– Create your own reverse shell
How do I create my own reverse shell
– Write two programs: The payload, for the victim, and the reverse shell, for the attacker
What can I do when I have created a reverse shell?
– Execute commands from the attacker’s machine on the victim’s machine via terminal
The payload
– Create C++ console application that will establish a socket connection with the reverse shell
– Once the connection is established, open a read loop that will make read calls from the reverse shell via TCP socket
– Process each read on the victim’s machine
The reverse shell
– Open a TCP socket connection that will listen for incoming connnections
– Once a connection is established, then process input from the attacker
– Send the input from the attacker to the victim’s machine