##Backdoor based on TCP server and client with python
Server side code : 'server.py'
"server.py is the code which will be running on the attacker's machine"
##required libraries
## create socket object
## generate_socket_and_listen method is to generate socket (i.e. bind an ip address with the port number) and listen for the incoming connections
## once the victim opens the executable in his/her machine ,and the socket recieved the incoming connection ,then shell method will be executed . since we have the shell from the victims machine we can do anything like perform any os command ,or execute manually written commands like get ,download ,start ,upload
"download -> download files from victim's machine"
"upload -> upload files to victim's machine"
"get -> download files from the internet to victim's machine"
"start-> start other applications on victim's machine"
## we will use the json to communicate over sockets while both recieving data from victim's machine or sending commands/files to victims machine
Client side code : 'reverse_shell.py'
"reverse_shell.py is the code which will be running on the victim's machine"
## Required libraries
## create socket object
## This part of the code is should be uncommented if victim has window's machine ,code in this snippet will create registry and after every reload/reboot of the system ,this will autmoatically be invoked and start running
/br>
connect_back method will try to connect to the after every 20 seconds in case client is not able to reach the server at attacker's machine
download method will help attacker to download the files from the internet in the victim's machine
## we will use the json to communicate over sockets while both recieving data from victim's machine or sending commands/files to victims machine
## shell method at client side is different from what we have in our above server.py file ,once attacker will trigger a command to be executed in the vcitim's machine then this shell method will come into the picture and the command send by the attacker will go through the if else and will be executed accordingly
## start the execution of the code
**NOTE : revershell.py can be given/tricked to the victim in form of executable or image or audio file.
you can find the whole code this git repository link :
backdoor_code
Checkout some more hacking scripts