microsoft.ui.xaml.xamltypeinfo.dll

Part of the DLL iconHijack Libs project.

Expected Locations

The file microsoft.ui.xaml.xamltypeinfo.dll is a phantom DLL, meaning it normally doesn't exist.

Vulnerable Executables

The following executable attempts to load microsoft.ui.xaml.xamltypeinfo.dll:

Detection

Below a sample Sigma rule that will find processes that loaded microsoft.ui.xaml.xamltypeinfo.dll located in a folder that is not one of the expected locations (see above).
title: Possible DLL Hijacking of microsoft.ui.xaml.xamltypeinfo.dll
id: 3584231b-7740-48a3-2257-5b9ff8497102
status: experimental
description: Detects possible DLL hijacking of microsoft.ui.xaml.xamltypeinfo.dll by looking for suspicious image loads, loading this DLL from unexpected locations.
references:
    - https://hijacklibs.net/entries/microsoft/built-in/microsoft.ui.xaml.xamltypeinfo.html
author: "Wietze Beukema"
date: 2023-04-03
tags:
    - attack.defense_evasion
    - attack.T1574.001
logsource:
    product: windows
    category: image_load
detection:
    selection:
        ImageLoaded: '*\microsoft.ui.xaml.xamltypeinfo.dll'

    condition: selection 
falsepositives:
    - False positives are likely. This rule is more suitable for hunting than for generating detections.
title: Possible preparation for microsoft.ui.xaml.xamltypeinfo.dll DLL Hijacking
id: 3584232b-7740-48a3-2257-5b9ff8497102
status: experimental
description: Detects possible DLL hijacking of microsoft.ui.xaml.xamltypeinfo.dll by looking for suspicious file writes of this DLL, to unexpected locations.
references:
    - https://hijacklibs.net/entries/microsoft/built-in/microsoft.ui.xaml.xamltypeinfo.html
author: "Wietze Beukema"
date: 2023-04-03
tags:
    - attack.defense_evasion
    - attack.T1574.001
logsource:
    product: windows
    category: file_event
detection:
    selection:
        TargetFileName: '*\microsoft.ui.xaml.xamltypeinfo.dll'

    condition: selection 
falsepositives:
    - False positives are likely. This rule is more suitable for hunting than for generating detections.
Note that this rule is also included in the Sigma feed that comprises all DLL Hijacking entries part of this project.

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 microsoft.ui.xaml.xamltypeinfo.dll.

How do I abuse this vulnerability?
As a red teamer, you'll have to compile your own version of microsoft.ui.xaml.xamltypeinfo.dll. More background on this can be found here.

How could the vendor have prevented this vulnerability?
Phantom DLL Hijacking vulnerabilities are typically introduced due to human error: for example, a typo may cause an executable to attempt to load a non-existing DLL; similarly, the removal of a DLL without removing the reference in the depending application will result in the same. Better (code coverage) testing and unused dependency detection may aid in catching potential Phantom DLL vulnerabilities from being introduced.

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.