dd(Disk Dump)
- 기본 패키지 설치 됨
dcfldd(국방 컴퓨터 법의학 연구소)
- sudo apt-get install dcfldd
- dd 명령에서 fork 함.
dc3add(방위 사이버 범죄 센터)
- sudo apt-get install dc3dd
- dd 명령어 사용 하며 기능 추가
필수 옵션
- if="device/image"
example: if=/dev/sda
- of="/device/image"
example: of=/home/user/copy.img
파티션 정보 덮어쓰기
파티션 Linux ext4
shell> sudo fdisk -l
Disk /dev/mmcblk0: 58.6 GiB, 62881005568 bytes, 122814464 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x524b0d66
Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 2048 122814463 122812416 58.6G 83 Linux
파티션 NTFS
Disk /dev/sdc: 14.5 GiB, 15504900096 bytes, 30283008 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x09bd599f
Device Boot Start End Sectors Size Id Type
/dev/sdc1 2048 30281727 30279680 14.4G 7 HPFS/NTFS/exFAT
shell> sudo dc3dd if=/dev/sdc of=/dev/mmcblk0p1
dc3dd 7.2.646 started at 2018-12-22 00:14:00 +0900 ---> 시작 시간
compiled options:
command line: dc3dd if=/dev/sdc of=/dev/mmcblk0p1
device size: 30283008 sectors (probed), 15,504,900,096 bytes
sector size: 512 bytes (probed)
15504900096 bytes ( 14 G ) copied ( 100% ), 14882 s, 1017 K/s
input results for device `/dev/sdc':
30283008 sectors in
0 bad sectors replaced by zeros
output results for device `/dev/mmcblk0p1':
30283008 sectors out
dc3dd completed at 2018-12-22 04:22:02 +0900 ---> 종료 시간
총 4시간 30분 걸림.
여기 테스트는 하드 디스크 크기가 같지 않으므로 제대로 인식하지 않음.
동일한 크기를 가지는 USB 저장 장치가 있으면 된다.
shell> sudo fdisk -l
Disk /dev/mmcblk0: 58.6 GiB, 62881005568 bytes, 122814464 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x524b0d66
Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 2048 122814463 122812416 58.6G 83 Linux ----> 기존 값 그대로
Disk /dev/sdc: 14.5 GiB, 15504900096 bytes, 30283008 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x09bd599f
Device Boot Start End Sectors Size Id Type
/dev/sdc1 2048 30281727 30279680 14.4G 7 HPFS/NTFS/exFAT ---> 기존 값 그대로
파티션 이미지 복사
shell> sudo dc3dd if=/dev/sdc1 of=/home/username/Desktop/flashdriver.img
dc3dd 7.2.646 started at 2018-12-22 06:24:04 +0900
compiled options:
command line: dc3dd if=/dev/sdc1 of=./flashdriver.img
device size: 1953792 sectors (probed), 1,000,341,504 bytes
sector size: 512 bytes (probed)
1000341504 bytes ( 954 M ) copied ( 100% ), 892 s, 1.1 M/s
input results for device `/dev/sdc1':
1953792 sectors in
0 bad sectors replaced by zeros
output results for file `./flashdriver.img':
1953792 sectors out
dc3dd completed at 2018-12-22 06:38:56 +0900
shell> sudo chmod 777 flashdriver.img
gzip 이미지 복사.
shell> sudo dc3dd if=/dev/sdc1 | gzip -6 > /home/username/Desktop/zippedflash.gz
옵션
-6 : 압축률 평균
-9 : 압출률 작게
zip 압축해제
shell> gunzip zippedflash.gz