homepage
Open menu Go one level top
  • Train and Certify
    • Get Started in Cyber
    • Courses & Certifications
    • Training Roadmap
    • Search For Training
    • Online Training
    • OnDemand
    • Live Training
    • Summits
    • Cyber Ranges
    • College Degrees & Certificates
    • NICE Framework
    • DoDD 8140
    • Specials
  • Manage Your Team
    • Overview
    • Group Purchasing
    • Why Work with SANS
    • Build Your Team
    • Hire Cyber Talent
    • Team Development
    • Private Training
    • Security Awareness Training
    • Leadership Training
    • Industries
  • Resources
    • Overview
    • Reading Room
    • Webcasts
    • Newsletters
    • Blog
    • Tip of The Day
    • Posters
    • Top 25 Programming Errors
    • The Critical Security Controls
    • Security Policy Project
    • Critical Vulnerability Recaps
    • Affiliate Directory
  • Focus Areas
    • Blue Team Operations
    • Cloud Security
    • Digital Forensics & Incident Response
    • Industrial Control Systems
    • Leadership
    • Offensive Operations
  • Get Involved
    • Overview
    • Work Study
    • Teach for SANS
    • Partnerships
    • Sponsorship Opportunities
    • Join the Community
  • About
    • About SANS
    • Instructors
    • Mission
    • Initiatives
    • Diversity
    • Awards
    • Contact
    • Frequently Asked Questions
    • Customer Reviews
    • Press
  • Log In
  • Join
  • Contact Us
  • SANS Sites
    • GIAC Security Certifications
    • Internet Storm Center
    • SANS Technology Institute
    • Security Awareness Training
  • Search
  1. Home >
  2. Blog >
  3. Digital Forensic SIFTing: Registry and Filesystem Timeline Creation
370x370_Rob-Lee.jpg
Rob Lee

Digital Forensic SIFTing: Registry and Filesystem Timeline Creation

February 24, 2009

Over the years, being able to examine filesystem timeline data has truly been a breakthrough for many investigations. We started using this technique when we were working on cases in the AFOSI very early on when I wrote a script that would create a basic timeline called mac_daddy.pl based off of the original coroner's toolkit. To my surprise, this key forensic capability that is found in the TCT tools, sleuthkit, and others has not been picked up on by the major forensic vendors as a capability in their toolsets such as EnCase and FTK.

Today's post will discuss how to create a windows operating system timeline of both filesystem and registry data using the SIFT Digital Forensics Workstation.

What is computer forensic timeline analysis?

Timeline analysis essentially takes the metadata time values for each existing and unallocated metadata structure in the file system and sorts it, in order from earliest to most recent, to be viewed and interpreted by a forensic analyst. A good portion of Day 2 in the SEC508 Computer Forensic, Investigation, and Response class is dedicated to creating and analyzing timeline data for both Windows and Linux machines.

Timeline Data is based off of the timestamps stored in the metadata of your filesystem. Lets take a look at the different timestamps stored for some of the most common filesystems you might encounter.

timeline-data
Timeline Data

Once a timeline is created, it will be sorted based off of the above timestamp data into a file. Each line will have an output that will include the majority of the metadata associated with it. Learning how to interpret a timeline takes time and practice, but after you utilize it for several cases you will realize just how valuable this data will be to help generate additional computer forensic leads to examine inside the case you are working.

timeline-output
Timeline Data

Creating a timeline on a Windows machine (Registry Key Last Write Time and Filesystem Time MetaData)

You will need the SIFT Workstation for this example. DOWNLOAD

Not only can you bring in timeline data from the filesystem, the registry can also be combined into a timeline. First of all we will start with a filesystem image that was acquired. This is our working copy image that is in raw (dd) format. In this case, the name of the file is xp_dblake.dd acquired in the 20090204 case following the YYYYMMDD case name example.

app_forensics_1
Our NTFS Raw (dd) Image

Mounting an image is easy. Take a look at the previous Digital Forensic SIFT'ing blog on how to examine and mount raw (dd) images in read-only mode.

app_forensics_2
Mounting in Read-Only Mode an NTFS Disk Image in Raw (dd) Format

Creating Timeline of Registry Hives

Regtime.pl is a tool that was created by Harlan Carvey and can be found on the SIFT Workstation to parse the registry and pull all of the last write times from every key. It will output in the sleuthkit "bodyfile" format that can be added to the filesystem bodyfile or analyzed separately using the mactime tool. I had been bugging Harlan for years for this capability based off of his knowledge of the registry. He probably knows registry forensics better than anyone I know and his toolkits show it.

How do you use regtime.pl? Easy.

Run from /usr/local/src/windows-perl on the SIFT Workstation

# perl regtime.pl —m <HIVETYPE> —r <HIVEFILE> > bodyfile
[Useful Options]
-r Registry hive file to parse <HIVEFILE>
-m Name of <HIVENAME> for Mactime Bodyfile
Example (HKLM-SAM, HKEY-USER-NAME)

The benefits of identifying when specific keys are last updated and comparing that to what is occurring on the filesystem is a very telling investigative technique. You can use this to easily identify when files are saved, USB keys are inserted, and programs are executed.

Creating a timeline of the registry is easy. You just need to remember where the registry hives are stored on the windows filesystem. The program will require you to point the (-r) option at the specific registry hive you would like to parse. Remember, HKEY_LOCAL_MACHINE hives are located in C:\WINDOWS\system32\config (SECURITY, SAM, system, software). The HKEY-USER hives are located in C:\Documents and Setting\<username>\NTUSER.DAT. If you are one of the few people using VISTA look in C:\Users\<username>NTUSER.DAT.

The hive name is utilized by the mactime program to allow for the user to easily identify the specific key and the hivetype that it originated from. Without the (-m) option, you will not know which user a specific hive originated from. The (-m) option will take any regular input.

The output below uses the mounted filesystem above and uses regtime.pl. This is an example of using regtime.pl to pull bodyfile data from the core HKEY_LOCAL_MACHINE hives (system, SAM, SECURITY, software) located in /WINDOWS/system32/config/ directory. Notice how in each execution it is appending to the existing bodyfile using the (>>) as a part of the command. Each of the 4 core hives and the user hive (NTUSER.dat) will be added to the overall bodyfile located in this example in /images/20090204/bodyfile.

app_forensics_3
Adding Core Registry Hives and the User Hive to the Bodyfile

Creating a Timeline of a NTFS Filesystem

Once the bodyfile has been created, then we can move on to adding the metadata timestamps from the NTFS filesystem using fls from the sleuthkit. Again, make sure you continue to use the (>>) to append the existing bodyfile. Finally, once our final bodyfile is created we can use the mactime tool to create our human readable output for examination.

app_forensics_4
Adding NTFS Filesystem Timestamps to the Bodyfile

Registry and Filesystem Timeline Examination

app_forensics_5
Registry and Filesystem Timeline Output For Jan 16, 2009 18:24 EST

In the above example we can see exactly where the setupapi.log file was updated which is very useful in forensics. On VISTA the location of this file is \WINDOWS\inf\setupapi.dev.log. You can also clearly see when the HKEY_Local_Machine USBSTOR keys were last modified when the Apple Ipod was inserted. Again detailed information on USB History viewing and their associated registry keys can be found in many places.

The overall point of this exercise is to show you how to create a timeline of both registry and file system data. This combination makes a very powerful analysis mechanism for examining changes to the system around a specific time of activity on a machine.

If you have any questions or have trouble getting this to work on your case, please email me at rlee@sans.org. Sign up for the NEW class SEC408 Computer Forensic and E-Discovery Essentials debuting at SANSFIRE 2009.

Rob Lee is a Principal Consultant for MANDIANT, a leading provider of information security consulting services and software to Fortune 500 organizations and the U.S. Government. Rob has over 13 years experience in computer forensics, vulnerability discovery, intrusion detection and incident response. Rob is the lead course author and faculty fellow for the computer forensic courses at the SANS Institute.

Share:
TwitterLinkedInFacebook
Copy url Url was copied to clipboard
Subscribe to SANS Newsletters
Join the SANS Community to receive the latest curated cybersecurity news, vulnerabilities, and mitigations, training opportunities, plus our webcast schedule.
United States
Canada
United Kingdom
Spain
Belgium
Denmark
Norway
Netherlands
Australia
India
Japan
Singapore
Afghanistan
Aland Islands
Albania
Algeria
American Samoa
Andorra
Angola
Anguilla
Antarctica
Antigua and Barbuda
Argentina
Armenia
Aruba
Austria
Azerbaijan
Bahamas
Bahrain
Bangladesh
Barbados
Belarus
Belize
Benin
Bermuda
Bhutan
Bolivia
Bonaire, Sint Eustatius, and Saba
Bosnia And Herzegovina
Botswana
Bouvet Island
Brazil
British Indian Ocean Territory
Brunei Darussalam
Bulgaria
Burkina Faso
Burundi
Cambodia
Cameroon
Cape Verde
Cayman Islands
Central African Republic
Chad
Chile
China
Christmas Island
Cocos (Keeling) Islands
Colombia
Comoros
Cook Islands
Costa Rica
Croatia (Local Name: Hrvatska)
Curacao
Cyprus
Czech Republic
Democratic Republic of the Congo
Djibouti
Dominica
Dominican Republic
East Timor
East Timor
Ecuador
Egypt
El Salvador
Equatorial Guinea
Eritrea
Estonia
Ethiopia
Falkland Islands (Malvinas)
Faroe Islands
Fiji
Finland
France
French Guiana
French Polynesia
French Southern Territories
Gabon
Gambia
Georgia
Germany
Ghana
Gibraltar
Greece
Greenland
Grenada
Guadeloupe
Guam
Guatemala
Guernsey
Guinea
Guinea-Bissau
Guyana
Haiti
Heard And McDonald Islands
Honduras
Hong Kong
Hungary
Iceland
Indonesia
Iraq
Ireland
Isle of Man
Israel
Italy
Jamaica
Jersey
Jordan
Kazakhstan
Kenya
Kingdom of Saudi Arabia
Kiribati
Korea, Republic Of
Kosovo
Kuwait
Kyrgyzstan
Lao People's Democratic Republic
Latvia
Lebanon
Lesotho
Liberia
Liechtenstein
Lithuania
Luxembourg
Macau
Macedonia
Madagascar
Malawi
Malaysia
Maldives
Mali
Malta
Marshall Islands
Martinique
Mauritania
Mauritius
Mayotte
Mexico
Micronesia, Federated States Of
Moldova, Republic Of
Monaco
Mongolia
Montenegro
Montserrat
Morocco
Mozambique
Myanmar
Namibia
Nauru
Nepal
Netherlands Antilles
New Caledonia
New Zealand
Nicaragua
Niger
Nigeria
Niue
Norfolk Island
Northern Mariana Islands
Oman
Pakistan
Palau
Palestine
Panama
Papua New Guinea
Paraguay
Peru
Philippines
Pitcairn
Poland
Portugal
Puerto Rico
Qatar
Reunion
Romania
Russian Federation
Rwanda
Saint Bartholemy
Saint Kitts And Nevis
Saint Lucia
Saint Martin
Saint Vincent And The Grenadines
Samoa
San Marino
Sao Tome And Principe
Senegal
Serbia
Seychelles
Sierra Leone
Sint Maarten
Slovakia (Slovak Republic)
Slovenia
Solomon Islands
South Africa
South Georgia and the South Sandwich Islands
South Sudan
Sri Lanka
St. Helena
St. Pierre And Miquelon
Suriname
Svalbard And Jan Mayen Islands
Swaziland
Sweden
Switzerland
Taiwan
Tajikistan
Tanzania
Thailand
Togo
Tokelau
Tonga
Trinidad And Tobago
Tunisia
Turkey
Turkmenistan
Turks And Caicos Islands
Tuvalu
Uganda
Ukraine
United Arab Emirates
United States Minor Outlying Islands
Uruguay
Uzbekistan
Vanuatu
Vatican City
Venezuela
Vietnam
Virgin Islands (British)
Virgin Islands (U.S.)
Wallis And Futuna Islands
Western Sahara
Yemen
Yugoslavia
Zambia
Zimbabwe

Tags:
  • Digital Forensics and Incident Response

Related Content

Blog
DFIR_FOR509_Countdown_Social4.jpg
Digital Forensics and Incident Response, Cloud Security
April 9, 2021
NEW FOR509: Enterprise Cloud Forensics & Incident Response - Beta coming June 2021
The new Enterprise Cloud Forensics course brings examiners up to speed with the rapidly changing world of enterprise cloud
SANS DFIR
read more
Blog
3_Min_Max_(58).png
Digital Forensics and Incident Response
March 30, 2021
3MinMax Series Topic Review - Apple Acquisition
Apple devices that we must be aware of in order to perform forensic acquisitions
370x370_Kevin-Ripa.jpg
Kevin Ripa
read more
Blog
3_Min_Max_(56).png
Digital Forensics and Incident Response
March 30, 2021
3MinMax Series Topic Review - Using KAPE in Forensics
KAPE is an efficient and highly configurable triage program that will target essentially any device or storage location, find forensically
370x370_Kevin-Ripa.jpg
Kevin Ripa
read more
  • Register to Learn
  • Courses
  • Certifications
  • Degree Programs
  • Cyber Ranges
  • Job Tools
  • Security Policy Project
  • Posters
  • The Critical Security Controls
  • Focus Areas
  • Blue Team Operations
  • Cloud Security
  • Cybersecurity Leadership
  • Digital Forensics
  • Industrial Control Systems
  • Offensive Operations
Subscribe to SANS Newsletters
Join the SANS Community to receive the latest curated cybersecurity news, vulnerabilities, and mitigations, training opportunities, plus our webcast schedule.
United States
Canada
United Kingdom
Spain
Belgium
Denmark
Norway
Netherlands
Australia
India
Japan
Singapore
Afghanistan
Aland Islands
Albania
Algeria
American Samoa
Andorra
Angola
Anguilla
Antarctica
Antigua and Barbuda
Argentina
Armenia
Aruba
Austria
Azerbaijan
Bahamas
Bahrain
Bangladesh
Barbados
Belarus
Belize
Benin
Bermuda
Bhutan
Bolivia
Bonaire, Sint Eustatius, and Saba
Bosnia And Herzegovina
Botswana
Bouvet Island
Brazil
British Indian Ocean Territory
Brunei Darussalam
Bulgaria
Burkina Faso
Burundi
Cambodia
Cameroon
Cape Verde
Cayman Islands
Central African Republic
Chad
Chile
China
Christmas Island
Cocos (Keeling) Islands
Colombia
Comoros
Cook Islands
Costa Rica
Croatia (Local Name: Hrvatska)
Curacao
Cyprus
Czech Republic
Democratic Republic of the Congo
Djibouti
Dominica
Dominican Republic
East Timor
East Timor
Ecuador
Egypt
El Salvador
Equatorial Guinea
Eritrea
Estonia
Ethiopia
Falkland Islands (Malvinas)
Faroe Islands
Fiji
Finland
France
French Guiana
French Polynesia
French Southern Territories
Gabon
Gambia
Georgia
Germany
Ghana
Gibraltar
Greece
Greenland
Grenada
Guadeloupe
Guam
Guatemala
Guernsey
Guinea
Guinea-Bissau
Guyana
Haiti
Heard And McDonald Islands
Honduras
Hong Kong
Hungary
Iceland
Indonesia
Iraq
Ireland
Isle of Man
Israel
Italy
Jamaica
Jersey
Jordan
Kazakhstan
Kenya
Kingdom of Saudi Arabia
Kiribati
Korea, Republic Of
Kosovo
Kuwait
Kyrgyzstan
Lao People's Democratic Republic
Latvia
Lebanon
Lesotho
Liberia
Liechtenstein
Lithuania
Luxembourg
Macau
Macedonia
Madagascar
Malawi
Malaysia
Maldives
Mali
Malta
Marshall Islands
Martinique
Mauritania
Mauritius
Mayotte
Mexico
Micronesia, Federated States Of
Moldova, Republic Of
Monaco
Mongolia
Montenegro
Montserrat
Morocco
Mozambique
Myanmar
Namibia
Nauru
Nepal
Netherlands Antilles
New Caledonia
New Zealand
Nicaragua
Niger
Nigeria
Niue
Norfolk Island
Northern Mariana Islands
Oman
Pakistan
Palau
Palestine
Panama
Papua New Guinea
Paraguay
Peru
Philippines
Pitcairn
Poland
Portugal
Puerto Rico
Qatar
Reunion
Romania
Russian Federation
Rwanda
Saint Bartholemy
Saint Kitts And Nevis
Saint Lucia
Saint Martin
Saint Vincent And The Grenadines
Samoa
San Marino
Sao Tome And Principe
Senegal
Serbia
Seychelles
Sierra Leone
Sint Maarten
Slovakia (Slovak Republic)
Slovenia
Solomon Islands
South Africa
South Georgia and the South Sandwich Islands
South Sudan
Sri Lanka
St. Helena
St. Pierre And Miquelon
Suriname
Svalbard And Jan Mayen Islands
Swaziland
Sweden
Switzerland
Taiwan
Tajikistan
Tanzania
Thailand
Togo
Tokelau
Tonga
Trinidad And Tobago
Tunisia
Turkey
Turkmenistan
Turks And Caicos Islands
Tuvalu
Uganda
Ukraine
United Arab Emirates
United States Minor Outlying Islands
Uruguay
Uzbekistan
Vanuatu
Vatican City
Venezuela
Vietnam
Virgin Islands (British)
Virgin Islands (U.S.)
Wallis And Futuna Islands
Western Sahara
Yemen
Yugoslavia
Zambia
Zimbabwe
  • © 2021 SANS™ Institute
  • Privacy Policy
  • Contact
  • Twitter
  • Facebook
  • Youtube
  • LinkedIn