Django(DES Crypt Wrapper) Hash

Technical details, regex signatures, and cracking commands for the Django(DES Crypt Wrapper) algorithm.

Regex Identification Signature:
^crypt\$[a-f0-9]{5}\$[a-z0-9\/.]{13}$
Not supported natively by Hashcat
Not supported natively by John the Ripper
← Back to Hash Identifier

What is Django(DES Crypt Wrapper)?

The Django Crypt Wrapper, often colloquially referred to as "Django(DES Crypt Wrapper)"—though technically a misnomer—originates from Django’s early cryptographic utilities, specifically the `django.contrib.auth.hashers` module, which historically included a legacy wrapper around the **DES (Data Encryption Standard)** algorithm for password hashing. Structurally, this wrapper abstracts the DES-CBC (Cipher Block Chaining) mode with a fixed 8-byte IV (Initialization Vector) and a 7-byte salt (derived from the password) prepended to the plaintext before encryption. The process involves padding the salted password to a multiple of 8 bytes, encrypting it with DES in CBC mode, and returning the resulting ciphertext as a base64-encoded string (e.g., `django-crypt-wrapper$$`). Its primary use-case was in Django versions prior to 1.5, where it served as a rudimentary password hashing mechanism, though it was deprecated in favor of more secure algorithms like PBKDF2 or bcrypt due to its inherent cryptographic flaws.

The vulnerability of Django’s DES Crypt Wrapper stems from fundamental cryptographic weaknesses exacerbated by implementation choices. DES itself is broken for modern security standards, with a 56-bit key space that renders brute-force attacks feasible with minimal computational effort—modern GPUs can crack DES hashes in seconds via optimized tools like John the Ripper or Hashcat. The lack of a robust salt (only 7 bytes, often truncated or predictable) eliminates uniqueness per-user, enabling rainbow table attacks. Additionally, CBC mode’s chaining vulnerability allows for differential cryptanalysis if the IV is reused or weak, and the base64 encoding provides no additional security. Finally, the wrapper’s reliance on DES’s small block size (64 bits) and outdated key schedule makes it susceptible to known plaintext attacks and collision exploits, rendering it catastrophically insecure for password storage.

Identifying Django(DES Crypt Wrapper) 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 Django(DES Crypt Wrapper), security researchers analyze the hash against a strict regular expression (regex) signature (shown above) to find structural matches.

How to Crack Django(DES Crypt Wrapper)

If you need to recover the plaintext password for a Django(DES Crypt Wrapper) 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.