> For the complete documentation index, see [llms.txt](https://breakpoint-journal.gitbook.io/breakpoint/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://breakpoint-journal.gitbook.io/breakpoint/windows/windows-privilege-escalation/virtual-hard-disks.md).

# Virtual Hard Disks

During penetration tests you might come across important backup files such as `.vhd`, `.vhdx`, and `.vmdk` files.

|         |                                        |
| ------- | -------------------------------------- |
| `.vhd`  | Virtual Hard Disk (used by Hyper-V)    |
| `.vhdx` | Virtual Hard Disk v2 (used by Hyper-V) |
| `.vmdk` | Virtual Machine Disk (used by VMware)  |

Suppose we come across one of these. We can mount them and explore these files likeso:

{% tabs %}
{% tab title="VMDK" %}
{% code title="" %}

```bash
$ guestmount -a SQL01-disk1.vmdk -i --ro /mnt/vmdk
```

{% endcode %}
{% endtab %}

{% tab title="VHD/VHDX" %}
{% code title="" %}

```python
$ guestmount --add WEBSRV10.vhdx  --ro /mnt/vhdx/ -m /dev/sda1
```

{% endcode %}
{% endtab %}
{% endtabs %}

On Windows we can right-click the file and choose `Mount` or utilize the `Disk Management` utility to mount a `.vhd` or `.vhdx` file. Alternatively, there is a [Mount-VHD](https://docs.microsoft.com/en-us/powershell/module/hyper-v/mount-vhd?view=windowsserver2019-ps) PowerShell cmdlet.

<figure><img src="https://2618442973-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmGhYQRY1OEeL4zywZ9zS%2Fuploads%2Ft9BdHPUsU4PNRC9jkcxQ%2Fimage.png?alt=media&amp;token=3bc82852-70e8-4237-a2d6-cd5b00512e04" alt=""><figcaption></figcaption></figure>

For a .vmdk file we can select `Map Virtual Disk` and follow the instructions to map to a drive letter or utilize VMWare Workstation.
