Branch | Windows | Linux | MacOS |
---|---|---|---|
main | |||
Enhancements |
⛔ This project is no longer actively maintained ⛔
04/03/2022 - I have decided to archive this project. The module is also now unlisted on the PSGallery. Primary reasons:
- I lack the necessary .NET skill set for making this module truly cross-platform. A firm understanding of
System.Security.Cryptography
in .NET Core is necessary to achieve this. - It is extremely challenging to keep pace with browser changes and the way they store and interact with cookies. This module breaks constantly as a result.
If you are interested in picking up this project, feel free to reach out to me on Twitter.
ApertaCookie is a PowerShell module that can extract and decrypt cookie data from the SQLite databases of several popular browsers.
ApertaCookie enables you to quickly extract the cookies from a browser's SQLite database using PowerShell.
Edge, Chrome, and Firefox are currently supported across Windows, Linux, and MacOS for retrieving raw cookie information. With the exception of Firefox, cookie values are encrypted. Cookie value decryption is currently supported on Windows OS.
ApertaCookie provides the following functions:
ApertaCookie aims to be a fully cross-platform module. For Firefox, it currently is. Unfortunately, while you can still pull raw cookie information on Linux and MacOS, cookie value decryption is not currently possible. See the issues tab if you have experience with PBKDF2 and .NET Core System.Security.Cryptography
to see how you can improve ApertaCookie!
OS | Edge | Chrome | Firefox |
---|---|---|---|
Windows | ✅ | ✅ | ✔️ no decrypt required |
Linux | ❌ | ❌ | ✔️ no decrypt required |
MacOS | ❌ | ❌ | ✔️ no decrypt required |
Using PowerShell you can now quickly query the cookies database of several browsers. You can also quickly load desired cookies into a websession for a variety of use cases.
- PowerShell 7.0.0 (or higher version)
#from a 7.0.0+ PowerShell session
Install-Module -Name "ApertaCookie" -Scope CurrentUser
#------------------------------------------------------------------------------------------------
# import the ApertaCookie module
Import-Module -Name "ApertaCookie"
#------------------------------------------------------------------------------------------------
# get raw cookie information from chrome - cookie values are encrypted
$allChromeCookies = Get-RawCookiesFromDB -Browser Chrome
#------------------------------------------------------------------------------------------------
# get decrypted cookie information from edge
$edgeCookies = Get-DecryptedCookiesInfo -Browser Edge
#------------------------------------------------------------------------------------------------
# get decrypted cookie information from edge for a specific domain
$edgeCookies = Get-DecryptedCookiesInfo -Browser Edge -Domain facebook
#------------------------------------------------------------------------------------------------
# get decrypted cookie infromation from firefox for the twitter domain and load into a web session
$session = Get-DecryptedCookiesInfo -Browser Firefox -DomainName twitter -WebSession
#------------------------------------------------------------------------------------------------
# get information about various cookie time values
Convert-CookieTime -CookieTime 13267233550477440
# for firefox cookies specify the firefox switch
Convert-CookieTime -CookieTime 1616989552356002 -FirefoxTime
#------------------------------------------------------------------------------------------------
Jake Morrison - https://www.techthoughts.info/
This PowerShell project was created with Catesta.
This project is licensed under the MIT License.
Reference the Changelog