Stealth Execution

T1574.001: DLL

Adversaries may abuse dynamic-link library files (DLLs) in order to achieve persistence, escalate privileges, and evade defenses. DLLs are libraries that contain code and data that can be simultaneous...

T1574.001 · Sub-technique ·1 platforms ·35 groups

Description

Adversaries may abuse dynamic-link library files (DLLs) in order to achieve persistence, escalate privileges, and evade defenses. DLLs are libraries that contain code and data that can be simultaneously utilized by multiple programs. While DLLs are not malicious by nature, they can be abused through mechanisms such as side-loading, hijacking search order, and phantom DLL hijacking.(Citation: unit 42)

Specific ways DLLs are abused by adversaries include:

### DLL Sideloading Adversaries may execute their own malicious payloads by side-loading DLLs. Side-loading involves hijacking which DLL a program loads by planting and then invoking a legitimate application that executes their payload(s).

Side-loading positions both the victim application and malicious payload(s) alongside each other. Adversaries likely use side-loading as a means of masking actions they perform under a legitimate, trusted, and potentially elevated system or software process. Benign executables used to side-load payloads may not be flagged during delivery and/or execution. Adversary payloads may also be encrypted/packed or otherwise obfuscated until loaded into the memory of the trusted process.

Adversaries may also side-load other packages, such as BPLs (Borland Package Library).(Citation: kroll bpl)

Adversaries may chain DLL sideloading multiple times to fragment functionality hindering analysis. Adversaries using multiple DLL files can split the loader functions across different DLLs, with a main DLL loading the separated export functions. (Citation: Virus Bulletin) Spreading loader functions across multiple DLLs makes analysis harder, since all files must be collected to fully understand the malware’s behavior. Another method implements a “loader-for-a-loader”, where a malicious DLL’s sole role is to load a second DLL (or a chain of DLLs) that contain the real payload. (Citation: Sophos)

### DLL Search Order Hijacking Adversaries may execute their own malicious payloads by hijacking the search order that Windows uses to load DLLs. This search order is a sequence of special and standard search locations that a program checks when loading a DLL. An adversary can plant a trojan DLL in a directory that will be prioritized by the DLL search order over the location of a legitimate library. This will cause Windows to load the malicious DLL when it is called for by the victim program.(Citation: unit 42)

### DLL Redirection Adversaries may directly modify the search order via DLL redirection, which after being enabled (in the Registry or via the creation of a redirection file) may cause a program to load a DLL from a different location.(Citation: Microsoft redirection)(Citation: Microsoft - manifests/assembly)

### Phantom DLL Hijacking Adversaries may leverage phantom DLL hijacking by targeting references to non-existent DLL files. They may be able to load their own malicious DLL by planting it with the correct name in the location of the missing module.(Citation: Hexacorn DLL Hijacking)(Citation: Hijack DLLs CrowdStrike)

### DLL Substitution Adversaries may target existing, valid DLL files and substitute them with their own malicious DLLs, planting them with the same name and in the same location as the valid DLL file.(Citation: Wietze Beukema DLL Hijacking)

Programs that fall victim to DLL hijacking may appear to behave normally because malicious DLLs may be configured to also load the legitimate DLLs they were meant to replace, evading defenses.

Remote DLL hijacking can occur when a program sets its current directory to a remote location, such as a Web share, before loading a DLL.(Citation: dll pre load owasp)(Citation: microsoft remote preloading)

If a valid DLL is configured to run at a higher privilege level, then the adversary-controlled DLL that is loaded will also be executed at the higher level. In this case, the technique could be used for privilege escalation.

Platforms

Windows

Mitigations (5)

Application Developer GuidanceM1013

When possible, include hash values in manifest files to help prevent side-loading of malicious libraries.

Execution PreventionM1038

Identify and block potentially malicious software executed through DLL hijacking by using application control solutions capable of blocking DLLs loaded by legitimate software.(Citation: Microsoft AppLocker DLL)

AuditM1047

Use auditing tools capable of detecting DLL search order hijacking opportunities on systems within an enterprise and correct them. Toolkits like the PowerSploit framework contain PowerUp modules that can be used to explore systems for DLL hijacking weaknesses.(Citation: Powersploit)

Use the program sxstrace.exe that is included with Windows, along with manual inspection, to check manifest files

Update SoftwareM1051

Update software regularly to include patches that fix DLL side-loading vulnerabilities.

Restrict Library LoadingM1044

Disallow loading of remote DLLs. This is included by default in Windows Server 2012+ and is available by patch for XP+ and Server 2003+.(Citation: Microsoft More information about DLL)

Enable Safe DLL Search Mode to move the user's current folder later in the search order. This is included by default in modern versions of Windows; the associated Windows Registry key is located at HKLM\SYSTE

Threat Groups (35)

IDGroupContext
G1008SideCopy[SideCopy](https://attack.mitre.org/groups/G1008) has used a malicious loader DLL file to execute the `credwiz.exe` process and side-load the maliciou...
G0093GALLIUM[GALLIUM](https://attack.mitre.org/groups/G0093) used DLL side-loading to covertly load [PoisonIvy](https://attack.mitre.org/software/S0012) into memo...
G0022APT3[APT3](https://attack.mitre.org/groups/G0022) has been known to side load DLLs with a valid version of Chrome with one of their tools.(Citation: FireE...
G0040PatchworkA [Patchwork](https://attack.mitre.org/groups/G0040) .dll that contains [BADNEWS](https://attack.mitre.org/software/S0128) is loaded and executed usin...
G0096APT41[APT41](https://attack.mitre.org/groups/G0096) has used search order hijacking to execute malicious payloads, such as [Winnti for Windows](https://att...
G0120Evilnum[Evilnum](https://attack.mitre.org/groups/G0120) has used the malware variant, TerraTV, to load a malicious DLL placed in the TeamViewer directory, in...
G0045menuPass[menuPass](https://attack.mitre.org/groups/G0045) has used DLL side-loading to launch versions of Mimikatz and PwDump6 as well as [UPPERCUT](https://a...
G0050APT32[APT32](https://attack.mitre.org/groups/G0050) ran legitimately-signed executables from Symantec and McAfee which load a malicious DLL. The group also...
G0069MuddyWater[MuddyWater](https://attack.mitre.org/groups/G0069) maintains persistence on victim networks through side-loading dlls to trick legitimate programs in...
G0019Naikon[Naikon](https://attack.mitre.org/groups/G0019) has used DLL side-loading to load malicious DLL's into legitimate executables.(Citation: CheckPoint Na...
G1046Storm-1811[Storm-1811](https://attack.mitre.org/groups/G1046) has deployed a malicious DLL (7z.DLL) that is sideloaded by a modified, legitimate installer (7zG....
G0121Sidewinder[Sidewinder](https://attack.mitre.org/groups/G0121) has used DLL side-loading to drop and execute malicious payloads including the hijacking of the le...
G0129Mustang Panda[Mustang Panda](https://attack.mitre.org/groups/G0129) has used a legitimately signed executable to execute a malicious payload within a DLL file.(Cit...
G0126Higaisa[Higaisa](https://attack.mitre.org/groups/G0126)’s JavaScript file used a legitimate Microsoft Office 2007 package to side-load the <code>OINFO12.OCX<...
G0081Tropic Trooper[Tropic Trooper](https://attack.mitre.org/groups/G0081) has been known to side-load DLLs using a valid version of a Windows Address Book and Windows D...
G0143Aquatic Panda[Aquatic Panda](https://attack.mitre.org/groups/G0143) has used DLL search-order hijacking to load `exe`, `dll`, and `dat` files into memory.(Citation...
G0098BlackTech[BlackTech](https://attack.mitre.org/groups/G0098) has used DLL side loading by giving DLLs hardcoded names and placing them in searched directories.(...
G1021Cinnamon Tempest[Cinnamon Tempest](https://attack.mitre.org/groups/G1021) has used search order hijacking to launch [Cobalt Strike](https://attack.mitre.org/software/...
G0114Chimera[Chimera](https://attack.mitre.org/groups/G0114) has used side loading to place malicious DLLs in memory.(Citation: NCC Group Chimera January 2021)
G1054MirrorFace[MirrorFace](https://attack.mitre.org/groups/G1054) has used legitimate EXE files to load malicious DLLs via sideloading.(Citation: Kaspersky LODEINFO...

Associated Software (75)

IDNameTypeContext
S1100NinjaMalware[Ninja](https://attack.mitre.org/software/S1100) loaders can be side-loaded with legitimate and signed executables including the VLC.exe media player...
S0662RCSessionMalware[RCSession](https://attack.mitre.org/software/S0662) can be installed via DLL side-loading.(Citation: Secureworks BRONZE PRESIDENT December 2019)(Cita...
S9029IronWindMalware[IronWind](https://attack.mitre.org/software/S9029) has used DLL sideloading for execution.(Citation: Check Point Wirte NOV 2024)
S0134DowndelphMalware[Downdelph](https://attack.mitre.org/software/S0134) uses search order hijacking of the Windows executable sysprep.exe to escalate privileges.(Citatio...
S1041ChinoxyMalware[Chinoxy](https://attack.mitre.org/software/S1041) can use a digitally signed binary ("Logitech Bluetooth Wizard Host Process") to load its dll into m...
S1233PAKLOGMalware[PAKLOG](https://attack.mitre.org/software/S1233) has leveraged legitimate binaries to conduct DLL side-loading.(Citation: Zscaler PAKLOG CorkLog Spla...
S0153RedLeavesMalware[RedLeaves](https://attack.mitre.org/software/S0153) is launched through use of DLL search order hijacking to load a malicious dll.(Citation: FireEye ...
S1229HavocMalware[Havoc](https://attack.mitre.org/software/S1229) has leveraged legitimate executables to side-load malicious payloads.(Citation: Check Point Wirte NOV...
S0109WEBC2MalwareVariants of [WEBC2](https://attack.mitre.org/software/S0109) achieve persistence by using DLL search order hijacking, usually by copying the DLL file ...
S0630NebulaeMalware[Nebulae](https://attack.mitre.org/software/S0630) can use DLL side-loading to gain execution.(Citation: Bitdefender Naikon April 2021)
S9026ROAMINGHOUSEMalware[ROAMINGHOUSE](https://attack.mitre.org/software/S9026) can use a legitimate EXE to sideload a malicious DLL named JSFC.dll.(Citation: Trend Micro Ear...
S1239TONESHELLMalware[TONESHELL](https://attack.mitre.org/software/S1239) has abused legitimate executables to side-load malicious DLLs.(Citation: CSIRT CTI MUSTANG PANDA ...
S0629RainyDayMalware[RainyDay](https://attack.mitre.org/software/S0629) can use side-loading to run malicious executables.(Citation: Bitdefender Naikon April 2021)
S0624EcipekacMalware[Ecipekac](https://attack.mitre.org/software/S0624) can abuse the legitimate application policytool.exe to load a malicious DLL.(Citation: Securelist ...
S1226BOOKWORMMalware[BOOKWORM](https://attack.mitre.org/software/S1226) has used DLL side-loading to execute the malicious payload. (Citation: Broadcom)(Citation: Palo Al...
S0113PrikormkaMalware[Prikormka](https://attack.mitre.org/software/S0113) uses DLL search order hijacking for persistence by saving itself as ntshrui.dll to the Windows di...
S1228PUBLOADMalware[PUBLOAD](https://attack.mitre.org/software/S1228) has abused legitimate executables to side-load malicious DLLs.(Citation: Cisco Talos MUSTANG PANDA ...
S1237CANONSTAGERMalware[CANONSTAGER](https://attack.mitre.org/software/S1237) has abused legitimate executables to side-load malicious DLLs.(Citation: Google Threat Intellig...
S1101LoFiSeMalware[LoFiSe](https://attack.mitre.org/software/S1101) has been executed as a file named DsNcDiag.dll through side-loading.(Citation: Kaspersky ToddyCat Ch...
S0612WastedLockerMalware [WastedLocker](https://attack.mitre.org/software/S0612) has performed DLL hijacking before execution.(Citation: NCC Group WastedLocker June 2020)

References

Frequently Asked Questions

What is T1574.001 (DLL)?

T1574.001 is a MITRE ATT&CK technique named 'DLL'. It belongs to the Stealth, Execution tactic(s). Adversaries may abuse dynamic-link library files (DLLs) in order to achieve persistence, escalate privileges, and evade defenses. DLLs are libraries that contain code and data that can be simultaneous...

How can T1574.001 be detected?

Detection of T1574.001 (DLL) 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 T1574.001?

There are 5 documented mitigations for T1574.001. Key mitigations include: Application Developer Guidance, Execution Prevention, Audit, Update Software, Restrict Library Loading.

Which threat groups use T1574.001?

Known threat groups using T1574.001 include: SideCopy, GALLIUM, APT3, Patchwork, APT41, Evilnum, menuPass, APT32.