Bitcoin Forum
April 26, 2024, 09:50:05 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Recovering keys from ALTCOIN wallets  (Read 614 times)
markm (OP)
Legendary
*
Offline Offline

Activity: 2940
Merit: 1090



View Profile WWW
July 02, 2015, 06:11:45 AM
 #1

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. Smiley)

-MarkM-


Browser-launched Crossfire client now online (select CrossCiv server for Galactic  Milieu)
Free website hosting with PHP, MySQL etc: http://hosting.knotwork.com/
1714125005
Hero Member
*
Offline Offline

Posts: 1714125005

View Profile Personal Message (Offline)

Ignore
1714125005
Reply with quote  #2

1714125005
Report to moderator
The forum was founded in 2009 by Satoshi and Sirius. It replaced a SourceForge forum.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714125005
Hero Member
*
Offline Offline

Posts: 1714125005

View Profile Personal Message (Offline)

Ignore
1714125005
Reply with quote  #2

1714125005
Report to moderator
1714125005
Hero Member
*
Offline Offline

Posts: 1714125005

View Profile Personal Message (Offline)

Ignore
1714125005
Reply with quote  #2

1714125005
Report to moderator
mullick
Legendary
*
Offline Offline

Activity: 1064
Merit: 1002


View Profile
July 02, 2015, 06:38:17 AM
Last edit: July 02, 2015, 07:07:28 AM by mullick
 #2

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
markm (OP)
Legendary
*
Offline Offline

Activity: 2940
Merit: 1090



View Profile WWW
July 02, 2015, 07:21:17 AM
 #3

Thanks, that magic over-ride for pywallet did the trick it seems. Smiley

-MarkM-

Browser-launched Crossfire client now online (select CrossCiv server for Galactic  Milieu)
Free website hosting with PHP, MySQL etc: http://hosting.knotwork.com/
mullick
Legendary
*
Offline Offline

Activity: 1064
Merit: 1002


View Profile
July 02, 2015, 07:28:41 AM
 #4

Thanks, that magic over-ride for pywallet did the trick it seems. Smiley

-MarkM-


Glad I could help Smiley

Just so happens I have a little bit of experience recovering altcoin wallets lol
kennyP
Hero Member
*****
Offline Offline

Activity: 544
Merit: 500



View Profile
July 02, 2015, 09:30:12 AM
 #5

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
mullick
Legendary
*
Offline Offline

Activity: 1064
Merit: 1002


View Profile
July 03, 2015, 12:45:57 AM
 #6

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.
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!