Description
Adversaries may inject malicious code into process via process doppelgänging in order to evade process-based defenses as well as possibly elevate privileges. Process doppelgänging is a method of executing arbitrary code in the address space of a separate live process.
Windows Transactional NTFS (TxF) was introduced in Vista as a method to perform safe file operations. (Citation: Microsoft TxF) To ensure data integrity, TxF enables only one transacted handle to write to a file at a given time. Until the write handle transaction is terminated, all other handles are isolated from the writer and may only read the committed version of the file that existed at the time the handle was opened. (Citation: Microsoft Basic TxF Concepts) To avoid corruption, TxF performs an automatic rollback if the system or application fails during a write transaction. (Citation: Microsoft Where to use TxF)
Although deprecated, the TxF application programming interface (API) is still enabled as of Windows 10. (Citation: BlackHat Process Doppelgänging Dec 2017)
Adversaries may abuse TxF to a perform a file-less variation of Process Injection. Similar to Process Hollowing, process doppelgänging involves replacing the memory of a legitimate process, enabling the veiled execution of malicious code that may evade defenses and detection. Process doppelgänging's use of TxF also avoids the use of highly-monitored API functions such as NtUnmapViewOfSection, VirtualProtectEx, and SetThreadContext. (Citation: BlackHat Process Doppelgänging Dec 2017)
Process Doppelgänging is implemented in 4 steps (Citation: BlackHat Process Doppelgänging Dec 2017):
Transact – Create a TxF transaction using a legitimate executable then overwrite the file with malicious code. These changes will be isolated and only visible within the context of the transaction. Load – Create a shared section of memory and load the malicious executable. Rollback – Undo changes to original executable, effectively removing malicious code from the file system. Animate – Create a process from the tainted section of memory and initiate execution.
This behavior will likely not result in elevated privileges since the injected process was spawned from (and thus inherits the security context) of the injecting process. However, execution via process doppelgänging may evade detection from security products since the execution is masked under a legitimate process.
Platforms
Mitigations (1)
Behavior Prevention on EndpointM1040
Some endpoint security solutions can be configured to block some types of process injection based on common sequences of behavior that occur during the injection process.
Threat Groups (1)
| ID | Group | Context |
|---|---|---|
| G0077 | Leafminer | [Leafminer](https://attack.mitre.org/groups/G0077) has used [Process Doppelgänging](https://attack.mitre.org/techniques/T1055/013) to evade security s... |
Associated Software (2)
| ID | Name | Type | Context |
|---|---|---|---|
| S0242 | SynAck | Malware | [SynAck](https://attack.mitre.org/software/S0242) abuses NTFS transactions to launch and conceal malicious processes.(Citation: SecureList SynAck Dopp... |
| S0534 | Bazar | Malware | [Bazar](https://attack.mitre.org/software/S0534) can inject into a target process using process doppelgänging.(Citation: Cybereason Bazar July 2020)(C... |
Related CWE Weaknesses
References
- Liberman, T. & Kogan, E. (2017, December 7). Lost in Transaction: Process Doppelgänging. Retrieved December 20, 2017.
- Microsoft. (n.d.). Basic TxF Concepts. Retrieved December 20, 2017.
- Microsoft. (n.d.). Transactional NTFS (TxF). Retrieved December 20, 2017.
- Microsoft. (n.d.). When to Use Transactional NTFS. Retrieved December 20, 2017.
Frequently Asked Questions
What is T1055.013 (Process Doppelgänging)?
T1055.013 is a MITRE ATT&CK technique named 'Process Doppelgänging'. It belongs to the Stealth, Privilege Escalation tactic(s). Adversaries may inject malicious code into process via process doppelgänging in order to evade process-based defenses as well as possibly elevate privileges. Process doppelgänging is a method of execu...
How can T1055.013 be detected?
Detection of T1055.013 (Process Doppelgänging) typically involves monitoring system logs, network traffic, and endpoint telemetry. Use SIEM rules, EDR solutions, and behavioral analytics to identify suspicious activity associated with this technique.
What mitigations exist for T1055.013?
There are 1 documented mitigations for T1055.013. Key mitigations include: Behavior Prevention on Endpoint.
Which threat groups use T1055.013?
Known threat groups using T1055.013 include: Leafminer.