Network Incident Response — Network Forensics
Network-specific evidence collection and analysis during security incidents.
This skill covers network artifacts only: packet captures, flow records
(NetFlow/sFlow/IPFIX), ARP/MAC/CAM tables, routing table state, and device
syslog events. It does not cover general incident response lifecycle (NIST
800-61), endpoint forensics, malware analysis, or organizational
communication plans.
The procedure follows an event-driven lifecycle shaped around forensic
evidence: preserve volatile data → triage scope → detect lateral movement →
verify containment → reconstruct timeline → document findings. All commands
are read-only. Containment verification confirms that previously applied
controls are effective — it does not execute containment actions.
Commands use [Cisco], [JunOS], or [EOS] vendor labels where syntax
diverges. See references/cli-reference.md for the full command reference
and references/forensics-workflow.md for evidence methodology,
chain-of-custody templates, and timeline reconstruction guidance.
When to Use
- - Active security incident requiring network-level evidence collection
(packet captures, flow analysis, device logs)
- - Post-incident network forensics — reconstructing what happened on the
network after a confirmed security event
- - Lateral movement investigation — tracing attacker movement between
internal hosts using flow records, ARP/MAC table changes, and routing
state analysis
- - Unauthorized access investigation — identifying how an external or
internal actor reached target systems via network path analysis
- - Data exfiltration analysis — quantifying outbound data transfers via
flow record byte counts and packet capture content analysis
- - Containment verification — confirming (read-only) that ACLs, null
routes, or VLAN isolation applied by responders are blocking attacker
traffic effectively
Prerequisites
- - Device CLI access — read-only access to network devices in the
incident scope is sufficient for all evidence collection commands.
No enable/configure privilege is required.
- - Flow collection infrastructure — NetFlow, sFlow, or IPFIX collectors
must be receiving exports from network devices. Verify with flow export
commands in
references/cli-reference.md. Without flow data, lateral
movement analysis (Step 3) is limited to ARP/MAC/syslog correlation.
- - Centralized logging — device syslog events must be forwarded to a
SIEM or syslog server. Local device log buffers are small and rotate
quickly. Missing centralized logs create timeline gaps.
- - NTP synchronization — all devices must be time-synchronized. Verify
with
[Cisco] show ntp status,
[JunOS] show system ntp,
[EOS] show ntp status. Skewed clocks corrupt timeline correlation.
- - Known-good baseline — saved copies of routing tables, ARP tables, and
device configurations from before the incident for comparison. Without
baselines, anomaly detection relies on general heuristics rather than
delta analysis.
Procedure
Follow these six steps in order. Earlier steps capture volatile evidence
before it ages out; later steps analyze and document. Each step references
specific commands from references/cli-reference.md and methodology from
references/forensics-workflow.md.
Step 1: Evidence Preservation
Capture volatile network evidence before it ages out or is overwritten.
Follow the volatility ordering from references/forensics-workflow.md —
most volatile first.
1a. ARP / MAC / CAM tables (highest volatility — minutes to hours):
Collect the current ARP and MAC address tables from every device in the
incident scope. These tables map IP addresses to MAC addresses and MAC
addresses to physical switch ports — essential for identifying which hosts
were connected where.
- - [Cisco] —
show arp and INLINECODE16 - [JunOS] —
show arp no-resolve and INLINECODE18 - [EOS] —
show arp and INLINECODE20
Save output to files with timestamps. ARP entries typically age out in
4 hours; CAM entries in 5 minutes. Delay here means losing L2 mapping.
1b. Active packet captures (real-time — exists only while traffic flows):
If the incident is active and the investigation requires payload-level
evidence, initiate packet captures on relevant interfaces immediately.
- - [Cisco] —
monitor capture CAP1 interface <intf> both then
monitor capture CAP1 start — export with
monitor capture CAP1 export flash:evidence.pcap
- - [JunOS] — INLINECODE24
- [EOS] — INLINECODE25
Performance note: On-device packet capture consumes CPU. Monitor
device health during capture and set packet count or duration limits.
1c. Routing table snapshots (hours — convergence overwrites state):
- - [Cisco] —
show ip route and INLINECODE27 - [JunOS] —
show route and INLINECODE29 - [EOS] —
show ip route and INLINECODE31
Also capture routing protocol adjacency state (show ip ospf neighbor,
show ip bgp summary or vendor equivalents) to document peering status
at the time of collection.
1d. Flow export verification (hours to days — collector retention):
Confirm that flow data from the incident time window is available in the
flow collector. Verify export is active and records exist:
- - [Cisco] —
show flow monitor and INLINECODE35 - [JunOS] —
show services flow-monitoring version-ipfix template and
show services accounting status
- - [EOS] —
show flow tracking and INLINECODE39
1e. Device configuration and comprehensive state:
Save the running configuration and full technical support output for each
device in scope:
- - [Cisco] — INLINECODE40
- [JunOS] — INLINECODE41
- [EOS] — INLINECODE42
Compute SHA-256 hashes immediately after saving evidence files (see
references/forensics-workflow.md for hash verification commands).
Step 2: Initial Triage
Determine the scope of the incident — affected devices, time window,
involved IP addresses — using log and flow data collected in Step 1.
Identify the time window: Find the earliest indicator (first alert,
first anomalous event) and the latest known malicious activity. Add a
buffer of ±2 hours to account for undetected precursor activity.
Identify involved IPs: Extract unique source and destination IP
addresses from alerts, SIEM events, and flow records within the time
window. Classify each as internal, external, or infrastructure.
Identify affected devices: Determine which network devices handled
traffic to/from involved IPs. Use routing tables to trace the forwarding
path and identify all transit devices.
Scope assessment output: A list of (1) affected time window, (2)
involved IP addresses with classification, (3) affected network devices,
and (4) evidence types available for each device. This scoping drives
the depth of Steps 3–5.
Step 3: Lateral Movement Detection
Trace internal-to-internal connections that indicate attacker movement
between hosts. Lateral movement leaves evidence in flow records (new
internal connections), ARP/MAC tables (new L2 entries), and syslog
(authentication events, new sessions).
Flow record analysis: Query the flow collector for internal-to-internal
connections involving known compromised IPs during the incident time
window. Look for:
- - Connections to ports commonly used for lateral movement (SMB/445,
RDP/3389, SSH/22, WinRM/5985, WMI/135)
- - Connections from a compromised host to hosts it has never contacted
before (new destination analysis)
- - High byte-count transfers between internal hosts (staging or exfil prep)
- Sequential connections from one host to many hosts in a short time
window (scanning behavior)
ARP/MAC table analysis: Compare current ARP/MAC tables against
baseline captures. Look for:
- - New MAC addresses on access ports (rogue devices)
- MAC address appearing on a different port than baseline (device moved
or MAC spoofing)
- - Multiple IP addresses mapped to a single MAC (IP aliasing, potential
MITM)
Syslog correlation: Review authentication events on network devices
during the incident window. Attacker lateral movement often involves:
- - Failed authentication attempts from internal IPs against network
device management interfaces
- - Successful logins from unexpected source IPs
- Configuration view commands from unusual user accounts
Step 4: Containment Verification (Read-Only)
Verify that containment measures applied by the incident response team
are functioning as intended. This step is strictly read-only — it
confirms effectiveness, it does not apply containment.
ACL hit count verification: Confirm that blocking ACLs are matching
the attacker's traffic. Rising hit counters on deny rules confirm the
ACL is intercepting traffic.
- - [Cisco] —
show access-lists <containment-acl-name> — check hit
counters on deny entries
- - [JunOS] —
show firewall filter <containment-filter> — check
term counters for deny actions
- - [EOS] —
show access-lists <containment-acl-name> — check
per-entry match counts
Routing containment verification: If null routes or route
modifications were applied for containment, verify they are present and
effective:
- - Confirm the null route exists in the routing table (
show ip route
<attacker-prefix> should show Null0/discard) - Verify no more-specific routes bypass the null route
- Check routing protocol advertisements to confirm containment routes
are not being overridden by dynamic protocols
Network isolation verification: If VLAN isolation was applied, verify
that the isolated segment has no unintended paths:
- - Check the routing table for routes to/from the isolated VLAN
- Verify trunk port allowed VLAN lists exclude the isolated VLAN
on uplinks
- - Confirm no layer-3 interfaces provide alternative paths
Step 5: Timeline Reconstruction
Build a unified chronological sequence of network events from all
evidence sources. This timeline is the primary deliverable of network
forensics investigation.
Source integration: Merge events from syslog, flow records, routing
changes, and ARP/MAC transitions into a single timeline sorted by UTC
timestamp. Follow the full timeline reconstruction methodology in
references/forensics-workflow.md.
Key timeline elements:
- 1. Anchor events — high-confidence events that serve as fixed points
(first alert, interface state changes, BGP/OSPF adjacency changes)
- 2. Correlated events — events linked by shared IP addresses,
timestamps, or session identifiers across multiple devices
- 3. Gaps — time periods with missing evidence from devices that should
have been active (document explicitly as uncertainty)
- 4. Phase transitions — points where activity shifts from
reconnaissance to access, access to lateral movement, lateral
movement to objective or exfiltration
Timeline validation: Cross-reference the reconstructed timeline
against multiple evidence sources. Events confirmed by two or more
independent sources (e.g., firewall deny in syslog + flow record for
same session) are high confidence. Single-source events are medium
confidence.
Step 6: Post-Incident Documentation
Compile investigation findings into a structured evidence package. This
documentation supports organizational incident response and any
subsequent legal or compliance review.
Required documentation artifacts:
- - Evidence inventory with chain-of-custody records (use the template
in
references/forensics-workflow.md)
- - Reconstructed timeline of network events (from Step 5)
- Lateral movement map showing affected hosts and connection paths
(from Step 3, if lateral movement was detected)
- - Containment verification results (from Step 4)
- List of affected network devices with evidence types collected
- Identified gaps in evidence and their impact on conclusions
Threshold Tables
Evidence Priority Classification
| Priority | Evidence Type | Condition | Rationale |
|---|
| Critical | Active packet captures | Incident is active, payload evidence required | Live traffic cannot be recovered after the fact |
| Critical |
ARP/MAC/CAM tables | Any incident within the last 4 hours | Aging timers overwrite entries — shortest evidence lifespan |
|
High | Flow records | Incident time window within collector retention | Reveals communication patterns and lateral movement paths |
|
High | Syslog events | Incident time window within log retention | Provides the event narrative — auth, config, state changes |
|
Medium | Routing table snapshots | Suspected route manipulation or path analysis needed | Shows forwarding state but only captures current point-in-time |
|
Medium | SNMP trap history | Corroborating physical or threshold events | Supplements syslog but with less detail |
|
Low | Historical config archives | Baseline comparison or configuration drift analysis | Persistent data — available for later retrieval if needed |
Containment Verification Criteria
| Check | Expected Result | Failure Indicator |
|---|
| ACL deny counters | Incrementing on containment rules | Zero or static counters — ACL not matching traffic |
| Null route presence |
Attacker prefix routes to Null0/discard | Route missing or overridden by dynamic protocol |
| VLAN isolation | No L3 routes to/from isolated segment | Routes exist, providing bypass path |
| Flow records post-containment | No new flows from/to attacker IPs | Continuing flows indicate containment bypass |
Decision Trees
Evidence Collection Priority
CODEBLOCK0
Report Template
CODEBLOCK1
Troubleshooting
Insufficient Flow Data Coverage
Symptom: Flow records do not exist for devices or time windows
critical to the investigation.
Diagnosis: Verify flow export configuration on each device using
commands in references/cli-reference.md. Check collector storage —
retention may have expired for the incident time window.
Workaround: Substitute with syslog events (lower fidelity but covers
event timestamps) and ARP/MAC table correlation. Document the flow gap
and its impact on lateral movement analysis completeness.
Time Synchronization Gaps
Symptom: Events from different devices appear out of order or
correlation produces implausible sequences.
Diagnosis: Check NTP status on each device. Compare timestamps of
events that should be near-simultaneous (e.g., both ends of a link-down
event logged by adjacent devices).
Workaround: Calculate clock offset per device and apply correction
to the timeline. Note the correction in evidence documentation. Reduce
correlation confidence for events involving desynchronized devices.
Evidence Overwritten by Log Rotation
Symptom: Syslog events from the incident time window no longer exist
on the device or in the SIEM.
Diagnosis: Check device log buffer size (show logging to see
buffer capacity and oldest retained message). Check SIEM retention
policy for the relevant index.
Workaround: Use flow records or SNMP trap history as alternative
event sources. Note the syslog gap in the timeline with an explicit
confidence reduction for that time period.
Packet Capture Performance Impact
Symptom: Device CPU spikes or forwarding performance degrades during
on-device packet capture.
Diagnosis: Monitor CPU utilization during capture. On-device
capture processes packets in software, bypassing hardware forwarding.
Workaround: Limit captures with ACL filters (capture only relevant
traffic), set packet count limits (-c flag), use span/mirror sessions
to an external capture appliance instead of on-device capture, or
reduce capture duration. If performance impact is unacceptable, stop
capture and rely on flow records for metadata-level analysis.
Incomplete ARP/MAC Table Recovery
Symptom: ARP or MAC address tables are mostly empty — entries have
already aged out by the time evidence collection begins.
Diagnosis: Default ARP aging is 4 hours; default CAM aging is
5 minutes. If more than 4 hours have elapsed since the incident,
ARP entries for inactive hosts will be gone.
Workaround: Cross-reference DHCP lease logs for IP-to-MAC mappings
during the incident window. Use flow records to identify involved
IP addresses without L2 mapping. Check if any NMS polled ARP/MAC
tables via SNMP during the incident window.
网络事件响应 — 网络取证
安全事件期间网络特定证据的收集与分析。
本技能仅涵盖网络工件:数据包捕获、流记录
(NetFlow/sFlow/IPFIX)、ARP/MAC/CAM表、路由表状态和设备
系统日志事件。不涵盖通用事件响应生命周期(NIST
800-61)、端点取证、恶意软件分析或组织
沟通计划。
该流程遵循以取证证据为中心的事件驱动生命周期:保存易失数据 → 确定范围 → 检测横向移动 →
验证遏制 → 重建时间线 → 记录发现。所有命令
均为只读。遏制验证确认先前应用的
控制措施有效 — 不执行遏制操作。
命令在语法不同处使用[Cisco]、[JunOS]或[EOS]供应商标签。
完整命令参考请参见references/cli-reference.md,证据方法论、
监管链模板和时间线重建指南请参见references/forensics-workflow.md。
使用时机
(数据包捕获、流分析、设备日志)
网络上发生的情况
- - 横向移动调查 — 使用流记录、ARP/MAC表变化和路由
状态分析追踪攻击者在内部主机之间的移动
- - 未授权访问调查 — 通过网络路径分析识别外部或
内部行为者如何到达目标系统
- - 数据外泄分析 — 通过流记录字节计数和数据包捕获
内容分析量化出站数据传输
- - 遏制验证 — 确认(只读)响应者应用的ACL、空路由
或VLAN隔离是否有效阻止攻击者流量
前提条件
- - 设备CLI访问 — 对事件范围内网络设备的只读访问足以执行所有证据收集命令。
不需要启用/配置权限。
- - 流收集基础设施 — NetFlow、sFlow或IPFIX收集器
必须接收来自网络设备的导出。使用references/cli-reference.md中的流导出
命令进行验证。没有流数据时,横向移动分析(步骤3)将
仅限于ARP/MAC/系统日志关联。
- - 集中式日志记录 — 设备系统日志事件必须转发到
SIEM或系统日志服务器。本地设备日志缓冲区较小且轮换
迅速。缺少集中式日志会造成时间线空白。
[Cisco] show ntp status、[JunOS] show system ntp、
[EOS] show ntp status验证。时钟偏差会破坏时间线关联。
- - 已知良好基线 — 事件发生前保存的路由表、ARP表和
设备配置副本用于比较。没有基线时,异常检测依赖
通用启发式方法而非差异分析。
流程
按顺序执行以下六个步骤。早期步骤在易失证据
过期前捕获;后期步骤进行分析和记录。每个步骤引用
references/cli-reference.md中的特定命令和
references/forensics-workflow.md中的方法论。
步骤1:证据保存
在网络易失证据过期或被覆盖前捕获。遵循
references/forensics-workflow.md中的易失性顺序 —
最易失的优先。
1a. ARP / MAC / CAM表 (最高易失性 — 数分钟至数小时):
收集事件范围内每台设备的当前ARP和MAC地址表。这些表将IP地址映射到MAC地址,MAC
地址映射到物理交换机端口 — 对于识别哪些主机
连接在何处至关重要。
- - [Cisco] — show arp 和 show mac address-table
- [JunOS] — show arp no-resolve 和 show ethernet-switching table
- [EOS] — show arp 和 show mac address-table
将输出保存到带时间戳的文件。ARP条目通常在
4小时后过期;CAM条目在5分钟后。延迟意味着丢失L2映射。
1b. 活跃数据包捕获 (实时 — 仅在流量流动时存在):
如果事件处于活跃状态且调查需要有效载荷级
证据,立即在相关接口上启动数据包捕获。
- - [Cisco] — monitor capture CAP1 interface both 然后
monitor capture CAP1 start — 使用
monitor capture CAP1 export flash:evidence.pcap导出
- - [JunOS] — monitor traffic interface write-file /var/tmp/capture.pcap
- [EOS] — bash tcpdump -i -w /mnt/flash/evidence.pcap -c 10000
性能说明: 设备上数据包捕获消耗CPU。在捕获期间
监控设备健康状态,并设置数据包计数或持续时间限制。
1c. 路由表快照 (数小时 — 收敛会覆盖状态):
- - [Cisco] — show ip route 和 show ip route summary
- [JunOS] — show route 和 show route summary
- [EOS] — show ip route 和 show ip route summary
同时捕获路由协议邻接状态(show ip ospf neighbor、
show ip bgp summary或供应商等效命令)以记录收集时的
对等状态。
1d. 流导出验证 (数小时至数天 — 收集器保留期):
确认事件时间窗口内的流数据在流收集器中可用。
验证导出处于活跃状态且记录存在:
- - [Cisco] — show flow monitor 和 show flow exporter statistics
- [JunOS] — show services flow-monitoring version-ipfix template 和
show services accounting status
- - [EOS] — show flow tracking 和 show flow tracking counters
1e. 设备配置和全面状态:
为范围内每台设备保存运行配置和完整技术支持输出:
- - [Cisco] — show tech-support | redirect flash:tech--.txt
- [JunOS] — request support information | save /var/tmp/tech--.txt
- [EOS] — show tech-support | redirect flash:tech--.txt
保存证据文件后立即计算SHA-256哈希(哈希验证命令
请参见references/forensics-workflow.md)。
步骤2:初始分类
使用步骤1中收集的日志和流数据确定事件范围 —
受影响的设备、时间窗口、涉及的IP地址。
识别时间窗口: 找到最早的指标(首次告警、
首次异常事件)和最新的已知恶意活动。添加
±2小时的缓冲以考虑未检测到的前兆活动。
识别涉及的IP: 从时间窗口内的告警、SIEM事件和流记录中
提取唯一的源和目标IP地址。将每个地址分类为
内部、外部或基础设施。
识别受影响的设备: 确定哪些网络设备处理了
进出涉及IP的流量。使用路由表追踪转发
路径并识别所有传输设备。
范围评估输出: (1)受影响时间窗口、(2)涉及IP地址及分类、
(3)受影响网络设备和(4)每台设备可用证据类型的列表。
此范围界定驱动步骤3-5的深度。
步骤3:横向移动检测
追踪指示攻击者在主机之间移动的内部到内部连接。
横向移动在流记录(新的内部连接)、ARP/MAC表(新的L2条目)和系统日志
(认证事件、新会话)中留下证据。
流记录分析: 查询流收集器,查找事件时间窗口内涉及已知
受损IP的内部到内部连接。查找:
RDP/3389、SSH/22、WinRM/5985、WMI/135)
(新目标分析)
- - 内部主机之间的高字节计数传输(暂存或外泄准备)
- 短时间内从一台主机到多台主机的顺序连接
(扫描行为)
ARP/MAC表分析: 将当前ARP/MAC表与基线捕获
进行比较。查找:
- - 接入端口上的新MAC地址(恶意设备)
- 与基线相比出现在不同端口上的MAC地址(设备移动
或MAC欺骗)
- - 映射到单个MAC的多个IP地址(IP别名,潜在
MITM)
系统日志关联: 审查事件窗口内网络设备上的认证事件。
攻击者横向移动通常涉及:
- - 来自内部IP对网络设备管理接口的失败认证尝试
- 来自意外源IP的成功登录
- 来自异常用户账户的配置视图命令
步骤4:遏制验证(只读)
验证事件响应团队应用的遏制措施是否按预期
运行。此步骤严格为只读 — 它确认
有效性,不应用遏制措施。
ACL命中计数验证: 确认阻止AC