Forensic Focus - Computer Forensics, Computer Forensic Training, Digital Forensics
LoginRegisterForumsPapersEducationGraduate RecruitmentReviewsInterviewsNewsletterJobsEventsBlog
Search Forensic Focus
Custom Search
Graduate Recruitment

computer forensics graduate jobs

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

Main Menu
MY ACCOUNT
COMMUNITY
EMPLOYMENT
EDUCATION
RESOURCES
MISC
Computer Forensics 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: jackof33trades
New Today: 12
New Yesterday: 20
Overall: 13597

People Online:
Members: 5
Visitors: 12
Bots: 9
Staff: 0
Staff Online:

No staff members are online!
Latest Jobs

Computer Forensics Examiners- Virginia
Last post by 4n6art in Computer Forensics Job Vacancies on Mar 12, 2010 at 21:00:17

Investigations Manager-China- Salary Neg
Last post by Teval in Computer Forensics Job Vacancies on Mar 12, 2010 at 16:51:00

EDISCOVERY SENIOR ANALYST & MANAGER LONDON
Last post by ScottBurkeman in Computer Forensics Job Vacancies on Mar 11, 2010 at 17:02:47

DATA ANALYTICS & COMPUTER FORENSICS - LONDON, T0 £60000
Last post by ScottBurkeman in Computer Forensics Job Vacancies on Mar 11, 2010 at 16:12:33

Forensic Data Analytics senior associate- London upto 40k +
Last post by ChrisHolt in Computer Forensics Job Vacancies on Mar 09, 2010 at 19:36:48

Digital Forensic Analyst (Fort Worth, Texas)
Last post by pispy4u in Computer Forensics Job Vacancies on Mar 01, 2010 at 00:23:53

Senior Researcher & Research Officer - Staffordshire Uni, UK
Last post by Fab4 in Computer Forensics Job Vacancies on Feb 27, 2010 at 21:19:57

PhD Studentship, Cranfield University, Shrivenham
Last post by charg in Computer Forensics Job Vacancies on Feb 22, 2010 at 14:52:15

Forensic eDiscovery Mgr Global consultancy (London)
Last post by ChrisHolt in Computer Forensics Job Vacancies on Feb 19, 2010 at 16:57:38

Director, Center for Crimminal Justice Training Glenville WV
Last post by JasonMcDougal in Computer Forensics Job Vacancies on Feb 18, 2010 at 14:31:34

Computer Forensics Blog
· Guest blog post: TACTICAL trial by fire
· Computer forensics education directory updated
· Computer forensics education directory now online
· US academic institutions - final call for contact details!
· Hidden Hymn
· Adroit Photo Forensics review
· Interview with Russell May, 4N6 Investigation
· Forensic Computing PhD, UK
· The Value of Push Button Computer Forensics
· Academic institutions - updated

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.
Computer Forensics Downloads
  1: Forensic Examination of Digital Evidence: A Guide for Law Enforcement (pdf)
  2: ACPO Good Practice Guide for Computer based Electronic Evidence
  3: Electronic Crime Scene Investigation: A Guide for First Responders (pdf)
  4: Ancysoft Data Recovery Software
  5: HELIX incident response CD
  6: PDA Forensic Tools:An Overview and Analysis
  7: Forensics Plan Guide & Forensic Cookbook
  8: Recover My Files
  9: Autopsy Forensic Browser Version 2.03 (source code)
  10: Handy Recovery

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 © 2010 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 :.