Bitcoin Forum
May 24, 2024, 04:20:26 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Wallet Brute Force Cracker  (Read 6908 times)
Jutarul (OP)
Donator
Legendary
*
Offline Offline

Activity: 994
Merit: 1000



View Profile
October 07, 2012, 05:06:45 PM
 #1

Hi,

is there an open-source wallet brute force cracker, which takes the input from a wordlist file and reports the successful passphrase?
It is not uncommon for people to lose part of their passphrase and they need to test a few 10000 variations.

A feasible solution right now is to use the RPC interface and wrap it in a script, this way I achieve about 10 trial keys per second. So if the wordlist is < 100,000 keys, a full scan should be completed in about 3-4 hours. (since the procedure is embarrassingly parallel you can easily increase the cracking speed, e.g. 1000 instances should give you about 25 million trial keys / hour)

procedure:
0) create a wordlist with one of the major password cracking tools (e.g. john the ripper)
1) run bitcoind as a server with RPC active
2) adjust the following python script to your operating system and environment (link:http://ubuntuone.com/7XJaHf4OH4Ak91DUGhscvG):
Code:
import subprocess
import sys

wordfile=open(sys.argv[1],"r")
logfile=open(sys.argv[2],"a")

for l in wordfile:
 sys.stdout.write("trying %s" % l)
 w=l.strip()
 p=subprocess.Popen(['./bitcoind','walletpassphrase',w,"1"],stdout=subprocess.PIPE,stderr=subprocess.STDOUT)
 s=p.communicate()[0]
 if ("incorrect" in s):
  logfile.write("%s: incorrect\n" % (w))
 elif ("unlocked" in s):
  logfile.write("%s: unlocked\n" % (w))
 else:
  logfile.write("%s: likely passphrase\n" % (w))
  print "success!"
  print "likely passphrase: %s" % (w)
  break

logfile.close()
3) run the script local to your bitcoin directory:
Code:
python crack.py wordlist.txt log.txt

I'd appreciate if people could extend this thread by explicit instructions for their specific operating system and environment.

The ASICMINER Project https://bitcointalk.org/index.php?topic=99497.0
"The way you solve things is by making it politically profitable for the wrong people to do the right thing.", Milton Friedman
Revalin
Hero Member
*****
Offline Offline

Activity: 728
Merit: 500


165YUuQUWhBz3d27iXKxRiazQnjEtJNG9g


View Profile
October 07, 2012, 06:25:42 PM
 #2

Related: I wrote a brute force script that takes your best guess at the passphrase and tries possible typos.

https://bitcointalk.org/index.php?topic=85495.msg942171#msg942171

      War is God's way of teaching Americans geography.  --Ambrose Bierce
Bitcoin is the Devil's way of teaching geeks economics.  --Revalin 165YUuQUWhBz3d27iXKxRiazQnjEtJNG9g
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!