Security Events Worth Logging
What you'll learn: You'll discover which specific system events are critical to capture in logs for effective security monitoring and incident response.
Why Not Log Everything?
Imagine logging is like a security camera system — you could record every doorway, hallway, and corner 24/7, but reviewers would drown in footage. Instead, you focus cameras on entry points, safes, and high-value areas. Similarly, logging everything creates noise; smart logging captures security-relevant events that reveal attacks, policy violations, or system compromises.
Critical Events to Log
Authentication Events
Log all login attempts (successful and failed), password changes, account lockouts, and privilege escalations. These reveal brute-force attacks, credential theft, and unauthorized access attempts. Example: multiple failed SSH login attempts followed by a success might indicate a compromised credential.
Authorization and Access Control
Capture attempts to access restricted resources, permission changes, and privilege grants/revocations. If a web user suddenly tries accessing admin endpoints or a process attempts reading files outside its scope, you want that recorded.
Configuration Changes
Log modifications to security policies, firewall rules, user accounts, installed software, and system configurations. Attackers often alter defenses after gaining access — these logs create an audit trail.
Anomalies and Security Tool Alerts
Record antivirus detections, intrusion detection alerts, system crashes, unexpected service restarts, and unusual network connections. These often indicate active attacks or exploitation attempts.
Practical Considerations
Focus on events that answer: Who did what, when, where, and what was the outcome? Avoid logging sensitive data like passwords or encryption keys directly. Balance security value against log volume based on your retention capabilities (remember lesson 1470: rotation and retention matter).
Key Takeaway: Prioritize logging authentication, authorization decisions, configuration changes, and security anomalies — these events provide the evidence trail needed to detect breaches, investigate incidents, and prove compliance with security policies.