13.07.2015 Views

Linux System Administration Recipes A Problem-Solution Approach

Linux System Administration Recipes A Problem-Solution Approach

Linux System Administration Recipes A Problem-Solution Approach

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CHAPTER 4 ■ TAKING BACKUPS AND MANAGING DATA■ Note Again, you should run this on a disk image (created as in recipe 4-8) rather than on the disk itself. Themore you use your damaged disk, the more you risk damaging it.Start Autopsy, and see whether you can read your copied filesystem. It is possible that even if thefilesystem itself is still unreadable, you may be able to get at some of the inode and metadatainformation.In this case, you can experiment with the Sleuthkit command-line tools:• ils lists inode information from the image.• ffind finds the file or directory name using the inode.• icat outputs the file content based on its inode number.So, you can get inode information, use ffind to get the file/directory name, and then output thecontent with icat once you establish whether you’re looking at a file or a directory.As an example of this process, the Sleuthkit fls command will list the files and directory names in aparticular image:fls hdaimage.dd -r -f ext3 -i rawSo, you might get some output from fls, which includes the following line:r/r * 10: myfile.txtThe r/r at the start of the line gives the directory entry type value and the file type (r means regularfile; d is a directory). As a rule, these will match. * indicates that it’s been deleted, and 10 is the inodenumber. The final field is of course the file name.Use this command to retrieve the contents of this file:icat -r -f ext3 -i raw hdaimage.dd 10 > myfile.txtThis uses file recovery techniques (-r) since the file has been deleted. -f ext3 specifies thefilesystem type, and -i raw uses the image type that you’re working from. hdaimage.dd is the path to theimage file, and 10 is the inode we want (as retrieved from the earlier fls command). The recoveredoutput is piped into the file name that was retrieved from fls.■ Note Use the sorter script to look for particular types of file (for example, images). To use the suppliedimages.sort file, this should work:# sorter -f ext3 -C /usr/local/sleuthkit/share/sort/images.sort -d data/sortedimages -h -s hdaimage.dd117Download at WoweBook.Com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!