PT Network Attack Discovery

Helps reconstruct the attack timeline and understand the sources and scale of threats

T1557: Adversary-in-the-Middle

Adversaries may attempt to position themselves between two or more networked devices using an adversary-in-the-middle (AiTM) technique to support follow-on behaviors such as Network Sniffing, Transmitted Data Manipulation, or replay attacks (Exploitation for Credential Access). By abusing features of common networking protocols that can determine the flow of network traffic (e.g. ARP, DNS, LLMNR, etc.), adversaries may force a device to communicate through an adversary controlled system so they can collect information or perform additional actions.

For example, adversaries may manipulate victim DNS settings to enable other malicious activities such as preventing/redirecting users from accessing legitimate sites and/or pushing additional malware. Adversaries may also manipulate DNS and leverage their position in order to intercept user credentials, including access tokens (Steal Application Access Token) and session cookies (Steal Web Session Cookie). Downgrade Attacks can also be used to establish an AiTM position, such as by negotiating a less secure, deprecated, or weaker version of communication protocol (SSL/TLS) or encryption algorithm.

Adversaries may also leverage the AiTM position to attempt to monitor and/or modify traffic, such as in Transmitted Data Manipulation. Adversaries can setup a position similar to AiTM to prevent traffic from flowing to the appropriate destination, potentially to Impair Defenses and/or in support of a Network Denial of Service.

Positive Technologies products that cover the technique

Detection

PT NAD can detect man-in-the-middle attacks using rules and a special module of the activity stream.

Examples of PT NAD detection rules

  • ATTACK [PTsecurity] SMB-TO-HTTP NTLM Relay attack (sid 10009829)
  • ATTACK [PTsecurity] HTTP-to-RPC NTLM Relay attack (sid 10005927)

PT NAD detection modules

  • NTLM Relay attack

Detection

IDDS0029Data source and componentNetwork Traffic: Network Traffic ContentDescription

Monitor network traffic for anomalies associated with known AiTM behavior.

IDDS0015Data source and componentApplication Log: Application Log ContentDescription

Monitor application logs for changes to settings and other events associated with network protocols and other services commonly abused for AiTM.

IDDS0029Data source and componentNetwork Traffic: Network Traffic FlowDescription

Monitor for network traffic originating from unknown/unexpected hardware devices. Local network traffic metadata (such as source MAC addressing) as well as usage of network management protocols such as DHCP may be helpful in identifying hardware.

IDDS0024Data source and componentWindows Registry: Windows Registry Key ModificationDescription

Monitor HKLM\Software\Policies\Microsoft\Windows NT\DNSClient for changes to the "EnableMulticast" DWORD value. A value of "0" indicates LLMNR is disabled.

IDDS0019Data source and componentService: Service CreationDescription

Monitor for newly constructed services/daemons through Windows event logs for event IDs 4697 and 7045. Data and events should not be viewed in isolation, but as part of a chain of behavior that could lead to other activities, such as remote logins or process creation events.

Mitigation

IDM1035NameLimit Access to Resource Over NetworkDescription

Limit access to network infrastructure and resources that can be used to reshape traffic or otherwise produce AiTM conditions.

IDM1037NameFilter Network TrafficDescription

Use network appliances and host-based security software to block network traffic that is not necessary within the environment, such as legacy protocols that may be leveraged for AiTM conditions.

IDM1041NameEncrypt Sensitive InformationDescription

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.

IDM1042NameDisable or Remove Feature or ProgramDescription

Disable legacy network protocols that may be used to intercept network traffic if applicable, especially those that are not needed within an environment.

IDM1017NameUser TrainingDescription

Train users to be suspicious about certificate errors. Adversaries may use their own certificates in an attempt to intercept HTTPS traffic. Certificate errors may arise when the application’s certificate does not match the one expected by the host.

IDM1031NameNetwork Intrusion PreventionDescription

Network intrusion detection and prevention systems that can identify traffic patterns indicative of AiTM activity can be used to mitigate activity at the network level.

IDM1030NameNetwork SegmentationDescription

Network segmentation can be used to isolate infrastructure components that do not require broad network access. This may mitigate, or at least alleviate, the scope of AiTM activity.