在Python中解密Chrome Linux BLOB加密的Cookie [英] Decrypt Chrome Linux BLOB encrypted cookies in Python
问题描述
我在Ubuntu中有Chrome 33以上的版本,我发现这些Cookie是以BLOB结构加密的:
I have Chrome 33+ in Ubuntu and I see that the cookies are encrypted in a BLOB structure:
CREATE TABLE cookies(creation_utc INTEGER NOT NULL UNIQUE PRIMARY KEY,host_key TEXT NOT NULL,name TEXT NOT NULL,value TEXT NOT NULL,path TEXT NOT NULL,expires_utc INTEGER NOT NULL,secure INTEGER NOT NULL,httponly INTEGER NOT NULL,last_access_utc INTEGER NOT NULL,has_expires INTEGER NOT NULL DEFAULT 1,persistent INTEGER NOT NULL DEFAULT 1,priority INTEGER NOT NULL DEFAULT 1,encrypted_value BLOB DEFAULT'');
我想写一个python脚本来解密cookie。我看到有 Chrome问题Chrome 33测试版,但依赖于 CryptUnprotectData
表示它是Windows API。
I would like to write a python script to decrypt the cookie. I've seen that there is Cookie issue with Chrome 33 Beta but relies in CryptUnprotectData
that it's a Windows API.
首先我想知道cookies是如何加密的。我已经阅读3DES和AES,但我找不到一个可靠的来源获取信息。
First of all I would like to know how are the cookies encrypted. I've read 3DES and AES but I don't find a trusty source to get the info.
我将编写代码做必要的加密和解密,如果我
I will write the code to do the necessary encryption and decryption if I have info about how to do it.
谢谢
推荐答案
我已发布示例Python脚本此处解码OSX或Linux中的加密Cookie。
I've posted an example Python script here for decoding the encrypted cookies in either OSX or Linux.
这篇关于在Python中解密Chrome Linux BLOB加密的Cookie的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!