openwall / openwall/john

dashlane2john.py not properly recognizing compression in Dashlane .aes files

Open
#4,821 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
13.6k
Forks
2.6k
PR merge metrics
No merged PRs in 30d

Description

🥇 👍

A bug has emerged for dashlane2john.py, now producing incorrect results due to a change in Dashlane's ".aes" file compression.

The "2john" utility used to extract hashes from Dashlane ".aes" files looks for the ascii string literal "KWC3" indicating compression. If it finds that string in bytes 33-36 (after the salt), then it sets v=1, skips those four bytes, and writes the hash as the 220 bytes following byte 36.

However Dashlane ".aes" files which use compression now set bytes 33-36 = 4b574336 (ascii "KWC6"). As a result, the dashlane2john.py utility now fails to match the compression code "KWC6" and incorrectly writes the hash to stdout as 224 bytes starting with "KWC6", with v=0 indicating compression is not in use.

To fix this bug, dashlane2john.py should also recognize KWC6 in Dashlane ".aes" files, set v=1, skip these four bytes, and write the hash as 220 bytes starting with byte 37.

My Command Line: python dashlane2john.py mydata\personaldataDatabase.aes > mydata\mydash2.hash

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Inspect dashlane2john.py and its existing KWC3 handling first. Run the reported command with a Dashlane .aes file using KWC6 and verify that compression is detected, v=1 is emitted, and the extracted hash is 220 bytes beginning after the marker.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, security
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.