オフライン環境でBitcoin Coreパスワードを復旧する完全ガイド|wallet.datの解析とbtcrecover活用

カテゴリー: 回復事例・トラブルシューティングFAQ 2026-05-25 11:48
オフライン環境でBitcoin Coreパスワードを復旧する完全ガイド|wallet.datの解析とbtcrecover活用

「オフライン環境でBitcoin Coreパスワードを復旧したい」military you've indicated, the core target is an encrypted wallet.dat file. Recovering the password offline means running password analysis on a local copy of the wallet, without uploading the file or candidate list to an online service. This article explains the complete flow, from identifying the type of password to preparing an air-gapped environment, executing btcrecover, verifying the result, re-encrypting the wallet, and creating resilient backups.

Important scope of application: This procedure is only for wallets you own or are legally authorized to recover. Never upload a Bitcoin Core wallet to an unknown online cracking service, because the file may contain private keys and could be retained or leaked by the operator.

First, identify exactly which Bitcoin Core password was forgotten

Bitcoin Core does not have one universal login password. Depending on the symptom, you may be dealing with the wallet encryption passphrase, the RPC authentication credential, the wallet file path, or the PIN of a hardware wallet. These must be handled differently.

| Symptom | What actually needs to be recovered | Correct approach |
|---|---|---|
| A wallet unlock window asks for a password | Wallet encryption passphrase | Restore it through offline candidate analysis with btcrecover |
| JSON-RPC returns an authorization error | rpcuser or rpcpassword | Edit bitcoin.conf locally and restart the node |
| The wallet file cannot be found | Data directory or wallet path | Locate the correct wallet.dat before attempting analysis |
| A Ledger or Trezor asks for a PIN | Hardware-device PIN | Use the manufacturer's device-recovery procedure |

A wallet encryption passphrase protects the private keys stored in a Bitcoin Core wallet. It is not derived from a BIP39 seed phrase, and it cannot be reconstructed from the public blockchain. A 12- or 24-word mnemonic and a wallet passphrase are separate pieces of information.

On the other hand, rpcpassword only controls access to the local node's JSON-RPC interface. If the GUI or another program shows an RPC authentication error but the wallet itself opens normally, changing bitcoin.conf is enough. There is no need to attack the wallet encryption.

What offline cracking can and cannot do

Offline processing removes the risk of transmitting the wallet to a third party, but it does not create a cryptographic bypass. The attacker's task is still to find a password that passes the wallet format's key derivation and decryption checks.

The method is realistic when at least one of the following conditions applies:

  • The passphrase was reused from another service.
  • It is based on a name, date, phrase, or keyboard pattern.
  • Only part of the password is remembered.
  • The candidate list contains variations of a short password.
  • The file was created with an older or weakly configured wallet format.

If the passphrase is a genuinely random, high-entropy secret, offline exhaustive analysis may be computationally infeasible. Bitcoin Core's legacy, Descriptor, and newer native encryption formats are not all identical, so the wallet version and format must also be identified correctly. btcrecover can directly process supported Bitcoin Core wallets, but support for recent formats depends on the tool version.

A safe offline recovery workflow

Use the following order to minimize the chance of damaging the only wallet copy:

  1. Identify the password type and wallet format.
  2. Completely close Bitcoin Core and back up the wallet.
  3. Verify the backup with a SHA-256 hash.
  4. Prepare a physically offline environment and verified tools.
  5. Build a prioritized candidate list.
  6. Analyze a working copy with btcrecover.
  7. Verify the recovered passphrase in Bitcoin Core itself.
  8. Change to a new, strong passphrase and create a fresh backup.

1. Locate the correct wallet file

Typical default locations include:

  • Linux: ~/.bitcoin/wallet.dat
  • Windows: %APPDATA%/Bitcoin/wallet.dat
  • macOS: ~/Library/Application Support/Bitcoin/wallet.dat

Newer versions may store wallets in a wallets/ directory, a wallet-specific subdirectory, or a custom data directory. If Bitcoin Core starts, the listwallets command can help identify loaded wallet names. Do not assume that every file named wallet.dat belongs to the wallet you intend to recover.

Bitcoin Core versions using database-style wallet files should be fully shut down before copying. Do not copy the file while the application is running, because an incomplete database snapshot may not open correctly. Keep the original medium untouched and perform all analysis on a separate working copy.

2. Verify the backup before analysis

Calculate a hash on the source device and again on the copied device. A matching SHA-256 value confirms that the transfer was completed without corruption; it does not encrypt the wallet.

btcrecoverによるパスワードクラック

On Linux or macOS:

sha256sum wallet.dat
shasum -a 256 wallet.dat

On Windows PowerShell:

Get-FileHash ./wallet.dat -Algorithm SHA256

Record the result in a separate notebook or on paper. If the hashes differ, repeat the copy rather than beginning password analysis against a potentially damaged file.

3. Build a genuinely offline workstation

A reliable air gap should be physical rather than merely hiding the Bitcoin Core window:

  • Use a clean, preferably temporary Linux environment instead of a daily-use operating system.
  • Disable Wi-Fi and Ethernet at the hardware or firmware level when possible.
  • Mount the original wallet medium read-only and work only with a copy.
  • Transfer btcrecover, its dependencies, and documentation from a separately prepared USB drive.
  • Download the official release, verify its published checksum or signature, and record the verified hash before introducing any secret data.
  • Keep candidate lists on encrypted or access-controlled media, separate from the output device.
  • Disable cloud synchronization, automatic clipboard sharing, chat software, and remote-access tools.
  • Treat terminal logs containing a discovered password as sensitive documents.

Bitcoin Core can also be started with connection-related options disabled, but physical network isolation is the primary protection. If the machine has never connected to the internet, it is still not automatically trustworthy; the operating system image and every recovery utility must come from verified sources.

Create a high-quality candidate list

The most effective candidates usually come from personal memory, not from a massive generic word list. Write down every plausible password exactly as it may have been entered before expanding it mechanically.

Review the following categories:

  • Words or phrases connected to the owner, service, pet, team, or device.
  • Dates in formats such as 2024, 04, 2404, and 20240401.
  • Combinations of two or three remembered words.
  • Capitalization changes, appended digits, and commonly added symbols.
  • JIS and US keyboard layouts, especially for symbols and punctuation.
  • Japanese full-width versus half-width letters, digits, and symbols.
  • IME conversion differences between kana, romaji, and kanji.
  • Accidental capitalization caused by Caps Lock or Shift.
  • Missing or additional spaces.

Create the list in UTF-8 without a byte-order mark. With btcrecover's --passwordlist mode, place one complete candidate on each line and preserve spaces within a passphrase.

If the password consists of known components, the --tokenlist mode can generate combinations. Its token-order and delimiter behavior can differ between releases, so confirm the installed version's --help output before starting a long run. Test a few known examples first to ensure the interpretation matches your expectation.

Avoid sending a multi-gigabyte leaked password list to the recovery machine without checking its source and relevance. Large lists produce noise, consume storage, and rarely outperform a carefully prioritized personal list.

Run btcrecover against the working copy

After obtaining the official btcrecover release and preparing the environment offline, the basic command is:

python3 ./btcrecover.py --wallet ./work/wallet.dat --passwordlist ./work/candidates.txt

For token-based candidates, use the following form only after checking the installed version's documentation:

btcrecoverによるパスワードクラック

python3 ./btcrecover.py --wallet ./work/wallet.dat --tokenlist ./work/tokens.txt

First run a small test list to confirm that the wallet format is recognized and that the candidates are being read correctly. Only then expand the search. Compatible GPU acceleration can increase throughput, but it does not improve the accuracy of the candidate list and may require additional offline driver setup. Validate the workflow on the CPU before enabling acceleration.

When a candidate is found, do not publish the result or paste it into an online terminal. Note that a matching output from a cracking tool is not the final verification. The recovered value must also successfully unlock the actual wallet in Bitcoin Core.

When Hashcat or John the Ripper is considered

Hashcat and John the Ripper may support some Bitcoin wallet formats through conversion scripts or dedicated modes. However, the conversion must match the exact wallet version and encryption format. A misidentified hash can produce misleading results, while an unsupported Descriptor or native-encryption wallet may not work at all.

Do not assume that an Ethereum wallet mode is compatible with Bitcoin Core. For a Bitcoin Core wallet, btcrecover's direct wallet-processing mode is usually easier to validate because it avoids some conversion and format-detection errors. If another tool is used, obtain it from its official distribution channel, verify the binary, and keep the converted hash offline.

Verify the password and protect the recovered wallet

After btcrecover reports a candidate:

  1. Start Bitcoin Core with networking disabled and load the matching wallet.
  2. Enter the candidate in the wallet unlock dialog.
  3. Confirm that expected addresses, transaction history, and balance are visible.
  4. Lock the wallet immediately with walletlock or the GUI's lock command.
  5. Change the passphrase to a new, high-entropy value using Bitcoin Core's wallet-passphrase-change function.
  6. Fully close Bitcoin Core and save a newly encrypted wallet backup.

The relevant RPC method is walletpassphrasechange. Avoid placing the old and new passphrases directly in shell arguments, because command-line arguments may appear in shell history or the process list. Use the GUI where available, or use a supported bitcoin-cli -stdin workflow on a clean offline machine.

Avoid exporting private keys merely to prove that recovery succeeded. Unlocking the wallet and checking a known transaction is sufficient, and keeping keys inside Bitcoin Core reduces exposure. If the old passphrase or wallet file may already have reached an unauthorized party, changing the passphrase does not fully repair the situation; creating a new wallet from a verified seed on a clean system is safer.

When a seed phrase is available

If the 12- or 24-word BIP39 mnemonic is still available, restoring a new wallet is often faster and safer than recovering an old encryption passphrase. The correct BIP32 derivation path, script type, and address type must still be reproduced so that the new wallet displays the expected history and receive addresses.

BIP39 generation principles, partial-memory recovery, and offline dictionary methods for seed phrases are covered separately in「仮想通貨ウォレット復元ガイド」. Those procedures address the mnemonic itself and should not be confused with Bitcoin Core's wallet-file password analysis.

If the mnemonic is incomplete, repeatedly creating wallets on a compromised computer can expose candidate seeds. Perform the work offline and compare the first derived addresses or transaction history before transferring any funds.

Treat a weak passphrase as a possible security incident

Suppose the wallet file was copied to cloud storage, sent through chat, or stored on a shared computer. Anyone holding the encrypted file may eventually crack a weak passphrase offline. If that possibility cannot be ruled out:

  • Assume the old wallet and passphrase are no longer confidential.
  • Create a fresh wallet on a clean, trusted environment.
  • Restore the seed or use a controlled migration method.
  • Confirm the new addresses against the old wallet and an independent source.
  • Transfer funds only after the addresses match.
  • When a hardware wallet is available, verify the destination on the device screen rather than trusting only the computer display.
  • Securely retire the old file only after the new wallet, backup, and transfer have been fully verified.

Create backups that can actually survive an incident

A Bitcoin wallet backup should follow the 3-2-1 principle: three copies, two different media types, and one copy stored separately. For cryptocurrency, the wallet file and its passphrase should also be stored separately so that a single stolen item is insufficient.

Recommended practices include:

  • Make a backup only after Bitcoin Core has completely exited.
  • Store copies on separate, offline media, with one in a secure physical location.
  • Encrypt removable media when the threat model requires it.
  • Do not keep the only wallet backup in the same cloud account used for everyday files.
  • Protect bitcoin.conf separately because it may contain RPC credentials; it is not required to restore private keys.

btcrecoverによるパスワードクラック

  • Periodically test restoration in an offline environment and confirm that the wallet opens and displays the expected history.
  • Record the wallet version and creation method so that future recovery does not depend on memory alone.

The broader backup and permanent-loss prevention section of「仮想通貨ウォレット復元ガイド」 also covers cold wallets, hardware wallets, and multi-copy storage strategies for users who need to combine wallet-file recovery with long-term asset protection.

Troubleshooting when no password is found

The tool says the format is unsupported

The wallet may use a newer Descriptor or native encryption format. Update btcrecover from a verified official source and confirm that the release explicitly supports the relevant Bitcoin Core version. Do not randomly convert the file or alter its header, because any modification can destroy the only usable copy.

The tool recognizes the wallet but finds nothing

Check the following in order:

  • Confirm that the file is the intended wallet and not a backup or empty default file.
  • Verify that the SHA-256 hash still matches the source.
  • Check UTF-8 encoding and remove accidental blank lines or invisible characters.
  • Revisit keyboard-layout, capitalization, and full-width character variations.
  • Add personally meaningful token combinations rather than an arbitrary enormous list.
  • Consider that the passphrase may be high-entropy and therefore outside practical search range.

Bitcoin Core still asks for the RPC password

This is not evidence that the wallet passphrase recovery failed. Edit the local bitcoin.conf, change or remove the configured RPC credentials, and restart the node. If cookie authentication is being used, the generated cookie file can also be managed locally. None of these actions changes the wallet encryption passphrase.

Frequently asked questions

Is an internet connection required for btcrecover?

No. The actual analysis can be performed entirely offline. Internet access may be used beforehand to obtain and verify the official tool and dependencies, but it should be disabled before wallet files and password candidates are introduced.

Can every forgotten Bitcoin Core password be recovered?

No. Recovery is practical for weak, memorable, partially remembered, or reused passphrases. A high-entropy random passphrase may require more computing time than is realistically available.

Does finding the wallet passphrase reveal the seed phrase?

No. They are independent. The passphrase decrypts the existing wallet; it does not reveal or derive the BIP39 mnemonic.

Does btcrecover support the newest Bitcoin Core versions?

Support depends on the wallet format and the release date of the tool. Check the current official compatibility notes. Legacy wallets, Descriptor wallets, and newer native encryption methods should not be assumed to behave identically.

How long does recovery take?

There is no fixed duration. It depends on the number of candidates, the wallet's key-derivation workload, CPU or GPU performance, and whether a partially remembered token structure can reduce the search space.

Final checklist

Before considering the recovery complete, confirm all of the following:

  • The password type was correctly identified as a wallet passphrase rather than an RPC credential.
  • The original wallet remained untouched and a verified working copy was analyzed.
  • The recovery environment had no active network connection.
  • btcrecover and all dependencies came from verified sources.
  • The recovered passphrase unlocked the correct wallet in Bitcoin Core itself.
  • The wallet was locked again immediately after verification.
  • A new strong passphrase was set through Bitcoin Core's own function.
  • A fresh post-change backup was created and its hash recorded.
  • If exposure was possible, funds were moved only after address verification on a trusted device.

By following this workflow, the offline environment for Bitcoin Core password recovery can be conducted without exposing the wallet to an unknown online operator. The decisive elements are an untouched original copy, accurate format detection, a realistic candidate list, and final verification using Bitcoin Core itself.