Back to blog

Cisco / Defensive  ·  Detection  ·  July 2026

Detecting Attacks
on Cisco Gear

The offensive post showed what an attacker does to a Cisco switch or router. This is the other half of the pair: the log lines, flow patterns, and config-change signals that catch each of those techniques while it's happening — so a compromise is an alert, not a surprise you find out about from someone else.

Cisco IOS Blue Team Detection Syslog NetFlow

Every technique in Attacking Cisco Gear leaves a trace — you just have to be collecting it and looking. This post pairs each attack with its detection signature: Smart Install and SNMP config-theft show up as unexpected TFTP flows and config-copy syslog; Layer-2 abuse (DTP/VTP) trips port and protocol logs; the post-compromise moves (new users, config changes) are exactly what config-archive and EEM watch for. Detection turns the offensive post's fix list into an alerting list.

The prerequisite is the observability stack — correct time, remote syslog, NetFlow to a collector, SNMPv3. Without those you have nothing to detect with; with them, most of these signatures are a saved search away. Detection doesn't replace hardening — it's the safety net for when hardening is incomplete or a new bug appears.

Prerequisites

01

Detect Config Theft — Smart Install & SNMP

Both unauthenticated config-exfil paths end the same way: the device sends its running-config to an attacker over TFTP. That outbound TFTP flow to a non-management host is the tell.

Detection — the config-copy signatures
# NetFlow: the device SENDING UDP/69 (TFTP) to anything that isn't your
# provisioning/backup server is the alarm — config is leaving the box.
  flow: src=<device>  dst=<unknown>  proto=UDP  dstport=69   -> ALERT

# Syslog: a config-copy you didn't initiate (SNMP ccCopyTable or SMI):
  %SYS-5-CONFIG_I: Configured from ... by snmp
  %SNMP-... copy of running-config to network

# Smart Install probes: connections to TCP/4786 from outside management.
  flow: dst=<device>  dstport=4786  src=<not-mgmt>   -> ALERT
◆ The Highest-Value Single Alert

If you build one detection from this whole post, make it "a network device is the source of a TFTP/FTP/SCP flow to a host that isn't your backup server." Config theft — whether via Smart Install, SNMP-RW, or a logged-in attacker running copy run tftp — nearly always manifests as the device pushing its config outbound. Your switches and routers should almost never initiate file transfers except to known infrastructure; anything else is either a misconfiguration or an exfil, and both are worth a page.

02

Detect Layer-2 Abuse — DTP, VTP, CDP

Trunk negotiation and VLAN-database changes are loud if you're listening. An access port becoming a trunk, or the VTP config revision jumping, is never normal on a stable network.

Syslog — the L2-attack signatures
# A port unexpectedly negotiating a trunk (DTP / VLAN-hopping attempt):
  %DTP-5-TRUNKPORTON: Port Gi0/x has become dot1q trunk   # on an ACCESS port = alarm

# VTP database being rewritten (config revision jump / injected VLANs):
  %SW_VLAN-4-VTP_...: VTP ... revision N   # unexpected jumps = VTP attack

# Port-security / BPDU-guard firing (rogue device, MAC flood, rogue switch):
  %PM-4-ERR_DISABLE: ... err-disabled (psecure-violation / bpduguard)

These are also prevention signals — if you've hardened per Switch Security (access ports nonegotiate, VTP transparent/password, BPDU guard), the attack is blocked and logs the attempt. Alert on the err-disable and DTP-trunk events and you catch the on-LAN attacker in the act.

03

Detect Recon & Brute Force

Before the exploit comes the knock: SNMP walks with guessed communities, SSH/Telnet login storms, sweeps of management ports. Rate and failure patterns give them away.

Recon / brute signalWhere it shows
SNMP failures / wrong community%SNMP-3-AUTHFAIL — repeated = community guessing
SSH/Telnet auth failuresAAA/login syslog — a burst from one src = brute force
Mgmt-port sweep (22/23/161/4786)NetFlow: one src touching many mgmt ports/hosts
Login from an unexpected sourceThe login on-success log — geo/host anomaly
💡 Turn On the Login Logging You Already Have

IOS has login on-failure log and login on-success log — enable both and every management authentication, good or bad, hits syslog with source and username. That single pair of commands is the difference between "someone brute-forced us for an hour and we never knew" and a threshold alert on failure bursts. Pair it with an ACL/CoPP so those attempts can only come from management in the first place — then any failure log from outside management is doubly suspicious.

04

Detect the Aftermath — Config & User Changes Safe to Run

An attacker who gets in changes things: a new local user, a modified ACL, an added SNMP community, a config export. The config archive and EEM turn every change into a logged, diff-able event.

IOS — log and react to config changes automatically
# Config-change logging: who changed what, when, from where.
R1(config)# archive
R1(config-archive)# log config
R1(config-archive-log-cfg)# logging enable
R1(config-archive-log-cfg)# notify syslog

# EEM: page immediately when a config write happens (or when a new
# 'username' line appears) — the aftermath alarm.
R1(config)# event manager applet CONFIG-WATCH
R1(config-applet)# event syslog pattern "CONFIG_I"
R1(config-applet)# action 1.0 syslog msg "Config changed — verify"
# See the EEM post for reacting on-box; feed CONFIG_I to your SIEM too.

Takeaways

  1. Every attack in the offensive post leaves a trace — detection pairs each with a log/flow signature, if you're collecting the telemetry.
  2. The single best alert: a network device is the source of a file transfer (TFTP/FTP/SCP) to anything but your backup server — that's config exfil.
  3. Layer-2 abuse is loud — an access port becoming a trunk, VTP revision jumps, and err-disable events catch the on-LAN attacker.
  4. Turn on login on-failure/on-success log and SNMP auth-fail — recon and brute force become threshold alerts.
  5. Log config changes with the archive + EEM — new users, modified ACLs, and exports become diff-able, alertable events.
  6. Detection is the safety net for hardening — it catches what prevention misses and the next bug that isn't public yet.

Would you know if someone was inside your switches right now?

NOCTIS builds detection for Cisco and MikroTik estates across Crete — the log, flow, and config-change alerts that turn a device compromise into a page, not a post-incident discovery.

Book a Discovery Call →