Avoiding duplicate lvm name issues.
Scenario: Let's say 5-10 systems are compromised and all of those systems are spawned up from a pre-configured template i.e. AMI - amazon machine image. Using that you can launch new EC2 instance.
Template‑এ থাকে:
OS (Linux/Windows)
Pre‑installed packages
Configuration settings
Now when you try to bring all the images of those host machines and try to mount on your analyst vm, it will refuse to work due to same lvm group name, uuid etc. We are here to fix that problem.
First note the checksum:
host1/disk1.raw and host1/disk1.raw --> We have this directory structure where images are present.
md5sum host*/*
e3b85cad126731e76955b2240b69f39d host1/disk1.raw
e3b85cad126731e76955b2240b69f39d host2/disk1.raw
You can see that the checksum is same.
Pre-requisite necessary tool installation:
apt install xmount
Step 1 — দুইটার জন্যই xmount cache + loopback সেটআপ:
mkdir -p /mnt/host1/xmount/disk1
mkdir -p /mnt/host2/xmount/disk1
xmount --cache /mnt/host1/xmount/cache1 --in raw host1/disk1.raw /mnt/host1/xmount/disk1
xmount --cache /mnt/host2/xmount/cache1 --in raw host2/disk1.raw /mnt/host2/xmount/disk1
ls -lh /mnt/host*/xmount/*
-rw-r--r-- 1 root root 720K Aug 2 16:38 /mnt/host1/xmount/cache1
-rw-r--r-- 1 root root 720K Aug 2 16:38 /mnt/host2/xmount/cache1
/mnt/host1/xmount/disk1:
total 0
-rw-rw-rw- 1 root root 60G Jan 1 1970 disk1.dd
-r--r--r-- 1 root root 266 Jan 1 1970 disk1.info
/mnt/host2/xmount/disk1:
total 0
-rw-rw-rw- 1 root root 60G Jan 1 1970 disk1.dd
-r--r--r-- 1 root root 266 Jan 1 1970 disk1.info
xmount created the virtual disk image .dd files without touching the original .raw images. In next whatever changes we done will be saved on the cache file rather than impacting the original image.
xmount can take input from E01, AFF - advanced forensic format and raw. But output will be always in .dd format so that we can work with loopback device or lvm tool easily.
Step 2 - The next step is to set up loopback devices pointing at these virtual files:
Avi
Comments
Post a Comment