DAY 4 · MODULE 4
Build a Python Security Log Analyzer
Use Python dictionaries and loops to summarize repeated authentication failures.
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.
See what happens internally
Interactive visualization loads here.
Stage 2 Interactive Lab
Open Interactive LabOperate this concept in a larger realtime simulation and save your practical score.
Perform the activity
- Open the browser Python log-analysis exercise.
- Count failures by IP.
- Change the alert threshold.
- 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.
Read and understand the working example
failures = {}
# count LOGIN_FAILED events by source IPOpen in Browser Code LabProve your understanding
Modify the analyzer so it prints ALERT only when an IP has three or more failed logins.