Endpoint
Logging
Understand how event logs and syslog capture activity on endpoints, giving defenders the visibility they need to detect and investigate threats.
What Is Endpoint Logging?
Every action on a computer: a user signing in, a program starting, or a file being modified: generates a record. Endpoint logging is the practice of systematically capturing, storing, and organizing those records so security teams can trace what happened, when, and who was responsible.
Why Logging Matters
Anatomy of a Log Entry
Windows Event Logs
Windows stores logs in a structured binary format (.evtx) managed by the Event Log service. They are viewed through Event Viewer (eventvwr.msc) and can be queried programmatically with PowerShell or wevtutil.
The Syslog Protocol
Syslog is a standard protocol (RFC 5424) used by Linux, macOS, network devices, and many applications to send log messages to a centralized server. Unlike Windows Event Logs, syslog messages are plain text and follow a universal format.
Event Logs vs Syslog
| Windows Event Logs | Syslog | |
|---|---|---|
| Format | Structured binary (.evtx) | Plain text (RFC 5424) |
| Platform | Windows only | Linux, macOS, routers, firewalls |
| Viewer | Event Viewer (GUI) / PowerShell | Text editors, grep, log aggregators |
| Transport | Local + WEF forwarding | UDP 514, TCP 514, TLS 6514 |
| Severity | 5 levels (Critical to Info) | 8 levels (Emergency to Debug) |
| Centralization | Windows Event Forwarding (WEF) | rsyslog, syslog-ng, SIEM |
The Logging Pipeline
Key Log Sources on an Endpoint
How to Set Up Effective Logging
Example: Windows Security Log
Example: Syslog Entry Analysis
Example: Correlating Log Sources
Syslog Facility Codes
The facility code tells you which subsystem generated the message. Combined with severity, it forms the priority value in the syslog header (\( \text{Priority} = \text{Facility} \times 8 + \text{Severity} \)).
Common Mistakes
Question 1 of 5
Which Windows Event ID indicates a successful logon?
Question 2 of 5
Syslog uses severity levels numbered 0 through 7. Which severity level represents the most critical condition?
Question 3 of 5
What is the primary reason to forward endpoint logs to a centralized server?
Question 4 of 5
A syslog message has the priority value <38>. If the facility for "auth" is 4, and the priority formula is \( \text{Facility} \times 8 + \text{Severity} \), what is the severity level?
Question 5 of 5
Scenario: A security analyst reviewing morning alerts notices the following sequence in the SIEM:
1. 03:02 AM: Firewall log shows 200+ connection attempts from IP 198.51.100.22 to the RDP port (3389) of a server.
2. 03:08 AM: Windows Security Event ID 4624 (successful logon) for user "admin" from source IP 198.51.100.22, Logon Type 10.
3. 03:09 AM: Windows Security Event ID 4688 (new process) shows "cmd.exe" spawned by "admin".
4. 03:10 AM: EDR alert: PowerShell script downloading file from external URL.
Which statement best describes what this correlated sequence of events indicates?