By mistake i've send BTC to my old electrum wallet for which i don't remember my password (and don't have saved the seeds)
Can someone give me a easy to use brute force software with which i can find my password?
I've tried with btcrecover, but as i see it doesn't work with electrum wallet (i've made new wallet with password pass and i've tried to brute force it - no result)
I don't know is it matter but the default_wallet file was created on 18.03.2015 (with older electrum wallet)
Thanks in advance
Hi,
do you remember at least the length of the password (and if there were number or special characters)?
I think i used this model: first character is Upper or Lowercase after that several lowercase characters and maybe in the end i've places one or three special characters
example:
Password&
password&&&
[ main ]
edit: the length should be between 8 and 12 characters and i have three variants of [main]
and all this is in case i haven't used the seed as a password
Try with this script :
Bounty for anyone who can help of course.
Sure, I can do Electrum. Their key stretching has an interesting flaw. This script exploits it to get a few hundred times speedup compared to simple brute force.
My help is free but tips are always welcome. I suggest 15%, just like tipping your waiter.
require 'base64'
require 'digest/sha2'
require 'open3'
require 'openssl'
# Double substitution for Electrum
# Put your best guess at your passphrase here
passphrase = 'Oops I forgot'
# The full path to your electrum.dat or default_wallet
wallet_file = '/home/revalin/.electrum/wallets/default_wallet'
# Where to find Electrum. Use 1.9.2! Older versions may be incompatible.
$electrum = '/home/revalin/Electrum-1.9.2/electrum'
def test(phrase)
$cipher.reset
$cipher.key = Digest::SHA256.digest(Digest::SHA256.digest(phrase))
$cipher.update $seed
$cipher.final
puts phrase
i,o,t = Open3.popen2e($electrum, "-o", "getseed")
i.puts(phrase)
i.close
if t.value.success?
puts "Found it! #{phrase}"
exit
end
rescue OpenSSL::Cipher::CipherError
end
def scramble(passphrase)
characters = " !\"\#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"
list = []
# transpose adjacent chars
(passphrase.length - 1).times do |i|
testphrase = passphrase.dup
testphrase[i] = passphrase[i+1]
testphrase[i+1] = passphrase[i]
list << testphrase
end
# delete one char
passphrase.length.times do |i|
testphrase = passphrase.dup
testphrase = testphrase[0,i] + testphrase[(i+1)..-1]
list << testphrase
end
# substitutute one char
passphrase.length.times do |i|
characters.chars.each do |c|
testphrase = passphrase.dup
testphrase[i] = c
list << testphrase
end
end
# insert one char
(passphrase.length + 1).times do |i|
characters.chars.each do |c|
testphrase = passphrase.dup
testphrase.insert(i, c)
list << testphrase
end
end
return list.uniq
end
wallet = File.read(wallet_file)
seed_base64 = wallet.match(/'seed': '([^']+)'/).captures.first
$seed = Base64.decode64(seed_base64)
$cipher = OpenSSL::Cipher.new('aes-256-cbc')
$cipher.iv = $seed.slice!(0,16)
Dir.chdir File.dirname $electrum
list1 = scramble(passphrase)
list1.each { |i| test i }
list1.each { |i| scramble(i).each { |j| test j }}
puts "No luck."
exit 1