์ด๋ฏธ์ง ์์ง ๋ฐ ๋ง์ดํธ
Tip
AWS ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:
HackTricks Training AWS Red Team Expert (ARTE)
GCP ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:HackTricks Training GCP Red Team Expert (GRTE)
Azure ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:
HackTricks Training Azure Red Team Expert (AzRTE)
HackTricks ์ง์ํ๊ธฐ
- ๊ตฌ๋ ๊ณํ ํ์ธํ๊ธฐ!
- **๐ฌ ๋์ค์ฝ๋ ๊ทธ๋ฃน ๋๋ ํ ๋ ๊ทธ๋จ ๊ทธ๋ฃน์ ์ฐธ์ฌํ๊ฑฐ๋ ํธ์ํฐ ๐ฆ @hacktricks_live๋ฅผ ํ๋ก์ฐํ์ธ์.
- HackTricks ๋ฐ HackTricks Cloud ๊นํ๋ธ ๋ฆฌํฌ์งํ ๋ฆฌ์ PR์ ์ ์ถํ์ฌ ํดํน ํธ๋ฆญ์ ๊ณต์ ํ์ธ์.
์์ง
ํญ์ ์ฝ๊ธฐ ์ ์ฉ์ผ๋ก ์์งํ๊ณ ๋ณต์ฌํ๋ ๋์ ํด์๋ฅผ ์์ฑํ์ธ์. ์๋ณธ ์ฅ์น๋ ์ฐ๊ธฐ ์ฐจ๋จ ์ํ๋ก ์ ์งํ๊ณ ๊ฒ์ฆ๋ ๋ณต์ฌ๋ณธ์์๋ง ์์ ํ์ธ์.
DD
# Generate a raw, bit-by-bit image (no on-the-fly hashing)
dd if=/dev/sdb of=disk.img bs=4M status=progress conv=noerror,sync
# Verify integrity afterwards
sha256sum disk.img > disk.img.sha256
dc3dd / dcfldd
dc3dd๋ dcfldd(DoD Computer Forensics Lab dd)์ ์ ๊ทน์ ์ผ๋ก ์ ์ง ๊ด๋ฆฌ๋๋ ํฌํฌ์
๋๋ค.
# Create an image and calculate multiple hashes at acquisition time
sudo dc3dd if=/dev/sdc of=/forensics/pc.img hash=sha256,sha1 hashlog=/forensics/pc.hashes log=/forensics/pc.log bs=1M
Guymager
๊ทธ๋ํฝ, ๋ฉํฐ์ค๋ ๋ ์ด๋ฏธ์ ๋ก raw (dd), EWF (E01/EWFX) ๋ฐ AFF4 ์ถ๋ ฅ์ ์ง์ํ๋ฉฐ ๋ณ๋ ฌ ๊ฒ์ฆ์ด ๊ฐ๋ฅํฉ๋๋ค. ๋๋ถ๋ถ์ Linux ์ ์ฅ์์์ ์ฌ์ฉ ๊ฐ๋ฅ (apt install guymager).
# Start in GUI mode
sudo guymager
# Or acquire from CLI (since v0.9.5)
sudo guymager --simulate --input /dev/sdb --format EWF --hash sha256 --output /evidence/drive.e01
AFF4 (Advanced Forensics Format 4)
AFF4๋ ๋งค์ฐ ํฐ ์ฆ๊ฑฐ(ํฌ์, ์ฌ๊ฐ ๊ฐ๋ฅ, ํด๋ผ์ฐ๋ ๋ค์ดํฐ๋ธ)๋ฅผ ์ํด ์ค๊ณ๋ Google์ ํ๋์ ์ธ ์ด๋ฏธ์ง ํ์์ ๋๋ค.
# Acquire to AFF4 using the reference tool
pipx install aff4imager
sudo aff4imager acquire /dev/nvme0n1 /evidence/nvme.aff4 --hash sha256
# Velociraptor can also acquire AFF4 images remotely
velociraptor --config server.yaml frontend collect --artifact Windows.Disk.Acquire --args device="\\.\\PhysicalDrive0" format=AFF4
FTK Imager (Windows & Linux)
You can download FTK Imager and create raw, E01 or AFF4 images:
ftkimager /dev/sdb evidence --e01 --case-number 1 --evidence-number 1 \
--description 'Laptop seizure 2025-07-22' --examiner 'AnalystName' --compress 6
EWF ๋๊ตฌ (libewf)
sudo ewfacquire /dev/sdb -u evidence -c 1 -d "Seizure 2025-07-22" -e 1 -X examiner --format encase6 --compression best
Imaging Cloud Disks
AWS โ ์ธ์คํด์ค๋ฅผ ์ข ๋ฃํ์ง ์๊ณ ํฌ๋ ์ ์ค๋ ์ท์ ์์ฑํฉ๋๋ค:
aws ec2 create-snapshot --volume-id vol-01234567 --description "IR-case-1234 web-server 2025-07-22"
# Copy the snapshot to S3 and download with aws cli / aws snowball
Azure โ az snapshot create๋ฅผ ์ฌ์ฉํ๊ณ SAS URL๋ก ๋ด๋ณด๋
๋๋ค.
๋ง์ดํธ
์ฌ๋ฐ๋ฅธ ์ ๊ทผ ๋ฐฉ์ ์ ํ
- ์๋ณธ ํํฐ์ ํ ์ด๋ธ(MBR/GPT)์ด ํ์ํ ๋ ์ ์ฒด ๋์คํฌ๋ฅผ ๋ง์ดํธํฉ๋๋ค.
- ํ๋์ ๋ณผ๋ฅจ๋ง ํ์ํ ๋ ๋จ์ผ ํํฐ์ ํ์ผ์ ๋ง์ดํธํฉ๋๋ค.
- ํญ์ ์ฝ๊ธฐ ์ ์ฉ(
-o ro,norecovery)์ผ๋ก ๋ง์ดํธํ๊ณ ๋ณต์ฌ๋ณธ์์ ์์ ํฉ๋๋ค.
์์ ์ด๋ฏธ์ง (dd, AFF4 ์ถ์ถ)
# Identify partitions
fdisk -l disk.img
# Attach the image to a network block device (does not modify the file)
sudo modprobe nbd max_part=16
sudo qemu-nbd --connect=/dev/nbd0 --read-only disk.img
# Inspect partitions
lsblk /dev/nbd0 -o NAME,SIZE,TYPE,FSTYPE,LABEL,UUID
# Mount a partition (e.g. /dev/nbd0p2)
sudo mount -o ro,uid=$(id -u) /dev/nbd0p2 /mnt
์๋ฃ๋๋ฉด ๋ถ๋ฆฌํ์ญ์์ค:
sudo umount /mnt && sudo qemu-nbd --disconnect /dev/nbd0
EWF (E01/EWFX)
# 1. Mount the EWF container
mkdir /mnt/ewf
ewfmount evidence.E01 /mnt/ewf
# 2. Attach the exposed raw file via qemu-nbd (safer than loop)
sudo qemu-nbd --connect=/dev/nbd1 --read-only /mnt/ewf/ewf1
# 3. Mount the desired partition
sudo mount -o ro,norecovery /dev/nbd1p1 /mnt/evidence
๋์ xmount๋ฅผ ์ฌ์ฉํ์ฌ ์ค์๊ฐ์ผ๋ก ๋ณํํฉ๋๋ค:
xmount --in ewf evidence.E01 --out raw /tmp/raw_mount
mount -o ro /tmp/raw_mount/image.dd /mnt
LVM / BitLocker / VeraCrypt ๋ณผ๋ฅจ
๋ธ๋ก ์ฅ์น(๋ฃจํ ๋๋ nbd)๋ฅผ ์ฐ๊ฒฐํ ํ:
# LVM
sudo vgchange -ay # activate logical volumes
sudo lvscan | grep "/dev/nbd0"
# BitLocker (dislocker)
sudo dislocker -V /dev/nbd0p3 -u -- /mnt/bitlocker
sudo mount -o ro /mnt/bitlocker/dislocker-file /mnt/evidence
kpartx ํฌํผ
kpartx๋ ์ด๋ฏธ์ง๋ฅผ /dev/mapper/์ ์๋์ผ๋ก ๋งคํํฉ๋๋ค:
sudo kpartx -av disk.img # creates /dev/mapper/loop0p1, loop0p2 โฆ
mount -o ro /dev/mapper/loop0p2 /mnt
์ผ๋ฐ์ ์ธ ๋ง์ดํธ ์ค๋ฅ ๋ฐ ์์
| ์ค๋ฅ | ์ผ๋ฐ์ ์ธ ์์ธ | ์์ |
|---|---|---|
cannot mount /dev/loop0 read-only | ์ ๋๋ง ํ์ผ ์์คํ (ext4)์ด ์ ์์ ์ผ๋ก ๋ถ๋ฆฌ๋์ง ์์ | -o ro,norecovery ์ฌ์ฉ |
bad superblock โฆ | ์๋ชป๋ ์คํ์ ๋๋ ์์๋ ํ์ผ ์์คํ | ์คํ์
๊ณ์ฐ (sector*size) ๋๋ ๋ณต์ฌ๋ณธ์์ fsck -n ์คํ |
mount: unknown filesystem type 'LVM2_member' | LVM ์ปจํ ์ด๋ | vgchange -ay๋ก ๋ณผ๋ฅจ ๊ทธ๋ฃน ํ์ฑํ |
์ ๋ฆฌ
umount ๋ฐ disconnect ๋ฃจํ/nbd ์ฅ์น๋ฅผ ๊ธฐ์ตํ์ฌ ์ถ๊ฐ ์์ ์ ์์์ํฌ ์ ์๋ ๋จ์ ์๋ ๋งคํ์ ๋จ๊ธฐ์ง ์๋๋ก ํ์ญ์์ค:
umount -Rl /mnt/evidence
kpartx -dv /dev/loop0 # or qemu-nbd --disconnect /dev/nbd0
References
- AFF4 imaging tool announcement & specification: https://github.com/aff4/aff4
- qemu-nbd ๋งค๋ด์ผ ํ์ด์ง (๋์คํฌ ์ด๋ฏธ์ง๋ฅผ ์์ ํ๊ฒ ๋ง์ดํธํ๊ธฐ): https://manpages.debian.org/qemu-system-common/qemu-nbd.1.en.html
Tip
AWS ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:
HackTricks Training AWS Red Team Expert (ARTE)
GCP ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:HackTricks Training GCP Red Team Expert (GRTE)
Azure ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:
HackTricks Training Azure Red Team Expert (AzRTE)
HackTricks ์ง์ํ๊ธฐ
- ๊ตฌ๋ ๊ณํ ํ์ธํ๊ธฐ!
- **๐ฌ ๋์ค์ฝ๋ ๊ทธ๋ฃน ๋๋ ํ ๋ ๊ทธ๋จ ๊ทธ๋ฃน์ ์ฐธ์ฌํ๊ฑฐ๋ ํธ์ํฐ ๐ฆ @hacktricks_live๋ฅผ ํ๋ก์ฐํ์ธ์.
- HackTricks ๋ฐ HackTricks Cloud ๊นํ๋ธ ๋ฆฌํฌ์งํ ๋ฆฌ์ PR์ ์ ์ถํ์ฌ ํดํน ํธ๋ฆญ์ ๊ณต์ ํ์ธ์.


