Lesson 02 Log Analysis & Pattern Discovery
Theme:

Answers

Reference answers for Lesson 02 lab exercises and homework tasks.

AI outputs are non-deterministic. These answers describe the expected findings, not exact wording.

Part 1 — Lab Answers

Exercise 1 — SSH Brute Force & Lateral Movement

Expected findings

Exercise 2 — Web Server Recon

Expected findings

The exploitable finding

Whichever 200-response was against a path that should not exist in production.

Exercise 3 — Application Debug-Log Mining

Expected findings

Top exploit value

The credential is almost always #1 because it is instantly reusable.

Exercise 4 — Windows Event-Log Correlation

Expected attack chain

  1. 4625 burst (failed logons) — brute force or spray begins.
  2. 4624 type 3 or type 10 — successful remote logon.
  3. 4672 — special privileges assigned (admin context).
  4. 4688 — PowerShell or cmd child process spawned.
  5. 7045 or 4720 — persistence via service install or user creation.
  6. 1102 — audit log cleared (defense evasion).

A good analysis places these events on a unified timeline with timestamps.

Final Exercise — Cross-Log Correlation

Expected cross-source finding

An IP, username, or timestamp cluster that appears in at least two of the four logs. Typical example: the SSH successful-login IP also appears as the source of the Apache 200 on the backdoor path, and the debug log shows an exception around the same timestamp.


Part 2 — Homework Answers

Task 1 — Detection Rule Pack

Expected rules

Good rules include a falsepositives section that lists realistic benign triggers (e.g., "SRE rotating logs manually").

Task 2 — Blind-Spot Analysis

Typical blind spots

Task 3 — Correlation Script

Expected shape

A ~100-line Python script with three regex pools (IPv4, usernames, ISO timestamps), a dictionary counting which files each token appears in, and a final print of any token with file-count >= 2. The bonus timeline should use simple dict bucketing by hour and print a bar of # characters per bucket.