Bitcoin Forum

Alternate cryptocurrencies => Altcoin Discussion => Topic started by: markm on July 02, 2015, 06:11:45 AM



Title: Recovering keys from ALTCOIN wallets
Post by: markm on July 02, 2015, 06:11:45 AM
I have been finding my ancient wallets left over from trying out various altcoins over the years, building the corresponding altcoins and getting up to date with their blockchains to access any coins those wallets might contain.

This went fine until I happened upon a wallet that crashed the coin daemon, asking for a database recovery to be done.

db_recover utility for BDB wants you to have a log not just the database (wallet) itself, so that was no good.

So I grabbed pywallet, a newer version of it said to be better than the older one someone else had on github.

Doing just a dump of the wallet using pywallet resulted in huge private keys with long strings of FFFFFFFF in them.

So I tried pywallet's recover routine, as it can work on a file not just on disk drive. (It is intended for scouring a disk or part of a disk trying to recover keys from deleted wallets).

The problem I have now is that the recover routine will not let me give no password to the wallet it creates to put the recovered keys into.

It made me a file with 207 recovered keys in it, but I had to tell it a password to use to encrypt that wallet, so it is an encrypted wallet.

I did mention I am talking about ancient coins, right? Right. Well guess what, some ancient coins do not have encrypted wallet capability even in their latest incarnations.

So the coin daemon cannot use this nice shiny new, but encrypted, wallet.

I asked pywallet to dump the wallet, I even told it the password, but instead of dumping un-encrypted keys the dump has all the private keys encrypted. It told me at the top of the dump that the password was correct, if I tell it a wrong password it tells me it is incorrect. So it does know how to decrypt the keys, heck it probably decrypts them (or at least one of them) to check whether or not the password I give is correct. But the damn dump does not dump decrypted keys.

So I am still trying to find out how the heck to import the damn keys or, probably simplest really, decrypt the damn wallet and leave it decrypted.

I had to tell pywallet the exact address-version the coin in question uses to get it to do things right, so it does not seem likely I could just load it with some other coin deamon entirely, one that does support wallet encryption, then tell that to decrypt the thing.

(A brief look toward that idea actually leads me to think maybe the coins that do support wallet encryption do not offer a decryption option to turn them back into decrypted wallets anyway, so even if I convert the whole thing over to some other coin's address version byte style I maybe still could not use some more modern coin-daemon to decrypt the damn thing.)

Any insights/ideas/solutions?

(Hopefuly something faster than reverse-engineering pywallet to figure out how to hack it to allow not encrypting the recovered-keys wallet it creates. :))

-MarkM-



Title: Re: Recovering keys from ALTCOIN wallets
Post by: mullick on July 02, 2015, 06:38:17 AM
I had this same problem with pywallet before. Ended up reviewing the code and found the exact string you needed to pass to not give it a passphrase. Ill see if I can find it

Another option I use often is gavins bitcointools with fixwallet and passing the --notxes flag.

5 EDITS LATER: Found it

https://github.com/jackjack-jj/pywallet/blob/master/pywallet.py#L4880

Entering

"I don't want to put a password on the recovered wallet and I know what can be the consequences."

Without quotes will dump the wallet unencrypted.

Also gavins script is here

https://github.com/gavinandresen/bitcointools

Yet another option.

https://bitcointalk.org/index.php?topic=25091.0

Sadly the source code repository is now dead. So I can no longer use this. I might have the source hanging around on a vm somewhere. If I find it I'll create a new repository. I suppose you could isolate it to a vm with no network access (which I do anyways when running 3rd party software on wallets) and use the binary file. Although if the developer was really tricky he could still be malicious


Title: Re: Recovering keys from ALTCOIN wallets
Post by: markm on July 02, 2015, 07:21:17 AM
Thanks, that magic over-ride for pywallet did the trick it seems. :)

-MarkM-


Title: Re: Recovering keys from ALTCOIN wallets
Post by: mullick on July 02, 2015, 07:28:41 AM
Thanks, that magic over-ride for pywallet did the trick it seems. :)

-MarkM-


Glad I could help :)

Just so happens I have a little bit of experience recovering altcoin wallets lol


Title: Re: Recovering keys from ALTCOIN wallets
Post by: kennyP on July 02, 2015, 09:30:12 AM
I tried using pywallet on windows 7 to recover some NOBL coins from a wallet I recovered off a deleted USB backup but couldn't get it to work. I think the wallet had ~2.5-3 million coins in it from memory but is probably quite corrupted. I'd share 50% with anyone who could extract the private keys from it. I gave up trying. If anyone is interested let me know


Title: Re: Recovering keys from ALTCOIN wallets
Post by: mullick on July 03, 2015, 12:45:57 AM
I tried using pywallet on windows 7 to recover some NOBL coins from a wallet I recovered off a deleted USB backup but couldn't get it to work. I think the wallet had ~2.5-3 million coins in it from memory but is probably quite corrupted. I'd share 50% with anyone who could extract the private keys from it. I gave up trying. If anyone is interested let me know

You can message me and I can give it a shot for you. Cant promise anything.

I would attempt to get a list of addresses so you can verify I was unable to recover anything in case I'm not.