Penkr is a C++ port of ohyicong/decrypt-chrome-passwords. I made this because I wanted to show my family why they need a proper password manager and why not to store passwords directly in the browser.
Python isn't as straight forward as a standalone exe file and some dll files. So I decided to make this C++ port as I don't wanna go mess around installing Python on their PC. This project runs on 2 exe files, and libraries use 2 dll files or are linked statically, the rest is built into Windows with the C++ redistributable installation that most people already have installed.
The name consists of 2 parts.
The first part is Pen
which comes from Pen-testing
which also comes from Penetration Testing
. But also, Pen
is also what is used to describe Pen-drives
which is something I carry with me all the time, to both run portable Linux on any machine, as well as having most of my files with me.
The second part is Kr
which is the first two consonants in my nickname.
This repository is a bit tricky to setup but premake should get most of it done for you.
- Penkr is using Visual Studio 2022. If you use another version of Visual Studio, you need to edit
scripts/Win-GenProjects.bat
and changevs2022
to whichever IDE you use. For a list of all IDEs supported by premake, visit Premake's website.
- Clone the repository. Remember to clone recursively
git clone --recursive https://github.com/Kirdow/Penkr
as it does use a submodule for Crypto++. - Open
scripts/
and runSetup.bat
. The python script should go through and install all the requisites needed in order to build and run the project. - Inside
Penkr/vendor/cryptopp
there is a file namedcryptlib.vcxproj
. Open it using Visual Studio. - At the top for the build, select
Release
andx64
. - In the project list, right click
cryptlib
and hitBuild
. - Wait until the build finishes.
- At the top for the build, select
Debug
andx64
. - In the project list, right click
cryptlib
and hitBuild
. - Once the build finishes, close Visual Studio.
- Now go back into the repository folder, and open
Penkr.sln
using Visual Studio. - At the top, select either Debug, Release or Dist, then under
Build
, clickBuild Solution
. - Now in the repository folder, your binaries will be in the
bin/<config>/Penkr
directory. - In order for
PenkrClear.exe
to work withPenkr.exe
it has to be moved to the same folder. Simply navigate tobin/<config>/PenkrClear
and movePenkrClear.exe
intobin/<config>/Penkr
. - Some DLLs aren't automatically copied to the binary folder, in case you're missing DLL files after the build, you'll find their locations below.
- Run
Penkr.exe
to fetch the passwords. Current supported browsers are listed below. Once it's finished it will save all passwords to pass.csv in the current working directory. pass.csv
contains passwords across all browsers stored in columns ofindex
,url
,username
andpassword
. Note that for usernames and passwords containing a comma the format may break. URLs containing a comma is handled though.- Run
PenkrClear.exe
to remove thepass.csv
file. This does the same as just deleting it normally except it doesn't stay in the recycle bin. I made this in order to avoid the risk of having someone getting the file back via the recycle bin. It still risk being reinstated with disk recovery apps though. - If
PenkrClear.exe
successfully removes the file you should hear arecycle
sound effect. Any other sound indicates that the file couldn't be removed. This could be due to the file being open in something like Microsoft Excel or similar.
Only Chromium based browser are supported. The currently supported browsers are:
- Google Chrome (Chromium, Chrome, Chrome Beta & Chrome Canary)
- Brave
- Opera (Opera & Opera GX)
- Microsoft Edge
This list may be outdated at some points, so check directories.cpp to see the most up to date list currently in use.
- Crypto++ (see their website and their github) - This one is statically linked and shouldn't require a DLL. But its
.lib
file is located inPenkr/vendor/cryptopp/x64/Output/<config>/cryptlib.lib
. - SQLiteCpp (see their website and their github) - This one is pre-compiled for the repository, and is located in
Penkr/vendor/sqlite/
with the.lib
files atlib/sqlite3.lib
andlib/SQLiteCpp.lib
, as well as the.dll
files atdll/sqlite3.dll
anddll/SQLiteCpp.dll
. - Crypt32 (see Microsoft Docs) - This one is used the decrypt the initial key as is included with your Windows installation. This is simply linked as
Crypt32.lib
and is located atC:/Windows/System32/crypt32.dll
.
This software is provided with MIT License.