Encode blob in chrome cookies

588 Views Asked by At

I want to insert cookies to chrome (C:\Users<User>\AppData\Local\Google\Chrome\User Data\Default\Cookies), via a python script and sqlite. The actual cookie values is stored in the column "encrypted_value" and it is a blob. How do I encrypt my plain value to the blob in order to work for chrome. I am currently trying to encrypt it with:

win32crypt.CryptProtectData("test message".encode(), u"<password>", None, None, None, 0)

I am not shure If this is the right way and what actual password I have to use. I tried the users password, but the encrypted value is different to the value chrome encrypted. Online I found a lot about windows DPAPI library, but I am not sure how this works in this idea. Does "win32crypt.CryptProtectData" uses DPAPI ?

Please share some thoughts. Jonas

1

There are 1 best solutions below

0
On BEST ANSWER

Ok I found the solution here: Chrome 80 how to decode cookies. Since chrome 80 it is not so easy anymore.