Log analysis & basic forensics

Reconstructing an attack from auth logs, web logs, and cloud trail; preserving evidence; timeline building. The core hands-on SOC skill.

About 24 min read3-question knowledge check

The mental model

Log analysis is reading a crime scene backwards from the footprints, not watching the crime happen. You almost never see the attacker in the act; you arrive after, holding a pile of timestamped fragments — auth logs, web access logs, cloud audit trails — and your job is to reconstruct a coherent story: who got in, when, how, what they touched, and whether they are still inside.

The analogy that sticks: an air-crash investigation. The black box does not tell you "the plane crashed because of X." It gives you thousands of discrete, correlated readings, and the investigator's skill is *sequencing* them into a timeline that survives cross-examination. A single log line is meaningless. 200 GET /api/user/1024 is nothing on its own. The same line, correlated with a login from a new ASN four seconds earlier and 1,600 similar requests iterating /api/user/1..2000 over the next minute, is a data-exfiltration IDOR sweep.

The one idea that explains most beginner confusion: detection and reconstruction are different jobs. A SIEM alert answers "did something suspicious happen?" Forensics answers "prove exactly what happened, in order, with evidence that holds up." That is why the discipline obsesses over three things a beginner ignores: a single normalized clock (everything in UTC, or your timeline is fiction), a pivot (the one field — source IP, user ID, session token, request ID — that links events across otherwise unrelated log sources), and evidence integrity (a hash and a chain of custody, so no one can argue you altered the logs after the fact).

The full lesson continues with 15 more sections
  • Deep dive
  • Internal architecture
  • Real-world use cases
  • Best practices
  • Common mistakes
  • Performance
  • Security
  • Production troubleshooting
  • Advantages & disadvantages
  • Alternatives
  • Interview expectations
  • Interview questions
  • Facts to remember
  • Cheat sheet
  • Quick revision