Routers, switches and firewalls run no EDR agent, so their syslog, command accounting and configuration history are the only evidence of a compromise, and state-sponsored actors have spent years living on network devices because those records are rarely collected or reviewed. The 2024 and 2025 joint advisories on intrusions into telecommunications and other networks describe changed ACLs, new local accounts, redirected TACACS+ servers, tunnels and on-box packet capture, every one of which leaves a trace if logging is set up properly. This guide covers what to log on network devices, how to transport and protect it, how to detect unauthorised configuration change, and the detections and hunts that matter most. It is for SOC and detection engineers and network operations teams. Platform hardening is in the Edge Device Security Guide and the Network Device Management Plane Hardening Guide.
Key takeaways
- Three evidence streams, not one. Syslog shows events, AAA command accounting shows who typed what, and configuration archives show the resulting state. Collect all three off the device.
- The device is not the source of truth. CISA and partners advise holding approved configurations centrally, comparing them with running configurations often, and investigating every difference that lacks a change record.
- Protect the log path. Classic syslog over UDP has no integrity, confidentiality or replay protection; use TLS (RFC 5425, TCP 6514) or IPsec, and keep copies that cannot be altered.
- Known attacker changes are specific. ACL additions, SSH or HTTP on unusual high ports, new tunnels, SPAN sessions, packet captures on TCP/49 and changed AAA servers are concrete, detectable patterns.
- Silence is a signal. A device that stops sending logs, clears its buffer or disables logging should be treated as a possible compromise, not a monitoring fault.
What to collect from network devices
| Evidence stream | What it shows | Typical configuration (Cisco IOS XE examples) | Gaps |
|---|---|---|---|
| Syslog | Logins, configuration events, interface and routing changes, process and hardware events | logging host, logging trap 6, logging source-interface Loopback0, service timestamps log datetime msec show-timezone | Usually records that config changed, not the full command |
| AAA accounting (TACACS+) | Every exec session and command, with user and time | aaa accounting exec default start-stop group tacacs+; aaa accounting commands 15 default start-stop group tacacs+ (and levels 0 and 1) | Command accounting is not supported over RADIUS; lost if the AAA server address is changed |
| Configuration change log | Each configuration command, mode, user and time | archive, log config, logging enable, hidekeys, notify syslog (off by default; buffer 1 to 1,000 entries, default 100) | Commands applied from a file with copy are not logged |
| Configuration archive | Full running configuration over time | On-box archive path plus an off-box backup or network automation system pulling configs | On-box archives can be altered by an attacker with admin rights |
| Flow telemetry | Traffic to and from the device and through it | NetFlow or IPFIX exporters at key ingress and egress points | Sampling can miss low-volume management traffic |
| SNMP traps and polling | State changes, CPU and memory thresholds, configuration-changed traps | SNMPv3 with authentication and encryption only | v1 and v2c communities are cleartext and frequently abused |
| Integrity checks | Whether the running image matches the vendor's signed image | show software authenticity file, copy /verify | Point-in-time; needs scheduling |
On other platforms the same three streams exist under different names (for example Junos commit and login messages, or the system and configuration logs on firewalls). Set the remote trap level to informational (6), avoid debug (7) in production because of CPU cost, and turn off console and monitor logging. Time is critical for correlation: authenticate NTP (ntp authenticate with trusted keys) and log with millisecond timestamps and a time zone. See the NTP Security Guide and, for telemetry, the NetFlow and IPFIX Flow Telemetry Guide.
Syslog transport, format and protection
RFC 5424 defines the modern syslog format: a priority value (facility times 8 plus severity), version, timestamp, hostname, app name, process ID, message ID and structured data. Severities run from 0 (Emergency) to 7 (Debug); the local0 to local7 facilities (codes 16 to 23) are the ones network devices normally use. Many devices still emit the older RFC 3164 style, so parsers must handle both.
| Transport | Standard | Protection | When to use |
|---|---|---|---|
| UDP 514 | RFC 5426 | None: messages can be dropped, spoofed, modified or replayed | Only inside a dedicated out-of-band management network, and only where nothing better is supported |
| TCP | Vendor implementations | Reliable delivery, no confidentiality | When TLS is not supported but loss matters |
| TLS on TCP 6514 | RFC 5425 (updated by RFC 9662) | Confidentiality and integrity; mutual certificate authentication is the recommended default | Preferred wherever the device supports it |
| IPsec tunnel to collector | Device VPN features | Protects any syslog or SNMP traffic in transit | Older devices without syslog over TLS |
- Collectors: send to at least two collectors, use a fixed source interface (a loopback) so the source address is stable, and forward from collectors to the SIEM.
- Immutable copies: the joint guidance asks for off-site log copies that cannot be modified or deleted. Write-once object storage or a separate logging tenant achieves this.
- Local persistence: keep a local buffer and, where supported, persistent on-flash logging, so evidence survives a collector outage. Remember that an attacker with admin rights can clear both.
- Management plane separation: logs, AAA and SNMP should travel on the management VRF or out-of-band network, never across the data plane where an attacker can see or block them.
Detecting unauthorised configuration change
The single most valuable network device detection is "configuration changed without an approved change". There are three complementary ways to build it.
- Event-driven: alert on configuration events in syslog (on Cisco IOS, for example,
%SYS-5-CONFIG_Ifor a configuration session and%PARSER-5-CFGLOG_LOGGEDCMDfor each logged command whennotify syslogis set) and on TACACS+ command accounting records for configuration commands. Join to the change management system by device, user and time window. - State comparison: pull running configurations on a schedule (and on every configuration event), compare with the last approved version in your source of truth, and raise every diff. This catches changes made through paths that do not log, such as configuration applied from a file.
- Enforcement: re-apply the approved configuration on a schedule (for example with
configure replaceor an automation platform). CISA recommends frequent override so that unauthorised change cannot persist quietly.
Prioritise diffs by section. The joint advisory AA25-239A (August 2025) gives a clear list of what attackers changed on compromised devices:
| Configuration area | What to alert on | ATT&CK v20 |
|---|---|---|
| ACLs | New permit entries for external addresses, especially on management ACLs; the advisory notes attacker use of a list named access-list 20 (or 50 or 10) | T1686 Disable or Modify System Firewall |
| Management services | SSH on high non-default ports (22x22 or xxx22 patterns), HTTP or HTTPS on 18xxx ports, IOS XR host SSH on TCP 57722, re-enabled Telnet or HTTP server | T1571 Non-Standard Port, T1021.004 SSH |
| AAA | TACACS+ or RADIUS server address changed, new server group, weaker method list, local fallback added | T1556.004 Network Device Authentication |
| Local accounts and keys | New username entries, privilege 15 grants, SSH public keys added | T1136.001 Local Account, T1098.004 SSH Authorized Keys |
| Tunnels and routing | New GRE, mGRE or IPsec tunnels, static routes or route maps not in the design | T1572 Protocol Tunneling, T1599 Network Boundary Bridging |
| Traffic mirroring and capture | SPAN, RSPAN or ERSPAN sessions; monitor capture starts, especially filtering TCP 49 (TACACS+) | T1020.001 Traffic Duplication, T1040 Network Sniffing |
| SNMP | New communities, v1 or v2c re-enabled, new trap or SNMP SET destinations | T1602.002 Network Device Configuration Dump |
| Logging | logging host removed or changed, trap level lowered, archive logging disabled | T1685 Disable or Modify Tools, T1690 Prevent Command History Logging |
| Containers and image | guestshell enable, guestshell run bash, then guestshell disable or destroy; boot variable or image changed | T1610 Deploy Container, T1070.009 Clear Persistence, T1601 Modify System Image |
The advisory maps ACL changes to an older ATT&CK firewall technique ID; in ATT&CK v20 that technique was revoked and replaced by T1686, which explicitly covers network devices.
Login, session and command detections
- Management logins from outside the jump hosts: any successful login (for example
%SEC_LOGIN-5-LOGIN_SUCCESSon Cisco, or TACACS+ start records) whose source is not an approved bastion or automation host. Router-to-router logins are called out in the advisory as atypical and worth investigating. - Local account use: logins that authenticated locally rather than through TACACS+. The joint guidance says local accounts should be for emergencies only, with the password changed after each use, so every local login is an event.
- Brute force and spraying: bursts of failed logins (for example
%SEC_LOGIN-4-LOGIN_FAILED) or login quiet-mode triggers, by source. - High-risk commands in accounting:
monitor capture,monitor session,guestshell,chvrfanddohost(NX-OS),copyto FTP or TFTP destinations,show running-configrun by non-network staff, andclear logging. - Service accounts: automation and backup accounts that pull configurations should log in from a fixed set of hosts at predictable times. Treat them as non-human identities with owners and credential rotation; see the AAA Security Guide.
Detecting logging gaps and device-level tampering
- Heartbeat per device: track the last message time for every device in inventory and alert when a normally chatty device goes quiet for longer than its baseline. Messages that logging to a host started or stopped (for example
%SYS-6-LOGGINGHOST_STARTSTOPon Cisco) deserve their own rule. - Reloads and image changes: unexpected reloads, boot variable changes and image file changes, followed by an integrity check against the vendor's published hashes or signature verification.
- Flow-based cross-check: because a compromised device can lie in its own logs, use flow data from neighbouring devices to see traffic the device does not report: FTP or TFTP to unapproved destinations after on-box capture, tunnels between unexpected ASNs, or inbound connections to unusual management ports.
- Files on flash: scheduled listings of flash, NVRAM and bootflash compared against a baseline; the advisory names capture files such as
mycap,tac.pcapand1.pcap.
For the full response process once tampering is suspected, use the Edge Device Compromise Investigation Playbook.
Implementation and measurement
- Inventory and baseline (month 1): list every device with owner, OS version and management address; collect current configurations into a version-controlled store and mark the reviewed version as approved.
- Standard logging template (months 1 to 2): push a logging, NTP and AAA accounting template through change management, starting with a pilot of a few non-critical devices to check CPU impact and collector load. Roll back by re-applying the previous approved configuration.
- Secure transport (months 2 to 3): move collectors to TLS or IPsec where supported, place them on the management network, and add immutable storage.
- Detections (months 2 to 4): deploy configuration-diff alerts, change-ticket correlation, management login source checks and logging heartbeat. Run high-noise rules in report-only mode for two weeks.
- Hunt (quarterly): run the advisory's configuration checks across the estate: unexpected ACL entries, AAA servers, tunnels, SPAN sessions, local accounts, SNMP versions and non-standard files.
Decision guidance: a small organisation with a handful of firewalls and switches can use vendor management tools or a simple scheduled configuration backup with diff alerts and send syslog straight to the SIEM. A large estate or service provider needs a network source of truth, automation that enforces configuration, dedicated collectors per region, and TACACS+ command accounting as the primary record. Choose TLS syslog where supported; use IPsec when it is not; accept UDP only on an isolated management network and compensate with configuration comparison.
- Coverage: percentage of inventoried devices sending syslog, command accounting and configuration backups (target 100 per cent of in-scope devices).
- Change reconciliation: percentage of configuration diffs matched to an approved change (target above 98 per cent, with every exception investigated).
- Drift dwell time: time from an unauthorised change to detection (target under 24 hours, ideally under one hour).
- Silent devices: number of devices with no logs in 24 hours (target zero unexplained).
- Secure transport: share of devices logging over TLS or IPsec.
| Framework | Relevant controls |
|---|---|
| NIST CSF 2.0 | PR.PS-01 configuration management, PR.PS-04 log records generated and available, DE.CM-01 networks monitored, DE.CM-09 hardware and software monitored, DE.AE-03 correlation |
| NIST SP 800-53 Rev. 5 | AU-2, AU-3, AU-6, AU-9, AU-12, CM-2 Baseline Configuration, CM-3 Configuration Change Control, CM-6, SI-4, SI-7 Software, Firmware, and Information Integrity |
| CIS Controls v8.1 | Control 4 Secure Configuration, Control 8 Audit Log Management, Control 12 Network Infrastructure Management |
| ISO/IEC 27001:2022 Annex A | 8.9 Configuration management, 8.15 Logging, 8.16 Monitoring activities, 8.20 Networks security |
Common failure patterns
- Logging to a collector nobody reads: syslog lands in a file server or a SIEM index with no rules, so changed ACLs and new accounts sit unnoticed for months.
- Trusting the device's own archive: attackers with admin rights can alter on-box archives and clear buffers. Only off-box configuration copies and accounting records are reliable evidence.
- AAA as a single point of evidence: when the TACACS+ server address is changed, command accounting goes to the attacker and the SOC sees nothing. Alert on AAA configuration changes and on accounting volume dropping for a device.
- UDP syslog across the data plane: logs can be dropped or forged in transit, and attackers watching traffic learn where your collectors are.
- Change tickets not linked to diffs: without reconciliation every change looks legitimate, so the attacker's change blends in with the week's maintenance.
- Ignoring silence: a device that stops logging is filed as a monitoring ticket rather than a security alert.
Lessons from incidents
- Telecommunications intrusions (2024 to 2025): reporting on the Salt Typhoon telecom intrusions describes access mostly through legitimate credentials, followed by changes to AAA and TACACS+ server addresses, new local accounts, altered ACLs and SNMP communities, SSH on high ports and packet capture with log clearing. Each is a configuration diff or a command accounting record; the defence is collecting them off-box and reconciling them with change. See the Salt Typhoon Threat Actor Profile.
- Exploited management interfaces: the CVEs listed in AA25-239A, including the Cisco IOS XE web UI flaws CVE-2023-20198 and CVE-2023-20273, were used to create admin accounts. New local accounts and web UI access from unexpected sources are exactly what the login and configuration rules on this page catch. Hardening detail is in the Cisco IOS XE Hardening Guide.
Practitioner checklist
- Send syslog from every network device to at least two collectors over TLS or IPsec on the management network.
- Enable TACACS+ exec and command accounting for privilege levels 0, 1 and 15.
- Turn on configuration change logging with
hidekeysandnotify syslog, or the platform equivalent. - Back up running configurations off-box on every change event and on a schedule, and diff against the approved version.
- Correlate every configuration diff with an approved change and investigate the rest.
- Alert on ACL, AAA, local account, tunnel, SPAN, packet capture, SNMP and logging changes as high priority.
- Alert on management logins from outside approved bastions and on any local account login.
- Monitor a logging heartbeat for every device in inventory.
- Authenticate NTP and log with millisecond timestamps and a time zone.
- Hunt quarterly using the AA25-239A configuration checks and verify image integrity.
Standards and references
- CISA, NSA, FBI and partners: Enhanced Visibility and Hardening Guidance for Communications Infrastructure
- NSA, CISA, FBI and partners: Countering Chinese State-Sponsored Actors Compromise of Networks Worldwide (AA25-239A)
- IETF: RFC 5424 The Syslog Protocol
- IETF: RFC 5425 Transport Layer Security (TLS) Transport Mapping for Syslog
- Cisco: Cisco IOS XE Software Hardening Guide
- Cisco: Configuration Change Notification and Logging
- MITRE ATT&CK: Network Device Authentication
Related NHI Mgmt Group resources: Edge Device Security Guide · Network Device Management Plane Hardening Guide · VPN and Firewall Log Detection Guide · SNMP Security Guide · SIEM Guide