Home > Forensics, Timeline analysis > Timeline Analysis 101

Timeline Analysis 101

I recently got the question of how to start with your timeline analysis.  And usually when someone finally asks you the question, you know that there are quite a lot of others that have absolutely no idea how to go about such analysis yet somehow don’t have the guts to ask.  Therefore for those that have never done any timeline analysis before or just want to get a better clarification on the meaning of the fields provided in the timeline, etc, here is my mini guide to get you started in your quest of timeline analysis, and who knows, this might be the first post in a series of similar ones.

First of all you need to create the super timeline. That should be the first step, without it there isn’t much to analyze.

We don’t want a simple filesystem timeline, which although can be revealing just doesn’t tell us give us enough overview of what happened on the system.  So we would like to start by extending it into a super timeline, using few tools to extract as much information as we possibly can.  And since there is still not a single tool to do all that for us, at least until I’ve added the functionality of these tools into log2timeline, we will have to make due with these great instructions on how to create a super timeline.

Since we are adding information using few tools we need to use a common output method, and in this case we used a mactime output to create the bodyfile and then change it into a CSV file using the mactime tool from the Sleuthkit (as the instructions go over, step-by-step).  Now we are ready to import this into a spreadsheet application of our choice to start our analysis.  But first thing first… what do all of these fields mean and especially in the context of a super timeline?

The format of the mactime body file starting from version 3.x is an ASCII file, pipe delimited, which is structured in the following way:

MD5|name|inode|mode_as_string|UID|GID|size|atime|mtime|ctime|crtime

The mactime body file was created to properly represent timestamps from filesystems (since that is what TSK does) so you can see there are four timestamps in each line, even though there aren’t always four recorded timestamps in every filesystem. We still use this format to describe entries that have originated from other sources than files, that is information extracted from within log files, even though some of the fields have no real meaning and quite possibly have the potential to make the analysis more difficult to understand.

A quick explanation of all the available fields in the mactime body format is perhaps needed.  Some of the information found here is taken from TSK wiki.

  • MD5
    This is the MD5 sum of the file, something that isn’t really used at all, but kept there just in case someone would want it (very time consuming to calculate the md5 sum for each file) – although it is possible to populate this field using log2timeline.
  • name
    This is the name and path of the file
  • inode
    Although there is no notion of inodes in most filesystems this field’s name is still inode.  The value of this field refers to the metadata address, which differs depending on the filesystem in question.  In the FAT context this refers to the FAT number and in NTFS this is the MFT number, etc…
  • mode_as_string
    Again, here is something that refers to the *NIX way of representing file access settings, dwrxrwxrwx is the default standard for representing file access rights in *NIX.  If you see the letter, then that access is defined, otherwise it is filled with -.  The first letter represents the file type, if we take a closer look at the Wiki for the TSK we see the following definition of the file type field:

    • -: Unknown type
    • r: Regular file
    • d: Directory
    • c: Character device
    • b: Block device
    • l: Symbolic link
    • p: Named FIFO
    • s: Shadow
    • h: Socket
    • w: Whiteout
    • v: TSK Virtual file / directory (not a real directory, created by TSK for convenience).

    The majority of the entries will be either ‘-’, ‘r’ or ‘d’, others are mostly *NIX focused. The next three letters represent write/read/execute, which are the three access rights you can set on a file in a *NIX system.  You see that this is repeated three times, the first set is the access settings of the owner of the file (user settings), the next the group settings (each file has only one group and one user) and last you have settings for everyone else.

    In other words, the mode:
    -rwx—r–
    Means that this is a file that can be read, modified and executed by it’s owner. All other members of the group that the file belongs to cannot do anything with it, that is to say they have no access rights. And everyone else, those that do not belong to the group and are not the owner, can read the file but not execute it nor modify it.

  • UID
    This is the User ID for the owner of the file.
  • GID
    This is the Group ID for the group permission of the file.
  • size
    The size of the file
  • atime
    Mactime uses the MACB method of representing timestamps.  And the meaning of each of these timestamps differ between filesystems, so I will use a very generic description here and then show you a more detailed one later.
    This is the file’s last access time.
  • mtime
    This represents the last time it was modified.
  • ctime
    This represents the time when the file was changed.
  • crtime
    This represents the time the file was created.

So we need to take a closer look at the MACB (modified, accessed, creation, birth) definition which is used.  Since each filesystem contains there own definition of the timestamps we really can’t generalize and say that these timestamps have the same meaning in each context.  So we need to take a look at it from a different perspective, I will just include a table from the Sleuthkit web site:

MAC Meaning by File System

File System M A C B
Ext2/3 Modified Accessed Changed N/A
FAT Written Accessed N/A Created
NTFS File Modified Accessed MFT Modified Created
UFS Modified Accessed Changed N/A

If we take a closer look at this, you can start to see where this form does not properly describe timestamps extracted from other sources. Although the timeline to be analyzed in the spreadsheet application contains only one timestamp per entry, it will contain the MACB definition of the timestamp in question. Each line in the CSV file contains the following fields:

Date,Size,Type,Mode,UID,GID,Meta,File Name

In other words, you have the date, the size of the file, the mode, user ID, group ID, the META or inode number and the “File Name” field.

How does a registry entry fall into these fields? It does not necessarily have a group ID, nor a user ID, and not really a size field, inode number nor a file name, etc… here comes the a bit of artistic license into play when use these fields to properly describe such events.  And another thing, a registry entry has one timestamp, called “Last Write time”… how does that fit into the MACB definition that is more geared towards filesystems?  This makes the need of adjusting the definition of MACB.

Each file has there own settings in regards to timestamps, and in log2timeline context you will see the following input modules (assuming the latest published release, which is of this time version 0.43).  this is the meaning of the MACB fields found within the timeline:

Input module atime mtime ctime crtime
chrome The time a URL was visited or a file downloaded
evt The time when the event is registered in the Event log file
evtx The time when the event is registered in the Event log file
exif The time when the event is registered in the Even log file
ff_bookmark The time when a bookmark was created or visited or when a bookmark folder was created or modified (the type is contained within the description)
firefox3 (URL record) The time when a URL was visited
firefox3 (bookmark) When a bookmark or a bookmark folder was last modified When a bookmark or a bookmark folder was added
iehistory Meaning different depending on the location of the file – cache meaning when the file was saved on the hard drive When the user visited the URL – but can differ between index.dat files
iis The time when the entry was logged down
isatxt The time when the entry was logged down
mactime atime of the record mtime of the record ctime of the record crtime of the record
opera The time a user visited the URL
oxml The time of the action that is referred to in the text
pcap The time when the packet was recorded
prefetch The time when the executable that the prefetch file points to was executed last
recycler The time the file was sent to the recycle bin
restore The time when the restore point was created according to the timestamp in the rp.log file
setupapi The timestamp in the log file for each entry, indicating the time when the information was logged down
sol The time of the event that was found inside the file
sol (no timestamp found) The last access time of the sol file The last modification time of the sol file The last inode or metadata change time of the sol file
squid The time when the entry was logged down
tln The timestamp within the TLN entry
userassist The extracted timestamp from the binary value of the registry entry
win_link The extracted last access time from the LNK file The extracted last modified time from the LNK file The extracted last creation time from the LNK file
xpfirewall The time when the entry was logged down

Some of these modules will include a size field definitions, while other do not, etc.  So you will see different fields populated by different modules, depending on if that particular item is really applicable. And you will see that the “File Name” field is changed for a description of the event as extracted from the artifact in question.

This of course only applies to the mactime output, yet other output mechanism share some of these fields.  In future posts I will go into more details of both other output mechanism as well as the actual analysis part, showing examples of timelines and how to interpret them.

One of the nice things about exporting the data into the mactime body file (besides the fact that you can include information from other tools) is that you can easily transform it into a CSV file for importing into a spreadsheet application.  And in the spreadsheet application you can easily hide the fields that you are not interested in, making the analysis easier. So typically what I do is to split the date part into date and time, then I hide the mode,uid and gid fields.  After that you can turn on filtering in the spreadsheet and start analyzing (or just use grep/less/vim combination). Of course this is just my own preference while doing timeline analysis, and it depends on what I’m looking for as well.

  1. Howard Patterson
    June 2nd, 2010 at 01:54 | #1

    Thanks for this great intro and commentary on the timeline. I have been using the new SIFT tool, and this helps me figure out the results I’m getting. I have used it on a WinXP and Vista system (both 32-bit).

  1. No trackbacks yet.
-->