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

Publicado em: 17 Agosto 2021
no canal de: 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


Nesta página do site você pode assistir ao vídeo on-line How to Code a Reverse Shell Program in Python | Class Presentation | Programming for Cybersecurity duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário TLT TV 17 Agosto 2021, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 17 vezes e gostou 0 espectadores. Boa visualização!