KeePass 2 AES (with keyfile) Hash

Technical details, regex signatures, and cracking commands for the KeePass 2 AES (with keyfile) algorithm.

Regex Identification Signature:
^\$keepass\$\*2\*\d+\*\d+\*[0-9a-f]+\*[0-9a-f]+\*[0-9a-f]+\*[0-9a-f]+\*[0-9a-f]+\*\d+\*\d+\*[0-9a-f]+$
Hashcat Command (Mode: 13400):
John the Ripper Command:
← Back to Hash Identifier

What is KeePass 2 AES (with keyfile)?

The **KeePass 2 AES (with keyfile)** encryption format is a hybrid cryptographic scheme designed for secure password database storage, introduced as part of the KeePass open-source password manager ecosystem. Its origins trace back to the need for a lightweight yet robust solution to protect sensitive credential data, leveraging the AES-256-CBC cipher in combination with a key derivation function (KDF) derived from the master password and an optional keyfile. The structure consists of three primary components: a **256-bit AES key** (derived via PBKDF2-HMAC-SHA256 with 600,000 iterations by default in KeePass 2.x), a **128-bit initialization vector (IV)** stored in plaintext within the database header, and an optional **keyfile** (encrypted with AES-256-CBC) that contributes to the key derivation process. The format prioritizes backward compatibility with KeePass 1.x while introducing optional security enhancements (e.g., keyfile integration) to mitigate brute-force attacks. Its primary use-case is securing password databases with a balance between usability and cryptographic strength, though it remains vulnerable to trade-offs in iteration count and key derivation flexibility.

The **KeePass 2 AES (with keyfile)** format is susceptible to cracking due to several architectural limitations. The **PBKDF2 iteration count (600k by default)** is often considered insufficient for modern hardware, as GPUs and FPGA-based cracking tools (e.g., Hashcat) can evaluate millions of hashes per second, reducing the effective security margin. The **lack of a cryptographic salt in the KDF** (though the IV is present, it is not used for key derivation) allows attackers to precompute or reuse hash tables for rainbow tables, though this is mitigated by the keyfile requirement. Additionally, **AES-CBC mode is vulnerable to padding oracle attacks** if improperly implemented, though KeePass mitigates this via PKCS#7 padding validation. The **keyfile’s AES-256-CBC encryption** introduces a dependency on secure keyfile handling, and its absence (in master-password-only mode) reduces entropy. Finally, the **fixed iteration count** (modifiable but rarely increased) and **lack of adaptive KDF parameters** (e.g., no per-database salt or dynamic iteration scaling) make the scheme vulnerable to brute-force optimization as computational power advances.

Identifying KeePass 2 AES (with keyfile) Hashes

Identifying a hash blindly is often difficult because multiple algorithms can output strings of the exact same length. For example, a standard 32-character hexadecimal string could be MD5, NTLM, MD4, or LM. To definitively identify KeePass 2 AES (with keyfile), security researchers analyze the hash against a strict regular expression (regex) signature (shown above) to find structural matches.

How to Crack KeePass 2 AES (with keyfile)

If you need to recover the plaintext password for a KeePass 2 AES (with keyfile) hash during a penetration test or forensics investigation, you must supply the correct module ID to your cracking software. Use the exact commands provided at the top of this page to target the hash successfully.