Encrypted cookies in Chrome

前端 未结 6 2012
挽巷
挽巷 2020-11-27 15:36

I am currently working on a C# forms application that needs to access a specific cookie on my computer, which I can do perfectly fine. Here\'s the issue:

Google stor

6条回答
  •  孤独总比滥情好
    2020-11-27 16:13

    Alright, so in case anyone is interested, I found a solution to this problem after alot of trial, error and googling.

    Google Chrome cookies DB has 2 columns for storing values: "value" and "encrypted_value", the latter being used when the cookie stored was requested to be encrypted - often the case with certain confidential information and long-time session keys.

    After figuring this out, I then needed to find a way to access this key, stored as a Blob value. I found several guides on how to do this, but the one that ended up paying of was: http://www.codeproject.com/Questions/56109/Reading-BLOB-in-Sqlite-using-C-NET-CF-PPC

    Simply reading the value is not enough, as it is encrypted. - Google Chrome uses triple DES encryption with the current users password as seed on windows machines. In order to decrypt this in C#, one should use Windows Data Protection API (DPAPI), there are a few guides out there on how to make use of it.

提交回复
热议问题