Detection rules › Sigma

Unsigned DLL Loaded by Windows Utility

Status
test
Severity
medium
Log source
product windows, category image_load
Author
Swachchhanda Shrawan Poudel
Source
github.com/SigmaHQ/sigma

Detects windows utilities loading an unsigned or untrusted DLL. Adversaries often abuse those programs to proxy execution of malicious code.

MITRE ATT&CK coverage

Event coverage

ProviderEventTitle
SysmonEvent ID 7Image loaded

Rule body yaml

title: Unsigned DLL Loaded by Windows Utility
id: b5de0c9a-6f19-43e0-af4e-55ad01f550af
status: test
description: |
    Detects windows utilities loading an unsigned or untrusted DLL.
    Adversaries often abuse those programs to proxy execution of malicious code.
references:
    - https://www.elastic.co/security-labs/Hunting-for-Suspicious-Windows-Libraries-for-Execution-and-Evasion
    - https://akhere.hashnode.dev/hunting-unsigned-dlls-using-kql
    - https://unit42.paloaltonetworks.com/unsigned-dlls/?web_view=true
author: Swachchhanda Shrawan Poudel
date: 2024-02-28
modified: 2025-10-07
tags:
    - attack.stealth
    - attack.t1218.011
    - attack.t1218.010
logsource:
    product: windows
    category: image_load
detection:
    selection:
        Image|endswith:
            # Note: Add additional utilities that allow the loading of DLLs
            - '\InstallUtil.exe'
            - '\RegAsm.exe'
            - '\RegSvcs.exe'
            - '\regsvr32.exe'
            - '\rundll32.exe'
    filter_main_signed:
        Signed: 'true'
    filter_main_sig_status:
        SignatureStatus:
            - 'errorChaining'
            - 'errorCode_endpoint'
            - 'errorExpired'
            - 'trusted'
            - 'Valid'
    filter_main_signed_null:
        Signed: null
    filter_main_signed_empty:
        Signed:
            - ''
            - '-'
    filter_main_sig_status_null:
        SignatureStatus: null
    filter_main_sig_status_empty:
        SignatureStatus:
            - ''
            - '-'
    filter_main_windows_installer:
        Image:
            - 'C:\Windows\SysWOW64\rundll32.exe'
            - 'C:\Windows\System32\rundll32.exe'
        ImageLoaded|startswith: 'C:\Windows\Installer\'
        ImageLoaded|endswith:
            - '.tmp-\Microsoft.Deployment.WindowsInstaller.dll'
            - '.tmp-\Avira.OE.Setup.CustomActions.dll'
    filter_main_assembly:
        Image|startswith:
            - 'C:\Windows\SysWOW64\'
            - 'C:\Windows\System32\'
            - 'C:\Windows\Microsoft.NET\Framework64'
        Image|endswith: '\RegAsm.exe'
        ImageLoaded|endswith: '.dll'
        ImageLoaded|startswith: 'C:\Windows\assembly\NativeImages'
    filter_optional_klite_codec:
        Image:
            - 'C:\Windows\SysWOW64\regsvr32.exe'
            - 'C:\Windows\System32\regsvr32.exe'
        ImageLoaded|startswith:
            - 'C:\Program Files (x86)\K-Lite Codec Pack\'
            - 'C:\Program Files\K-Lite Codec Pack\'
    condition: selection and not 1 of filter_main_* and not 1 of filter_optional_*
falsepositives:
    - Unknown
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:
    Image|endswith:
        - '\InstallUtil.exe'
        - '\RegAsm.exe'
        - '\RegSvcs.exe'
        - '\regsvr32.exe'
        - '\rundll32.exe'

Stage 2: not filter_main_*

filter_main_signed:
    Signed: 'true'
filter_main_sig_status:
    SignatureStatus:
        - 'errorChaining'
        - 'errorCode_endpoint'
        - 'errorExpired'
        - 'trusted'
        - 'Valid'
filter_main_signed_null:
    Signed: null
filter_main_signed_empty:
    Signed:
        - ''
        - '-'
filter_main_sig_status_null:
    SignatureStatus: null
filter_main_sig_status_empty:
    SignatureStatus:
        - ''
        - '-'
filter_main_windows_installer:
    Image:
        - 'C:\Windows\SysWOW64\rundll32.exe'
        - 'C:\Windows\System32\rundll32.exe'
    ImageLoaded|startswith: 'C:\Windows\Installer\'
    ImageLoaded|endswith:
        - '.tmp-\Microsoft.Deployment.WindowsInstaller.dll'
        - '.tmp-\Avira.OE.Setup.CustomActions.dll'
filter_main_assembly:
    Image|startswith:
        - 'C:\Windows\SysWOW64\'
        - 'C:\Windows\System32\'
        - 'C:\Windows\Microsoft.NET\Framework64'
    Image|endswith: '\RegAsm.exe'
    ImageLoaded|endswith: '.dll'
    ImageLoaded|startswith: 'C:\Windows\assembly\NativeImages'

Stage 3: not filter_optional_klite_codec

filter_optional_klite_codec:
    Image:
        - 'C:\Windows\SysWOW64\regsvr32.exe'
        - 'C:\Windows\System32\regsvr32.exe'
    ImageLoaded|startswith:
        - 'C:\Program Files (x86)\K-Lite Codec Pack\'
        - 'C:\Program Files\K-Lite Codec Pack\'

Exclusions

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

FieldKindExcluded values
ImageeqC:\Windows\SysWOW64\rundll32.exe
ImageeqC:\Windows\System32\rundll32.exe
ImageLoadedends_with.tmp-\Avira.OE.Setup.CustomActions.dll
ImageLoadedends_with.tmp-\Microsoft.Deployment.WindowsInstaller.dll
ImageLoadedstarts_withC:\Windows\Installer\
Imagestarts_withC:\Windows\Microsoft.NET\Framework64
Imagestarts_withC:\Windows\SysWOW64\
Imagestarts_withC:\Windows\System32\
Imageends_with\RegAsm.exe
ImageLoadedends_with.dll
ImageLoadedstarts_withC:\Windows\assembly\NativeImages
SignatureStatuseq-
SignatureStatuseqValid
SignatureStatuseqerrorChaining
SignatureStatuseqerrorCode_endpoint
SignatureStatuseqerrorExpired
SignatureStatuseqtrusted
SignatureStatusis_null(no value, null check)
Signedeq-
Signedeqtrue
Signedis_null(no value, null check)
ImageeqC:\Windows\SysWOW64\regsvr32.exe
ImageeqC:\Windows\System32\regsvr32.exe
ImageLoadedstarts_withC:\Program Files (x86)\K-Lite Codec Pack\
ImageLoadedstarts_withC:\Program Files\K-Lite Codec Pack\

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
  • \InstallUtil.exe corpus 9 (sigma 9)
  • \RegAsm.exe corpus 9 (sigma 9)
  • \RegSvcs.exe corpus 8 (sigma 8)
  • \regsvr32.exe corpus 65 (sigma 65)
  • \rundll32.exe corpus 95 (sigma 95)