Detection rules › Sigma

Amsi.DLL Load By Uncommon Process

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

Detects loading of Amsi.dll by uncommon processes

Known false positives

  • Legitimate third party apps installed in "ProgramData" and "AppData" might generate some false positives. Apply additional filters accordingly

MITRE ATT&CK coverage

TacticTechniques
Impact

Telemetry coverage

ProviderRecord / event type
SysmonEvent ID 7: Image loaded

Rule body

title: Amsi.DLL Load By Uncommon Process
id: facd1549-e416-48e0-b8c4-41d7215eedc8
status: test
description: Detects loading of Amsi.dll by uncommon processes
references:
    - https://infosecwriteups.com/amsi-bypass-new-way-2023-d506345944e9
    - https://github.com/TheD1rkMtr/AMSI_patch
    - https://github.com/surya-dev-singh/AmsiBypass-OpenSession
author: frack113
date: 2023-03-12
modified: 2026-06-29
tags:
    - attack.impact
    - attack.t1490
    - detection.threat-hunting
logsource:
    category: image_load
    product: windows
detection:
    selection:
        ImageLoaded|endswith: '\amsi.dll'
    filter_main_exact:
        Image|endswith:
            - ':\Windows\explorer.exe'
            - ':\Windows\Sysmon64.exe'
            - ':\Windows\Sysmon64a.exe'
    filter_main_generic:
        Image|contains:
            - ':\Program Files (x86)\'
            - ':\Program Files\'
            - ':\Windows\System32\'
            - ':\Windows\SysWOW64\'
            - ':\Windows\WinSxS\'
    filter_optional_defender:
        Image|contains: ':\ProgramData\Microsoft\Windows Defender\Platform\'
        Image|endswith: '\MsMpEng.exe'
    filter_main_dotnet:
        Image|contains:
            - ':\Windows\Microsoft.NET\Framework\'
            - ':\Windows\Microsoft.NET\Framework64\'
            - ':\Windows\Microsoft.NET\FrameworkArm\'
            - ':\Windows\Microsoft.NET\FrameworkArm64\'
        Image|endswith: '\ngentask.exe'
    filter_main_null:
        Image: null
    filter_main_empty:
        Image: ''
    condition: selection and not 1 of filter_main_* and not 1 of filter_optional_*
falsepositives:
    - Legitimate third party apps installed in "ProgramData" and "AppData" might generate some false positives. Apply additional filters accordingly
level: low

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: '\amsi.dll'

Stage 2: not filter_main_*

filter_main_exact:
    Image|endswith:
        - ':\Windows\explorer.exe'
        - ':\Windows\Sysmon64.exe'
        - ':\Windows\Sysmon64a.exe'
filter_main_generic:
    Image|contains:
        - ':\Program Files (x86)\'
        - ':\Program Files\'
        - ':\Windows\System32\'
        - ':\Windows\SysWOW64\'
        - ':\Windows\WinSxS\'
filter_main_dotnet:
    Image|contains:
        - ':\Windows\Microsoft.NET\Framework\'
        - ':\Windows\Microsoft.NET\Framework64\'
        - ':\Windows\Microsoft.NET\FrameworkArm\'
        - ':\Windows\Microsoft.NET\FrameworkArm64\'
    Image|endswith: '\ngentask.exe'
filter_main_null:
    Image: null
filter_main_empty:
    Image: ''

Stage 3: not filter_optional_defender

filter_optional_defender:
    Image|contains: ':\ProgramData\Microsoft\Windows Defender\Platform\'
    Image|endswith: '\MsMpEng.exe'

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
Imagematch:\Windows\Microsoft.NET\Framework64\excludes:Image field:"Image" value:":\Windows\Microsoft.NET\Framework64\"
Imagematch:\Windows\Microsoft.NET\FrameworkArm64\excludes:Image field:"Image" value:":\Windows\Microsoft.NET\FrameworkArm64\"
Imagematch:\Windows\Microsoft.NET\FrameworkArm\excludes:Image field:"Image" value:":\Windows\Microsoft.NET\FrameworkArm\"
Imagematch:\Windows\Microsoft.NET\Framework\excludes:Image field:"Image" value:":\Windows\Microsoft.NET\Framework\"
Imageends_with\ngentask.exeexcludes:Image field:"Image" value:"\ngentask.exe"
Imageends_with:\Windows\Sysmon64.exeexcludes:Image field:"Image" value:":\Windows\Sysmon64.exe"
Imageends_with:\Windows\Sysmon64a.exeexcludes:Image field:"Image" value:":\Windows\Sysmon64a.exe"
Imageends_with:\Windows\explorer.exeexcludes:Image field:"Image" value:":\Windows\explorer.exe"
Imageis_null(no value, null check)excludes:Image
Imagematch:\Program Files (x86)\excludes:Image field:"Image" value:":\Program Files (x86)\"
Imagematch:\Program Files\excludes:Image field:"Image" value:":\Program Files\"
Imagematch:\Windows\SysWOW64\excludes:Image field:"Image" value:":\Windows\SysWOW64\"
Imagematch:\Windows\System32\excludes:Image field:"Image" value:":\Windows\System32\"
Imagematch:\Windows\WinSxS\excludes:Image field:"Image" value:":\Windows\WinSxS\"
Imageends_with\MsMpEng.exeexcludes:Image field:"Image" value:"\MsMpEng.exe"
Imagematch:\ProgramData\Microsoft\Windows Defender\Platform\excludes:Image field:"Image" value:":\ProgramData\Microsoft\Windows Defender\Platform\"

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
ImageLoadedends_with
  • \amsi.dll corpus 3 (sigma 3)
field:"ImageLoaded" kind:ends_with value:"\amsi.dll"