Detection rules › Sigma

Potential DLL Sideloading Using Coregen.exe

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

Detect usage of the "coregen.exe" (Microsoft CoreCLR Native Image Generator) binary to sideload arbitrary DLLs.

MITRE ATT&CK coverage

Event coverage

ProviderEventTitle
SysmonEvent ID 7Image loaded

Rule body yaml

title: Potential DLL Sideloading Using Coregen.exe
id: 0fa66f66-e3f6-4a9c-93f8-4f2610b00171
status: test
description: Detect usage of the "coregen.exe" (Microsoft CoreCLR Native Image Generator) binary to sideload arbitrary DLLs.
references:
    - https://lolbas-project.github.io/lolbas/OtherMSBinaries/Coregen/
author: frack113
date: 2022-12-31
tags:
    - attack.privilege-escalation
    - attack.stealth
    - attack.t1218
    - attack.t1055
logsource:
    category: image_load
    product: windows
detection:
    selection:
        Image|endswith: '\coregen.exe'
    filter_main_legit_paths:
        ImageLoaded|startswith:
            - 'C:\Program Files (x86)\Microsoft Silverlight\'
            - 'C:\Program Files\Microsoft Silverlight\'
            - 'C:\Windows\System32\'
            - 'C:\Windows\SysWOW64\'
    condition: selection and not 1 of filter_main_*
falsepositives:
    - Unknown
level: medium

Stages and Predicates

Stage 0: condition

selection and not 1 of filter_main_*

Stage 1: selection

selection:
    Image|endswith: '\coregen.exe'

Stage 2: not filter_main_legit_paths

filter_main_legit_paths:
    ImageLoaded|startswith:
        - 'C:\Program Files (x86)\Microsoft Silverlight\'
        - 'C:\Program Files\Microsoft Silverlight\'
        - 'C:\Windows\System32\'
        - 'C:\Windows\SysWOW64\'

Exclusions

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

FieldKindExcluded values
ImageLoadedstarts_withC:\Program Files (x86)\Microsoft Silverlight\
ImageLoadedstarts_withC:\Program Files\Microsoft Silverlight\
ImageLoadedstarts_withC:\Windows\SysWOW64\
ImageLoadedstarts_withC:\Windows\System32\

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
  • \coregen.exe