KeePass Master Password Exploit - CVE-2023-32784 - Proof Of Concept (POC)
KeePass 2.x before 2.54 leaves the cleartext master password in memory, so an attacker with a process dump, swap file, hibernation file or full RAM dump can recover it, missing only the first character. The proof of concept uses a public dumper tool on a KeePass process dump to show the recovered password.
Published on bleekseeks.com
Password Managers are excellent. They help have random secure passwords for each account, they encourage good password hygiene and enforce the latest encryption standards.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely KeePass's memory handling left the master password in cleartext in process memory, and version 2.54 changed API usage and/or inserted random strings to mitigate this.
Impact
An attacker who already has access to the machine or to a memory, swap or hibernation file could recover the master password, though the first character is always missing and the tool is not always fully accurate.
What the attacker needed
Access to the machine or its memory files; a KeePass process, swap, hibernation or RAM dump; the KeePass password dumper tool; .NET installed
How it was found
- Download and install .NET.
- Download and install KeePass (versions 2.54 and before are affected).
- Download the KeePass password dumper tool from GitHub.
- Create a new password database within KeePass.
- Open a command prompt and change directory to the folder containing the downloaded tool.
- Create a KeePass process dump via Task Manager, then run the dumper against the dump file path to recover the password.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
KeePass is a program that stores all your passwords in one encrypted file, unlocked by a single master password. This bug means that while KeePass is running, pieces of that master password are left in the computer's memory. If someone can copy that memory (for example by making a dump file of the KeePass process), a tool can read most of the password back out, though the very first character is lost.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.