Sigma rule: Invoke-Obfuscation Obfuscated IEX Invocation - Security

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

Rule

Title
Invoke-Obfuscation Obfuscated IEX Invocation - Security
Status
test
Level
high
Author
Daniel Bohannon (@Mandiant/@FireEye), oscd.community
Date
2019-11-08
Modified
2022-11-27
File
rules/windows/builtin/security/win_security_invoke_obfuscation_obfuscated_iex_services_security.yml
Commit
ccbb0369507f796db0b0ae6854c8a2be471b9d84

Detects all variations of obfuscated powershell IEX invocation code generated by Invoke-Obfuscation framework from the code block linked in the references

Log source

product
windows
service
security
definition
The 'System Security Extension' audit subcategory need to be enabled to log the EID 4697

Detection

selection_eid:
    EventID: 4697
selection_servicefilename:
    - ServiceFileName|re: '\$PSHome\[\s*\d{1,3}\s*\]\s*\+\s*\$PSHome\['
    - ServiceFileName|re: '\$ShellId\[\s*\d{1,3}\s*\]\s*\+\s*\$ShellId\['
    - ServiceFileName|re: '\$env:Public\[\s*\d{1,3}\s*\]\s*\+\s*\$env:Public\['
    - ServiceFileName|re: '\$env:ComSpec\[(\s*\d{1,3}\s*,){2}'
    - ServiceFileName|re: '\\*mdr\*\W\s*\)\.Name'
    - ServiceFileName|re: '\$VerbosePreference\.ToString\('
    - ServiceFileName|re: '\String\]\s*\$VerbosePreference'
condition: all of selection_*

False positives (as the rule lists them)

  • Unknown

Tags

  • attack.stealth
  • attack.t1027

MITRE ATT&CK ids this rule names

Related rules

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/security/win_security_invoke_obfuscation_obfuscated_iex_services_security.yml

Sources and licences

  • SigmaHQ

    "Invoke-Obfuscation Obfuscated IEX Invocation - Security" by Daniel Bohannon (@Mandiant/@FireEye), oscd.community (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/builtin/security/win_security_invoke_obfuscation_obfuscated_iex_services_security.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 Obfuscated IEX Invocation - Security",
entity page, dataset version ref-d4a56825df69, updated 2022-11-27T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/fd0f5778-d3cb-4c9a-9695-66759d04702a (accessed 2026-11-03).
Underlying source: SigmaHQ rule fd0f5778-d3cb-4c9a-9695-66759d04702a, 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.