Sigma rule: Suspicious Environment Variable Has Been Registered
A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-97d71263e676, updated 2023-08-17T00:00:00.000Z.
Rule
- Title
- Suspicious Environment Variable Has Been Registered
- Status
- test
- Level
- high
- Author
- Nasreddine Bencherchali (Nextron Systems)
- Date
- 2022-12-20
- Modified
- 2023-08-17
- File
- rules/windows/registry/registry_set/registry_set_suspicious_env_variables.yml
- Commit
- ccbb0369507f796db0b0ae6854c8a2be471b9d84
Detects the creation of user-specific or system-wide environment variables via the registry. Which contains suspicious commands and strings
Log source
- product
- windows
- category
- registry_set
Detection
selection_main:
TargetObject|contains: '\Environment\'
selection_details:
- Details:
- 'powershell'
- 'pwsh'
- Details|contains:
# Add more suspicious strings in env variables below
- '\AppData\Local\Temp\'
- 'C:\Users\Public\'
# Base64 MZ Header
- 'TVqQAAMAAAAEAAAA' # MZ..........
- 'TVpQAAIAAAAEAA8A'
- 'TVqAAAEAAAAEABAA'
- 'TVoAAAAAAAAAAAAA'
- 'TVpTAQEAAAAEAAAA'
# Base64 Invoke- (UTF-8)
- 'SW52b2tlL'
- 'ludm9rZS'
- 'JbnZva2Ut'
# Base64 Invoke- (UTF-16LE)
- 'SQBuAHYAbwBrAGUALQ'
- 'kAbgB2AG8AawBlAC0A'
- 'JAG4AdgBvAGsAZQAtA'
- Details|startswith: # https://gist.github.com/Neo23x0/6af876ee72b51676c82a2db8d2cd3639
- 'SUVY'
- 'SQBFAF'
- 'SQBuAH'
- 'cwBhA'
- 'aWV4'
- 'aQBlA'
- 'R2V0'
- 'dmFy'
- 'dgBhA'
- 'dXNpbm'
- 'H4sIA'
- 'Y21k'
- 'cABhAH'
- 'Qzpc'
- 'Yzpc'
condition: all of selection_*False positives (as the rule lists them)
- Unknown
Tags
- attack.persistence
- attack.stealth
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/registry/registry_set/registry_set_suspicious_env_variables.yml
Sources and licences
SigmaHQ
"Suspicious Environment Variable Has Been Registered" by Nasreddine Bencherchali (Nextron Systems) (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/registry/registry_set/registry_set_suspicious_env_variables.yml.
Licensed under the Detection Rule License (DRL) 1.1: https://github.com/SigmaHQ/Detection-Rule-License
Cite this page
Dragons Eye Ransomware Tracker, "Sigma rule: Suspicious Environment Variable Has Been Registered",
entity page, dataset version ref-97d71263e676, updated 2023-08-17T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/966315ef-c5e1-4767-ba25-fce9c8de3660 (accessed 2026-11-03).
Underlying source: SigmaHQ rule 966315ef-c5e1-4767-ba25-fce9c8de3660, 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.