Ethereum lost password


b_o_b

Advanced Member
Joined
Sep 7, 2010
Messages
1,473
Hi all,

In august 2016 I bought a few ethers just for fun and stored them on my PC. Didn't worry about them too much but since then they have increased in price quite a bit and I recently thought about checking it again.
Unfortunately I've lost my password. I think it is a combination of a word in a Dutch or English dictionary with some additional characters and probably started with a capital. Something like "Dolphin£1" (dolphin being a word from the dictionary and the 1 could be a 2, 3...
I might also have doubled the words so - "dolphin1dolphin" or "dolphin1*dolphin"
Quite a few combinations possible but I hope not impossible to crack for someone.

I know there are sites or persons that assist for a certain percentage of the restored ethers but not sure if I can trust those services.

The technical details of ethereum are also quite confusing to me.

I still have a ~/.ethereum directory on my harddisk and according to https://github.com/ethereum/go-ethereum/wiki/Backup-&-restore that should be enough to back up your wallet.
They also warn you not to forget your password... yeah I know...

Luckily I am not the first (and certainly no the last ;) ) with this problem, so there are some tools

https://github.com/burjorjee/pyethrecover

That only seems to work for v1 json files - but I don' t even see any json file in my .ethereum directory so I have no idea what is the v1,2 or 3.

https://ethereum.stackexchange.com/...hrecover-py-on-v3-json-transfor-v3-json-to-v1

Any suggestion what is the best approach to safely crack the password? What file is the json file pyethrecover is referring to?
Hope there is someone on the board with some ethereum experience that can shed some light on this problem :)
 

FBnil

They'll own everything and be miserable.
Joined
Dec 14, 2012
Messages
5,071
Location
Yurp
If you can bruteforce it, then here is a generator I created, just add more stuff to the array @D.

PHP:
wget https://raw.githubusercontent.com/titoBouzout/Dictionaries/master/Dutch.dic
wget "https://github.com/titoBouzout/Dictionaries/raw/master/English%20(American).dic"

PHP:
#!/usr/bin/perl


@D = qw(dolphin dolphin1 b_o_b 1 2 3 4 5 6 7 8 9 0 2016 2015 2014 2013 2012 );
@B = qw(! @ # $ % ^ & * £ );

@Dutch = slurp_n_slash('Dutch.dic');
@Dutch = slurp_n_slash('English (American).dic');
@D = (@D, @Dutch, @English);

# L33t swapper
%M = (
   a => 4,
   i => 1,
   e => 3,
   o => 0,
);

# Combine 2 back to back or with a * in between
for my $i (@D){
   &print2($i);
   for my $j (@D){
       &print2("$i$j");
       foreach $b (@B) {
         &print2("$i$b$j");
       }
   }
}

# swap case and other tricks
sub print2 {
   my ($i) = @_;
   print "$i\n"; # as is
   print "\u$i\n"; # Titlecase
   print "\U$i\n"; # UPPERCASE
   $org = $i;
   $prev = "";
   for my $r (keys %M){
       while($i=~s/$r/$M{$r}/ex){ # replace with leetness
           if ($i ne $prev && $i ne $org){
               print "$i\n";  # leet as is
               print "\u$i\n"; # leet Titlecase
               print "\U$i\n"; # leet UPPERCASE
           }
       }
       $prev = $i;
   }
}


sub slurp_n_slash{
  my $file = @_;
  open(FF, '<', $_[0]) or die " $_[0]: $!";
  my @L;
  <FF>; # skip first line
  while(<FF>){
    chomp; 
    s@/.*@@; # remove the / and everything after that
    push(@L, $_);
  }
  close FF;
  @L; # return our read array
}
[doublepost=1513192146,1513190986][/doublepost]don't forget to pipe it through sort and uniq (as it generate duplicates)
 
Last edited:

b_o_b

Advanced Member
Joined
Sep 7, 2010
Messages
1,473
Awesome thx
Not sure if it is possible to bruce force it with this script. Array @D should ideally include the english and dutch dictionary so a very long list of words and I think the combinations currently possible with the script will be quite large.

That said, I will give it a try with a small list of words that are probable candidates once I know how what file to 'brute force' with pyetherecover (if that still works with my files). I think I will check on an cryptocurrency forum/IRC channel what the json file is folks are referring to.
 

FBnil

They'll own everything and be miserable.
Joined
Dec 14, 2012
Messages
5,071
Location
Yurp
@b_o_b If you want I can make something that also includes these dictionaries, if you want. Wont take more than 2 extra lines, just need to find the right word lists...
 

b_o_b

Advanced Member
Joined
Sep 7, 2010
Messages
1,473
@FBnil that would be great - https://github.com/titoBouzout/Dictionaries have some dic files that can be used.
I don't think the words I used for the password where very uncommon so I think any basic dictionary will do. With tweaking the script a bit it might be possible to have something that can be used as input password file.

Was travelling last two days but will have some time this weekend to check pyetherecover or other tools. I' ve already accepted losing the ethers but it would be fantastic if they could be recovered.
 

FBnil

They'll own everything and be miserable.
Joined
Dec 14, 2012
Messages
5,071
Location
Yurp
@b_o_b updated my previous post. But running that beast will take some serious time... and space...
 

levi

Still fresh, damnit!
Joined
Oct 6, 2008
Messages
15,852
Location
Somewhere off the coast of the EU
I never got to grips with exactly how it worked; why does it create duplicates? I'd have thought it possible to write it so that its iterable, and then you don't need to sort big lists of guesses.
 

b_o_b

Advanced Member
Joined
Sep 7, 2010
Messages
1,473
I am now using this tool https://github.com/lexansoft/ethcracker and running some possible combinations. At least I know it works as advertised - added an account and 'cracked' the password with it.

This tool creates passwords based on a text file on-the-fly and executes it on the password protected file. Due to all possible combinations even a small list of words will take a long time if I have to combine that with a dictionary it will take ages..
 

FBnil

They'll own everything and be miserable.
Joined
Dec 14, 2012
Messages
5,071
Location
Yurp
why does it create duplicates?
Because I make $prev = ""; While it should be $org = $i;
it will then loop through %M, adding the leet combinations on top of what we have, which means that if the word does not contain that letter to replace, it will not have changed, thus be printed, although we already had that (but valid in the first loop, because $prev="").
So if ($i ne $prev) should be ($i ne $prev && $i ne $org)

You know what? Fixing original..
 
Top