Перейти к основному содержимому
Security Monitoring & Log Collection Pipelines
Урок 2 из 13

Security Monitoring & Log Collection Pipelines

Learn how log collection pipelines move telemetry from Linux and Windows hosts to central storage, how to configure reliable forwarding and normalization, and how to detect blind spots.

Средний 24 мин Blue Team / SOC
Этого урока пока нет на выбранном языке — показана версия на другом языке. Перевод готовится.

Цели обучения

  • Explain the four stages of a security log collection pipeline from host generation to SIEM storage
  • Compare native host logging with Sysmon, rsyslog, and Beats collectors
  • Configure reliable forwarding with disk-backed queues and UTC time synchronization
  • Identify telemetry blind spots caused by broken collectors, dropped packets, or misconfigured filters

Рекомендуется заранее: Основы синей команды, архитектура SOC и задачи аналитиков

#Why this matters

SOC analysts triage alerts and reconstruct incidents using recorded evidence, yet that evidence does not reach a SIEM automatically. On an unmanaged host, logs stay on local disks where attackers can delete them or rotation overwrites them within days, and no analyst can inspect hundreds of servers manually during an intrusion.

A monitoring pipeline ships telemetry continuously from endpoints to central storage. When a pipeline is misconfigured, dashboards look green while critical servers or event channels go silent.

#Anatomy of a log pipeline

Every central monitoring pipeline passes events through four distinct stages. Breaking a pipeline into stages helps you pinpoint where data is delayed, altered, or dropped.

  1. GenerateOS audit policy, Sysmon, sshd, web server
  2. Collectrsyslog, Filebeat, Winlogbeat
  3. Transport & ParseTLS forwarding, UTC alignment, JSON fields
  4. Store & AlertSIEM index, retention tiers, detection rules
  1. Generate: Applications and operating system kernels emit records when logins, process launches, or network connections occur.
  2. Collect: Lightweight agents such as rsyslog or Elastic Beats read local files, system journals, or Windows Event channels.
  3. Transport and parse: Forwarders send events over encrypted channels (such as TLS syslog on port 6514 or Beats over TLS) to parsers that extract structured fields like src_ip and user.
  4. Store and alert: The SIEM indexes parsed events, applies retention policies, and runs detection rules against the normalized data.

#Endpoint and host telemetry sources

Different operating systems store events in different formats, so defenders pair built-in logging with specialized agents to capture security-relevant detail.

Source Primary role Common location or channel Typical collector
Linux auth and syslog Logins, sudo, daemon messages /var/log/auth.log, /var/log/secure, systemd journal rsyslog, Filebeat
Windows Security Log Logons (4624, 4625), account changes Security event channel Winlogbeat, Windows Event Forwarding
Sysmon Process command lines (1), network (3), DNS (22) Microsoft-Windows-Sysmon/Operational Winlogbeat
Network and proxy logs Flows, DNS queries, HTTP requests Appliance syslog or local log file rsyslog, Filebeat

Default Windows logs record authentication well, but miss full process context unless command-line auditing or Sysmon is enabled. Sysmon logs process hashes, parent IDs, outbound sockets (Event ID 3), and DNS lookups (Event ID 22). Tune its XML config to exclude noisy background tools while keeping suspicious paths.

On Linux, rsyslog reads local logs and forwards them via RFC 5424 syslog. Unlike UDP port 514, which drops packets under load and sends plaintext, TCP with TLS and a disk-assisted queue preserves delivery during outages:

text
# /etc/rsyslog.d/50-siem-forward.conf
action(
  type="omfwd"
  target="siem.lab.local"
  port="6514"
  protocol="tcp"
  queue.type="LinkedList"
  queue.filename="siem_fwd"
  queue.saveOnShutdown="on"
  action.resumeRetryCount="-1"
)

Before restarting rsyslog, validate configuration syntax and inspect the service status so a typo does not stop local logging:

Validating an rsyslog pipeline configuration on a lab host
$ sudo rsyslogd -N1
rsyslogd: version 8.2312.0, config validation run (level 1), master config /etc/rsyslog.conf
rsyslogd: End of config validation run. Bye.
$ sudo systemctl restart rsyslog
$ ss -tnp | grep 6514
ESTAB 0 0 10.10.10.25:49214 10.10.10.10:6514 users:(("rsyslogd",pid=1842,fd=7))

#Parsing, time sync, and data quality

Collecting raw lines is only half the job; analysts and detection rules rely on normalization and accurate timestamps.

  • Normalization: Converting unstructured syslog lines and Windows XML events into a shared JSON field structure lets one rule search source.ip across firewalls, Linux SSH logs, and Windows RDP logs at the same time.
  • Time synchronization: Every host and collector must run NTP and emit timestamps in UTC (or include an explicit timezone offset). If a database server drifts by seven minutes, cross-host attack timelines appear out of order.
  • Selective filtering: Dropping repetitive load-balancer health checks saves storage, but filtering out auth.log or Sysmon Event ID 1 creates blind spots an attacker can exploit unnoticed.

#Common mistakes

  • Using UDP port 514: Unreliable delivery drops security events under load and exposes payloads in plaintext.
  • Omitting collector health alerts: Teams monitor attacks but forget to alert when a forwarder stops checking in.
  • Shipping unaligned local timezones: Inconsistent clocks break cross-host correlation during incident triage.
  • Leaving Sysmon untuned: Unfiltered noise exhausts SIEM quotas and hides real alerts.

#Summary

  • A log pipeline moves telemetry through four stages: generation, collection, transport and parsing, and storage and alerting.
  • Pair native OS logs (auth.log, Windows Security) with Sysmon for process and network visibility, using rsyslog or Beats with TLS and disk-assisted queues.
  • Normalize fields into structured schemas and enforce UTC via NTP across every host so events align reliably.
  • Monitor the pipeline itself for stalled agents, permission changes, and missing channels so attackers cannot operate inside silent gaps.

Проверка знаний

Войдите, чтобы проходить тест, завершать уроки и сохранять прогресс. Войти в систему

Практика: проверьте свои знания