Forensic Imaging with DD command
Using the dd (Dataset Definition) command is a foundational skill in digital forensics for creating Bit-stream Images. This process ensures that every single bit—including deleted files and unallocated space—is captured for analysis.
Step 1: Identify the Source and Destination
Before running any commands, you must identify the correct drive identifiers to avoid the "Data Destroyer" accidental overwrite.
1.List all block devices:
lsblk
Step 2: Prevent Data Overwriting (Write-Blocking)
ISO/IEC 27037
Option A: Hardware Write-Blocker (Recommended)
Use a physical hardware write-blocker (like Tableau or WiebeTech) between the suspect drive and your workstation. This is the gold standard in forensics.
Photo by Gemini (Last update March 2026)
Option B: Software Write-Block (Forensics Mode)
Step 3: Execute the Forensic Image (dd)
sudo dd if=/dev/sdb of=/evidence/suspect_drive.dd bs=4K conv=noerror,sync
Command Breakdown:
if=/dev/sdb: Input File (The source evidence).of=...: Output File (The destination image file).bs=4K: Block Size. 4KB is generally efficient for modern drives.conv=noerror,sync:noerror: Instructsddto continue if it hits a bad sector (crucial for damaged drives).sync: Pads any bad sectors with zeros to keep the image size identical to the source.
Step 4: Integrity Verification (Hashing)
Per RFC 3227, you must prove that the copy is identical to the original. We use cryptographic hashes (SHA-256) to create a "digital fingerprint."
Hash the Source Disk:
.txt files match, your evidence is verified and admissible.Summary of Standards Reference
ISO/IEC 27037: Focuses on the "Digital Evidence First Responder" role—emphasizing write-protection and identification.
NIST SP 800-86: Provides the technical framework for the "Collection" phase—ensuring the data is captured as a complete bit-stream.
dd – Linux Command คำสั่ง backup ข้อมูลใน harddisk ในทาง digital forensics ใช้คำสั่ง DD ในการทำสำเนาหลักฐาน Forensic Imaging
คำสั่ง
dd if=<source file name> of=<target file name> [Options]- if=<source> – กำหนดตำแหน่ง directory ต้นทางที่ต้องการ Forensic Image ข้อมูล โดย “if” คือ input-file
- of=<destination> –กำหนดตำแหน่ง file ปลายทางที่ต้องการ Image file ทำการเขียนข้อมูลลงไป โดย “of” คือ output-file
dd if=/dev/sda of=/dev/sdb
2. ทำการ backup partition ที่ต้องการ ไปยัง file ที่กำหนด
dd if =/dev/sda2 of=~/hdadisk.img
3. ทำการ restore จาก Image file
dd if=hdadisk.img of=/dev/sdb3
4. คำสั่งลบข้อมูล (WIPE Disk) บน Harddisk
dd if=/dev/zero of=/dev/hda bs=4K conv=noerror,sync
5. Hash > Hashing the evidence for integrity checkingsha1sum /dev/hda | tee ForensicImage_sha1.txt
md5sum /dev/hda | tee ForensicImage_md5.txt
6. example dd if=/dev/hda bs=4K conv=sync,noerror | tee ForensicImage.img | md5sum > ForensicImage.md5
เมื่อทำ ForensicImage แล้ว ควรทำการ hash ไฟล์ข้อมูลทุกครั้งด้วย md5 หรือ SHA-1
DD command
ที่มา:
saixiii
www.forensicswiki
howtoforge
packtpub
* หากมีข้อมูลข้อผิดพลาดประการใด ขออภัยมา ณ ที่นี้ด้วย รบกวนแจ้ง Admin เพื่อแก้ไขต่อไป
ขอบคุณครับ
#WindowsForensic #ComputerForensics #dfir #forensics #digitalforensics #computerforensic #investigation #cybercrime #fraud



No comments:
Post a Comment