Detection rules › Sigma

Potential Mpclient.DLL Sideloading

Status
test
Severity
high
Log source
product windows, category image_load
Author
Bhabesh Raj
Source
github.com/SigmaHQ/sigma

Detects potential sideloading of "mpclient.dll" by Windows Defender processes ("MpCmdRun" and "NisSrv") from their non-default directory.

MITRE ATT&CK coverage

Event coverage

ProviderEventTitle
SysmonEvent ID 7Image loaded

Rule body yaml

title: Potential Mpclient.DLL Sideloading
id: 418dc89a-9808-4b87-b1d7-e5ae0cb6effc
related:
    - id: 7002aa10-b8d4-47ae-b5ba-51ab07e228b9
      type: similar
status: test
description: Detects potential sideloading of "mpclient.dll" by Windows Defender processes ("MpCmdRun" and "NisSrv") from their non-default directory.
references:
    - https://www.sentinelone.com/blog/living-off-windows-defender-lockbit-ransomware-sideloads-cobalt-strike-through-microsoft-security-tool
author: Bhabesh Raj
date: 2022-08-02
modified: 2023-08-04
tags:
    - attack.privilege-escalation
    - attack.persistence
    - attack.execution
    - attack.stealth
    - attack.t1574.001
logsource:
    product: windows
    category: image_load
detection:
    selection:
        ImageLoaded|endswith: '\mpclient.dll'
        Image|endswith:
            - '\MpCmdRun.exe'
            - '\NisSrv.exe'
    filter_main_known_locations:
        Image|startswith:
            - 'C:\Program Files (x86)\Windows Defender\'
            - 'C:\Program Files\Microsoft Security Client\'
            - 'C:\Program Files\Windows Defender\'
            - 'C:\ProgramData\Microsoft\Windows Defender\Platform\'
            - 'C:\Windows\WinSxS\'
    condition: selection and not 1 of filter_main_*
falsepositives:
    - Unlikely
level: high

Stages and Predicates

Stage 0: condition

selection and not 1 of filter_main_*

Stage 1: selection

selection:
    ImageLoaded|endswith: '\mpclient.dll'
    Image|endswith:
        - '\MpCmdRun.exe'
        - '\NisSrv.exe'

Stage 2: not filter_main_known_locations

filter_main_known_locations:
    Image|startswith:
        - 'C:\Program Files (x86)\Windows Defender\'
        - 'C:\Program Files\Microsoft Security Client\'
        - 'C:\Program Files\Windows Defender\'
        - 'C:\ProgramData\Microsoft\Windows Defender\Platform\'
        - 'C:\Windows\WinSxS\'

Exclusions

Top-level NOT(...) conjuncts: predicates this rule actively suppresses.

FieldKindExcluded values
Imagestarts_withC:\Program Files (x86)\Windows Defender\
Imagestarts_withC:\Program Files\Microsoft Security Client\
Imagestarts_withC:\Program Files\Windows Defender\
Imagestarts_withC:\ProgramData\Microsoft\Windows Defender\Platform\
Imagestarts_withC:\Windows\WinSxS\

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
Imageends_with
  • \MpCmdRun.exe corpus 4 (sigma 4)
  • \NisSrv.exe corpus 2 (sigma 2)
ImageLoadedends_with
  • \mpclient.dll