GhostPack / SharpDPAPI

SharpDPAPI is a C# port of some Mimikatz DPAPI functionality.
Other
1.16k stars 208 forks source link

Fails to run SharpChrome when Chrome is open #38

Open fk4125 opened 6 months ago

fk4125 commented 6 months ago

4trGk5jDoV

Got error when Chrome is open. Using SharpChrome v1.12.0, Windows 11, Google Chrome Version 122.0.6261.129

System.NullReferenceException: Object reference not set to an instance of an object.
   at SharpChrome.Chrome.ParseChromeCookies(Dictionary`2 MasterKeys, String cookieFilePath, String displayFormat, Boolean showAll, Boolean unprotect, String cookieRegex, String urlRegex, Boolean setneverexpire, Byte[] aesStateKey, Boolean quiet)
   at SharpChrome.Chrome.TriageChromeCookies(Dictionary`2 MasterKeys, String computerName, String userFolder, String displayFormat, Boolean showAll, Boolean unprotect, String cookieRegex, String urlRegex, Boolean setneverexpire, String stateKey, String browser, Boolean quiet)
   at SharpChrome.Commands.Cookies.Execute(Dictionary`2 arguments)
   at SharpChrome.Domain.CommandCollection.ExecuteCommand(String commandName, Dictionary`2 arguments)
   at SharpChrome.Program.MainExecute(String commandName, Dictionary`2 parsedArgs)
RickConsole commented 3 months ago

This is because the Cookies file in the chrome directory is a SQLite DB, and chrome keeps it open, preventing you from accessing it. A more informative error message here would be the only fix I imagine.