In this section

0.9 From Rows to a Timeline

Module 0

Introduction

Every artifact in this module has returned rows, and most of those rows carry a time: when a line was logged, when a file changed, when a process started. Separately they answer separate questions.

Put into one table and sorted, they become the account an investigation has to give in the end, of what happened and in what order. The sort is the easy part. Knowing what each time means, and which ones can be trusted, is the work.

This lesson plays out a short intrusion on ir-lab over real SSH, one step every 20 seconds: four wrong passwords and a right one for the account deploy, then, as deploy, a script dropped into /tmp/.cache, a binary copied there and started, a crontab entry to run the script, and finally the script's modification date set back to June 2025.

A custom collection gathers the authentication events and every timestamp of the files left behind, Linux.Sys.Pslist gathers the process, and a notebook query merges them. Module 9 builds timelines at scale; here the aim is to read one.

1

Rows With a Time in Them

What each kind of timestamp records

A timestamp is a record made by something, at some moment, for its own purposes, and its meaning comes from whatever made it. An authentication line's time is when rsyslog wrote it.

A file has several times, kept by the kernel in its inode, and they change for different reasons. A process's start time is not stored anywhere as a time at all; Velociraptor computes it from when the host booted and how long after boot the process began.

TimestampsWhat each timestamp records
auth.log lineWhen rsyslog wrote the line, in its own format and zone
BtimeWhen the file's inode was created; set by the kernel
MtimeWhen the content last changed; anyone who can write can set it
CtimeWhen the inode last changed, including a change to Mtime
AtimeWhen last read, if the mount records it; settable like Mtime
CreateTimeProcess start, derived from boot time; whole seconds here
Only Btime and Ctime are outside an ordinary user's reach

The pill at the bottom is the line to remember. Any user who can write to a file can set its modification and access times to anything with touch -d.

The birth time, which Velociraptor reports as Btime, is set once when the file is created, and the inode change time, Ctime, is updated by the kernel whenever anything about the inode changes, including the act of setting the other two. Neither can be set by an ordinary command.

The Velociraptor timeline blog makes the related point about the artifacts themselves: some timestamps they report are estimates, and a modification time records the last update, not creation, so an edited object looks new. Every row that goes into a timeline needs its time read with that in mind before it is sorted with anything else.

Time zones and formats belong to the same reading. The authentication lines on ir-lab carry a full RFC 3339 timestamp with its offset, +00:00, so there is no doubt what moment they name.

The classic syslog form that lesson 0.8's artifact expected carries neither a year nor a zone: Dec 2 17:19:44 means that time in whatever zone the host was set to, in a year the parser has to assume.

A timeline that merges such lines with file times, which the kernel keeps in UTC, has to convert them first, and a wrong guess about the host's zone shifts every log row by hours against every file row.

2

Collecting the Times

One custom artifact, two sources

Nothing built in gathers exactly these rows, so the lab defined a small artifact, Custom.Linux.Triage.Times, with two sources. One parses the authentication log with the RFC 3339 grok pattern lesson 0.8 had to fix; the other runs glob() over the intruder's folder and the crontab spool and returns all four timestamps of every file.

Module 4 builds artifacts like this properly; this one is about twenty lines of definition. The built-in Linux.Search.FileFinder would have returned three of the four file times, under the names MTime, ATime and CTime, but not the birth time, and section 4 turns on the birth time. Knowing which columns an artifact returns, and which it leaves out, is part of choosing it.

The authentication source returned the whole intrusion as seen by sshd:

VQL9 rows
SELECT Timestamp, Event, User, SourceIP
FROM source(client_id='C.300791787c148acf', flow_id='F.DC872FP0CIC7O',
            artifact='Custom.Linux.Triage.Times/Auth')
TimestampEventUserSourceIP
2026-12-02T19:26:17.059129ZFaileddeploy127.0.0.1
2026-12-02T19:26:21.577517ZFaileddeploy127.0.0.1
2026-12-02T19:26:24.96888ZFaileddeploy127.0.0.1
2026-12-02T19:26:29.306451ZFaileddeploy127.0.0.1
2026-12-02T19:26:30.890063ZAccepteddeploy127.0.0.1
2026-12-02T19:26:51.151389ZAccepteddeploy127.0.0.1
2026-12-02T19:27:11.439893ZAccepteddeploy127.0.0.1
2026-12-02T19:27:31.726047ZAccepteddeploy127.0.0.1
2026-12-02T19:27:52.018221ZAccepteddeploy127.0.0.1

Every SSH authentication in auth.log: four failures, then one accepted login for each step of the intrusion.

Four failures in twelve seconds, then an accepted login, then one accepted login every 20 seconds after it. Each later step was run as a separate SSH command, and every one of them is a full login in the log. The log says when each session began. It does not say what the session did.

The files source returned the three files the intruder left:

VQL3 rows
SELECT OSPath, Btime, Mtime, Ctime, Atime
FROM source(client_id='C.300791787c148acf', flow_id='F.DC872FP0CIC7O',
            artifact='Custom.Linux.Triage.Times/Files')
OSPathBtimeMtimeCtimeAtime
/tmp/.cache/kworkerd2026-12-02T19:27:11.510248883Z2026-12-02T19:27:11.513700367Z2026-12-02T19:27:11.513700367Z2026-12-02T19:27:11.514248884Z
/tmp/.cache/update.sh2026-12-02T19:26:51.222247677Z2025-06-01T08:00:00Z2026-12-02T19:27:52.082251295Z2025-06-01T08:00:00Z
/var/spool/cron/crontabs/deploy2026-12-02T19:27:31.790250089Z2026-12-02T19:27:31.792984558Z2026-12-02T19:27:31.792984558Z2026-12-02T19:27:31.792984558Z

Four timestamps for each file the intruder left. One of these files has two dates from June 2025.

The binary and the crontab look as expected, with all four times clustered together, a fraction of a second after a login. The script does not: its Btime and Ctime are in December 2026, and its Mtime and Atime are the first of June 2025, eighteen months earlier.

3

One Table, One Order

Merging the rows

A timeline is one table with a time, a source and a message on every row. The notebook query below reads both collections by flow ID, turns each file into three rows, one per meaningful time, and chains everything together before sorting. Every row keeps its source label, so a reader can always tell what kind of time they are looking at.

Two details of the query are worth copying. foreach() with chain() inside it turns one file row into three timeline rows, one each for birth, modification and inode change, because a file is not one event but several.

And the final SELECT passes every time through timestamp(), because the process start arrives as a string and the others as times, and sorting mixed types would order some rows by their text rather than their moment.

VQL19 rows
LET ClientId <= 'C.300791787c148acf'

LET TimesFlow <= 'F.DC872FP0CIC7O' LET PslistFlow <= 'F.DC872G8T9RI8C' LET Auth = SELECT Timestamp, 'auth.log' AS Source, format(format='%v password for %v from %v', args=[Event, User, SourceIP]) AS Message FROM source(client_id=ClientId, flow_id=TimesFlow, artifact='Custom.Linux.Triage.Times/Auth')

LET Files = SELECT FROM foreach( row={ SELECT FROM source(client_id=ClientId, flow_id=TimesFlow, artifact='Custom.Linux.Triage.Times/Files') }, query={ SELECT * FROM chain( a={ SELECT Btime AS Timestamp, 'file birth' AS Source, OSPath AS Message FROM scope() }, b={ SELECT Mtime AS Timestamp, 'file modified' AS Source, OSPath AS Message FROM scope() }, c={ SELECT Ctime AS Timestamp, 'inode changed' AS Source, OSPath AS Message FROM scope() }) })

LET Procs = SELECT timestamp(string=CreateTime) AS Timestamp, 'process start' AS Source, format(format='%v, pid %v, user %v', args=[Exe, Pid, Username]) AS Message FROM source(client_id=ClientId, flow_id=PslistFlow, artifact='Linux.Sys.Pslist') WHERE Username = 'deploy'

SELECT timestamp(epoch=Timestamp) AS Timestamp, Source, Message FROM chain(a=Auth, b=Files, c=Procs) ORDER BY Timestamp

TimestampSourceMessage
2025-06-01T08:00:00Zfile modified/tmp/.cache/update.sh
2026-12-02T19:26:17.059129Zauth.logFailed password for deploy from 127.0.0.1
2026-12-02T19:26:21.577517Zauth.logFailed password for deploy from 127.0.0.1
2026-12-02T19:26:24.96888Zauth.logFailed password for deploy from 127.0.0.1
2026-12-02T19:26:29.306451Zauth.logFailed password for deploy from 127.0.0.1
2026-12-02T19:26:30.890063Zauth.logAccepted password for deploy from 127.0.0.1
2026-12-02T19:26:51.151389Zauth.logAccepted password for deploy from 127.0.0.1
2026-12-02T19:26:51.222247677Zfile birth/tmp/.cache/update.sh
2026-12-02T19:27:10Zprocess start/tmp/.cache/kworkerd, pid 6627, user deploy
2026-12-02T19:27:11.439893Zauth.logAccepted password for deploy from 127.0.0.1
2026-12-02T19:27:11.510248883Zfile birth/tmp/.cache/kworkerd
2026-12-02T19:27:11.513700367Zfile modified/tmp/.cache/kworkerd
2026-12-02T19:27:11.513700367Zinode changed/tmp/.cache/kworkerd
2026-12-02T19:27:31.726047Zauth.logAccepted password for deploy from 127.0.0.1
2026-12-02T19:27:31.790250089Zfile birth/var/spool/cron/crontabs/deploy
2026-12-02T19:27:31.792984558Zfile modified/var/spool/cron/crontabs/deploy
2026-12-02T19:27:31.792984558Zinode changed/var/spool/cron/crontabs/deploy
2026-12-02T19:27:52.018221Zauth.logAccepted password for deploy from 127.0.0.1
2026-12-02T19:27:52.082251295Zinode changed/tmp/.cache/update.sh

Three collections, one order. Two rows are wrong in ways the table cannot show by itself.

Read top to bottom, most of it is the intrusion in order: failures, login, script born, process started, binary born, crontab born, and at the end, an inode change on the script with no other event of its own.

Two rows do not fit, and they are the subjects of the next two sections. The first is the top row, a modification in June 2025 sorted before everything else. The second is the process start, which the table places before the login of the session that started it.

auth.logprocess startfile birthfile modifiedinode changed19:26:17.059Z19:27:52.082Zoff the left edge: update.sh modified 2025-06-01, eighteen months earlier

The same rows as lanes. Each step of the intrusion is a login followed within a fraction of a second by a file event, except one point that the sort placed a year and a half earlier.

Neither problem is visible to the sort. ORDER BY puts rows in time order and has no idea what the times mean or how precise they are, so a merged timeline is only as good as the reading of each row in it.

MethodReading a merged timeline
One clockNormalize to UTC before sorting; the GUI shows UTC
One meaningLabel each row with what its time records
PrecisionWithin a second, order across sources is not sequence
OutliersA row far from the rest is a question, not a fact

The second and fourth rows are the ones this timeline needs. Every row here carries its source, so a reader can see that the top row is a modification time and not a creation; and the top row sits eighteen months before the next, which on any real case would be the first thing worth explaining rather than the first thing reported.

4

A Time That Lies

The modification time set back

The script's last step was touch -d '2025-06-01 09:00:00', run as deploy. It set the Mtime and Atime to that moment, and the timeline faithfully sorted the result to the top. An analyst who reads only modification times would conclude the script had been on the host for a year and a half and look for an intrusion in the wrong season.

/tmp/.cache/update.shBtime2026-12-02T19:26:51ZcreatedMtime2025-06-01T08:00:00Zset back by touchAtime2025-06-01T08:00:00Zset back with itCtime2026-12-02T19:27:52Zthe moment of the change

One file, four clocks. The two an ordinary user can set agree with each other and with nothing else.

Laid against the authentication log, each clock lines up with a moment in the intrusion except the two the intruder set:

Readupdate.sh against the logins
Btime2026-12-02T19:26:51.222247677Z, 0.1 s after login 2
Mtime2025-06-01T08:00:00Z, before its own Btime
Atime2025-06-01T08:00:00Z, set by the same command
Ctime2026-12-02T19:27:52.082251295Z, 0.1 s after login 5
An Mtime before the Btime cannot happen without someone setting it

The other two clocks tell the real story. The Btime, 2026-12-02T19:26:51.222247677Z, is 0.1 seconds after the second accepted login, which is when the script was written.

The Ctime, 2026-12-02T19:27:52.082251295Z, is 0.1 seconds after the last login, and it is the only trace of the touch itself: setting the modification time is itself a change to the inode, and the kernel records it. A modification time earlier than the file's own birth is impossible without someone setting it, and that impossibility is the finding.

Btime has conditions of its own. It is only reported where the filesystem stores a creation time and the kernel exposes it, which is true of the ext4 filesystem here and not of every filesystem or every older kernel. Where it is missing, the Ctime alone still dates the last change, and a Ctime far later than the Mtime is the same tell.

5

A Time That Is Approximate

A process that starts before its login

The second misfit is quieter. Pslist reports kworkerd starting at 2026-12-02T19:27:10Z. The login whose session started it is at 2026-12-02T19:27:11.439893Z, and the binary was born at 2026-12-02T19:27:11.510248883Z, both later. A process cannot start before the file it runs exists, so the process start time is wrong, and by about a second.

Readkworkerd against its own session
Login2026-12-02T19:27:11.439893Z, the session that ran it
Binary born2026-12-02T19:27:11.510248883Z, 0.1 s later
Process start2026-12-02T19:27:10Z, before both
PrecisionWhole seconds, derived from boot time and ticks
Report it as within a second of the login, not before it

The reason is the field itself. Linux records when a process started as a count of clock ticks after boot, and the start time Velociraptor shows is computed from that count and the host's boot time, reported here to whole seconds. Both the rounding and the boot-time estimate move it, and the effect is that this time is accurate to about a second, no better.

Within that second, it cannot be ordered against a log line or a file time measured in microseconds.

That generalizes into a rule for any merged timeline: precision differs by source, and the order of events closer together than the coarsest source's precision is not evidence of their sequence.

When the sequence matters, the evidence for it has to come from something other than the sort: a parent-child relationship between processes, a file that must exist before it can run, a log that records both events from one clock.

Across hosts the problem grows. Each host keeps its own clock, and a host whose clock has drifted puts every one of its rows at the wrong moment against every other host's.

Before merging several hosts' evidence into one timeline, it is worth finding one event that two of them recorded, such as an SSH login that appears in the client's authentication log and in the network logs of the host it came from, and checking that the two clocks agree about it.

Where they do not, the difference is a correction to apply to one host's rows, and it belongs in the report.

6

What the Timeline Does Not Say

Sessions, commands and inference

Every step of the intrusion appears as an accepted login followed within a fraction of a second by a file event. The pattern is strong, and it is still an inference: auth.log records authentication, not commands, and no source collected here records what each session ran. A report that says deploy's session at 2026-12-02T19:27:11.439893Z created the binary is drawing a conclusion from timing and ownership, and should say so.

The commands might be recoverable from elsewhere. An interactive shell writes history when it exits, process accounting or audit logs record executions where they are enabled, and a monitoring artifact like lesson 0.8's could have captured each process as it started. None of those existed on ir-lab, which is common, and the honest timeline marks the gap rather than filling it.

SourcesWhere the commands would have been
Shell historyWritten by interactive shells on exit; none for deploy
Audit logauditd records executions; not installed on ir-lab
Process eventsA monitoring artifact like 0.8's; not deployed then
File timesPresent, and tied to sessions only by timing

The last row is what the timeline actually rests on for the commands, and it is enough to act on: three files appeared, each a fraction of a second after a login as deploy, owned by deploy, in deploy's own crontab or in a folder deploy can write.

The inference is strong and it is labeled. Velociraptor's Linux.Sys.BashHistory artifact collects shell history where it exists, and on a host where deploy had used an interactive shell it would be the first collection to add.

Access times deserve a word of their own, because they look like a record of reading and often are not. The filesystem on ir-lab is mounted with relatime, which updates a file's access time only when it is older than the modification or change time, or more than a day old, so repeated reads within a day leave no trace.

On update.sh the access time was set back with the modification time and says nothing at all. Treat Atime as weak evidence everywhere, and as no evidence where the mount options are unknown.

The timeline also says nothing about what is absent from it. The curl command inside the script points at an address that would show up in network logs or DNS caches if the script had run, and the cron entry schedules it every 15 minutes wherever the cron daemon runs. Neither a connection nor a run is in these sources.

On Debian and Ubuntu, the cron daemon logs each job it starts to syslog with the user and the command, so a host where cron was running would have a line for every run of update.sh, and those lines would extend this timeline past the last login into the period when the intruder was no longer connected.

On ir-lab the daemon was not running, the entry never fired, and the absence of those lines says exactly that and nothing more. Lesson 0.5's point about order of volatility applies here too: the questions a timeline raises are often answered by evidence that has to be collected before it expires.

7

Supertimelines in the GUI

Where merged timelines live

A notebook query like the one in section 3 is one way to build a timeline, and it has the advantage of showing exactly how each row was made. The GUI offers another.

The timeline blog describes events as having a timestamp, a message and data fields; a timeline is a named series of them, and a supertimeline is a set of timelines viewed together, with each one switched on or off and a time navigator above a table of events, shown in UTC.

Any result table can be added to a supertimeline with its Add to Timeline button, choosing which column is the timestamp and which is the message. For a timeline that has to leave Velociraptor, the binary ships Server.Utils.TimesketchUpload, which sends a supertimeline's components to a Timesketch server, where larger teams often do their timeline analysis together.

The Notebooks.Timelines template creates a notebook that holds a supertimeline to start from. A special timeline inside it, the annotations, is where an analyst copies the few events that matter and writes what they mean, which the blog calls the investigative timeline: the one the report is written from.

The same thing can be done in VQL with timeline_add(), which takes the supertimeline's name, a name for the child timeline, a query and the column to key on.

It has to run inside a notebook: called from the lab's API client, it refused with timeline_add: Notebook ID must be specified.

SupertimelineBuilding the same timeline in the GUI
TemplateNotebooks.Timelines creates a notebook with one
Add to TimelineOn any result table: pick Timestamp and Message
timeline_add()timeline, name, query, key.

Only inside a notebook

AnnotationsThe few events that matter, with notes: the report

Whatever route builds it, every row added carries the meaning problems of sections 4 and 5 into the view, so the reading still has to happen.

8

Asking an Assistant

Bringing the anomalies, not the task

Asked how to make a timeline in Velociraptor, an assistant described the template, the button and the view, which is accurate and would have produced the timeline in section 3 with both problems sorted into it.

Two times that do not fitCaptured: Claude Opus 5.5, 2 December 2026
  1. You

    How do I make a timeline in Velociraptor?

  2. Assistant

    Create a notebook from the Notebooks.Timelines template, then open the results of a collection, click Add to Timeline, and choose the timestamp column and message column. The supertimeline view will show all your timelines together in time order.

  3. You

    In a Velociraptor 0.77.4 notebook I merged auth.log SSH events, file Btime, Mtime and Ctime from glob(), and Linux.Sys.Pslist CreateTime, ordered by time. On ir-lab, /tmp/.cache/update.sh has Mtime 2025-06-01T08:00:00Z but Btime 2026-12-02T19:26:51.222247677Z and Ctime 2026-12-02T19:27:52.082251295Z, and kworkerd's CreateTime 2026-12-02T19:27:10Z is earlier than the SSH login at 2026-12-02T19:27:11.439893Z that started it. Explain both and tell me which times I can put in the report.

  4. Assistant

    The Mtime was set back, most likely with touch -d, which also sets Atime; Ctime cannot be set that way and records when the change was made, so the Ctime is the time of the backdating and the Btime is when the file was created. Report the Btime as creation and the Ctime as the time of the change, and note the Mtime as tampered. The process CreateTime is calculated from the boot time and the process start ticks and is reported to whole seconds, so it can read up to a second early; treat it as accurate to about a second and do not use it to order events that are less than a second apart.

  5. Velociraptor
    VQL3 rows
    SELECT OSPath, Btime, Mtime, Ctime, Atime
    FROM source(client_id='C.300791787c148acf', flow_id='F.DC872FP0CIC7O',
                artifact='Custom.Linux.Triage.Times/Files')
    OSPathBtimeMtimeCtimeAtime
    /tmp/.cache/kworkerd2026-12-02T19:27:11.510248883Z2026-12-02T19:27:11.513700367Z2026-12-02T19:27:11.513700367Z2026-12-02T19:27:11.514248884Z
    /tmp/.cache/update.sh2026-12-02T19:26:51.222247677Z2025-06-01T08:00:00Z2026-12-02T19:27:52.082251295Z2025-06-01T08:00:00Z
    /var/spool/cron/crontabs/deploy2026-12-02T19:27:31.790250089Z2026-12-02T19:27:31.792984558Z2026-12-02T19:27:31.792984558Z2026-12-02T19:27:31.792984558Z

    Four timestamps for each file the intruder left. One of these files has two dates from June 2025.

The second prompt carried the values that did not fit. With them, the reply identified the backdating and which clocks survive it, and the coarse process start time and how far to trust it, and answered the question that matters: which times can go in the report.

PromptThe prompt that brings the anomalies
In a Velociraptor 0.77.4 notebook I merged auth.log SSH events, file Btime, Mtime and Ctime from glob(), and Linux.Sys.Pslist CreateTime, ordered by time. On ir-lab, /tmp/.cache/update.sh has Mtime 2025-06-01T08:00:00Z but Btime 2026-12-02T19:26:51.222247677Z and Ctime 2026-12-02T19:27:52.082251295Z, and kworkerd's CreateTime 2026-12-02T19:27:10Z is earlier than the SSH login at 2026-12-02T19:27:11.439893Z that started it. Explain both and tell me which times I can put in the report.
  1. merged auth.log SSH events, file Btime, Mtime and Ctimesays which sources and which fields are in play
  2. Mtime 2025-06-01T08:00:00Zgives the values, so the answer can reason about them
  3. earlier than the SSH loginnames the impossible ordering instead of hiding it
  4. which times I can put in the reportasks for a decision about evidence, not a description

The saving was the explanation, quickly and in terms a report can use. It also volunteered the detail that touch sets the access time along with the modification time, which matched the evidence and explained why two clocks agreed on a date that the other two contradicted.

That agreement is exactly the kind of coincidence that persuades a reader who has not asked what set each clock. Seeing that two rows did not fit was the analyst's part, and it came from reading each row's meaning before trusting the sort.

What the report can say about update.sh
  1. HoldsIt was created during the intrusionBtime 2026-12-02T19:26:51.222247677Z, 0.1 s after an accepted login
  2. HoldsIts Mtime was set back after creationMtime 2025-06-01T08:00:00Z is before its own Btime
  3. HoldsThe backdating happened at the CtimeCtime 2026-12-02T19:27:52.082251295Z, 0.1 s after the last login
  4. Failsdeploy ran the touch commandno source records commands; it is inferred from timing and ownership
DecisionReport creation and backdating from Btime and Ctime, and the command as an inference with its basis.

The failing line is the one a report most often gets wrong by omission. The timing makes deploy's session the likely author of the touch, and the report should say likely, and why. The other three lines are the kind a report can state flatly, because each rests on a clock the intruder could not set, read against a log that recorded the sessions.

Do

Practice

Which times go in the report?
your own Velociraptor

The scenario holds the merged timeline, the file timestamps and the SSH events from ir-lab, and a draft line saying the script has been there since June 2025. Decide which times the report can rely on.

Then make the evidence yourself. On a Linux machine with Velociraptor, create a file, wait a minute, set its date back with touch -d, and collect its times with glob() or stat(): compare Btime, Mtime, Ctime and Atime. Start a process from a copied binary and compare its Pslist CreateTime with the binary's Btime.

A timeline is rows from many sources in one order, and each row's time means what its source made it mean: a log write, an inode event, a value an ordinary user can set, an estimate accurate to a second.

Sort first, then read every row for meaning and precision, treat what does not fit as a finding, and label inference as inference. Lesson 0.10 closes the module by acting on what a timeline like this one shows: containing the host, removing what the intruder left, and doing it across a fleet.

Resources

Velociraptor changes quickly; where its documentation and this lesson disagree, the documentation is newer.

Stuck? Spotted an error?