Detection rules › Sigma

Regsvr32 Execution From Potential Suspicious Location

Status
test
Severity
medium
Log source
category process_creation, product windows
Author
Florian Roth (Nextron Systems), Nasreddine Bencherchali (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detects execution of regsvr32 where the DLL is located in a potentially suspicious location.

Known false positives

  • Some installers might execute "regsvr32" with DLLs located in %TEMP% or in %PROGRAMDATA%. Apply additional filters if necessary.

MITRE ATT&CK coverage

Telemetry coverage

ProviderRecord / event type
SysmonEvent ID 1: Process creation

Rule body

title: Regsvr32 Execution From Potential Suspicious Location
id: 9525dc73-0327-438c-8c04-13c0e037e9da
related:
    - id: 8e2b24c9-4add-46a0-b4bb-0057b4e6187d
      type: obsolete
status: test
description: Detects execution of regsvr32 where the DLL is located in a potentially suspicious location.
references:
    - https://web.archive.org/web/20171001085340/https://subt0x10.blogspot.com/2017/04/bypass-application-whitelisting-script.html
    - https://app.any.run/tasks/34221348-072d-4b70-93f3-aa71f6ebecad/
author: Florian Roth (Nextron Systems), Nasreddine Bencherchali (Nextron Systems)
date: 2023-05-26
tags:
    - attack.stealth
    - attack.t1218.010
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        - Image|endswith: '\regsvr32.exe'
        - OriginalFileName: 'REGSVR32.EXE'
    selection_cli:
        CommandLine|contains:
            - ':\ProgramData\'
            - ':\Temp\'
            - ':\Users\Public\'
            - ':\Windows\Temp\'
            - '\AppData\Local\Temp\'
            - '\AppData\Roaming\'
    condition: all of selection_*
falsepositives:
    - Some installers might execute "regsvr32" with DLLs located in %TEMP% or in %PROGRAMDATA%. Apply additional filters if necessary.
level: medium

Stages and Predicates

Stage 0: condition

all of selection_*

Stage 1: selection_img

selection_img:
    - Image|endswith: '\regsvr32.exe'
    - OriginalFileName: 'REGSVR32.EXE'

Stage 2: selection_cli

selection_cli:
    CommandLine|contains:
        - ':\ProgramData\'
        - ':\Temp\'
        - ':\Users\Public\'
        - ':\Windows\Temp\'
        - '\AppData\Local\Temp\'
        - '\AppData\Roaming\'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
CommandLinematch
  • :\ProgramData\ corpus 11 (sigma 9, elastic 2)
  • :\Temp\ corpus 14 (sigma 14)
  • :\Users\Public\ corpus 20 (sigma 18, elastic 2)
  • :\Windows\Temp\ corpus 16 (sigma 16)
  • \AppData\Local\Temp\ corpus 28 (sigma 26, elastic 2)
  • \AppData\Roaming\ corpus 17 (sigma 16, elastic 1)
field:"CommandLine" kind:match
Imageends_with
  • \regsvr32.exe corpus 64 (sigma 64)
field:"Image" kind:ends_with value:"\regsvr32.exe"
OriginalFileNameeq
  • REGSVR32.EXE corpus 37 (sigma 17, elastic 15, splunk 5)
field:"OriginalFileName" kind:eq value:"REGSVR32.EXE"