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

Опубликовано: 17 Август 2021
на канале: 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


На этой странице сайта вы можете посмотреть видео онлайн How to Code a Reverse Shell Program in Python | Class Presentation | Programming for Cybersecurity длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь TLT TV 17 Август 2021, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 17 раз и оно понравилось 0 зрителям. Приятного просмотра!