Jump to content
funkey

CryptProtectData & CryptUnprotectData

Recommended Posts

Try to cast the string as binary.

Global $bData = Binary("0x763130C202B9EEA1599409C26FD6D4366CAF364BF9EBD238B407F2E7767BC3619082CD23C5009FA2225ECD86B78B")
Global $sPassword = ""
Global $sDesc

Global $sTest = _CryptUnprotectData($bData, $sDesc, $sPassword)
ConsoleWrite($sDesc & @CRLF)
ConsoleWrite($sTest & @CRLF)

 


Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the Universe
trying to produce bigger and better idiots.
So far, the Universe is winning.

Share this post


Link to post
Share on other sites
13 hours ago, funkey said:

Try to cast the string as binary.

Global $bData = Binary("0x763130C202B9EEA1599409C26FD6D4366CAF364BF9EBD238B407F2E7767BC3619082CD23C5009FA2225ECD86B78B")
Global $sPassword = ""
Global $sDesc

Global $sTest = _CryptUnprotectData($bData, $sDesc, $sPassword)
ConsoleWrite($sDesc & @CRLF)
ConsoleWrite($sTest & @CRLF)

 

Hi @funkey, thanks for your reply :)

I've received empty string from your code, actually my problem is how to decrypt my Google Chrome cookies (It's not illegal, there are many softwares in this way), please check this topic:

https://www.autoitscript.com/forum/topic/201979-export-chrome-cookies/


I recommend to you to get COVID-19, but don't get Wife

Share this post


Link to post
Share on other sites

It depends on what Chrome version you have. This simple way only works till version 79.0 See here

For newer versions additional steps are required


Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the Universe
trying to produce bigger and better idiots.
So far, the Universe is winning.

Share this post


Link to post
Share on other sites
Posted (edited)
16 hours ago, funkey said:

For newer versions additional steps are required

Excuse me @funkey, can you teach me how to code that for version 80 and newer versions please?

This site just had a C++ sample, i thanks to you if you convert this code to AutoIt :)❤
 

void DecryptPassword(char *passData, int passLen, char *password, int length)
{
	DATA_BLOB DataPassword;
	DATA_BLOB DataOutput;
	
	DataPassword.cbData = passLen;
	DataPassword.pbData = (BYTE *) passData;

	if( CryptUnprotectData(&DataPassword, NULL, 0, 0, 0, 0, &DataOutput) == FALSE )
	{
		printf("CryptUnprotectData failed with error 0x%.8x", GetLastError());
		return;
	}

	memcpy(password, DataOutput.pbData, DataOutput.cbData);
	password[DataOutput.cbData] = 0;
	
	
	printf("Successfully Decrypted Password is %s ", password);

}
"os_crypt":{"encrypted_key":"RFBBUEkBAAAA0Iyd3wEA0RGbegD...opsxEv3TKNqz0gyhAcq+nAq0"},
--------------------------------------------------------------------------------------
struct WebPassword
{
	BYTE signature[3] = "v10";
	BYTE iv[12];
	BYTE encPassword[...] 
}

 

Edited by Ho3ein

I recommend to you to get COVID-19, but don't get Wife

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...