Ethical Hacking Training at InfoSec Institute

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Computer Forensics Computer-Forensics
[Top] [All Lists]

Re: Problem using dd to clone a hard disk with bad sectors.

Subject: Re: Problem using dd to clone a hard disk with bad sectors.
Date: Sun, 19 Feb 2006 23:07:52 +0100
Greetings!

On Thu, 16 Feb 2006 18:31:42 +0800
Willard Van Dyne <wvandyne@hotpop.com> wrote:

I'm trying to properly clone a 4.3GB (it's old, I know) hard disk 
which unfortunately has a lot of bad sectors.
[...]
dd if=/dev/hdb of=/mnt/hda7/image.dd conv=noerror,sync

My problem is that the md5 hash of the image file is different from 
that of the original HD (acquired via the command: dd if=/dev/hdb 
conv=noerror,sync | md5sum > /mnt/hda7/orig_disk_md5sum.txt)
[...]
Can anyone please enlighten me as to what I'm doing wrong?

I guess the harddisc does not have CONSTANT errors, but varying
(probably increasing) errors reading the disc. You will probably get
more complete images with ddrescue which is a bit more
insisten/consistent reading over/around errors. 

As long as you are not sure that your disc (hardware) stays CONSCTANT in
reading behaviour, taking a checksum directly from the disc
*at*a*different*time* than when taking the image will of course give
different results.

Try taking both at the same time, like:

        dd if=/dev/hdb conv=noerror,sync \
                | tee /mnt/hda7/image.dd \
                | md5sum > /mnt/hda7/orig_disk_md5sum.txt


This will not be possible with ddrescur, though, as that will copy
non-sequential when stumbling over an error, trying smaller block sizes,
reading backward after an error, etc.

Bye

Volker


-- 

Volker Tanger    http://www.wyae.de/volker.tanger/
--------------------------------------------------
vtlists@wyae.de                    PGP Fingerprint
378A 7DA7 4F20 C2F3 5BCC  8340 7424 6122 BB83 B8CB

<Prev in Thread] Current Thread [Next in Thread>