Skip to main content

Way Forward For Duplicate LVM Names

 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

Popular posts from this blog

API hacking lab setup

 Follow the commands to install and configure API hacking lab: 1. Install kali linux and update all the packages.  apt update -y apt upgrade -y or apt dist-upgrade -y or apt full-upgrade -y If you face any problem regarding update, install cloud flare warp in the host machine, then again start updating packages in your kali vm.  2. Install and configure burpsuite professional.  After that open burpsuite and go to Extensions tab. Click on BAppStore. Search for Autorize extension, It will help us to automate authorization testing. Click on Download Jython from the right side. From Jython website click on Jython standalone JAR and save it. Go to Extensios > Extensions settings >  under Core extension settings find out Python environment on the right pane. Select the jython jar file that you just downloaded. Now again go to BAppStore and re-search for Autorize extension. You will see Install option this time after selecting Autorize extension. Install it. You ...

Privilege Escalation Domain Level PowerUp - Part - 2

  Our target is first escalate our local privs to local admin level. Then we will hunt for to check we have the local admin privs to which other machines. Then we will check on those machines, any domain admin sessions are available or not.  Unquoted service path check: Get-WmiObject -class win32_service | Select-Object pathname From powerup: Get-ServiceUnquoted -Verbose Get services where the current user can write to its binary path or change arguments to the binary: Get-ModifiableServiceFile -Verbose Get the services whose configuration current user can modify, if you are in server operator group then you can do this: Get-ModifiableService -Verbose Or we can run all the above checks from using powerup.ps1 script: . .\PowerUp.ps1 Invoke-AllChecks help Invoke-ServiceAbuse -Examples Invoke-ServiceAbuse -Name AbyssWebServer -UserName dcorp\student15     (Here AbyssWebServer is the abuseable service name that you come to know after running Invoke-AllChecks command) Wh...

Disk acquisition and access for IR

 Goal for this lab is after we acquire the disk in .E01 format then how can we mount this to linux system for analysis.  দুইটা scenario cover করছি: (A) simple E01 + LVM (single disk), (B) E01 + Software RAID + LVM (multi-disk, যেমন disk1/disk2) From the linux analysis vm like sansforensic vm, you need to run the following commands.  We need to first create the working directories : mkdir -p /mnt/case/img /mnt/case/data E01 + LVM (single disk) - First case. Step 1 — E01 mount: ewfmount Webserver.E01 /mnt/case/img ls -lh  /mnt/case/img total 0  -r--r--r-- 1 root root 32G Feb 16 18:21 ewf1 Ewf1 is a raw disk image. It's size and main disk size are same. This is in read-only mode. See the permission. Step 2 — See the partition layout : mmls /mnt/case/img/ewf1 কোন offset-এ কোন partition আছে (boot, lvm ইত্যাদি) note করুন। RAID sign ( 0xfd ) আছে কিনা খেয়াল করুন — থাকলে Scenario B তে যান। lvscan | grep VulnOSv2-vg mount -o ro,noexec /dev/VulnOSv2-vg/root /mnt/case/dat...