Detection rules › Sigma

Potential Wazuh Security Platform DLL Sideloading

Status
test
Severity
medium
Log source
product windows, category image_load
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

MITRE ATT&CK coverage

Event coverage

ProviderEventTitle
SysmonEvent ID 7Image loaded

Rule body yaml

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

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

FieldKindExcluded values
ImageLoadedstarts_withC:\Program Files (x86)\
ImageLoadedstarts_withC:\Program Files\
ImageLoadedmatch\AppData\Local\
ImageLoadedmatch\ProgramData\
ImageLoadedends_with\mingw64\bin\libwinpthread-1.dll

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
ImageLoadedends_with
  • \libwazuhshared.dll
  • \libwinpthread-1.dll