This project represents an example of chrome-like browser cookie decryption
- It opens chrome browser window through Selenium
- Browser uses profile folder which is located in app folder
- Navigates to https://stackoverflow.com
- Closes the browser window
- App decrypts cookie out of profile folder
Example output:
Domain=.stackoverflow.com; OptanonAlertBoxClosed=;
Domain=stackoverflow.com; OptanonAlertBoxClosed=;
Domain=.stackoverflow.com; OptanonConsent=;
Domain=stackoverflow.com; OptanonConsent=;
Domain=.stackoverflow.com; prov=ee427636-d130-94f0-ecee-945692582bf3;
This example works only on windows machines, because Chrome for linux-like OS uses different cookie encryption algorithm.
⚠️ It is possible to decrypt only cookies files what was created on same machine and same windows user as it runs this appThe key for cookies file is stored with
current user
protection scope
ProtectedData.Unprotect(key, null, DataProtectionScope.CurrentUser);