Bitcoin Forum
May 25, 2024, 12:37:55 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Lost wallet with virtual machine, have BTC address, can I recover coin?  (Read 2283 times)
HowlingMad (OP)
Full Member
***
Offline Offline

Activity: 175
Merit: 100


View Profile
October 27, 2013, 09:14:54 PM
 #1

I was using a virtual machine to run my Armory installation.  I created a new wallet, transferred funds, and then went back to an older image of the virtual machine.  The VM started crashing, etc.... I did not think the whole thing in advance.  

Of course, I printed a paper copy.  But it was to a PDF file which was guess where, on the virtual machine.

I have the bitcoin address of the wallet but not any keys.  Can I recover these funds and if so how?


Windows 10, R280x * 3
etotheipi
Legendary
*
Offline Offline

Activity: 1428
Merit: 1093


Core Armory Developer


View Profile WWW
October 27, 2013, 09:24:04 PM
 #2

You might be alright.  Just because the machine crashes doesn't mean that the virtual disk drive is lost.  Very frequently, you can still access that drive (i.e. make a new VM and add the VM disk of the old one to it).   As long as you didn't restore to before the wallet was made -- any version of the wallet is fine for recovering all the coins.  If you restored to before that point in time, you would probably be SoL. 

If you can get access to the wallet file in any way, then you can copy it out and import it into another instance of Armory.  Let me know how it goes.

Founder and CEO of Armory Technologies, Inc.
Armory Bitcoin Wallet: Bringing cold storage to the average user!
Only use Armory software signed by the Armory Offline Signing Key (0x98832223)

Please donate to the Armory project by clicking here!    (or donate directly via 1QBDLYTDFHHZAABYSKGKPWKLSXZWCCJQBX -- yes, it's a real address!)
HowlingMad (OP)
Full Member
***
Offline Offline

Activity: 175
Merit: 100


View Profile
October 27, 2013, 09:36:49 PM
 #3

You might be alright.  Just because the machine crashes doesn't mean that the virtual disk drive is lost.  Very frequently, you can still access that drive (i.e. make a new VM and add the VM disk of the old one to it).   As long as you didn't restore to before the wallet was made -- any version of the wallet is fine for recovering all the coins.  If you restored to before that point in time, you would probably be SoL. 

If you can get access to the wallet file in any way, then you can copy it out and import it into another instance of Armory.  Let me know how it goes.
Yes, the VM was restored to a previous point.  Damn.  I do have the actual BTC address that was associated with the wallet. 

Can I generate new keys from this address?

Windows 10, R280x * 3
etotheipi
Legendary
*
Offline Offline

Activity: 1428
Merit: 1093


Core Armory Developer


View Profile WWW
October 27, 2013, 09:48:05 PM
 #4

You might be alright.  Just because the machine crashes doesn't mean that the virtual disk drive is lost.  Very frequently, you can still access that drive (i.e. make a new VM and add the VM disk of the old one to it).   As long as you didn't restore to before the wallet was made -- any version of the wallet is fine for recovering all the coins.  If you restored to before that point in time, you would probably be SoL. 

If you can get access to the wallet file in any way, then you can copy it out and import it into another instance of Armory.  Let me know how it goes.
Yes, the VM was restored to a previous point.  Damn.  I do have the actual BTC address that was associated with the wallet. 

Can I generate new keys from this address?

Oh, that's probably even worse than deleting it, since you can usually forensically recover a deleted file.  I bet the restore is dramatically complicated.  However, I suppose it's possible to still recover something...

Turn off your virtual machine, and locate the directory that contains the hard disk.  We should probably just scan all related files, including the hard-disk file itself.  I will forward this to CircusPeanut who should be able to write a quick script that will search a directory, open all files in binary mode, and do a raw search for a bunch of magic strings that appear in wallet files.  With some luck, the virtual-disk interface works like a real HDD, where "deleted" files may not have been actually deleted but ignored, to be overwritten when something else needs the space.   A raw binary search should tell us right away if there's anything on that disk that even resembles a wallet.

Much more extreme would be a similar raw search of your host (physical) drive.  That's a bit more challenging and a bit more work.  I guess it depends how much BTC you had in there.  Wonder if the cost-to-benefit is there.

What OS are you in?  CircusPeanut should be able to write a dependency-less python script that will search for unique patterns that appear in Armory wallet files.  But if you're in Windows you'll have to install python for that to work.  For CircusPeanut or anyone else that would like to take a stab at raw binary searches for wallets, you can probably search for \xBAWALLET\x00 which will appear as the first eight bytes of any wallet file.  After that, you can look four bytes later for the network magic bytes \xF9\xBE\xB4\xD9.  Once you have that, you can use the binary map I linked above to figure out how much data to copy.

Founder and CEO of Armory Technologies, Inc.
Armory Bitcoin Wallet: Bringing cold storage to the average user!
Only use Armory software signed by the Armory Offline Signing Key (0x98832223)

Please donate to the Armory project by clicking here!    (or donate directly via 1QBDLYTDFHHZAABYSKGKPWKLSXZWCCJQBX -- yes, it's a real address!)
HowlingMad (OP)
Full Member
***
Offline Offline

Activity: 175
Merit: 100


View Profile
October 27, 2013, 10:08:07 PM
 #5

6.59159344 BTC involved.  Yes, I am using Windows 7 64-bit and am using Virtualbox.  Each of the 'disks' is a single file and Virtualbox sees them as SATA drives. 

I believe Python is already installed, if not, no big deal.  I can either install python or boot the computer with a LiveCD, I think I have Ubuntu 10.4 laying around here. 

Sorry I did not find any 'binary file above'.

Windows 10, R280x * 3
etotheipi
Legendary
*
Offline Offline

Activity: 1428
Merit: 1093


Core Armory Developer


View Profile WWW
October 27, 2013, 10:11:52 PM
 #6

Sorry I did not find any 'binary file above'.

Sorry, what I meant was:  we open the disk files as raw binary files and search them for unique strings that only appear in Armory wallets.  If the wallet still exists anywhere on the VM (even as a deleted file), a raw binary search will find it.


Founder and CEO of Armory Technologies, Inc.
Armory Bitcoin Wallet: Bringing cold storage to the average user!
Only use Armory software signed by the Armory Offline Signing Key (0x98832223)

Please donate to the Armory project by clicking here!    (or donate directly via 1QBDLYTDFHHZAABYSKGKPWKLSXZWCCJQBX -- yes, it's a real address!)
HowlingMad (OP)
Full Member
***
Offline Offline

Activity: 175
Merit: 100


View Profile
October 27, 2013, 11:18:16 PM
 #7

Any recommended hex editor for Windows?  I tried using Hex Editor Neo but it crashes when looking at snapshot files.

Windows 10, R280x * 3
etotheipi
Legendary
*
Offline Offline

Activity: 1428
Merit: 1093


Core Armory Developer


View Profile WWW
October 27, 2013, 11:19:27 PM
 #8

Any recommended hex editor for Windows?  I tried using Hex Editor Neo but it crashes when looking at snapshot files.

You're not going to be able to open it in a regular editor... it's a multi-gigabyte file.  vim should work, but it's a bear to use unless you know what you're doing.  Really though, we'll get a script for you that will do it automatically.  Just hold tight Smiley  (and pester me if you don't hear back)

Founder and CEO of Armory Technologies, Inc.
Armory Bitcoin Wallet: Bringing cold storage to the average user!
Only use Armory software signed by the Armory Offline Signing Key (0x98832223)

Please donate to the Armory project by clicking here!    (or donate directly via 1QBDLYTDFHHZAABYSKGKPWKLSXZWCCJQBX -- yes, it's a real address!)
HowlingMad (OP)
Full Member
***
Offline Offline

Activity: 175
Merit: 100


View Profile
October 27, 2013, 11:23:53 PM
 #9

Cool!  Just don't forget to PM with addresses so I can pay you guys for your efforts.

Windows 10, R280x * 3
jl2012
Legendary
*
Offline Offline

Activity: 1792
Merit: 1097


View Profile
November 06, 2013, 04:09:56 PM
 #10


Can I generate new keys from this address?

The answer is quite obvious....... Can you recover the key with the address in my signature?

Donation address: 374iXxS4BuqFHsEwwxUuH3nvJ69Y7Hqur3 (Bitcoin ONLY)
LRDGENPLYrcTRssGoZrsCT1hngaH3BVkM4 (LTC)
PGP: D3CC 1772 8600 5BB8 FF67 3294 C524 2A1A B393 6517
jackjack
Legendary
*
Offline Offline

Activity: 1176
Merit: 1255


May Bitcoin be touched by his Noodly Appendage


View Profile
November 13, 2013, 10:18:46 PM
 #11

This thread has been brought to my attention

Two remarks:
 - I HIGHLY recommend wxHexEditor, I love it
 - Pywallet recovers private keys from bitcoin-qt deleted wallets, using key headers. So if armory private keys do have headers (etotheipi?), it can easily recover them. I don't know about encryption and such, but once you have all the data you're kinda saved anyway

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
HowlingMad (OP)
Full Member
***
Offline Offline

Activity: 175
Merit: 100


View Profile
November 13, 2013, 10:30:52 PM
 #12

Thanks I purchased Hex Editor Neo and it seems to work great.  I have found a number of files with the correct header 'baWALLET' but not the wallet I was looking for.  I will try the wallet you recommended and let you know my results.

Windows 10, R280x * 3
etotheipi
Legendary
*
Offline Offline

Activity: 1428
Merit: 1093


Core Armory Developer


View Profile WWW
November 13, 2013, 10:39:06 PM
 #13

It's all documented here:

http://bitcoinarmory.com/developers/armory-wallet-files/

If it's encrypted, you'll need a little bit of python magic to apply the decryption (it's complicated).  But if you are in Linux (or can get there) it's trivial to get the python environment setup:  just run the four commands to build the project and then start python and "from armoryengine import *".  Windows is considerably more complicated.

In the future we hope to have a tool that will just apply all these steps for you.

Founder and CEO of Armory Technologies, Inc.
Armory Bitcoin Wallet: Bringing cold storage to the average user!
Only use Armory software signed by the Armory Offline Signing Key (0x98832223)

Please donate to the Armory project by clicking here!    (or donate directly via 1QBDLYTDFHHZAABYSKGKPWKLSXZWCCJQBX -- yes, it's a real address!)
HowlingMad (OP)
Full Member
***
Offline Offline

Activity: 175
Merit: 100


View Profile
November 13, 2013, 11:08:10 PM
 #14

Sorry guys, no headway.  I am running Debian with Python 2.6.6

For pywallet error is: root@debian:/home/bob# ./pywallet.py --web
./pywallet.py: line 1: syntax error near unexpected token `newline'
./pywallet.py: line 1: `<!DOCTYPE html>'
I cut/pasted the install line from the docs so I have all of the packages.

etotheipi
I started python and entered the command given, and the error within python is "no module named armoryengine"

Windows 10, R280x * 3
etotheipi
Legendary
*
Offline Offline

Activity: 1428
Merit: 1093


Core Armory Developer


View Profile WWW
November 13, 2013, 11:25:18 PM
 #15

Sorry guys, no headway.  I am running Debian with Python 2.6.6

For pywallet error is: root@debian:/home/bob# ./pywallet.py --web
./pywallet.py: line 1: syntax error near unexpected token `newline'
./pywallet.py: line 1: `<!DOCTYPE html>'
I cut/pasted the install line from the docs so I have all of the packages.

etotheipi
I started python and entered the command given, and the error within python is "no module named armoryengine"


HowlingMad:  armoryengine part of Armory.  You can't just run it in a vacuum.  You have to build the Armory project from source to get it.  Luckily, Armory is super easy to build from source:

http://bitcoinarmory.com/download/building-armory-from-source/

It's 4 lines on the terminal to get it running.  At that point, you should be able to start python in that directory and get access to it.  But there's still no shortage of complexity to get what you need out of the wallet file.  Explaining it here would be the start of developer documentation on how to use armoryengine. 

On the other hand, all the code you need to open the wallet and extract&decrypt the root private key and chaincode are part of the PyBtcWallet module.  You could probably dig through there and pick out what you need.  There's a header to read, which will also read a root address.  Then you read root private key and the KDF parameters (kdfRomix), and then apply the KDF with the passphrase to decrypt the key.

I don't have time to get into the details until aftter this release.  Though, if you're exceptionally anxious and have programming experience you might be able to figure it out just from looking at how Armory reads and decrypts the private keys.




Founder and CEO of Armory Technologies, Inc.
Armory Bitcoin Wallet: Bringing cold storage to the average user!
Only use Armory software signed by the Armory Offline Signing Key (0x98832223)

Please donate to the Armory project by clicking here!    (or donate directly via 1QBDLYTDFHHZAABYSKGKPWKLSXZWCCJQBX -- yes, it's a real address!)
HowlingMad (OP)
Full Member
***
Offline Offline

Activity: 175
Merit: 100


View Profile
November 13, 2013, 11:49:06 PM
 #16

Thanks much, I will take a crack at it.

Windows 10, R280x * 3
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!