DAY 4 · MODULE 4

Build a Python Security Log Analyzer

Use Python dictionaries and loops to summarize repeated authentication failures.

65 minBrowser Python log analyzerIn Progress
01 · LEARN

Understand the concept

File/log parsing
String splitting
Dictionaries
Counters
Thresholds
Alerts
Why this matters

Automation helps defenders turn large volumes of repetitive log events into actionable summaries.

02 · VISUALIZE

See what happens internally

Interactive visualization loads here.
Stage 2 Interactive Lab

Operate this concept in a larger realtime simulation and save your practical score.

Open Interactive Lab
03 · PRACTICAL

Perform the activity

  1. Open the browser Python log-analysis exercise.
  2. Count failures by IP.
  3. Change the alert threshold.
  4. Add a second suspicious IP and verify output.
Workshop safety: Activities involving scanning, web vulnerabilities or security testing must be performed only on the assigned training target or intentionally vulnerable lab.
04 · CODE / COMMANDS

Read and understand the working example

failures = {}
# count LOGIN_FAILED events by source IP
Open in Browser Code Lab
05 · CHALLENGE

Prove your understanding

Modify the analyzer so it prints ALERT only when an IP has three or more failed logins.

Login to Save Progress