How to decrypt an image * .vhd from Oracle VM VirtualBox?

Discussions related to using VirtualBox on Windows hosts.
Post Reply
Kenny00
Posts: 4
Joined: 26. Nov 2018, 16:41

How to decrypt an image * .vhd from Oracle VM VirtualBox?

Post by Kenny00 »

Hello!
The task is to recover information from the disk.
Virtual Machine has been removed.
The disc was left, and moved to enother drive.
VHD disk image, encryption method AES-XTS256-PLAIN64.
I know password.
Tried the following:

Code: Select all

openssl enc -aes-256-cbc -d -in encrypted.VHD -out decrypted.VHD
Error: bad magic number

i was trying read manual- 9.31.4. Decrypting encrypted images
but error:

Code: Select all

VBoxManage encryptmedium  "encrypted.VHD" --cipher AES-XTS256-PLAIN64 --oldpassword "PASSWD.TXT"
0%...
Progress state: VBOX_E_INVALID_OBJECT_STATE
VBoxManage.exe: error: Failed to encrypt hard disk
VBoxManage.exe: error: The image is not configured for encryption
VBoxManage.exe: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component MediumWrap, interface IMedium
VBoxManage.exe: error: Context: "enum RTEXITCODE __cdecl handleEncryptMedium(struct HandlerArg *)" at line 1890 of file VBoxManageDisk.cpp
Last edited by socratis on 28. Nov 2018, 17:07, edited 2 times in total.
Reason: Unmarked as [Solved].
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: How to decrypt an image * .vhd from Oracle VM VirtualBox?

Post by mpack »

There is no way to retrieve information from an encrypted disk unless you have the control data. That is what it means to encrypt a disk.

Your password is not the key which decrypts the disk. Your password merely decodes the real key (DEK) that was stored in the .vbox file. Without the .vbox file you have no chance.
Kenny00
Posts: 4
Joined: 26. Nov 2018, 16:41

Re: How to decrypt an image * .vhd from Oracle VM VirtualBox?

Post by Kenny00 »

mpack wrote:There is no way to retrieve information from an encrypted disk unless you have the control data. That is what it means to encrypt a disk.

Your password is not the key which decrypts the disk. Your password merely decodes the real key (DEK) that was stored in the .vbox file. Without the .vbox file you have no chance.
Thanks a lot.
Post Reply