How Traffic Analysis Systems Detect MITER ATT & CK Hacker Tactics Using PT Network Attack Discovery



In a previous article, we examined the techniques of two MITER ATT & CK tactics - initial access and execution, as well as how to detect suspicious activity in network traffic using our NTA solution . Now we’ll show you how our technologies work with persistence, privilege escalation, and defense evasion techniques.

Fastening (persistence)


Attackers use pinning tactics to ensure their continued presence in the attacked system. They need to be sure that even after restarting the system or changing credentials, their access to the system will remain. So they will be able at any time to control a compromised system, move along the infrastructure and achieve their goals.

Using traffic analysis, you can discover five fixing techniques.

1. T1133 : external remote services


The technique of using external remote services to consolidate externally on the internal resources of the company. Examples of such services: VPN and Citrix.

What PT Network Attack Discovery (PT NAD) does : it sees network sessions established via VPN or Citrix in the company's internal network. The analyst can study such sessions in detail and make a conclusion about their legitimacy.

2. T1053 : scheduled task


Using the Windows Task Scheduler and other utilities to program the launch of programs or scripts at a specific time. Attackers create such tasks, as a rule, remotely, which means that such sessions with the launch of task schedulers are visible in traffic.

What PT NAD does : if a domain controller sends XML files describing tasks created through group policies, our NTA solution automatically extracts such files. They contain information about the frequency of the task launch, which may indicate the use of the task scheduler for fixing to the network.

3. T1078 : valid accounts


Use of credentials: standard, local or domain for authorization on external and internal services.

What PT NAD does : automatically extracts credentials from HTTP, FTP, SMTP, POP3, IMAP, SMB, DCE / RPC, SOCKS5, LDAP, Kerberos. In general, this is a username, password and a sign of authentication success. If they were used, they are displayed in the corresponding session card.

4. T1100 : web shell


A script that is hosted on a web server and allows an attacker to gain control of that server. Since such scripts work in automatic mode and continue to function even after the server is rebooted, this technique can be used by cybercriminals during the fixing phase in the system.

What PT NAD does : it automatically detects the loading of common web shells, accessing them via HTTP requests and sending commands.

5. T1084 : Windows Management Instrumentation Event Subscription


Subscribing to events in WMI - technologies for managing components of local and remote operating systems. Attackers can use WMI to subscribe to certain events and trigger the execution of malicious code when this event occurs. Thus, attackers ensure a constant presence in the system. Examples of events that you can subscribe to: the onset of a certain time on the system clock or the expiration of a certain number of seconds from the moment the operating system starts.

What does PT NAD do?: Detects the use of the Windows Management Instrumentation Event Subscription technique using rules. One of them works when the network uses the ActiveScriptEventConsumer standard subscriber class, which allows code to be executed when an event occurs and thereby attach the attacker to the network node.

For example, after analyzing a session card with a rule triggering, we see that this activity was caused by the hacker tool Impacket: in the same session, a detector for using this tool for remote code execution worked.



The session card in which the use of the Impacket tool was revealed. With its help, attackers use a standard subscriber to remotely execute commands

Privilege escalation


Privilege escalation techniques are aimed at obtaining higher-level permissions in the attacked system. To do this, attackers exploit the weaknesses of systems, exploit configuration errors and vulnerabilities.

1. T1078 : valid accounts


This is identity theft: standard, local, or domain.

What PT NAD does : it sees which user has logged in, whereby it is possible to identify illegitimate inputs. One of the most common ways to increase privileges on a remote or local host that are running Windows is to create a Windows task scheduler task that will run on behalf of NT AUTHORITY \ SYSTEM, which makes it possible to execute commands with maximum privileges on the system.

Consider the case of creating such a task over the network using the ATExec tool. It is based on the components of the Impacket library and was created to demonstrate the library's ability to work with the remote protocol for the task scheduler. Its work is visible in network traffic, and it well illustrates the technique of elevating privileges from the administrator level of a network node to the NT AUTHORITY \ SYSTEM level.

PT NAD automatically detected the creation of scheduler tasks on the remote host. The attack card below shows that the connection was made on behalf of the user contoso \ user02. A successful SMB connection to the ADMIN $ resource of the target host indicates that this user is a member of the local administrators group on the destination host. However, the XML description of the task indicates that it will be executed in the context of NT AUTHORITY \ SYSTEM (SID S-1-5-18):



Detecting remote task creation using ATExec utility

Defense Evasion


This tactic brings together techniques by which an attacker can hide malicious activity and avoid detection by means of protection. Nine of these techniques can be detected using traffic analysis systems.

1. T1191: CMSTP (Microsoft Connection Manager Profile Installer)


Attackers are preparing a special malicious installation .inf file for the Windows Connectivity Manager Profile Installer utility (CMSTP.exe). CMSTP.exe takes the file as a parameter and sets the service profile for a remote connection. As a result, CMSTP.exe can be used to download and execute dynamically connected libraries (* .dll) or scriptlets (* .sct) from remote servers. In this way, attackers can bypass the whitelist policy for running programs.

What PT NAD does : it automatically detects the transmission of special .inf files in HTTP traffic. In addition to this, he sees HTTP protocol transmission of malicious scriptlets and dynamically-connected libraries from a remote server.

2. T1090 : connection proxy


Attackers can use a proxy server as an intermediary to exchange data with a C2 server. So they avoid direct connections to their infrastructure and complicate the ability to detect them.

What PT NAD does : determines the use of the SOCKS5 protocol (it sends data from the client to the destination server through a proxy server invisibly to them) and an HTTP proxy. If connections via SOCKS 5 protocol or through an HTTP proxy server are associated with suspicious events, then such connections may indicate a compromise.

3. T1207 : DCShadow


Creating a fake domain controller to bypass detection by SIEM systems, which allows malicious modifications to the AD scheme through the replication mechanism.

What PT NAD does : when using the DCShadow technique, a fake domain controller is created that does not send events to SIEM. Using such a domain controller, an attacker can modify Active Directory data - for example, information about any domain object, user credentials, and keys.

The use of such a technique can be identified by traffic. It clearly shows the addition of a new object to the configuration scheme of the domain controller type. The NTA system detects an attempt to attack DCShadow by detecting traffic specific to a domain controller from a network node that is not a domain controller.



PT NAD recorded an attempt to attack DCShadow

4. T1211 : exploitation for defense evasion


Exploiting vulnerabilities of the target system to bypass security features.

What PT NAD does : Automatically detects several popular exploitation techniques for vulnerabilities. For example, he identifies a technique for circumventing web application security based on duplicate HTTP headers.

5. T1170 : mshta


Using the mshta.exe utility, which runs Microsoft HTML applications (HTA) with the .hta extension. Since mshta processes files bypassing browser security settings, attackers can use mshta.exe to execute malicious HTA, JavaScript, or VBScript files. Attackers use the mshta technique most often to bypass whitelisting policies for running programs and triggering SIEM detection rules.

What PT NAD does : detects the transfer of malicious HTA files automatically. It captures files and information about them can be viewed in the session card.

6. T1027 : obfuscated files or information


An attempt to make an executable file or network traffic difficult for security tools to detect and analyze by encrypting, encoding or obfuscating (obfuscating) its contents.

What PT NAD does : it detects the transfer of executable files encoded using Base64, ROT13 algorithms or encrypted using gamma. Obfuscated traffic that some malware creates is also automatically detected.

7. T1108 : redundant access


A technique in which attackers use more than one remote access utility. If one of the tools is detected and blocked, the attackers will still have access to the network.

What PT NAD does : parses popular protocols, so it sees the activity of each network node. Using filters, the analyst can find all sessions of remote access tools installed from one node.

8. T1064 : scripting


Execution of scripts to automate various attacking actions, including bypassing whitelisting policies for launching programs.

What PT NAD does : it reveals the facts of script transmission over the network, that is, even before they are launched. It detects the content of scripts in raw traffic and detects the transfer of files over the network with extensions corresponding to popular scripting languages.

9. T1045 : software packing


A technique in which attackers use special utilities to compress or encrypt an executable file in order to avoid detection by signature protection systems. Such utilities are called packers.

What PT NAD does : it automatically detects signs that the transmitted executable file has been modified using the popular packer.

Instead of a conclusion


We remind you that the full mapping of PT NAD to the MITER ATT & CK matrix is published on Habré .

In the following articles, we will talk about other tactics and techniques of hackers and how the PT Network Attack Discovery NTA-system helps to identify them. Stay with us!

Authors:

  • Anton Kutepov, Specialist, PT Expert Security Center Positive Technologies
  • Natalia Kazankova, product marketer Positive Technologies

All Articles