Forensic Focus - Computer Forensics, Computer Forensic Training, Digital Forensics
LoginRegisterForumsArticles/PapersEducationReviewsInterviewsNewsletterJobsEventsBlogAdvertise
Search Forensic Focus
Custom Search

Find us on Facebook
Follow Forensic Focus on Twitter

Submit article, paper or blog post
Latest Articles
· “The Data Specimen is the Blood of Cyber Forensics”
· Forensic Imaging of Hard Disk Drives- What we thought we knew
· Can Your Digital Images Withstand A Court Challenge?
· Review: Proof Finder by Nuix
· Forensic Toolkit v3 Tips and Tricks ― Not on a Budget
· Is your client an attorney? Be aware of possible constraints on your investigation. (Part 2 of a multi-part series)
· iPhone Tracking – from a forensic point of view (Update!)
· Android Forensics Study of Password and Pattern Lock Protection
· Skype in eDiscovery
· Forensic Toolkit v3 Tips and Tricks – On a budget

read more...
Main Menu
MY ACCOUNT
COMMUNITY
EMPLOYMENT
EDUCATION
RESOURCES
MISC
Follow Forensic Focus

Join newsletter

Join LinkedIn group

Follow on Twitter

Subscribe to news

Subscribe to forums

Subscribe to blog

Subscribe to tweets

Members' blogs

External feeds

Bookmark & share: Bookmark and Share

Newsletter
Newsletter

You must be a
registered user
to receive our newsletter

Register Now!
Forensic Focus

Forensic Focus

Copy and paste the text below to insert the button displayed above on your site. Thanks for your support!


Forensic Analysis of the Microsoft Windows Vista Recycle Bin

By Mitchell Machor
MMachor@gmail.com
1/22/2008


(click here for a PDF version of this paper)


- 1 - Introduction

Contrary to due belief, when a file is deleted on a Microsoft operating system, it still exists on the computer. It is hidden away in a location commonly known as the Recycle Bin. The file is retained within the confines of the Recycle Bin until either the user chooses to empty the Recycle Bin. The user may bypass sending a file to the Recycle Bin by holding down the shift key while deleting the file. In the case that it is placed into the Recycle Bin the file is moved to a hidden, system folder where it is renamed and stored until further instructions are given as to what is to happen to the file. The file can still be restored at this point or the user may choose to more permanently rid them self of the file. In order to achieve this, there needs to be information stored pertaining to the file in its original state.

This file is being created as in the past Windows utilized a different means of managing the Windows Recycle bin. The past Recycle Bins had a master database that held all of the information named INFO2. Vista has decided to forgo the INFO2 file and create a separate record file for each file deleted. This will explain the location and structure of the files that may need to be analyzed in a forensic investigation.


- 2 - Background

To understand how the information files are structured and how they naming convention works, there must first be an understanding of how the Recycle Bin works. When a user “deletes” a file in Windows, the file itself is not actually deleted. The file is at this point copied into the Recycle Bins system folder where it is held until the user gives further instructions on what to do with the file. This location varies dependent on the versioin of Windows the user is running. The table below shows locations from both past versions of Windows as well as Windows Vista.

Operating System Common File System Structure Location of Deleted Files
Windows 95/98/ME FAT32 C:\Recycled\INFO2
Windows NT/2K/XP NTFS C:\Recycler\\INFO2
Windows Vista NTFS C:\$Recycle.Bin\\

Table 1 – File Locations

When a file is “deleted” and Windows moves it to the Recycle Bin is automatically renamed. In the past the renaming of the files was quite simply DC#.xxx. The DC is standard and the # are integer numbers assigned in the order that the files are received by the Recycle Bin. The xxx is where the Recycle Bin holds on to the original extension of the file. In Vista, however, the renaming of files consists of $R and a set of random letters and numbers still holding onto the files original extension. At this time a second file is also created being named $I and a set of random letters and numbers matching the ones given to the $R name. This file also keeps the original files extension. The file names will be identical with the exception of the $I versus the $R. When the Recycle Bin is emptied, both files in the pair are deleted.

Image 1 – Recycle Bin Directory In Windows Vista (click to enlarge)


- 3 - The Comparison of the $I Files to INFO2

At this point we have come to the conclusion that the files with the $I have to hold the information necessary to undelete the file if the user chooses to do so. The INFO2 file originally held the following information used to “undelete” files found in the Recycle Bin:

Original File Name
Original File Size
The Date And Time The File Was Deleted
The Files Unique Identifying Number In The Recycle Bin
The Drive Number That The File Came From

This is where there is a difference between the INFO2 and Vista. In Windows Vista the $I file contains information only relevant to the file that it is paired up with. The information contained in these files is as follows:

Original File Name
Original File Size
The Date And Time The File Was Deleted

Due to the fact that there is only one record in each of the information files, there is no need for the unique identifier that was present in the INFO2 file. Each of these files is 544 bytes long. We will now take a look at one using a hex editor to layout the file structure.


- 4 - The Header of the $I File

Image 2 – The File Header (click to enlarge)

The first eight bytes found in a $I file will be a 01 followed by seven sets of 00. This does not seem to have much value, however as it is present a mention of it has been made.


- 5 - The File Size

Image 2 – The File Size (click to enlarge)

The file size is stored in the $I file at offset 0x08 through offset 0x0F. The file size is stored as a hex and needs to be read in reverse if viewing with a hex editor as shown above. The size above is displayed as 99 B5 33 02 00 00 00 00. The proper way to recover the file size out of the file is to reverse the order as to obtain 00 00 00 00 02 33 B5 99. Placing these numbers even into Windows Calculator and converting back to decimal from the hex value gives us 36,943,257 bytes. The information retrieved from the original file matches as 35.2 MB (36,943,257 bytes) was copied from the files properties.


- 6 - Deleted Date and Time Stamp

Image 3 – Delete Date and Time Stamp (click to enlarge)

It can often become vital for an investigator to know when the file was moved to the Recycle Bin. This information can be found beginning at offset 0x10 and spanning 8 bytes. The date and time stamp highlighted above is F0 24 35 B2 D8 5B C8 01. In this form it is not of much use as it is not in a format that can be easily understood. Windows stores its time stamps in the number of seconds that have elapsed since Midnight, January 1, 1601. An easier way to find the time is to perform the following equation on the value:

File Deleted = 10^-7 * Windows Time - 11644473600

This will then translate the decoded Windows time stamp to the standard UNIX timestamp. A program such as Decode can then be used to find the date and time value of the resulting number. The value in this instance is 01 C8 5B D8 B2 35 24 F0. Using the above formula and pluging the resulting number into Decode the delete date and time are: Mon, 21 January 2008 02:52:44 GMT.

The value of 11644473600 is the number of seconds that have passed between the dates of Midnight January 1, 1601 and Midnight, January 1, 1970. This has been documented by Microsoft in the MSDN references as well as many other sources.


- 7 - Original File Name

Image 4 – File Name (click to enlarge)

The filename is located at offset 0x18 and spans the rest of the information found in the file. The ASCII characters are spaced apart with an empty byte between them. Once the end of the filename is reached the rest of the file is padded with empty bytes until it reaches 544 bytes in length.


- 8 - Conclusion

The following table will re-establish the structure of the $I files that accompany the $R deleted files that are found in the newly structured Windows Vista Recycle Bin directory.

Data Structure Length in Bytes Offset to Beginning of Structure
File Header 8 Bytes 0x00
File Size 8 Bytes From Beginning of File 0x08
File Delete Date and Time 8 Bytes From Beginning of File 0x10
File Name and Path (Before Being Deleted) Up To 520 Bytes From Beginning of File 0x18




--


Forensic Education

computer forensics education choices COURSE DIRECTORY

User Info

Welcome Anonymous

Nickname

Membership:
Latest: Draugrs
New Today: 0
New Yesterday: 13
Overall: 20808

People Online:
Members: 1
Visitors: 30
Bots: 5
Staff: 0
Staff Online:

No staff members are online!
Latest Jobs

Data Analytics Assistant Director, Dubai
Last post by ScottBurkeman in Digital Forensics Job Vacancies on Feb 02, 2012 at 17:14:03

Experienced Forensic Computer Analyst, Surrey
Last post by pickle in Digital Forensics Job Vacancies on Jan 31, 2012 at 12:35:31

eDiscovery Analyst and Assistant Manager, London £35-£50000
Last post by ScottBurkeman in Digital Forensics Job Vacancies on Jan 23, 2012 at 14:12:11

QCC Vacancy - Digital Forensics Sales Executive (London)
Last post by garybrevans in Digital Forensics Job Vacancies on Jan 20, 2012 at 13:17:43

E-Discovery Consultant- London- £40-£50K basic + 10% bonus
Last post by Teval in Digital Forensics Job Vacancies on Jan 20, 2012 at 10:09:56

Senior Software Licence Review Manager. London. Up to £100K
Last post by Tyrrell66 in Digital Forensics Job Vacancies on Jan 19, 2012 at 13:46:41

Senior Forensic Manager - London
Last post by diana2012 in Digital Forensics Job Vacancies on Jan 18, 2012 at 18:05:43

Data Analytics Consultant
Last post by Nicola in Digital Forensics Job Vacancies on Jan 18, 2012 at 18:04:08

Forensic General Investigations Accountant Consultant London
Last post by Nicola in Digital Forensics Job Vacancies on Jan 17, 2012 at 15:13:44

Forensic Technology - Sr. Consultant Needed in Boston, MA
Last post by mfeeley in Digital Forensics Job Vacancies on Jan 12, 2012 at 18:39:18

Blog
· Harry Onderwater
· Forensic Toolkit v3 Tips and Tricks ― Not on a Budget
· Is your client an attorney? Be aware of possible constraints (Part 2)
· iPhone Tracking – from a forensic point of view
· Android Forensics Study of Password and Pattern Lock Protection
· Skype in eDiscovery
· Forensic Toolkit v3 Tips and Tricks – On a budget
· Anonymous, what does it mean?
· YouDetect – Implementing the principles of statistical classifiers and cluster analysis for the purposes of classifying illegally acquired multimedia files
· Advice for Digital Forensics Job Seekers

read more...
Members' Blogs

Start Blogging

What is Computer Forensics?
Computer forensics (or forensic computing) is the use of specialized techniques for recovery, authentication, and analysis of electronic data with a view to presenting evidence in a court of law.
Downloads
  1: Forensic Examination of Digital Evidence: A Guide for Law Enforcement (pdf)
  2: ACPO Good Practice Guide for Computer based Electronic Evidence
  3: Ancysoft Data Recovery Software
  4: Electronic Crime Scene Investigation: A Guide for First Responders (pdf)
  5: HELIX incident response CD
  6: PDA Forensic Tools:An Overview and Analysis
  7: Recover My Files
  8: Autopsy Forensic Browser Version 2.03 (source code)
  9: Handy Recovery
  10: PC On/Off Time

Use of this website signifies your agreement to the Terms of Use/Privacy Policy available here.

All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © 2011 Forensic Focus


Interactive software released under GNU GPL, Code Credits, Privacy Policy
.: fisubsilver shadow phpbb2 style by Daz :: CPG-Nuke port by norseman :: ported to CPG-Dragonfly by jamin :.