Detection rules › Sigma

VBScript Payload Stored in Registry

Status
test
Severity
high
Log source
category registry_set, product windows
Author
Florian Roth (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detects VBScript content stored into registry keys as seen being used by UNC2452 group

MITRE ATT&CK coverage

Telemetry coverage

Rule body

title: VBScript Payload Stored in Registry
id: 46490193-1b22-4c29-bdd6-5bf63907216f
status: test
description: Detects VBScript content stored into registry keys as seen being used by UNC2452 group
references:
    - https://www.microsoft.com/security/blog/2021/03/04/goldmax-goldfinder-sibot-analyzing-nobelium-malware/
author: Florian Roth (Nextron Systems)
date: 2021-03-05
modified: 2023-08-17
tags:
    - attack.privilege-escalation
    - attack.persistence
    - attack.t1547.001
logsource:
    category: registry_set
    product: windows
detection:
    selection:
        TargetObject|contains: 'Software\Microsoft\Windows\CurrentVersion'
        Details|contains:
            - 'vbscript:'
            - 'jscript:'
            - 'mshtml,'
            - 'RunHTMLApplication'
            - 'Execute('
            - 'CreateObject'
            - 'window.close'
    filter:
        TargetObject|contains: 'Software\Microsoft\Windows\CurrentVersion\Run'
    filter_dotnet:
        Image|endswith: '\msiexec.exe'
        TargetObject|contains: '\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\'
        Details|contains:
            - '\Microsoft.NET\Primary Interop Assemblies\Microsoft.mshtml.dll'
            - '<\Microsoft.mshtml,fileVersion='
            - '_mshtml_dll_'
            - '<\Microsoft.mshtml,culture='
    condition: selection and not 1 of filter*
falsepositives:
    - Unknown
level: high

Stages and Predicates

Stage 0: condition

selection and not 1 of filter*

Stage 1: selection

selection:
    TargetObject|contains: 'Software\Microsoft\Windows\CurrentVersion'
    Details|contains:
        - 'vbscript:'
        - 'jscript:'
        - 'mshtml,'
        - 'RunHTMLApplication'
        - 'Execute('
        - 'CreateObject'
        - 'window.close'

Stage 2: not filter*

filter:
    TargetObject|contains: 'Software\Microsoft\Windows\CurrentVersion\Run'
filter_dotnet:
    Image|endswith: '\msiexec.exe'
    TargetObject|contains: '\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\'
    Details|contains:
        - '\Microsoft.NET\Primary Interop Assemblies\Microsoft.mshtml.dll'
        - '<\Microsoft.mshtml,fileVersion='
        - '_mshtml_dll_'
        - '<\Microsoft.mshtml,culture='

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
Detailsmatch<\Microsoft.mshtml,culture=excludes:Details field:"Details" value:"<\Microsoft.mshtml,culture="
Detailsmatch<\Microsoft.mshtml,fileVersion=excludes:Details field:"Details" value:"<\Microsoft.mshtml,fileVersion="
Detailsmatch\Microsoft.NET\Primary Interop Assemblies\Microsoft.mshtml.dllexcludes:Details field:"Details" value:"\Microsoft.NET\Primary Interop Assemblies\Microsoft.mshtml.dll"
Detailsmatch_mshtml_dll_excludes:Details field:"Details" value:"_mshtml_dll_"
Imageends_with\msiexec.exeexcludes:Image field:"Image" value:"\msiexec.exe"
TargetObjectmatch\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\excludes:TargetObject field:"TargetObject" value:"\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\"
TargetObjectmatchSoftware\Microsoft\Windows\CurrentVersion\Runexcludes:TargetObject field:"TargetObject" value:"Software\Microsoft\Windows\CurrentVersion\Run"

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
Detailsmatch
  • CreateObject
  • Execute(
  • RunHTMLApplication
  • jscript:
  • mshtml,
  • vbscript:
  • window.close
field:"Details" kind:match
TargetObjectmatch
  • Software\Microsoft\Windows\CurrentVersion
field:"TargetObject" kind:match value:"Software\Microsoft\Windows\CurrentVersion"