SANS Digital Forensics and Incident Response Blog

Digital Forensic SIFTing: SUPER Timeline Creation using log2timeline

This is a series of blog articles that utilize the SIFT Workstation. The free SIFT workstation, can match any modern forensic tool suite, is also directly featured and taught in SANS' Advanced Computer Forensic Analysis and Incident Response course (FOR 508). SIFT demonstrates that advanced investigations and responding to intrusions can be accomplished using cutting-edge open-source tools that are freely available and frequently updated.

The SIFT Workstation is a VMware appliance, pre-configured with the necessary tools to perform detailed digital forensic examination in a variety of settings. It is compatible with Expert Witness Format (E01), Advanced Forensic Format (AFF), and raw (dd) evidence formats.

Super-Timeline Background

I first started teaching timeline analysis back in 2000 when I first started teaching for SANS. It was in my first SANS@Night presentation I gave in Dec 2000 at what was then called "Capitol SANS" and I demonstrated a tool I wrote called based off of the TCT tool mactime. Since that point every certified GCFA has answered test questions on timeline analysis.

We have reached a new resurgence in timeline analysis thanks to Kristinn Gudjonsson and his tool log2timeline. Kristinn's work in the timeline analysis field will probably change the way many of you approach cases.

First of all, all of these tools will be found in the SIFT Workstation are ready to go out of the box, but you can keep them up to date at Kristinn's website Kristinn's tool was also recently added to the FOR508: Advanced Computer Forensic Analysis and Incident Response course last year and has already been taught to hundreds analysts who are now using it in the field daily.

Kristinn's log2timeline tool will parse all of the following data structures and more through AUTOMATICALLY recursing through the directories for you instead of having to manually accomplish this.

This is a list of the currently available formats log2timeline is able to parse. The tool is being constantly updated so to get the current list of available input modules it is possible to let the tool print out a list:

# log2timeline -f list

Artifacts Automatically Parsed in a SUPER Timeline:

How to automatically create a SUPER Timeline

log2timeline recursively scans through an evidence image (physical or partition) and extracts artifact timestamp data gathered from the evidence that the tool log2timeline supports (see artifacts above). This tutorial will step a user who is interested in creating their first timeline from start to finish.

Step 0 — Use the SIFT Workstation Distro

Download Latest SIFT Workstation Virtual Machine Distro:

It is recommended that you use VMware Player for PCs and VMware Fusion for MACs. Alternatively, you can install the SIFT workstation in any virtual machine or direct hardware using the downloadable ISO image as well.

Launch the SIFT workstation and login to the console by using the password "forensics".

Step 1 — Identify your evidence and gain access to it in the SIFT Workstation

The files used in this example.

Link your evidence files to the SIFT Workstation through the Windows File Share that is enabled by default in the /cases directory. Either you can plug in a USB drive, mount a remote drive share, or copy the evidence to your /cases/ directory.

It should be noted that the design of the SIFT workstation has a separate drive for the /cases directory to allow for a larger virtual drive or you can connect it to an actual hard drive as well that you mount at the /cases directory.

Open in Explorer \siftworkstation\cases\EXAMPLE-DIR-YYYYMMDD-###

If your evidence is a E01 then use this previous article on the topic to mount it correctly inside the SIFT workstation. If your evidence is RAW go ahead and skip to STEP 2. Access to the raw image is required as log2timeline cannot parse E01 files... yet.

  • $ sudo su —
  • # cd /cases/EXAMPLE-DIR-YYYMMDD-####/
  • # nps-2008-jean.E01 /mnt/ewf
  • # cd /mnt/ewf

Note the commands that are inputted by the forensicator are highlighted in the blue outlined box.

Step 2 — Create The Super Timeline

Manual creation of a timeline is challenging and still requires some work to get through. We have included in the SIFT Workstation an automated method of generating a timeline via the new log2timeline tool that can simply be pointed at a disk image (raw disk). Again, If you are examining an E01 or AFF file, please mount it first using or affuse respectively.

Creating a Super Timeline requires you to know whether or not your evidence image is a Physical or a Partition Image. A Physical image will include the entire disk image and can be parsed by the tool mmls to list the partitions. A Partition image will be the actual filesystem (e.g. NTFS) and can be parsed by the tool fsstat to list information about the partition.

Once you have figured out if you have a physical disk image or a partition image, then choose the correct implementation of the command to run with the correct timezone.

Critical Failure Point Note: There is confusion over what the (-z) time zone option is used for. The (-z) is the time zone of the SYSTEM. The timezone is used to baseline convert time data that is stored in "local" time and will output the data into the same time zone.

Why the need? Certain artifacts, such as setupapi.log files and index.dat files, store times in local system time instead of UTC. Without telling log2timeline what the local system time is, it would slurp up the data from those artifacts incorrectly. To correct this, log2timeline converts the data into UTC but then output the data back into the same —z time zone by default.

The output of your timeline will always be the same time zone as your —z option unless you specify a different time zone using the "BIG" —Z option. This will allow you to convert a system time of EST5EDT to UTC output if you desire to compare computers from two different time zones in a single timeline.

If your time zone includes areas that have daylight savings time, it is important to use the correct location with daylight savings time. For example, on the East Coast, the correct implementation of daylight savings for the timezone value would be EST5EDT. For Mountain Time it would be MST7MDT. log2timeline has autocomplete enabled in the SIFT Workstation, so all you would need to do is type -z [tab tab] to see all the available timezone options that it will recognize. If you do not use this time zone setting correctly with daylight savings accounted for, any local time timeline data that is analyzed in local time will be incorrect. So just to iterate, using EST as your timezone will treat all timestamps as if they were EST. Using EST5EDT (and other similarly named ones) will take daylight savings into account.

In summary: It is crucial that the -z option matches the way the system is configured to produce accurate results.

log2timeline LIST-Files

The list files in log2timeline are vitally important to understand. They can be used to specify exactly which log2timeline modules you would like to parse in a given image. There are some default list-files already built into log2timeline found in the /usr/share/perl5/Log2t/input directory and all in with the value .lst. The list-files will always be used with the —f list-file option and the -r (recurse directory) and will automatically parse any artifact included in the list-file chosen found in the starting or subdirectory of the location you are examining with log2timeline.

Once you understand the .lst files are just a list of artifacts you would like to examine, it is fairly simple to add your own for any type of situation. For example, you could add one for an intrusion investigation against an IIS webserver by using only the artifacts mft, evt, and iis. This will save you a lot of time especially if there are a bunch of IIS log files on the system.

Intermediate log2timeline LIST-Files usage

If you prefer to not make a list-file for use. log2timeline can take any number of processors, as long as they are separated with a comma.

An example: -f winxp,-ntuser,syslog- This will load up all the modules in the winxp input list file, and then add the syslog module, and remove the ntuser one.

The same can be done here: -f webhist,ntuser,altiris,-chrome — This will load up all the modules inside the webhist.lst file, add ntuser and altiris, and then remove the chrome module out of the list.

This is the proper way to form a command using the log2timeline list-files option in the SIFT workstation.

Now that we have an understanding of the basic functionality, it is best if we quickly take a look at some cases in where a targeted timeline could be used.

Case Study 1 — Intrusion Incident (IIS Web Server)

Perhaps you are examining a case in which you have to examine a web server for a possible residue of attack. In this case you are not sure when the attack took place but you would like to look at not only the system's MFT, you would also like to include the IIS log files and the system's event logs. This greatly reduces the amount of clutter in your timeline as you already know your attack via the web would be found in these 3 places.

Mount your disk image correctly using the SIFT workstation on /mnt/windows_mount

Now build the commands to build your initial timelin

Step 1 — Find Partition Starting Sector # mmls image.dd calculate offset ##### (sector *512)

Step 2 — Mount image for processing # mount -o ro, noexec,show_sys_files,loop,offset=##### image.dd /mnt/windows_mount

Step 3 — Add Filesystem Data # log2timeline —z EST5EDT —f mft,iis,evt /mnt/windows_mount —w intrusion.csv

Once you have run the three commands you will now have your timeline built. It is best that you now sort your timeline using l2t_process. l2t_process is most effective when you are bounding it by two dates to limit looking at all times on the system.

Step 4 — Filter Timeline # l2t_process -b intrusion.csv > filtered-timeline.csv

#l2t_process —b /cases/ EXAMPLE-DIR-YYYYMMDD-####/timeline.csv 01-16-2008..02-23-2008 > timeline-sorted.csv

Case Study 2 — Restore Point Examination

In this example, we are using log2timeline to sort a Windows XP restore points only looking for "Evidence of Execution" only. This is used to show how you can use log2timeline to provide a targeted timeline of only a piece of the drive image instead of the entire system itself. In this example, we could see historically the last execution time for many executables on each day a restore point was created.

# log2timeline -r -f ntuser -z EST5EDT /mnt/windows_mount/System\ Volume\ Information/ -w /cases/forensicchallenge/restore.csv

# kedit keyword (add userassist, runmru, LastVistedMRU, etc.)

# l2t_process -b restore.csv -k keyword.txt > filtered-timeline.csv

What if a key part of our case was determining when the last time internet explorer was last executed over time? It is now easily visible each time IE was last executed on a specific day using timeline analysis techniques like those I showed above. Here you can easily track the execution of a specific program across multiple days thanks to quick analysis using the restore point data (NTUSER.dat hives) and log2timeline.

Case Study 3 — Manual Super Timeline Creation

In some cases, you might not want to use the full super timeline. To understand what log2timeline is stepping through automatically; it might be useful to accomplish the same output by hand. The following is the steps that log2timeline takes care of us in a single command instead of 3 steps.

In Summary:

Timeline analysis is hard. Understanding how to use log2timeline will help engineer better solutions to unique investigative challenges. The tool was built for maximum flexibility to account for the need for both targeted and overall super timeline creation. Create your own preprocessors for targeted timelines. Use log2timeline to only collect the data you need. Or use it to collect everything.

In the next article we will talk about more efficient ways of analyzing data collected from log2timeline


You just created your first SUPER Timeline... now you get to analyze thousands of entries! (Wha???)

In another upcming article, I will discuss how to parse and reduce the timeline efficiently so you can analyze the data easier. SUPER-TIMELINES obtain much data from your operating system, but learning how to parse it into something useable is extremely valuable. In my SANS360 talk, I will take this technique even further. Of course, we go through all these techniques in our full training courses at SANS specifically FOR508: Advanced Computer Forensic Analysis and Incident Response.

Keep Fighting Crime!

Rob Lee has over 15 years of experience in digital 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 and lead author for FOR408 Windows Forensics and FOR508 Advanced Computer Forensics Analysis and Incident Response.




Posted July 29, 2010 at 11:30 PM | Permalink | Reply


I ran into a couple syntax issues:
1. I needed to change the syntax for part 2 moving the -r -o and -m flags to the end:
sudo fls /home/sansforensics/Desktop/VMware-Shared-Drive/Armato/Amato_SU2010-01063.img >> /home/sansforensics/Desktop/cases/SU2010-01063/bodyfile -r -o 63 -m C:
when I tried the original I kept getting this error:
sansforensics@SIFT-Workstation:/mnt/windows_mount$ sudo fls -o 63 ''"r ''"m C: /home/sansforensics/Desktop/VMware-Shared-Drive/Armato/Amato_SU2010-01063.img >> /home/sansforensics/Desktop/cases/SU2010-01063/bodyfile
Error stat(ing) image file (split_open ''" ''"r ''" No such file or directory)
2. I haven't been able to get part 3 to work yet, I am having a syntax problem with
There is a single space between -r and /mnt/''..
sansforensics@SIFT-Workstation:/usr/local/src/windows-perl$ ./ ''"m HKLM-SECURITY ''"r /mnt/windows_mount/WINDOWS/system32/config/SECURITY >> /home/sansforensics/cases/SU2010-01063/bodyfile
Unknown option: mnt/windows_mount/windows/system32/config/security
Any ideas what I did wrong? It seems to be only taking the / for the -r flag.

Posted August 15, 2011 at 12:45 PM | Permalink | Reply


PaulK ''" did you ever get a resolution to the errors you were gettting?

Posted February 23, 2012 at 2:23 PM | Permalink | Reply

Kevin Brisson

I have been using the SIFT supertimeline analysis for a few months now and have had great results with XP. My biggest issue with Windows 7 is I have yet to have a successful timeline created that includes the Event Logs.
Is this a known issue with the tool?
Thank you,

Posted February 23, 2012 at 3:52 PM | Permalink | Reply


Yes, as far as I know it is being worked on.

Posted March 14, 2012 at 4:48 PM | Permalink | Reply


Is there a way to perform forensics on a machine when a hacker disables syslog on a linux machine? Then enables syslog when they leave? Would I be able to see what they did while syslog was disabled?

Posted July 13, 2012 at 3:41 PM | Permalink | Reply


If you have a disk image with multiple partitions, do you need to run log2timeline-sift on both partitions and then combine the results?

Posted August 2, 2012 at 1:02 AM | Permalink | Reply


I am having trouble mounting multiple expert witness format files. What's the command for that?
My E01 files are on windows 7 operating system.
Basically, how i take it is, I need to mount the file share first where my E01 files are present. Once that mount is completed, then will be running the
Someone please tell me a little step by step for that (I am not good enough with Linux) =)
Any help will be highly appreciated.
Thanks in advance!

Posted August 21, 2012 at 9:02 AM | Permalink | Reply

Andrew Kempster

@Josh ''" When you say multiple EWF files, do you mean multiple files relating to more than one exhibit, or just one exhibit with files E01, E02, E03, etc?
If you're using the SIFT workstation within VMware, make sure you've added the share for your evidence location through VMWare (it's in the settings of the virtual machine ''" add a Shared Folder and point it to the drive or folder that contains your evidence files). On the desktop of the SIFT workstation is a folder called VMware-Shared-Drive, and any shared folders are in there.
To mount the EWF files, at the terminal type:
''sudo su'
to become root user. Then, type:
'' Desktop/VMware-Shared-Drive/[SHARE NAME]/[EWF FILENAME.E*] /mnt/ewf/'
Note that if your exhibit is broken up over several E0 files, put ''E*' as the extension, as this will then pick up the rest of the files.
Now browse to the folder containing the mounted E01 files by typing:
''cd /mnt/ewf/'
Typing ''ls' will display two files: one is a text file that contains case evidence entered when the exhibit was first acquired, the second file is the evidence mounted into a single raw flat file.
I haven't tried this one more than one exhibit at a time though.
Hope this helps.

Posted October 13, 2013 at 10:45 PM | Permalink | Reply


Is it possible to add a squid acces.log to the log2timeline-sift log file ?
or can this be done with log2timeline ?