System Information Discovery via Registry Queries
A Sigma rule for process creation on Windows, by lazarg.
low 1 ATT&CK technique 3 programs it names 1 everyday example trips it
What it looks for
detection:
selection_cmd_powershell:
CommandLine|contains:
- 'Get-ItemPropertyValue'
- 'gpv'
Image|endswith:
- '\powershell.exe'
- '\pwsh.exe'
selection_cmd_reg:
CommandLine|contains: 'query'
CommandLine|contains|windash: '-v'
Image|endswith: '\reg.exe'
selection_keys:
CommandLine|contains:
- '\SOFTWARE\Microsoft\Windows Defender'
- '\SOFTWARE\Microsoft\Windows NT\CurrentVersion'
- '\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall'
- '\SYSTEM\CurrentControlSet\Control\TimeZoneInformation'
- '\SYSTEM\CurrentControlSet\Services'
condition: 1 of selection_cmd_* and selection_keys
The rule’s detection, its selections and fields in order of name. The whole rule, with its references and false positives, is on SigmaHQ, by lazarg, under the Detection Rule License 1.1. CmdID evaluates it on a command line alone: a test on what a command line cannot show, such as the parent process or the user, is not met.
Command lines that trip it
Get the value of the ProductID property on the page for Get-ItemPropertyValue
Get-ItemPropertyValue 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion' -Name ProductIDIdentifyPrograms and files it names
ATT&CK
T1082System Information Discovery