Saturday, July 28, 2012

Forensics: Recovering data from heavily damaged / scratched DVD, CD

How many time have you lend your CD or DVD collections for movies, pictures or application to your friends and when you got them back, you discovered that they are badly damaged and beyond readable.

CD and DVD are fragile media. A few scratches here and there and they can easily become unreadable. This blog post present some of the tool that can allow recovering data from those spoilt CD/DVD’s.

Recoverdm Toolkit - (recoverdm)
This program will help you recover disks with bad sectors. In case if finds sectors which simply cannot be recovered, it writes an empty sector to the output file and continues. If you're recovering a CD or a DVD and the program cannot read the sector in "normal mode", then the program will try to read the sector in "RAW mode", meaning without error-checking etc. 

This toolkit also has a utility called 'mergebad': mergebad merges multiple images into one. This can be useful when you have, for example, multiple CD's with the same data that are all damaged. In such case, you can then first use recoverdm to retrieve the data from the damaged CD's into an ISO image-files and then combine them into one image with mergebad.

ISO Image

An ISO image is an archive file (disk image) of an optical disc using a conventional ISO (International Organization for Standardization) format. The name “ISO” is taken from the ISO 9660 file system used with CD-ROM media, but an ISO image can also contain UDF file system.

Data carving 

According to Wikipedia "Carving, is the practice of searching an input for files or other kinds of objects based on content, rather than on metadata. File carving is a powerful tool for recovering files and fragments of files when directory entries are corrupt or missing, as may be the case with old files that have been deleted or when performing an analysis on damaged media. 

Most file carvers operate by looking for file headers and/or footers, and then "carving out" the blocks between these two boundaries." In order to retrieve the files stored on our damaged media, we need a tool able to handle the ISO-9660 and/or UDF file system. At the time of writing of this blog post there is only few file carvers handling this file format. Dares is one of them.

Dares - (Windows - Linux)

Dares scans a CD/DVD image or a CD/DVD and tries to find files. It does not depend on file system information, but instead uses the Magic library to identify files. Doing it this way Dares can recover files even when the file system (ISO-9660 or UDF) on the disc is damaged and cannot be mounted anymore.

Case of study

In our case we have a heavily damaged DVD. This DVD is supposed to be a backup of pictures but it can't be read anymore. Let's see what we can restore.

Step 1 - Dumping the data

recoverdm -t 30 -i /dev/sr0 -o backupdvd.iso -s 1 -l badsectors.lst-r 1

Step 2 - Carving

dares –i backupdvd.iso –s outputdir

Step 3 - Renaming the files

Since we are looking for JPEG files we can rename all extracted file within the following command:

ls -d *.bin | sed 's/\(.*\).bin$/mv "&" "\1.jpg"/' | sh


  1. Most cloud-based storage systems (data room providers comparison) perform automatic backup. This means that if you delete a file that you are working on from your home computer, you can easily access the file and recover it from a cloud server or a different device.

  2. Businesses which ignore the threat of data breaches are an easy target for identity thieves and hackers. All enterprises should first realize that data breaches could happen to anyone any time and they are not immune to it.
    ideals data room

  3. Maximize rate of profitability and business openings. For instance, in the event that you give a sheltered domain to your buyers and are compensated with their contact data, you can expand on that database to build up a reliable gathering of rehash purchasers for more of your items.

  4. Second are working files, these are critical files that are accessed on a regular basis such as email, data grids, real-time inventory information, etc. The third type of data is system files. Self Storage