Detection rules › Sigma

Potential Mfdetours.DLL Sideloading

Status
test
Severity
medium
Log source
category image_load, product windows
Author
Nasreddine Bencherchali (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detects potential DLL sideloading of "mfdetours.dll". While using "mftrace.exe" it can be abused to attach to an arbitrary process and force load any DLL named "mfdetours.dll" from the current directory of execution.

Known false positives

  • Unlikely

MITRE ATT&CK coverage

Telemetry coverage

ProviderRecord / event type
SysmonEvent ID 7: Image loaded

Rule body

title: Potential Mfdetours.DLL Sideloading
id: d2605a99-2218-4894-8fd3-2afb7946514d
status: test
description: Detects potential DLL sideloading of "mfdetours.dll". While using "mftrace.exe" it can be abused to attach to an arbitrary process and force load any DLL named "mfdetours.dll" from the current directory of execution.
references:
    - Internal Research
author: Nasreddine Bencherchali (Nextron Systems)
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

Stages and Predicates

Stage 0: condition

selection and not 1 of filter_main_*

Stage 1: selection

selection:
    ImageLoaded|endswith: '\mfdetours.dll'

Stage 2: not filter_main_legit_path

filter_main_legit_path:
    ImageLoaded|contains: ':\Program Files (x86)\Windows Kits\10\bin\'

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
ImageLoadedmatch:\Program Files (x86)\Windows Kits\10\bin\excludes:ImageLoaded field:"ImageLoaded" value:":\Program Files (x86)\Windows Kits\10\bin\"

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
ImageLoadedends_with
  • \mfdetours.dll corpus 2 (sigma 2)
field:"ImageLoaded" kind:ends_with value:"\mfdetours.dll"