Thursday, December 26, 2013

Digital Forensics:Forensic Imaging with DD command

Digital Forensics:Forensic Imaging with DD command

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
1. ทำการ clone hardisk จากลูกหนึ่งไปอีกลูกหนึ่ง
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 checking
sha1sum /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 [OPERAND]... dd OPTION 

if             => input file
/dev/hda       => the linux name of a physical disk.  Mac has their own names.
/dev/zero      => in linux, this is an infinite source of nulls
of             => output file
ForensicImage.img  => The name of the image file you are creating
bs             => blocksize
65536          => 64K  (I normally use 4K in linux.  That is what the linux kernel uses as a page size.) 
        เป็นการบอกให้ dd ทำการอ่านและเขียนข้อมูลทีล่ะ 1024*64 k = 65536 byte blocksize 
 
noerror        => don't die if you have a read error from the source drive
 
conv=noerror    คือในกรณีที่คำสั่ง dd ทำการอ่านข้อมูลแล้วเกิดข้อผิดพลาดขึ้น ให้ dd ทำการอ่านข้อมูลต่อไปโดยที่ไม่ต้องหยุดการทำงาน
 
 sync           => if there is an error, null fill the rest of the block.

 note: 

  • ถ้ามี bad bad มาด้วย
  • HDD ควรมีขนาดเท่ากัน หรืออย่างน้อยขนาดของ HDD ที่จะเก็บข้อมูลที่จะ backup ต้องมีขนาดไม่เล็กกว่าตัวหลัก

DD command

ที่มา:

saixiii

www.forensicswiki

howtoforge

packtpub


หมายเหตุ:เนื้อหาในเว็บไซต์นี้มีขึ้นเพื่อวัตถุประสงค์ในการให้ข้อมูลและเพื่อการศึกษาเท่านั้น

* หากมีข้อมูลข้อผิดพลาดประการใด ขออภัยมา ณ ที่นี้ด้วย  รบกวนแจ้ง Admin เพื่อแก้ไขต่อไป
ขอบคุณครับ

#WindowsForensic #ComputerForensics #dfir #forensics #digitalforensics #computerforensic #investigation #cybercrime #fraud

 

No comments:

Post a Comment

Digital Forensics:User Access Logging (UAL)

 Digital Forensics:UAL  Log What Is User Access Logging? UAL is a feature included by default in Server editions of Microsoft Windows, start...