openwall / openwall/john

blockchain2john.py handling of old Base64 wallets is prone to user error

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

Nobody has claimed this yet.

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

Description

See #4872

$ ../run/blockchain2john.py -h
usage: ../run/blockchain2john.py [blockchain wallet files]

optional arguments:
  -h, --help  show this help message and exit
  --json      is the wallet using v2 format?
  --base64    does the wallet contain only a base64 string?

The problem with the --base64 option (for very old version wallets) is that if you don't give it where needed, you still get output that looks like a perfectly fine hash, but is uncrackable.

We don't seem to have any blockchain wallets in https://github.com/openwall/john-samples, maybe a first step is adding some (hopefully from https://github.com/gurnec/btcrecover/tree/master/btcrecover/test/test-wallets).

Then, see if we can implement a trivial check for whether a file is 100% Base-64 (while also not a too small subset of it) and either automagically infer the --base64 option, or at least print a warning.

While at it, we could possibly implement logic for auto-detecting json as well.

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

Start with run/blockchain2john.py and the behavior described in #4872, then review available wallet samples from john-samples and the referenced btcrecover test-wallets. Determine how old Base64 wallets and JSON wallets can be identified, and make completion observable through correct handling or a clear warning when --base64 is omitted.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
blockchain, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.