T1036.003-Rename System Utilities
Adversaries often change the names of system utilities to confuse defenders because what might seem suspicious under one process name could appear completely normal under another.
Malicious Objectives for Renaming System Utilities
Adversaries rename system utilities to evade security controls and bypass detection logic that depends on process names and paths. Through this, the adversaries use existing system utilities on the endpoint, reducing the need for additional malicious payloads post-access. For instance, the analyst may understand and mark the event as a false positive if they analyze the logs of detection due to the renaming of a legitimate process to a suspicious behavior.
An example of this technique is renaming system utilities like certutil.exe to something else, thus potentially bypassing security measures. Another approach to avoiding detection based on typical utility execution paths is to relocate a legitimate system utility to another directory or folder and give it a different name to evade the analyst or security tool.
Through this technique, adversaries abuse legitimate binaries, multiplying the complexity of analyzing the logs and making them detectable. For instance, a behavior might appear suspicious under one process name but seem normal under another. Thus, adversaries aim to keep their suspicious objectives undetectable in the disguise of non-suspicious process names.
For instance, if the process notepad.exe typically doesn’t establish network connections, detecting an adversary using it for such purposes would be easy. However, if notepad.exe were renamed to chrome.exe, actions like external network connections and file downloads would appear to be routine processes.
Mechanism How Adversaries Rename the System Utilities
There's limited approach in how adversaries rename system utilities. They typically either rename the binary or execute a combination of renaming and relocating the system binary. This technique tends to follow predictable behavior: the initial payload, such as a malicious script or document, copies a system binary, assigns it a new name, and, in certain scenarios, relocates it before using it to execute further payloads, establish persistence, or execute other malicious activities.
Note: While renaming or displacing, the adversary remains doesn't touch binary metadata that is linked with the utility. An adversary who manipulates binary metadata is effectively introducing an arbitrary, non-native binary, which is outside the scope of this technique.
In recent cyber attacks, adversaries have frequently abused the following system utilities:
Actions That Need to be Taken
Preventing adversaries from changing the outwardly presented name of a system utility is not easy with this technique. However, if you redefine the method for identifying system binaries, such as basing it on binary metadata rather than filenames, renaming an OS utility becomes practically impossible. Consequently, the most effective mitigation suggestions for this technique are outlined in the detection section below.
Visibility
From a broader perspective, the detection and prevention of the abuse of renamed system utilities is dependent on two major factors:
1.?The capability to distinguish suspicious behaviors irrespective of their source and the ability to ascertain the true identity of any system utility in use.
2. To effectively monitor processes and associated metadata, access to file creation event logs, file integrity monitoring, and EDR systems is crucial. This visibility enables tracking of system utility actions and changes in activity, enhancing overall endpoint security.
Process Monitoring:
Process Metadata:
File Monitoring:
Command Execution:
Detection Technology
Endpoint Detection and Response (EDR) tool
The EDR (Endpoint Detection and Response) tool is equipped to collect the necessary binary metadata essential for revealing the actual identity of a renamed system utility. It's crucial to note that this technique is detectable by EDR solutions due to their capability to collect the required binary metadata. This strengthens EDR to generate alerts on the genuine attributes of a system utility, even if it has been renamed.
Detection Strategy
The effective method for detecting renamed system utilities is by comparing the internal name embedded within the binary file with its externally presented name. Generating alerts whenever these names differ or deviate from expectations can be highly effective. Following are some suggestions to detect this technique:
Known process names:
Paths:
Hash Values:
Command-line Parameters:
Detection Logic
Unexpected Internal Process Name or Hash:
For example, the internal name for powershell.exe is “PowerShell,” and known process names include powershell.exe, powershell, posh.exe, and posh.
Process Execution from Unusual File Paths:
For example, the expected process path associated with cscript.exe (based on its internal name) should be system32, syswow64, and winsxs.
Processes Executing with Unusual Command Lines:
For instance, invoke-expression, also abbreviated as iex, is a cmdlet in PowerShell, so detecting an invoke-expression in a command line linked with another process rather than PowerShell would be suspicious.
Possible Use Case
All these system utilities (cmd.exe, rundll32.exe, certutil.exe, wscript.exe, mshta.exe, utilman.exe, regsvr32.exe,and powershell.exe) are typically executed from the system32 folder. To ensure security, implement a logic that triggers an alert on the security tool if any of these utilities run from a path that doesn't contain system32.
Real-life Example
APT10 (Menupass)
In July 2018, APT10, also known as menuPass, renamed certutil and relocated it within the system to evade detection methods reliant on the tool's typical usage.
FireEye devices detected and blocked what appears to be APT10 (Menupass) activity targeting the Japanese media sector. APT10, a Chinese cyber espionage group under FireEye's surveillance since 2009 and they have a record of targeting Japanese entities.
In this campaign, the group sent spearphishing emails containing malicious documents that led to the installation of the UPPERCUT backdoor. This backdoor is well-known in the security community as ANEL, and it used to come in beta or RC (release candidate) until recently.
The execution workflow is as follows:
3. The macro creates a copy of the files with their proper extensions using Extensible Storage Engine Utilities (esentutil.exe) with the following commands (esentutil.exe is also a legitimate program that is pre-installed in Windows):
The dropped files include the following:
4. The macro launches the legitimate executable GUP.exe.
5. The macro deletes the initially dropped .txt files using Windows esentutl.exe and changes the document text to an embedded message.
The complete attack overview is shown in the below figure.
Several threat actors leverage the technique of using Windows certutil.exe for payload decoding, and APT10 continues to employ this technique.
Feel free to share more insights on this technique! The comment section is open for all security experts to contribute valuable information to our community.
In this article, valuable information was referenced from the MITRE ATT&CK Framework and Mandiant.
Digital Marketer | Cyber Security Practitioner (Ce-CSP) |?CISMP |?ISO 27001 |?ITF+ | CCSK
11 个月Looking forward to diving into your informative series on MITRE ATT&CK techniques! ????