MODULE 3
π‘οΈ Certified SOC Analyst Level 2
Advanced Log Management and Analysis
Module Introduction
Welcome to Module Three of your Certified Security Operations Centre Analyst Level 2 course! In this module, we will explore advanced log management and analysis. You will learn how to collect, manage, and analyze logs from various sources to detect threats.
Think of this module as learning the language of your systems. Logs are the digital footprints left by users, applications, and systems. By the end of this module, you will be able to analyze logs to identify malicious activity.
π‘ What you will learn: Log management importance and approaches, local logging practices (Windows, Linux, Mac), firewall, router, web server, database, and email logs, centralised logging implementation, and statistical and behavioural anomaly detection.
Learning Objectives
By the end of this module, you will be able to:
- Understand log management importance and approaches.
- Implement local logging practices (Windows, Linux, Mac).
- Analyze firewall, router, web server, database, and email logs.
- Implement centralised logging.
- Apply statistical and behavioural anomaly detection.
Warmβup Story
Kemi's Log Analysis Success
Kemi was a Tier 2 SOC analyst at a bank in Lagos. She received an alert about unusual network activity. She started analyzing logs from the firewall, web server, and database.
She identified a pattern of suspicious requests to the web server. She used statistical analysis to detect anomalies and identified a potential SQL injection attack. Her quick analysis helped the team block the attack.
Kemi learned that log analysis is essential for detecting and responding to threats. She now uses logs to investigate every incident.
Main Lessons
Lesson 1: Introduction to Log Management
Definition: Log management is the process of collecting, storing, and analyzing logs from various sources.
Why it is important: Logs provide a record of activity on systems and networks, making them essential for detecting and investigating threats.
- Realβlife example: A company collects logs from firewalls to detect intrusions.
- School example: A school collects logs from student computers.
- Home example: A family checks logs from their home router.
- Nigerian example: A bank collects logs from ATMs.
π Mini summary: Log management is the process of collecting, storing, and analyzing logs to detect threats.
Lesson 2: Log Management Approaches
Definition: There are different approaches to log management.
- Centralized Logging: Logs are sent to a central server.
- Distributed Logging: Logs are stored locally on each system.
- Hybrid Logging: A combination of centralized and distributed.
π Mini summary: Log management approaches include centralized, distributed, and hybrid.
Lesson 3: Local Logging Practices β Windows
Definition: Windows provides several logging mechanisms, including Event Logs, Sysmon, and PowerShell logs.
- Windows Event Logs: Record system, application, and security events.
- Sysmon: Provides detailed system monitoring.
- PowerShell Logs: Record PowerShell activity.
π Mini summary: Windows logging includes Event Logs, Sysmon, and PowerShell logs.
Lesson 4: Local Logging Practices β Linux
Definition: Linux provides several logging mechanisms, including syslog, rsyslog, and auditd.
- syslog: A standard for log collection.
- rsyslog: An enhanced version of syslog.
- auditd: The Linux audit system.
π Mini summary: Linux logging includes syslog, rsyslog, and auditd.
Lesson 5: Local Logging Practices β Mac
Definition: Mac provides logging mechanisms through the unified logging system.
- Unified Logging: macOS system logs.
- Apple System Log (ASL): Legacy logging system.
- Console App: Tool for viewing logs.
π Mini summary: Mac logging includes unified logging, ASL, and the Console app.
Lesson 6: Firewall Logs
Definition: Firewall logs record traffic that passes through a firewall.
- What to look for:
- Blocked traffic: Attempts to access blocked services.
- Allowed traffic: Unusual traffic patterns.
- Port scanning: Multiple connection attempts.
- Source/destination IPs: Malicious IP addresses.
π Mini summary: Firewall logs record traffic and can reveal blocked traffic, port scanning, and malicious IPs.
Lesson 7: Router Logs
Definition: Router logs record activity on network routers.
- What to look for:
- Routing changes: Unauthorized changes to routing tables.
- Interface errors: Network issues.
- Login attempts: Failed or suspicious logins.
π Mini summary: Router logs can reveal routing changes, interface errors, and suspicious logins.
Lesson 8: Web Server Logs
Definition: Web server logs record requests to web servers.
- What to look for:
- 404 errors: Attempts to access non-existent pages.
- SQL injection attempts: Suspicious SQL keywords.
- XSS attempts: Suspicious script tags.
- Unusual user agents: Non-standard browsers.
π Mini summary: Web server logs can reveal 404 errors, SQL injection attempts, XSS attempts, and unusual user agents.
Lesson 9: Database Logs
Definition: Database logs record activity on databases.
- What to look for:
- Failed login attempts: Suspicious access attempts.
- Large queries: Unusual data requests.
- SQL injection: Suspicious SQL commands.
- Privilege changes: Unauthorized permission changes.
π Mini summary: Database logs can reveal failed logins, large queries, SQL injection, and privilege changes.
Lesson 10: Email Logs
Definition: Email logs record email traffic and activity.
- What to look for:
- Spam: Unusual email volume.
- Phishing: Suspicious email content.
- Bounce errors: Failed email deliveries.
- Login attempts: Suspicious access to email accounts.
π Mini summary: Email logs can reveal spam, phishing, bounce errors, and suspicious logins.
Lesson 11: Centralised Logging
Definition: Centralised logging is the process of sending logs from multiple sources to a central server.
- Benefits:
- Easier analysis: All logs in one place.
- Better correlation: Identify patterns across sources.
- Improved security: Logs are protected.
- Tools:
- ELK Stack: Elasticsearch, Logstash, Kibana.
- Splunk: Commercial SIEM.
- Graylog: Open-source log management.
π Mini summary: Centralised logging collects logs from multiple sources to a central server for easier analysis and correlation.
Lesson 12: Statistical and Behavioural Anomaly Detection
Definition: Anomaly detection identifies unusual patterns in logs.
- Statistical Anomaly Detection:
- Baseline: Establish normal behaviour.
- Thresholds: Set limits for normal activity.
- Alerts: Trigger when limits are exceeded.
- Behavioural Anomaly Detection:
- User behaviour: Identify unusual user activity.
- System behaviour: Identify unusual system activity.
- Network behaviour: Identify unusual network activity.
π Mini summary: Statistical and behavioural anomaly detection identifies unusual patterns in logs using baselines, thresholds, and behavioural analysis.
Key Vocabulary
Log Management: Collecting, storing, and analyzing logs.
Centralised Logging: Logs sent to a central server.
Distributed Logging: Logs stored locally.
Sysmon: Windows system monitoring tool.
auditd: Linux audit system.
Unified Logging: macOS logging system.
Firewall Logs: Traffic records.
Web Server Logs: Web request records.
Database Logs: Database activity records.
Anomaly Detection: Identifying unusual patterns.
Important Concepts
- Log management is essential for detecting and investigating threats.
- Local logging practices vary by operating system.
- Firewall, router, web server, database, and email logs provide valuable insights.
- Centralised logging simplifies analysis and correlation.
- Statistical and behavioural anomaly detection identifies unusual patterns.
Step-by-Step Explanations
How to Implement Centralised Logging
- Choose a logging tool (ELK Stack, Splunk, Graylog).
- Configure log sources to send logs to the central server.
- Set up log collection and storage.
- Create dashboards for log analysis.
- Set up alerts for suspicious activity.
How to Detect Anomalies in Logs
- Establish a baseline of normal activity.
- Set thresholds for normal activity.
- Monitor logs for deviations from the baseline.
- Investigate anomalies.
- Update baselines and thresholds as needed.
Real-Life Examples
- In a business: A company uses centralised logging to detect intrusions.
- In a school: A school uses logs to monitor student activity.
- In a hospital: A hospital uses logs to protect patient data.
- In Nigeria: A bank uses logs to detect fraud.
Nigerian Examples
- A bank in Lagos uses centralised logging to detect intrusions.
- A telecom company in Abuja uses logs to monitor network activity.
- A hospital in Kano uses logs to protect patient data.
- A government agency in Enugu uses logs for security monitoring.
Fun Examples Children Can Relate To
- A diary recording daily activities (logs).
- A librarian organizing books (log management).
- A detective looking for clues (log analysis).
- A weather report (anomaly detection).
Everyday Examples
- A call log on your phone (logs).
- Organizing your files (log management).
- Checking your bank statement (log analysis).
- Noticing unusual activity (anomaly detection).
Teacher Notes
- Emphasize the importance of log management.
- Use real-world examples to illustrate concepts.
- Discuss the role of centralised logging.
- Encourage students to practice log analysis.
Parent Tips
- Help your child understand the importance of logs.
- Discuss how logs can detect threats.
- Encourage them to think about log analysis.
- Support their interest in cybersecurity careers.
Interesting Facts
- Logs are often the first evidence of a security incident.
- Centralised logging was first introduced in the 1990s.
- Anomaly detection is used in many security tools.
- ELK Stack is used by many organizations for log analysis.
Did You Know?
Did you know? Logs can be used to detect insider threats.
Did you know? Centralised logging improves security by protecting logs.
Did you know? Anomaly detection can identify zero-day attacks.
Remember This
- Log management is essential for detecting and investigating threats.
- Local logging practices vary by operating system.
- Firewall, router, web server, database, and email logs provide valuable insights.
- Centralised logging simplifies analysis and correlation.
- Statistical and behavioural anomaly detection identifies unusual patterns.
Common Mistakes
- Not collecting enough logs: Incomplete data leads to missed threats.
- Not centralising logs: Distributed logs are harder to analyze.
- Not analyzing logs: Logs are useless without analysis.
- Ignoring anomalies: Anomalies can indicate threats.
- Not updating baselines: Baselines must be updated regularly.
Best Practices
- Collect logs from all sources.
- Centralise logs for easier analysis.
- Analyze logs regularly.
- Investigate anomalies.
- Update baselines regularly.
Comparison: Centralised vs Distributed Logging
| Feature | Centralised | Distributed |
| Log location | Central server | Local systems |
| Analysis | Easier | Harder |
| Security | Higher | Lower |
| Best for | Large organizations | Small organizations |
Comparison: Log Sources
| Source | Description | Key Insights |
| Firewall | Traffic records | Blocked traffic, port scanning |
| Router | Network activity | Routing changes, interface errors |
| Web Server | Web requests | 404 errors, SQL injection |
| Database | Database activity | Failed logins, large queries |
| Email | Email traffic | Spam, phishing |
End-of-Module Summary
Congratulations! You have completed Module Three. You now know:
- The importance of log management.
- Local logging practices for Windows, Linux, and Mac.
- How to analyze firewall, router, web server, database, and email logs.
- How to implement centralised logging.
- How to apply statistical and behavioural anomaly detection.
You are now ready to move on to Module Four, where you will learn about Incident Detection with SIEM.
Frequently Asked Questions
- What is log management? Collecting, storing, and analyzing logs.
- What is centralised logging? Logs sent to a central server.
- What is distributed logging? Logs stored locally.
- What are Windows logs? Event Logs, Sysmon, PowerShell logs.
- What are Linux logs? syslog, rsyslog, auditd.
- What are Mac logs? Unified logging, ASL.
- What are firewall logs? Traffic records.
- What are web server logs? Web request records.
- What are database logs? Database activity records.
- What is anomaly detection? Identifying unusual patterns.
Review Questions
- What is log management?
- What is centralised logging?
- What is distributed logging?
- What are Windows logs?
- What are Linux logs?
- What are Mac logs?
- What are firewall logs?
- What are web server logs?
- What are database logs?
- What is anomaly detection?
- What is the difference between centralised and distributed logging?
- What is the difference between statistical and behavioural anomaly detection?
- What are the benefits of centralised logging?
- What are the tools for centralised logging?
- How do you implement centralised logging?
Fill-in-the-Blank Exercises
- __________ is the process of collecting, storing, and analyzing logs.
- __________ logging sends logs to a central server.
- __________ logging stores logs locally.
- Windows logs include Event Logs, Sysmon, and __________ logs.
- Linux logs include syslog, rsyslog, and __________.
- Mac logs include unified logging and __________.
- __________ logs record traffic that passes through a firewall.
- __________ logs record requests to web servers.
- __________ logs record activity on databases.
- __________ detection identifies unusual patterns in logs.
True or False
- Log management is not important. (False)
- Centralised logging collects logs from multiple sources. (True)
- Distributed logging stores logs on a central server. (False)
- Windows logs include Event Logs. (True)
- Linux logs include syslog. (True)
- Mac logs include auditd. (False)
- Firewall logs record traffic. (True)
- Web server logs record database queries. (False)
- Database logs record web requests. (False)
- Anomaly detection identifies unusual patterns. (True)
Multiple Choice Questions
- What is log management?
a) Collecting, storing, and analyzing logs b) A type of software c) A hardware device d) A threat
Answer: a
- What is centralised logging?
a) Logs sent to a central server b) Logs stored locally c) A type of software d) A hardware device
Answer: a
- What is distributed logging?
a) Logs stored locally b) Logs sent to a central server c) A type of software d) A hardware device
Answer: a
- What are Windows logs?
a) Event Logs, Sysmon, PowerShell logs b) syslog, rsyslog c) Unified logging d) None
Answer: a
- What are Linux logs?
a) syslog, rsyslog, auditd b) Event Logs c) Unified logging d) None
Answer: a
- What are Mac logs?
a) Unified logging, ASL b) syslog, rsyslog c) Event Logs d) None
Answer: a
- What are firewall logs?
a) Traffic records b) Web request records c) Database activity records d) None
Answer: a
- What are web server logs?
a) Web request records b) Traffic records c) Database activity records d) None
Answer: a
- What are database logs?
a) Database activity records b) Traffic records c) Web request records d) None
Answer: a
- What is anomaly detection?
a) Identifying unusual patterns b) A type of software c) A hardware device d) A threat
Answer: a
- What is the difference between centralised and distributed logging?
a) Centralised sends logs to a central server; distributed stores logs locally b) They are the same c) Distributed sends logs to a central server; centralised stores logs locally d) None
Answer: a
- What is the difference between statistical and behavioural anomaly detection?
a) Statistical uses baselines; behavioural uses user behaviour b) They are the same c) Behavioural uses baselines; statistical uses user behaviour d) None
Answer: a
- What are the benefits of centralised logging?
a) Easier analysis, better correlation, improved security b) Only easier analysis c) Only better correlation d) None
Answer: a
- What are the tools for centralised logging?
a) ELK Stack, Splunk, Graylog b) Only ELK Stack c) Only Splunk d) None
Answer: a
- How do you implement centralised logging?
a) Choose a tool, configure log sources, set up collection, create dashboards, set up alerts b) Only choose a tool c) Only configure log sources d) None
Answer: a
Matching Exercises
Match the term on the left with its description on the right.
| Term | Description |
| 1. Centralised Logging | A. Logs stored locally |
| 2. Distributed Logging | B. Logs sent to a central server |
| 3. syslog | C. Linux logging system |
| 4. Sysmon | D. Windows monitoring tool |
| 5. auditd | E. Linux audit system |
Answers: 1-B, 2-A, 3-C, 4-D, 5-E
Short Answer Questions
- What is the difference between centralised and distributed logging?
- What is the difference between statistical and behavioural anomaly detection?
- What are the benefits of centralised logging?
- What are the tools for centralised logging?
- How do you implement centralised logging?
Scenario-Based Exercises
- Scenario: You are a SOC analyst. You need to implement centralised logging. What steps would you take?
- Scenario: You notice unusual activity in your firewall logs. How would you investigate?
- Scenario: You need to detect anomalies in your logs. How would you do it?
Group Activity
In groups of 3-4, set up a centralised logging environment using ELK Stack or Graylog. Collect logs from multiple sources and create dashboards. Present your setup to the class.
Individual Activity
Write a one-page report on a log analysis tool of your choice (ELK Stack, Splunk, or Graylog). Include its features and use cases.
Classroom Discussion Questions
- Why is log management important for SOCs?
- What are the challenges of log management?
- How can centralised logging improve security?
- What is the role of anomaly detection in log analysis?
- How can organizations improve their log management practices?
Mini Project
Project: "Log Management Implementation." Implement a centralised logging solution for a fictional organization. Include log collection, analysis, and dashboards. Present your solution to the class.
Practical Assignment
Set up a centralised logging environment using ELK Stack or Graylog. Collect logs from at least two sources. Create a dashboard to visualize the logs.
Challenge Exercise
Research the differences between ELK Stack and Splunk. Write a one-page summary of the differences and which is better for specific use cases.
Quiz Answers
Fill-in-the-Blank Answers:
- Log management
- Centralised
- Distributed
- PowerShell
- auditd
- ASL
- Firewall
- Web server
- Database
- Anomaly
True or False Answers: 1-F, 2-T, 3-F, 4-T, 5-T, 6-F, 7-T, 8-F, 9-F, 10-T
Key Takeaways
- Log management is essential for detecting and investigating threats.
- Local logging practices vary by operating system.
- Firewall, router, web server, database, and email logs provide valuable insights.
- Centralised logging simplifies analysis and correlation.
- Statistical and behavioural anomaly detection identifies unusual patterns.
Preparation for the Next Module
In Module Four, you will learn about Incident Detection with SIEM. You will explore SIEM architecture, deployment, and use case management.