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
| Part | Meaning |
|---|---|
<36> | PRI = facility × 8 + severity: facility 4 (security), severity 4 (warning) |
1 | version of the format |
- | timestamp (empty in leyoNET, the simulation has no clock time; the server notes the time of receipt) |
Router | name of the device |
leyonet | reporting program |
SSHFAIL | identifier of the message (MSGID) |
[leyonet@32473 …] | structured data; 32473 is the number for examples (RFC 5612) |
| rest | text 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):
| Value | Name | Meaning |
|---|---|---|
| 0 | Emergency | system unusable |
| 1 | Alert | act immediately |
| 2 | Critical | critical condition |
| 3 | Error | error |
| 4 | Warning | warning, e.g. port security violation |
| 5 | Notice | normal but significant, e.g. interface up again |
| 6 | Informational | information |
| 7 | Debug | troubleshooting, 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” 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
| Protocol | Layer | Simplification in the simulation |
|---|---|---|
| Syslog | 7 | Meldungen ü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 |