← Back to all lessons

05 / Investigation / 30 min READ + PRACTICE

Logs, timelines and evidence.

Parse local security logs, correlate events and preserve timestamps and provenance.

Practice boundaryUse your own devices, your isolated practice VM or 127.0.0.1. Get explicit authorization for any other system.

Preserve the original

Copy practice logs before analysis, note where they came from, and hash the copy. Normalize time zones before building a timeline. Do not silently edit the original to make events look more consistent.

Parse a tiny dataset

Use a fabricated log with a timestamp, event type and user. Count repeated failed logins by account or source without storing real credentials. Python collections.Counter works well for small exercises.

LAB TERMINAL / EXAMPLE
from collections import Counter
events = ['login_failed demo', 'login_ok demo', 'login_failed guest']
print(Counter(line.split()[0] for line in events))

Separate fact from inference

A failed login is an observed event; the identity or motive of the person behind it is not established by that line alone. Correlate logs, note missing data and keep confidence statements explicit.

HANDS-ON EXERCISE

Try it in your lab

Build a three-event timeline from invented logs and label each item as observation or interpretation.

CHECKPOINT

Make sure it clicks

Why does converting timestamps to a consistent timezone matter?

TRY WITH OPENCODE

A prompt you can adapt

Write a parser for these synthetic security logs and tests for malformed timestamps. Produce counts without printing personal data.
How to set up OpenCode ↗
Your progress stays in this browser only.