Query Registry using Built-in Tools

Last updated 7 days ago on 2026-10-07
Created 3 years ago on 2023-07-13

About

This rule identifies the execution of commands that can be used to query the Windows Registry. Adversaries may query the registry to gain situational awareness about the host, like installed security software, programs and settings.
Tags
Domain: EndpointOS: WindowsUse Case: Threat DetectionTactic: DiscoveryRule Type: BBRData Source: Elastic DefendRule Type: Event Correlation (EQL)Platform: WindowsLanguage: eql
Severity
low
Risk Score
21
MITRE ATT&CK™

Discovery (TA0007)(external, opens in a new tab or window)

License
Elastic License v2(external, opens in a new tab or window)

Definition

Rule Type
Event Correlation Rule
Integration Pack
Prebuilt Security Detection Rules
Index Patterns
logs-endpoint.events.process-*
Related Integrations

endpoint(external, opens in a new tab or window)

Query
text code block:
process where host.os.type == "windows" and event.type == "start" and ( (process.name : "reg.exe" and process.args : "query") or ( process.name : ("powershell.exe", "powershell_ise.exe", "pwsh.exe") and process.args : ("get-childitem", "gci", "dir", "ls", "get-item", "gi", "get-itemproperty", "gp") and process.args : ("hkcu", "hkey_current_user", "hkey_local_machine", "hklm", "registry::*") ) ) and not process.command_line : ( "C:\\Windows\\system32\\reg.exe query hklm\\software\\microsoft\\windows\\softwareinventorylogging /v collectionstate /reg:64", "reg query \"HKLM\\Software\\WOW6432Node\\Npcap\" /ve " )

Install detection rules in Elastic Security

Detect Query Registry using Built-in Tools in the Elastic Security detection engine by installing this rule into your Elastic Stack.

To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(external, opens in a new tab or window).