concrt140.dll
Part of the HijackLibs project.
Expected Locations
The fileconcrt140.dll
is normally found in the following paths:
%PROGRAMFILES%\Microsoft Visual Studio\%VERSION%\Community\Common7\IDE\VC\vcpackages
%PROGRAMFILES%\Microsoft Visual Studio\%VERSION%\BuildTools\Common7\IDE\VC\vcpackages
%PROGRAMFILES%\Microsoft Visual Studio\%VERSION%\BuildTools\Common7\IDE
Vulnerable Executables
The following executable attempts to loadconcrt140.dll
:
Detection
Below a sample Sigma rule that will find processes that loadedconcrt140.dll
located in a folder that is not one of the expected locations (see above).
title: Possible DLL Hijacking of concrt140.dll
id: 8484041b-9387-48a3-7560-5b9ff8877196
status: experimental
description: Detects possible DLL hijacking of concrt140.dll by looking for suspicious image loads, loading this DLL from unexpected locations.
references:
- https://hijacklibs.net/entries/microsoft/external/concrt140.html
author: "Austin Worline"
date: 2025-04-06
tags:
- attack.defense_evasion
- attack.T1574.002
logsource:
product: windows
category: image_load
detection:
selection:
ImageLoaded: '*\concrt140.dll'
filter:
ImageLoaded:
- 'c:\program files\Microsoft Visual Studio\*\Community\Common7\IDE\VC\vcpackages\*'
- 'c:\program files (x86)\Microsoft Visual Studio\*\Community\Common7\IDE\VC\vcpackages\*'
- 'c:\program files\Microsoft Visual Studio\*\BuildTools\Common7\IDE\VC\vcpackages\*'
- 'c:\program files (x86)\Microsoft Visual Studio\*\BuildTools\Common7\IDE\VC\vcpackages\*'
- 'c:\program files\Microsoft Visual Studio\*\BuildTools\Common7\IDE\*'
- 'c:\program files (x86)\Microsoft Visual Studio\*\BuildTools\Common7\IDE\*'
condition: selection and not filter
falsepositives:
- False positives are likely. This rule is more suitable for hunting than for generating detections.
title: Possible preparation for concrt140.dll DLL Hijacking
id: 8484042b-9387-48a3-7560-5b9ff8877196
status: experimental
description: Detects possible DLL hijacking of concrt140.dll by looking for suspicious file writes of this DLL, to unexpected locations.
references:
- https://hijacklibs.net/entries/microsoft/external/concrt140.html
author: "Austin Worline"
date: 2025-04-06
tags:
- attack.defense_evasion
- attack.T1574.002
logsource:
product: windows
category: file_event
detection:
selection:
TargetFileName: '*\concrt140.dll'
filter:
TargetFileName:
- 'c:\program files\Microsoft Visual Studio\*\Community\Common7\IDE\VC\vcpackages\*'
- 'c:\program files (x86)\Microsoft Visual Studio\*\Community\Common7\IDE\VC\vcpackages\*'
- 'c:\program files\Microsoft Visual Studio\*\BuildTools\Common7\IDE\VC\vcpackages\*'
- 'c:\program files (x86)\Microsoft Visual Studio\*\BuildTools\Common7\IDE\VC\vcpackages\*'
- 'c:\program files\Microsoft Visual Studio\*\BuildTools\Common7\IDE\*'
- 'c:\program files (x86)\Microsoft Visual Studio\*\BuildTools\Common7\IDE\*'
condition: selection and not filter
falsepositives:
- False positives are likely. This rule is more suitable for hunting than for generating detections.
FAQs
Why should I care about this?
DLL Hijacking enables the execution of malicious code through a signed and/or trusted executable. Defensive measures such as AV and EDR solutions may not pick up on this activity out of the box, and allow-list applications such as AppLocker may not block the execution of the untrusted code. There are numerous examples of threat actors that have been observed to leaverage DLL Hijacking to achieve their objectives. As such, this project wants to encourage you to monitor for unusual activity involving concrt140.dll
.
How do I abuse this vulnerability?
As a red teamer, you will have to compile your own version of concrt140.dll
. There are various guides on how this can be achieved.
How could the vendor have prevented this vulnerability?
Most DLL Hijacking vulnerabilities are introduced by the 'lazy' loading of DLL files, which relies on Windows' default DLL search order. Explicitly specifying where a required DLL is located is easy and often already helps a lot. This doesn't have to hurt portability if Windows API calls are used to obtain paths, e.g. GetSystemDirectory to get the path of the System32 folder. Even better is to check the signature of required DLLs prior to loading them; most platforms, frameworks and/or runtimes offer means to verify DLL signatures with minimal performance impact.
This DLL Hijack doesn't seem to work (anymore), why is it still included?
Luckily, vendors regularly patch vulnerable applications in order to prevent DLL Hijacking from taking place. Nevertheless, older versions will remain vulnerable; for that reason, the entry won't be deleted from this project. To help others, you may want to open a pull request updating the 'precondition' tag on this entry to make the community aware of the reduced scope.