Wiki DE Start in the browser

Wiki › Protocols

Syslog

Devices report events to a central syslog server: format following RFC 5424, transport over UDP 514. This makes it possible to prove later what happened when and where.

Layer
7 (Anwendung)
Standard
RFC 5424, RFC 5426, RFC 5612
See an example
See demo

Why a log?

A router remembers little, and whoever attacks it can delete their traces there. That is why routers, switches, firewalls and servers send their messages to a syslog server: a central place that collects everything with time and sender. If something stands out, you can look up what happened. In STRIDE this protects against repudiation (denial).

A message

<36>1 - Router leyonet - SSHFAIL [leyonet@32473 user="admin" from="192.168.10.66"] ssh failed login user admin from 192.168.10.66
PartMeaning
<36>PRI = facility × 8 + severity: facility 4 (security), severity 4 (warning)
1version of the format
-timestamp (empty in leyoNET, the simulation has no clock time; the server notes the time of receipt)
Routername of the device
leyonetreporting program
SSHFAILidentifier of the message (MSGID)
[leyonet@32473 …]structured data; 32473 is the number for examples (RFC 5612)
resttext of the message

Severities: 0 emergency, 1 alert, 2 critical, 3 error, 4 warning, 5 notice, 6 informational, 7 debug.

Severity levels

Every message has a severity from 0 to 7, smaller is more urgent (RFC 5424, Section 6.2.1):

ValueNameMeaning
0Emergencysystem unusable
1Alertact immediately
2Criticalcritical condition
3Errorerror
4Warningwarning, e.g. port security violation
5Noticenormal but significant, e.g. interface up again
6Informationalinformation
7Debugtroubleshooting, very many messages

Together with the facility (source, e.g. kernel or local application) it gives the PRI value at the start of every message: facility × 8 + severity. A server can, for example, keep only messages up to “warning”.

In leyoNET

  • Syslog server: computer → Advanced … → Services → Syslog, switch on “Syslog server”. The list of messages is shown there too.
  • Reporting: routers, firewalls and switches (with a management address) in the “Protection” tab or with logging host 192.168.10.50; computers under Services → Syslog.
  • Reported are SSH logins (SSHLOGIN, SSHFAIL), port security (PORTSEC), DHCP snooping (DHCPSNOOP), IP Source Guard (IPSG), full MAC table (MACFULL) and the guard's warnings (ARPSPOOF, SYNFLOOD, PORTSCAN).
  • In the packet list: filter udp.port == 514, the hex view shows the text.

How to do it in leyoNET

The same text as in the app’s help (F1 key).

Syslog

Syslog collects the messages of many devices in one place. The format is defined in RFC 5424, the transport over UDP 514 in RFC 5426.

  • A computer becomes the collector with the Syslog server service (device window → Services).
  • Routers, firewalls, switches (with a management address) and computers enter the syslog server under Protection or Services. On the command line: logging host 192.168.1.10.

Security-relevant events are reported: SSH logins (successful and refused), port security, DHCP snooping and the guard's warnings (ARP spoofing, SYN flood, port scan). Each message has a severity (0 = emergency to 7 = debug), the device name and an identifier (MSGID, e.g. SSHFAIL).

In STRIDE the R stands for Repudiation: Without a log it cannot be shown later who did what and when. The packets appear in the packet list, the bytes in the hex view.

See an example

  • Syslog: Who did that?

    An attacker in the company network guesses SSH passwords on the router. The strong password holds, and every failed attempt reaches the log server: with time, device and sender (syslog following RFC 5424 over UDP 514).

    Log server → Advanced … → Services → Syslog shows the “SSHFAIL” messages. Packet list with filter “udp.port == 514”, the hex view shows the text of the message.

    Watch live Project file

“Watch live” opens the network in leyoNET, the simulation runs in a loop. In the app you find it under File → Demo networks, with a step-by-step tour.

Practise

  • ★★★★☆ Who did that? Logging with syslog · 3 goals · Worksheet (German)

In leyoNET under Tools → Exercise catalogue. Every exercise checks itself.

What leyoNET simplifies

ProtocolLayerSimplification in the simulation
Syslog7Meldungen über UDP 514 mit PRI, Gerätename, MSGID und strukturierten Daten; TIMESTAMP als NILVALUE «-» (die Simulation kennt keine Uhrzeit); dieselbe MSGID höchstens einmal pro Sekunde je Gerät; kein TLS (RFC 5425), keine Weiterleitung zwischen Servern

Standards

  • RFC 5424 – The Syslog Protocol
  • RFC 5426 – Transmission of Syslog Messages over UDP
  • RFC 5612 – Enterprise Number for Documentation Use

Read on

Found a mistake or have an idea? Source of this page on GitHub.