{"id":"27aec9c9-dbb0-4939-8422-1742242471d0","title":"Invoke-Obfuscation VAR+ Launcher","description":"Detects Obfuscated use of Environment Variables to execute PowerShell","author":"Jonathan Cheong, oscd.community","status":"test","level":"high","date":"2020-10-15","modified":"2024-04-15","tags":["attack.stealth","attack.t1027","attack.execution","attack.t1059.001"],"technique_ids":["T1027","T1059.001"],"logsource":{"category":"process_creation","product":"windows"},"falsepositives":["Unknown"],"references":["https://github.com/SigmaHQ/sigma/issues/1009"],"source_path":"rules/windows/process_creation/proc_creation_win_hktl_invoke_obfuscation_var.yml","source_sha256":"9442ed3a32b6c21374f1ab4e6c8a4d1bab90118de2bf281c4cc670ed2c513ea2","source_url":"https://github.com/anpa1200/sigma/blob/b249e9683190cffdcaf188ccbfb90bf4759844e1/rules/windows/process_creation/proc_creation_win_hktl_invoke_obfuscation_var.yml","license":"Detection Rule License 1.1","license_url":"https://github.com/SigmaHQ/Detection-Rule-License/blob/main/LICENSE.Detection.Rules.md","yaml":"title: Invoke-Obfuscation VAR+ Launcher\nid: 27aec9c9-dbb0-4939-8422-1742242471d0\nstatus: test\ndescription: Detects Obfuscated use of Environment Variables to execute PowerShell\nreferences:\n    - https://github.com/SigmaHQ/sigma/issues/1009  # (Task 24)\nauthor: Jonathan Cheong, oscd.community\ndate: 2020-10-15\nmodified: 2024-04-15\ntags:\n    - attack.stealth\n    - attack.t1027\n    - attack.execution\n    - attack.t1059.001\nlogsource:\n    category: process_creation\n    product: windows\ndetection:\n    selection:\n        # 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') )) )\"\n        # 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\\\" ) \"\n        CommandLine|re: 'cmd.{0,5}(?:/c|/r)(?:\\s|)\\\"set\\s[a-zA-Z]{3,6}.*(?:\\{\\d\\}){1,}\\\\\\\"\\s+?\\-f(?:.*\\)){1,}.*\\\"'\n    condition: selection\nfalsepositives:\n    - Unknown\nlevel: high\n","validation":"yaml_parsed_not_backend_compiled_or_live_validated","techniques":[{"key":"enterprise/T1027","id":"T1027","name":"Obfuscated Files or Information","page":"techniques/enterprise/T1027/"},{"key":"enterprise/T1059.001","id":"T1059.001","name":"PowerShell","page":"techniques/enterprise/T1059.001/"}],"data_path":"data/detection-rules/27aec9c9-dbb0-4939-8422-1742242471d0.json","kind":"sigma"}
