Windows DLL Sideloading via mfdetours.dll using mftrace.exe

Alerts on mfdetours.dll loads that may indicate DLL sideloading outside the expected Windows Kits location.

FreeReviewedSigma · Medium · v2
Product
windows
Category
image_load
Author
Nasreddine Bencherchali (Nextron Systems) (SigmaHQ), DRL 1.1
Published
2023-08-03
Updated
2026-07-31
title: Windows DLL Sideloading via mfdetours.dll using mftrace.exe
id: cac88179-d22e-4308-bea4-f4ae25464b8b
status: test
description: This rule flags Windows processes that load a DLL named mfdetours.dll from locations other than a known legitimate Windows Kits path. Attackers can abuse mftrace.exe to attach to an arbitrary process and force it to load mfdetours.dll from the current directory, enabling DLL sideloading for persistence, privilege escalation, or stealth. The detection relies on image load telemetry indicating when mfdetours.dll is loaded and uses path filtering to reduce likely benign matches.
references:
  - Internal Research
  - https://github.com/SigmaHQ/sigma/blob/master/rules/windows/image_load/image_load_side_load_mfdetours.yml
author: Nasreddine Bencherchali (Nextron Systems), Huntrule Team
date: 2023-08-03
tags:
  - attack.persistence
  - attack.privilege-escalation
  - attack.execution
  - attack.stealth
  - attack.t1574.001
logsource:
  category: image_load
  product: windows
detection:
  selection:
    ImageLoaded|endswith: \mfdetours.dll
  filter_main_legit_path:
    ImageLoaded|contains: :\Program Files (x86)\Windows Kits\10\bin\
  condition: selection and not 1 of filter_main_*
falsepositives:
  - Unlikely
level: medium
license: DRL-1.1
related:
  - id: d2605a99-2218-4894-8fd3-2afb7946514d
    type: derived