Sigma rule: Invoke-Obfuscation VAR+ Launcher - System

A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-90de26299b16, updated 2022-11-29T00:00:00.000Z.

Rule

Title
Invoke-Obfuscation VAR+ Launcher - System
Status
test
Level
high
Author
Jonathan Cheong, oscd.community
Date
2020-10-15
Modified
2022-11-29
File
rules/windows/builtin/system/service_control_manager/win_system_invoke_obfuscation_var_services.yml
Commit
ccbb0369507f796db0b0ae6854c8a2be471b9d84

Detects Obfuscated use of Environment Variables to execute PowerShell

Log source

product
windows
service
system

Detection

selection:
    Provider_Name: 'Service Control Manager'
    EventID: 7045
    # ImagePath|re: 'cmd.{0,5}(?:\/c|\/r)(?:\s|)\"set\s[a-zA-Z]{3,6}.*(?:\{\d\}){1,}\\\"\s+?\-f(?:.*\)){1,}.*\"'
    # Example 1: C:\winDoWs\SySTeM32\cmd.Exe /C"SET NOtI=Invoke-Expression (New-Object Net.WebClient).DownloadString&& PowERshElL -NOl SET-iteM ( 'VAR' + 'i'+ 'A' + 'blE:Ao6' + 'I0') ( [TYpe](\"{2}{3}{0}{1}\"-F 'iRoN','mENT','e','nv') ) ; ${exECUtIONCOnTEXT}.\"IN`VO`KecOmMaND\".\"inVo`KES`crIPt\"( ( ( GEt-VAriAble ( 'a' + 'o6I0') -vaLU )::(\"{1}{4}{2}{3}{0}\" -f'e','gETenvIR','NtvaRIa','BL','ONme' ).Invoke(( \"{0}{1}\"-f'n','oti' ),( \"{0}{1}\" -f'pRoC','esS') )) )"
    # Example 2: cMD.exe /C "seT SlDb=Invoke-Expression (New-Object Net.WebClient).DownloadString&& pOWErShell .(( ^&(\"{1}{0}{2}{3}\" -f 'eT-vaR','G','iab','lE' ) (\"{0}{1}\" -f '*m','DR*' ) ).\"na`ME\"[3,11,2]-JOIN'' ) ( ( ^&(\"{0}{1}\" -f'g','CI' ) (\"{0}{1}\" -f 'ENV',':SlDb' ) ).\"VA`luE\" ) "
    ImagePath|contains|all:
        - 'cmd'
        - '"set'
        - '-f'
    ImagePath|contains:
        - '/c'
        - '/r'
condition: selection

False positives (as the rule lists them)

  • Unknown

Tags

  • attack.stealth
  • attack.t1027
  • attack.execution
  • attack.t1059.001

MITRE ATT&CK ids this rule names

References

Read on 2026-11-03T00:58:21.399Z under licence sigma-drl-1.1@d5f4c36a from https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/builtin/system/service_control_manager/win_system_invoke_obfuscation_var_services.yml

Sources and licences

  • SigmaHQ

    "Invoke-Obfuscation VAR+ Launcher - System" by Jonathan Cheong, oscd.community (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/builtin/system/service_control_manager/win_system_invoke_obfuscation_var_services.yml.
    Licensed under the Detection Rule License (DRL) 1.1: https://github.com/SigmaHQ/Detection-Rule-License

    Detection Rule License (DRL) 1.1

Cite this page

Dragons Eye Ransomware Tracker, "Sigma rule: Invoke-Obfuscation VAR+ Launcher - System",
entity page, dataset version ref-90de26299b16, updated 2022-11-29T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/8ca7004b-e620-4ecb-870e-86129b5b8e75 (accessed 2026-11-03).
Underlying source: SigmaHQ rule 8ca7004b-e620-4ecb-870e-86129b5b8e75, commit ccbb0369507f796db0b0ae6854c8a2be471b9d84.

Pages change. The dataset version identifies the data, but no archive of old versions is kept, so this citation cannot be replayed later.