Potential Vcruntime140 DLL Sideloading
Detects potential DLL sideloading of vcruntime140.dll, a common C++ runtime library, often used by threat actors like APT29 (via WinELOADER) to load malicious payloads under the guise of legitimate applications, leading to defense evasion, persistence, and privilege escalation.
This brief addresses the threat of DLL sideloading, specifically targeting the vcruntime140.dll library, a common component of the Visual C++ Redistributable. Threat actors, including APT29, have been observed exploiting this technique to load malicious payloads disguised as legitimate applications. By placing a malicious vcruntime140.dll in the same directory as a vulnerable application (e.g., SqlWriter, SqlDumper), attackers can hijack the application’s execution flow. This allows them to bypass security measures and execute arbitrary code with the privileges of the compromised application. The use of vcruntime140.dll sideloading has been documented in campaigns involving WinELOADER and targeted attacks against European diplomats. This technique is effective for defense evasion and establishing persistence on compromised systems.
Attack Chain
- The attacker identifies a vulnerable application susceptible to DLL sideloading, such as SqlWriter or SqlDumper.
- The attacker crafts a malicious
vcruntime140.dllcontaining the desired payload (e.g., a reverse shell or malware loader). - The attacker gains initial access to the target system (e.g., through phishing or exploiting a software vulnerability).
- The attacker places the malicious
vcruntime140.dllin the same directory as the vulnerable application. - The attacker executes the vulnerable application (e.g., SqlWriter.exe).
- The application attempts to load
vcruntime140.dllfrom its local directory, inadvertently loading the malicious version instead of the legitimate system library. - The malicious DLL executes its payload within the context of the vulnerable application, bypassing security controls.
- The attacker achieves persistence and privilege escalation, enabling further malicious activities on the compromised system.
Impact
Successful DLL sideloading can lead to a complete compromise of the affected system. Attackers can use this technique to execute arbitrary code, install malware, steal sensitive data, or establish a persistent foothold for future attacks. This technique has been observed in targeted attacks against political organizations and diplomats, highlighting its potential for espionage and disruption. If successful, organizations risk data breaches, financial loss, and reputational damage.
Recommendation
- Deploy the Sigma rule “Potential Vcruntime140 DLL Sideloading” to your SIEM to detect instances of suspicious
vcruntime140.dllloading from non-standard paths (logsource: image_load/windows). - Investigate any instances of
vcruntime140.dllbeing loaded from directories other thanC:\Windows\System32\,C:\Windows\SysWOW64\,C:\Program Files\, orC:\Program Files (x86)\using process creation logs. - Implement application whitelisting to prevent the execution of unauthorized applications and DLLs.
- Monitor for unsigned or improperly signed instances of
vcruntime140.dllbeing loaded.
Detection coverage 2
Suspicious Vcruntime140 DLL Load from Non-Standard Path
highDetects vcruntime140.dll loaded from a non-standard directory, which could indicate DLL sideloading.
Suspicious Vcruntime140 DLL Load Without Microsoft Signature
mediumDetects vcruntime140.dll being loaded without a valid Microsoft signature, which could indicate a malicious sideloaded DLL.
Detection queries are kept inside the platform. Get full rules →