How to Code a Reverse Shell Program in Python | Class Presentation | Programming for Cybersecurity

Veröffentlicht am: 17 August 2021
auf dem Kanal: TLT TV
17
0

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


Auf dieser Seite können Sie das Online-Video How to Code a Reverse Shell Program in Python | Class Presentation | Programming for Cybersecurity mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer TLT TV 17 August 2021 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 17 Mal angesehen und es wurde von 0 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!