We will see how we can take forensic images in different format of windows and linux system.
The reason of taking image is we cannot work on the system where malicious activity has happened. We may inadvertently spoil the evidence. Also for team distribution work, we need multiple copies of images for collaboration.
One option is if the machine is physical/virtual windows --> We can use Microsoft's Sysinternal's tool Disk2vhd. Using this tool we can take vhd or vhdx format image. We can take C drive or whole drive image.
For Hyper-V VM --> Shutdown the VM then go to the VM folder to collect .vhdx forensic copy of the hard drive. After taking snapshot you can export VHDX.
For VMware VM --> Native disk format is vmdk. You can use StarWind V2V converter to convert vmdk file to vhd/vhdx. You can also use qemu-img tool to convert the same.
qemu-img convert -O vpc disk.vmdk disk.vhd
VirtualBox --> VBoxManage clonehd disk.vdi disk.vhd --format VHD
For Linux physical server --> You can use FTK imager or dd tool to take the image in raw format. Then you can use qemu-img tool to convert the same.
dd if=/dev/sda of=disk.raw bs=4M conv=noerror,sync
qemu-img convert -O vpc disk.raw disk.vhd
For Linux vm server --> These vm are mostly in vmdk or qcow2 format.
qemu-img convert -O vpc disk.qcow2 disk.vhd
qemu-img convert -O vpc disk.vmdk disk.vhd
Azure VM --> You can export the managed disk in vhd format.
For evidence acquisition, E01 is best and for analysis vm making or other task, you can use vhd/vhdx/vmdk.
Another writeup of mine using kape tool to take vhd triage image: https://mahimfiroj.blogspot.com/2025/10/installing-kape-incident-response-tool.html
Qemu tool installation:
Debian/Ubuntu:
sudo apt update
sudo apt install qemu-utils
RHEL/CentOS/Fedora:
sudo yum install qemu-img
sudo dnf install qemu-img
Avi
Comments
Post a Comment