HackBrowserData icon indicating copy to clipboard operation
HackBrowserData copied to clipboard

fix cookie and password decryption for macOS

Open learnerLj opened this issue 9 months ago • 0 comments

  1. FIX cookie decryption: Handle cases for current mac chrome, trimming the value to remove ramdom bytes post decryption.
  2. Fix password decryption: Introduced a new error ErrDarwinNotSupportDPAPI to clearly indicate the lack of support for DPAPI on macOS. It also allows the password decryption by keychain.
password, err = crypto.DecryptWithDPAPI(pwd)
if err != nil {
    password, err = crypto.DecryptWithChromium(masterKey, pwd)
    if err != nil {
	    log.Debugf("decrypt chromium password error: %v", err)
    }
}

https://github.com/moonD4rk/HackBrowserData/blob/410e78051853c81d1add5e71cb158517bb20427a/browserdata/password/password.go#L77C1-L83C5

learnerLj avatar Dec 27 '24 20:12 learnerLj