Day-4: Log Analysis Basics — Detect Network Port Scans with UFW
Challenge Description
Background & Detection Concepts
Lab — Practical Simulation
A. Preparation (on Ubuntu victim) — make logs actionable
B. Attacker (Kali) — controlled scanning probes
C. Observe & collect evidence (on Ubuntu victim)
1) Live monitoring
2) Quick grep for attacker IP:
3) Extract representative log lines (for submission)
D. Analysis commands — quick detective work
Counts per source IP (how noisy is each host)
Unique destination ports per source (port diversity)
Alert one-liner: >20 blocked attempts in last 200 lines
Simple Python summary (counts per IP)
E. Evidence & write-up (what to capture for submission)
F. Remediation commands (immediate)
Last updated