Network Sniffing

Adversaries may sniff network traffic to capture information about an environment, including authentication material passed over the network. Network sniffing refers to using the network interface on a system to monitor or capture information sent over a wired or wireless connection. An adversary may place a network interface into promiscuous mode to passively access data in transit over the network, or use span ports to capture a larger amount of data.

Data captured via this technique may include user credentials, especially those sent over an insecure, unencrypted protocol. Techniques for name service resolution poisoning, such as LLMNR/NBT-NS Poisoning and SMB Relay, can also be used to capture credentials to websites, proxies, and internal systems by redirecting traffic to an adversary.

Network sniffing may also reveal configuration details, such as running services, version numbers, and other network characteristics (e.g. IP addresses, hostnames, VLAN IDs) necessary for subsequent Lateral Movement and/or Defense Evasion activities.

In cloud-based environments, adversaries may still be able to use traffic mirroring services to sniff network traffic from virtual machines. For example, AWS Traffic Mirroring, GCP Packet Mirroring, and Azure vTap allow users to define specified instances to collect traffic from and specified targets to send collected traffic to.[1] [2] [3] Often, much of this traffic will be in cleartext due to the use of TLS termination at the load balancer level to reduce the strain of encrypting and decrypting traffic.[4] [5] The adversary can then use exfiltration techniques such as Transfer Data to Cloud Account in order to access the sniffed traffic. [4]

ID: T1040
Sub-techniques:  No sub-techniques
Platforms: IaaS, Linux, Network, Windows, macOS
System Requirements: Network interface access and packet capture driver
CAPEC ID: CAPEC-158
Contributors: Oleg Kolesnikov, Securonix; Tiago Faria, 3CORESec
Version: 1.3
Created: 31 May 2017
Last Modified: 19 April 2022

Procedure Examples

ID Name Description
G0007 APT28

APT28 deployed the open source tool Responder to conduct NetBIOS Name Service poisoning, which captured usernames and hashed passwords that allowed access to legitimate credentials.[6][7] APT28 close-access teams have used Wi-Fi pineapples to intercept Wi-Fi signals and user credentials.[8]

G0064 APT33

APT33 has used SniffPass to collect credentials by sniffing network traffic.[9]

G0105 DarkVishnya

DarkVishnya used network sniffing to obtain login data. [10]

S0367 Emotet

Emotet has been observed to hook network APIs to monitor network traffic. [11]

S0363 Empire

Empire can be used to conduct packet captures on target hosts.[12]

S0661 FoggyWeb

FoggyWeb can configure custom listeners to passively monitor all incoming HTTP GET and POST requests sent to the AD FS server from the intranet/internet and intercept HTTP requests that match the custom URI patterns defined by the actor.[13]

S0357 Impacket

Impacket can be used to sniff network traffic via an interface or raw socket.[14]

G0094 Kimsuky

Kimsuky has used the Nirsoft SniffPass network sniffer to obtain passwords sent over non-secure protocols.[15][16]

S0443 MESSAGETAP

MESSAGETAP uses the libpcap library to listen to all traffic and parses network protocols starting with Ethernet and IP layers. It continues parsing protocol layers including SCTP, SCCP, and TCAP and finally extracts SMS message data and routing metadata. [17]

S0590 NBTscan

NBTscan can dump and print whole packet content.[18][19]

S0587 Penquin

Penquin can sniff network traffic to look for packets matching specific conditions.[20][21]

S0378 PoshC2

PoshC2 contains a module for taking packet captures on compromised hosts.[22]

S0019 Regin

Regin appears to have functionality to sniff for credentials passed over HTTP, SMTP, and SMB.[23]

S0174 Responder

Responder captures hashes and credentials that are sent to the system after the name services have been poisoned.[24]

G0034 Sandworm Team

Sandworm Team has used intercepter-NG to sniff passwords in network traffic.[25]

Mitigations

ID Mitigation Description
M1041 Encrypt Sensitive Information

Ensure that all wired and/or wireless traffic is encrypted appropriately. Use best practices for authentication protocols, such as Kerberos, and ensure web traffic that may contain credentials is protected by SSL/TLS.

M1032 Multi-factor Authentication

Use multi-factor authentication wherever possible.

M1018 User Account Management

In cloud environments, ensure that users are not granted permissions to create or modify traffic mirrors unless this is explicitly required.

Detection

ID Data Source Data Component
DS0017 Command Command Execution
DS0009 Process Process Creation

Detecting the events leading up to sniffing network traffic may be the best method of detection. From the host level, an adversary would likely need to perform a Adversary-in-the-Middle attack against other devices on a wired network in order to capture traffic that was not to or from the current compromised system. This change in the flow of information is detectable at the enclave network level. Monitor for ARP spoofing and gratuitous ARP broadcasts. Detecting compromised network devices is a bit more challenging. Auditing administrator logins, configuration changes, and device images is required to detect malicious changes.

In cloud-based environments, monitor for the creation of new traffic mirrors or modification of existing traffic mirrors.

References