There are many ways to gain control over a compromised system and a common method is to gain command prompt access. However, most basic firewalls block direct remote connections, which is one benefit of using a reverse shell, to bypass firewall restrictions. The basic premise of my two scripts will be that one machine (Attacker) will act as a Server, which I will use Kali Linux, and the second machine (Victim) will act as the Client, which will be a distribution of Linux - Ubuntu. In the two scripts, the Victim machine will initiate a connection to the Attacker’s machine where the Attacker's machine will listen for and accept incoming connections on a specified port.
Source Code Step-by-Step Explanation
Attacker’s Code (Server)
1. Input Host IP Address and Port Number
2. Create socket with socket.socket function
3. Bind socket to IP Address & Port with socket.bind function
4. Put the socket in listening mode with socket.listen function
5. Accept connection with socket.accept function
6. “While” loop that sends commands to the Client and retrieves/prints results until “exit” is entered
7. Close connection
Victim’s Code (Client)
1. Input Host IP Address and Port Number
2. Create socket with socket.socket function
3. Connect to Server
4. “While” loop that receives commands from the Server, executes/retrieves results, and sends results back to the Server until “exit” is entered
5. Close connection
Sur cette page du site, vous pouvez voir la vidéo en ligne How to Code a Reverse Shell Program in Python | Class Presentation | Programming for Cybersecurity durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur TLT TV 17 août 2021, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 17 fois et il a aimé 0 téléspectateurs. Bon visionnage!