Skip to content

Haniamin90/BitcoinCarver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

BitcoinCarver

Ultra-Fast Bitcoin Wallet Recovery from Raw Disks

===========================================

Description

BitcoinCarver is a high-performance, open-source tool designed to recover Bitcoin Core and Electrum wallet data directly from raw storage devices (HDDs, SSDs, NVMe, USB drives, memory cards, etc.).

It performs low-level pattern scanning across entire physical drives or partitions to locate:

  • Encrypted master keys (mkey)
  • Encrypted private keys (ckey)
  • Unencrypted private keys

The tool is heavily inspired by the legendary pywallet (the original Python wallet recovery script) — but completely rewritten from the ground up with modern techniques for maximum speed and reliability on today’s multi-terabyte drives.

Key Features

  • Blazing-fast raw disk scanning
  • Full Windows (\\.\PhysicalDriveX) and Linux (/dev/sdX, /dev/nvme0n1) support
  • Sector-aligned, overlap-safe, memory-efficient search
  • Automatic detection and extraction of wallet structures
  • Generates ready-to-use outputs:
    • recovered_keys.json – Complete wallet info + P2PKH addresses
    • recovered_masterkeys_hashes.txt – Hashcat compatible mkey hashes ($bitcoin$...)
    • recovered_unencrypted_keys.txt – Raw private keys in hex
  • Optional built-in password testing against recovered master keys
  • No external dependencies beyond standard Python packages

recovered_keys.json Sample

[
    {
        "master_key": "4e6ab96bbc23d77fbb7e5bfec6d746b05e0934e6ab96fc8456d4794e6ab3b265cedf0ede4d0f1f43b2651a5496436",
        "salt": "7d20c4dfc0b88d85",
        "iterations": 86641,
        "total_keys": 1459,
        "encrypted_keys": 
        [
            {
                "encrypted_private_key": "5968e1929f742fbca01b14da7df7eea0676f798cec2e91745fcbbbe37a55f7af9e741508c55f2b97cdf1fcb4c5",
                "associated_public_key": "02ced4d6663d70e8c475befda355a2242077bbab1ae2c57b046f1cdbfb8df5f733",
                "public_key_hash160": "0b5feafc05c35ae0b504eb8a0b61283259e3ab77",
                "bitcoin_address_p2pkh": "12336fSXoybk8GPdQKa3VJMmWHHFBrETAd"
            }
        ]
    }
]

Requirements

  • Python 3.8+
  • Run as Administrator on Windows or root on Linux
  • Install dependencies:
pip install -r requirements.txt

Usage

python bitcoincarver.py

The program guides you interactively:

  1. Lists all physical drives with sizes
  2. Lets you select device, scan range, and optimal chunk size
  3. Scans at maximum possible speed
  4. Extracts and validates all found keys
  5. Saves results automatically
  6. Offers to test passwords against recovered master keys

Output Files

File Description
recovered_keys.json Full details + Bitcoin addresses
recovered_masterkeys_hashes.txt Ready for Hashcat/John the Ripper
recovered_unencrypted_keys.txt Plain private keys (if any found)
cracked_keys.txt Successfully decrypted wallets (if password testing used)
recovered_keys_remaining.json Master keys still needing password cracking

Disclaimer

For legal and ethical use only:

  • Recovering your own wallets
  • Authorized digital forensics
  • Research and education

Never scan devices you do not own or have explicit permission to access.

Author

Hani Amin

License

MIT License — feel free to use, modify, and distribute.

If BitcoinCarver helps you recover a lost wallet, consider starring the repo and sharing your success story!

Your coins might still be waiting on that old drive. BitcoinCarver finds them.

About

Ultra-Fast Bitcoin Wallet Recovery from Raw Disks

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors