Join our Newsletter — 33% off our NHI Course
Home› Guides› MITRE ATT&CK T1040 Network Sniffing: Detecting and Preventing…
Guide Identity Visibility, Posture & Threat Detection

MITRE ATT&CK T1040 Network Sniffing: Detecting and Preventing Credential Theft

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, edited by Lalit Choda Updated 11 November 2026 14 min read
On this page

Any credential, token or service account password that crosses a network in cleartext can be collected by an attacker who controls one interface, one switch port, one cloud mirroring session or one router CLI on the path. MITRE ATT&CK tracks this as T1040 Network Sniffing, a technique in both the Credential Access (TA0006) and Discovery (TA0007) tactics, on IaaS, Linux, macOS, Network Devices and Windows. This guide is the defender view: where sniffing happens today (endpoints, cloud traffic mirroring and network device packet capture), the signals that reveal it, the controls that make captured traffic worthless, and how to respond. It is written for detection engineers, network and cloud security teams, and identity teams responsible for machine credentials. For the network monitoring you run yourself, see the Network Monitoring and Packet Capture Guide; for network security architecture, see ISO/IEC 27033.

Key takeaways

  • Sniffing is passive, so detect the setup, not the listening. You will rarely see a packet being read; you can see promiscuous mode, capture tools starting, new mirroring sessions and capture commands on routers.
  • Cloud mirroring is the modern span port. ATT&CK names AWS Traffic Mirroring, Google Cloud Packet Mirroring and Azure virtual network TAP as ways to copy VM traffic, and notes that traffic behind TLS-terminating load balancers is often cleartext.
  • Network devices can capture too. Router and switch features such as Cisco Embedded Packet Capture (monitor capture) turn a compromised admin session into a sniffing point.
  • Encryption is the control that matters most. If every protocol carrying credentials is encrypted and authenticated, sniffing yields metadata, not secrets.
  • Machine credentials are the soft target. Legacy service protocols, SNMP community strings, basic-auth API calls and internal HTTP between services often carry non-human credentials in the clear long after human logins moved to TLS.

How the technique works

ATT&CK v20 (technique version 1.7) describes adversaries passively capturing traffic to collect information, including authentication material. The technique has no sub-techniques, but the description covers four distinct collection points, each with its own preconditions and telemetry.

Collection pointHow it is done (per ATT&CK)Attacker preconditionBest telemetry
Host interfacePlacing a network interface into promiscuous mode, or using capture libraries on a compromised hostLocal admin or root, or a user with capture rights (for example membership of a capture group)Process creation, driver or service install, interface flag changes
Switch span portUsing span ports to capture a larger amount of dataAdmin access to the switch, or physical access to a port already spannedDevice configuration change logs, AAA command accounting
Cloud traffic mirroringAWS Traffic Mirroring, Google Cloud Packet Mirroring, Azure virtual network TAP copying VM traffic to a target the attacker controlsA cloud identity allowed to create mirroring sessions, policies or TAP configurationsCloud control plane audit logs
Network device CLICapture commands such as monitor capture through T1059.008 Network Device CLIA privileged device account, often from stolen or default credentialsSyslog, TACACS+ command accounting

ATT&CK links sniffing to T1557.001 Name Resolution Poisoning and SMB Relay, which redirects traffic to the attacker so it can be captured, and to T1557 Adversary-in-the-Middle. The difference matters for detection: AiTM changes the traffic path and leaves active traces, while pure sniffing only copies traffic. For the active side, see MITRE ATT&CK T1557 Adversary-in-the-Middle and LLMNR and NBT-NS Poisoning. Beyond credentials, ATT&CK notes that sniffing reveals running services, version numbers, IP addresses, hostnames and VLAN IDs used to plan lateral movement, which is why it also sits in Discovery.

The cloud mirroring path in detail

Cloud traffic mirroring deserves its own section because it needs no foothold on the victim VM at all: a cloud identity with the right permissions can copy traffic from a production instance to a collector it controls. ATT&CK adds that the adversary can then move the captured data out with T1537 Transfer Data to Cloud Account. Each provider's feature is a legitimate monitoring tool; treat creating it as a privileged action.

Providers are listed alphabetically.

Provider and featureBuilding blocks (from provider docs)Permission to controlWhat to alert on
AWS Traffic MirroringA session ties one source (an elastic network interface), one filter and one target. Targets are another instance's network interface, a Network Load Balancer with a UDP listener, or a Gateway Load Balancer with a UDP listener. Mirrored packets are VXLAN-encapsulated. Source and target can be in peered VPCs or VPCs joined by a transit gateway.ec2:CreateTrafficMirrorSession, which AWS shows restricted by resource to a named traffic mirror target, plus the filter and network interface resourcesCloudTrail CreateTrafficMirrorSession and ModifyTrafficMirrorTarget (the events in the ATT&CK analytic), especially to a target in another VPC or account
Azure virtual network TAPA TAP configuration on a VM network interface streams traffic to a destination IP (a VM network interface or internal load balancer) in the same or a peered virtual network. One TAP resource can aggregate traffic across subscriptions, including cross-tenant. As of November 2026 Microsoft lists the feature as public preview in selected regions.Network Contributor, or a custom role with Microsoft.Network/virtualNetworkTaps/* and Microsoft.Network/tapConfigurations/*Activity log writes on virtualNetworkTaps and tapConfigurations; any cross-tenant destination
Google Cloud Packet MirroringA policy names mirrored sources (by subnet, network tag or instance name) and a collector: an instance group behind an internal passthrough Network Load Balancer. By default all IPv4 traffic, headers and payloads, is mirrored. Mirroring a subnet covers future instances too. Google now recommends Network Security Integration Packet Mirroring for new deployments.compute.packetMirroringAdmin on the mirrored sources and compute.packetMirroringUser in the collector's projectAdmin Activity audit log entries creating or updating packet mirroring policies; subnet-wide policies

Two provider details shape detection. Google states that VPC Flow Logs do not log mirrored packets, so the copy is invisible in flow data and only the control plane shows it. Google also states mirrored traffic is encrypted only if the application encrypts it, which is the ATT&CK point about TLS terminated at the load balancer: traffic from the balancer to the backend is often plain HTTP carrying session cookies, bearer tokens and API keys.

Where non-human identities fit

Human sign-ins mostly moved to TLS and phishing-resistant MFA years ago. Machine traffic often did not. The credentials most likely to still cross internal networks in the clear are non-human:

  • Service-to-service HTTP: bearer tokens and API keys in headers between microservices, or between a load balancer and its backends. Mutual TLS or a service mesh closes this; see the mTLS Guide.
  • Network management protocols: SNMPv1 and v2c community strings, Telnet and unencrypted TACACS+ or RADIUS traffic between devices and servers. See the SNMP Security Guide.
  • Legacy Windows authentication: NTLM challenge-response captured from the wire can be cracked offline or relayed. See the NTLM Deprecation and Elimination Guide.
  • Database and directory binds: application service accounts binding to LDAP on port 389 without signing or StartTLS, or connecting to databases without TLS.
  • The mirroring identity itself: the cloud role or service principal that can create mirror sessions is a high-value NHI. Scope it like any privileged credential.

Our recommendation at NHI Mgmt Group: treat any secret seen in a capture as compromised and rotate it, then fix the transport. Rotating without encrypting just hands the attacker the next secret.

Detection

ATT&CK detection strategy DET0314 (Detection Strategy for Network Sniffing Across Platforms) gives one analytic per platform. The table turns them into rules you can build, with the tuning values ATT&CK marks as environment-specific.

PlatformSignalLog sourceTune for
WindowsCapture tools starting (Wireshark, tshark and similar); a capture driver installed as a serviceSecurity event 4688 (process creation), System event 7045 (service installed); EDR process telemetryApproved tools list, approved admin hosts
LinuxInterface flag changed to PROMISC; tcpdump, tshark or custom pcap processes, especially from non-root or unexpected sessionsauditd execve and ioctl records; kernel messages about promiscuous mode; interface state from ip linkInterfaces that legitimately run promiscuous (IDS sensors, bridges)
macOStcpdump or libpcap use, access to BPF devices, unified log messages mentioning promiscuousUnified log, osquery process events, Endpoint Security process eventsDeveloper and network admin machines
IaaSNew mirroring session, policy or TAP, or a changed targetAWS CloudTrail, Azure Activity Log, Google Cloud Admin Activity audit logsKnown monitoring collectors and the identities that deploy them
Network devicesCapture commands such as monitor capture or debug packet commands; admin login followed by logging changesSyslog, AAA command accountingChange windows, named network engineers

Device-side captures are short-lived: on Cisco IOS and IOS XE, Embedded Packet Capture runs from exec mode, holds packets in DRAM, is not saved to the configuration and is lost on reload, and buffers can be exported as PCAP to a remote server (Cisco's example uses TFTP). Configuration backups will not show it; only command accounting will. An export to an unfamiliar file transfer host is a strong follow-on signal. The Network Device Syslog and Configuration Change Detection Guide covers the logging pipeline.

On the network side, flag cleartext credential protocols wherever they appear: Telnet (23), FTP (21), HTTP basic authentication, LDAP simple binds on 389 and SNMPv1 or v2c (161). Protocol metadata tools such as Zeek log these without full capture. This does not detect the sniffer, but it measures what a sniffer would get.

Response when sniffing is found

  1. Preserve: capture the process tree, interface state and any pcap files on the host; export the cloud audit events and the mirror session, policy or TAP definition before deleting it; pull device command accounting.
  2. Contain: remove the mirror session or TAP, kill the capture process, disable the cloud identity or device account used, and isolate any collector instance the attacker controlled.
  3. Scope: list every source interface or subnet mirrored and the time window, then identify which protocols on those paths carried credentials in cleartext.
  4. Rotate: rotate every secret that could have crossed those paths during the window, starting with service account passwords, API keys and SNMP communities.
  5. Fix the transport: encrypt the protocols that leaked, so the same collection would yield nothing next time.

Prevention

ATT&CK maps four mitigations to T1040. Each is listed with the concrete work behind it.

MitigationATT&CK guidanceConcrete controls
M1041 Encrypt Sensitive InformationEncrypt wired and wireless traffic; use strong authentication protocols such as Kerberos; protect web traffic carrying credentials with TLSTLS to the backend, not only to the load balancer; LDAPS or LDAP signing; SNMPv3 authPriv; SSH instead of Telnet; disable NTLM where possible; MACsec on high-value links (see MACsec)
M1018 User Account ManagementDo not grant permission to create or modify traffic mirrors unless explicitly requiredRemove broad network roles; restrict mirror actions to a named monitoring role; deny them by organisation policy outside the monitoring account
M1030 Network SegmentationDeny direct access to broadcasts and multicast sniffing, and prevent name resolution poisoningPrivate VLANs, port security, 802.1X on access ports (see 802.1X and EAP-TLS Enterprise Wi-Fi Guide), disable LLMNR and NBT-NS
M1032 Multi-factor AuthenticationUse MFA wherever possiblePhishing-resistant MFA so a sniffed password alone is not enough; short-lived tokens for machines so a sniffed token expires quickly

Restrict capture rights on hosts too: limit who can install capture drivers on Windows, keep capture capabilities on Linux to named admin groups, and keep packet capture tools off servers that do not need them. Lock down device AAA so only a small group can run capture or debug commands; see the Network Device Management Plane Hardening Guide.

Implementation sequence

The phases and timings below are NHI Mgmt Group recommendations; adjust them to your estate.

  1. Measure exposure first (weeks 1 to 2): run protocol metadata collection on core segments and list every cleartext credential protocol and the identities using it. This is your baseline and your priority list.
  2. Lock down mirroring (weeks 2 to 4): inventory existing mirror sessions, packet mirroring policies and TAPs; remove unknown ones; restrict create rights to one monitoring role; alert on every create or modify event.
  3. Turn on host analytics in alert-only mode (weeks 3 to 6): deploy the Windows, Linux and macOS rules, tune out approved IDS sensors and admin workstations, then raise severity.
  4. Enable device command accounting (weeks 4 to 8): send TACACS+ accounting and syslog to the SIEM and alert on capture and debug commands outside change windows.
  5. Encrypt by priority (ongoing): start with protocols carrying privileged or machine credentials. Test each change in a pilot segment; keep the old listener available for a fixed rollback window, then remove it.
  6. Rotate and verify: rotate credentials that were sent in cleartext, then confirm with fresh metadata that they no longer appear.

Decision guidance

  • Small organisations: skip host sniffing analytics at first. Focus on encryption (no Telnet, FTP, SNMPv2c or plain LDAP) and on alerting for cloud mirroring creation, which is cheap and high signal.
  • Large or regulated estates: add host and device analytics, and run mirroring only from a dedicated monitoring account with its own guardrails.
  • TLS termination choice: terminating at the load balancer and sending plain HTTP to backends is simpler but leaves tokens readable to anyone who can mirror backend traffic. Re-encrypt to the backend where the traffic carries credentials.
  • Your own monitoring: your IDS and capture platform is itself a sniffer full of credentials. Restrict and log access to stored captures as you would a secrets store.

Measuring progress

  • Number of distinct cleartext credential flows observed per week (target: falling to zero for privileged and machine accounts).
  • Percentage of mirror sessions, policies and TAPs with a named owner and change record (target: 100%).
  • Number of identities able to create mirroring resources (target: one role per cloud).
  • Percentage of network devices sending command accounting to the SIEM.
  • Mean time to triage a promiscuous mode or capture tool alert.

Common failure patterns

  • Encrypting the edge only: TLS ends at the load balancer and tokens travel in the clear inside the VPC, exactly the case ATT&CK describes for mirrored cloud traffic.
  • Relying on flow logs: Google states mirrored packets are not in VPC Flow Logs; mirroring is only visible in audit logs.
  • Broad network admin roles: network contributor style roles quietly include mirroring rights, so many identities can sniff without anyone noticing.
  • No command accounting on devices: device captures leave nothing in the saved configuration, so configuration diffing misses them.
  • Rotating without fixing the protocol: the new secret is captured the same way.
  • Unprotected capture archives: stored pcaps from your own tools become the easiest place to harvest credentials.

Framework mapping

FrameworkReferenceRelevance
MITRE ATT&CKT1040; TA0006, TA0007; mitigations M1041, M1018, M1030, M1032; detection strategy DET0314Technique, tactics and defender guidance
NIST SP 800-53 Rev 5SC-8 and SC-8(1) Transmission Confidentiality and Integrity, Cryptographic ProtectionEncrypt credentials in transit
NIST SP 800-53 Rev 5AC-6 Least Privilege; CM-7 Least FunctionalityLimit mirroring rights and capture tools
NIST SP 800-53 Rev 5SI-4 System Monitoring; AU-12 Audit Record GenerationHost, cloud and device telemetry
NIST CSF 2.0PR.DS-02; DE.CM-01Data in transit protected; networks monitored

Practitioner checklist

  • List every cleartext credential protocol on your networks and the accounts using it.
  • Inventory and own every cloud mirror session, packet mirroring policy and virtual network TAP.
  • Restrict mirroring create and modify rights to one monitoring role per cloud.
  • Alert on mirroring control plane events, especially cross-account or cross-tenant targets.
  • Detect promiscuous mode and capture tools on Windows, Linux and macOS, with an approved list.
  • Send device command accounting to the SIEM and alert on capture and debug commands.
  • Re-encrypt from load balancers to backends where traffic carries tokens or keys.
  • After any finding, rotate exposed machine credentials and fix the transport.

Standards and references

Related NHI Mgmt Group resources: Network Monitoring and Packet Capture Guide · ATT&CK Credential Access Tactic Guide · MITRE ATT&CK T1557 Adversary-in-the-Middle · SNMP Security Guide · ISO/IEC 27033

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Researched and written by the NHI Mgmt Group editorial team using AI tools, under the editorial direction of Lalit Choda. Facts are drawn from the sources listed on this page and checked by our automated quality process. Last updated 11 November 2026. Spotted an error? Use our contact page.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM and Agentic AI security. nhimg.org

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick the PDF box to continue.