Detection rules › Sigma

Potential Wazuh Security Platform DLL Sideloading

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

Detects potential DLL side loading of DLLs that are part of the Wazuh security platform

Known false positives

  • Many legitimate applications leverage this DLL. (Visual Studio, JetBrains, Ruby, Anaconda, GithubDesktop, etc.)

MITRE ATT&CK coverage

Telemetry coverage

ProviderRecord / event type
SysmonEvent ID 7: Image loaded

Rule body

title: Potential Wazuh Security Platform DLL Sideloading
id: db77ce78-7e28-4188-9337-cf30e2b3ba9f
status: test
description: Detects potential DLL side loading of DLLs that are part of the Wazuh security platform
references:
    - https://www.trendmicro.com/en_us/research/23/c/iron-tiger-sysupdate-adds-linux-targeting.html
author: X__Junior (Nextron Systems)
date: 2023-03-13
modified: 2023-05-12
tags:
    - attack.persistence
    - attack.privilege-escalation
    - attack.execution
    - attack.stealth
    - attack.t1574.001
logsource:
    category: image_load
    product: windows
detection:
    selection:
        ImageLoaded|endswith:
            - '\libwazuhshared.dll'
            - '\libwinpthread-1.dll'
    filter_main_generic:
        ImageLoaded|startswith:
            - 'C:\Program Files\'
            - 'C:\Program Files (x86)\'
    filter_optional_mingw64:
        # Note: Many third party apps installed in "AppData" or "ProgramData" and leverage "mingw64" make use of "libwinpthread-1.dll"
        # In production its best to make a list of these apps and replace this filter with a specific one.
        ImageLoaded|contains:
            - '\AppData\Local\'
            - '\ProgramData\'
        ImageLoaded|endswith: '\mingw64\bin\libwinpthread-1.dll'
    condition: selection and not 1 of filter_main_* and not 1 of filter_optional_*
falsepositives:
    - Many legitimate applications leverage this DLL. (Visual Studio, JetBrains, Ruby, Anaconda, GithubDesktop, etc.)
level: medium

Stages and Predicates

Stage 0: condition

selection and not 1 of filter_main_* and not 1 of filter_optional_*

Stage 1: selection

selection:
    ImageLoaded|endswith:
        - '\libwazuhshared.dll'
        - '\libwinpthread-1.dll'

Stage 2: not filter_main_generic

filter_main_generic:
    ImageLoaded|startswith:
        - 'C:\Program Files\'
        - 'C:\Program Files (x86)\'

Stage 3: not filter_optional_mingw64

filter_optional_mingw64:
    ImageLoaded|contains:
        - '\AppData\Local\'
        - '\ProgramData\'
    ImageLoaded|endswith: '\mingw64\bin\libwinpthread-1.dll'

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
ImageLoadedstarts_withC:\Program Files (x86)\excludes:ImageLoaded field:"ImageLoaded" value:"C:\Program Files (x86)\"
ImageLoadedstarts_withC:\Program Files\excludes:ImageLoaded field:"ImageLoaded" value:"C:\Program Files\"
ImageLoadedmatch\AppData\Local\excludes:ImageLoaded field:"ImageLoaded" value:"\AppData\Local\"
ImageLoadedmatch\ProgramData\excludes:ImageLoaded field:"ImageLoaded" value:"\ProgramData\"
ImageLoadedends_with\mingw64\bin\libwinpthread-1.dllexcludes:ImageLoaded field:"ImageLoaded" value:"\mingw64\bin\libwinpthread-1.dll"

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
ImageLoadedends_with
  • \libwazuhshared.dll
  • \libwinpthread-1.dll
field:"ImageLoaded" kind:ends_with