Advances in File Carving


Published on

Published in: Technology
1 Comment
  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • Simple Carver Suite - www.simplecarver.comCarvFs - - - Rescue -
  • Advances in File Carving

    1. 1. Advances in File Carving<br />Rob Zirnstein, President<br />Forensic Innovations, Inc.<br /><br />7/14/2011<br />
    2. 2. Our Data is GONE!<br />All of your servers have Crashed!<br />Your customers’ Data is Lost!<br />You backed up last week, but important business transactions have taken place since.<br />70% of companies with devastating data loss go out of business.<br />All it took was one employee writing a simple SQL database script after you fired them.<br />
    3. 3. We Didn’t Find The Evidence!<br />What do you do when you’ve searched through all of the evidence and came up empty?<br />When you know a suspect is hiding something, where do you look first?<br />TrueCrypt Volumes & Unallocated Space<br />Even good people shred data when faced with an investigation.<br />The tools are easy to find.<br /><br />
    4. 4. How They Hide the Evidence<br />Deleting a file<br />Sends the file to the Windows Recycle Bin<br />Empty or bypass the Recycle Bin<br />Undelete tools depend on the deleted directory entry<br />That can be deleted or overwritten too<br />Then there’s no undeleting possible<br />Store files in a TrueCrypt Volume<br />Undetectable as a file (except for my tools)<br />Looks like random data in unallocated space (except for my tool)<br />
    5. 5. How To Get The Files Back<br />File Carving<br />Definition: “General term for extracting data (files) out of undifferentiated blocks (raw data), like "carving" a sculpture out of soap stone.”<br />The sectors containing the files are orphaned<br />Some of them may get overwritten<br />They are like many jigsaw puzzles thrown into a trash bag, if they were fragmented.<br />If some sectors were stored consecutively, then it’s like puzzle pieces that weren’t pulled apart before getting trashed.<br />
    6. 6. File Carving Assumptions<br />No Files are Fragmented!?!<br />All Files are stored in consecutive sectors<br />Sector Size = 512 bytes<br />May be detected through disk structure<br />Cluster Size = 512 to 16,384 bytes<br />May be detected through disk structure<br />File Slack may be ignored<br />RAM slack is ignored<br />Or incorrectly bundled in with File Slack<br />Isn’t it always zeroed out?<br />
    7. 7. File Carving Techniques<br />Block Based Carving<br />Statistical Carving<br />Header/Footer Carving<br />Header/Maximum File Size Carving<br />Header/Embedded Length Carving<br />File Structure Based Carving<br />Semantic Carving<br />Carving with Validation<br />Fragment Recovery Carving<br />Repackaging Carving<br />SmartCarving<br />Hash Carving<br />Fuzzy Hash Carving<br /><br />
    8. 8. Block Based Carving<br />Analyze each sector on a block-by-block basis to determine if they belong together in the same file.<br />Assuming that each sector can only be part of a single file<br />
    9. 9. Statistical Carving<br />Use statistics or content characteristics to identify each sector.<br />Entropy measurement<br />Filter out blocks that clearly aren’t part of a desired file type.<br />
    10. 10. Header/Footer Carving<br />Search for file header signature(s).<br />Search for the matching file footer signatures.<br />Capture the sectors in between.<br />
    11. 11. Header/Maximum File Size Carving<br />Search for file header signature(s).<br />Consult a list of maximum file lengths for each header type.<br />Capture the sectors in between.<br />Many file types do not detect the additional unrelated data that may get appended to the recovered file. <br />
    12. 12. Header/Embedded Length Carving<br />Search for file header signature(s).<br />Read the file length from one of the fields in the header.<br />
    13. 13. File Structure Based Carving<br />Once a sector’s file type is identified<br />Match to other sectors that contain similar data structures.<br />Use knowledge of the file type’s data structures to search for structure parts expected to exist in later sectors.<br />
    14. 14. Semantic Carving<br />Identify the language used in a sector.<br />Identify the language used in each of the following sectors<br />Collect the sectors that are written in the same language<br />
    15. 15. Carving with Validation<br />Use a file interpreter or viewer to load each recovered file.<br />If the interpreter encounters invalid data, assume that is the point where the carving method failed.<br />Use on completed files.<br />Use on each added sector.<br />
    16. 16. Fragment Recovery Carving<br />Find two or more fragments that belong to the same file.<br />Filter out the sectors between the fragments that don’t belong.<br />
    17. 17. Repackaging Carving<br />Used on partially recovered files.<br />Rebuild the parts of the file that were not able to be recovered.<br />The result should be a file that can be opened with it’s native application or a standard viewer.<br />
    18. 18. SmartCarving<br />Use knowledge of the file system’s typical fragmentation effects.<br />Preprocess the source sectors.<br />Decompress, decrypt or translate the data<br />Collate the identified blocks.<br />Sort by file type<br />Reassemble the blocks in sequences that match their file type.<br />
    19. 19. Hash Carving<br />Calculate a hash value for each sector<br />MD5, SHA-1<br />Compare the hash value to a list of known sector hash values<br />This list can be of known Good and/or known Bad files.<br />Filter out known Good files. (ex: Installed applications)<br />Recover known Bad files. (ex: known illicit material)<br />
    20. 20. Fuzzy Hash Carving<br />Calculate a fuzzy hash value for each sector.<br />Compare the fuzzy hash values of sectors to determine which sectors are similar in content.<br />Combine similar sectors into recovered files.<br />Match raw data sectors together for object types that have no identifiable signatures or that extend beyond a single sector.<br />Recover file types not previously encountered.<br />
    21. 21. Tools Today (1)<br />Adroit Photo Recovery/Forensics<br />combination of SmartCarving, header carving, structure based validation and validation of the entire file to determine if each new sector belongs; Repackaging Carving is also available;<br />Supports JPEG, RAW camera images, PNG, BMP and GIF files<br />DataLifter<br />header-footer carving; Supports 25 file types<br />Encase<br />header-footer carving; Supports ~250 file types<br />Foremost<br />file structure based carving for avi, bmp, doc, gif, hmlt, jpg, mov, pdf, png, rar, wav and zip files.<br />header-footer carving for art, asf, chm, cookie, cpp, dat, dbx, fws, idx, java, lnk, mail, mbx, mp3, mpg, ost, pgd, pgp, ppt, pst, ra, rdp, rpm, tif, txt, wma, wmv, wpc and xls files.<br />Forensic Toolkit (FTK)<br />internal techniques unknown; Supports abl, aol, asd, bmp, doc, dot, emf, gif, html, jpg, mpp, one, pdf, png, ppt, pub, puz, vsd, vss, vst, xla, xls and xlt files.<br /><br />
    22. 22. Tools Today (2)<br />HstEx / Netanalysis<br />internal techniques unknown; Supports browser history formats<br />NFI Defraser<br />Fragment recovery carving & carving with validation; Supports MPEG, 3GPP, Quicktime & AVI files<br />PhotoRec<br />combination of file structure based carving and header-footer carving of 80 file formats<br />PyFlag<br />appears to use a simple text search method, ignoring sector boundaries; Supports server log file formats<br />Recover My Files<br />internal techniques unknown; Supports 200 file types<br />Revit<br />SmartCarving; Supported file types list not available<br /><br />
    23. 23. Tools Today (3)<br />Scalpel<br />combination of header-footer and header-maximum file size carving; Supports art, avi, dat, dbx, doc, fws, gif, htm, idx, java, jpg, mail, max, mbx, mov, mpg, ost, pdf, pgd, pgp, pins, png, pst, ra, rpm, tif, txt, wav, wpc and zip files.<br />X-Ways<br />header-footer carving; unknown support list<br /><br />
    24. 24. Tool Problems<br />Few tools handle file fragmentation<br />The tools that handle fragmentation support very few file types<br />Most tools can not detect false positives<br />Most tools hard code file type support<br />Only 1 tool claims to rebuild partial files<br />It only supports 5 file types (image files)<br />Performance is a problem<br />most tools utilize inefficient databases and scripting languages<br />
    25. 25. Future Tools<br />Carver 2.0<br />Open Source, in the early specification stages<br />File Harvester<br />Combination of multiple methods:<br />Block Based Carving<br />Statistical Carving<br />Header/Footer Carving<br />Header/Embedded Length Carving<br />File Structure Based Carving<br />Fragment Recovery Carving<br />Repackaging Carving (Phase 3)<br />SmartCarving<br />Fuzzy Hash Carving<br />(secret sauce)<br />
    26. 26. Thank you<br />Contact<br />Rob Zirnstein<br /><br /><br />(317) 430-6891<br />