Configuration and Service Reconnaissance via Reg.exe
Adversaries utilize the Windows command-line registry utility to perform system and service reconnaissance, aiding in local environment discovery and persistence identification.
Triage facts
Revision 1- Evidence
- Unknown
- Severity
- Medium
- Action
- Monitor or close
- Freshness
- Revision 1Oct 21, 00:48 UTC
- Detection
- 1 rule
- Source quality
- B3Likely
Adversaries frequently leverage the legitimate Windows utility reg.exe to perform reconnaissance activities. By querying sensitive registry keys, an attacker can enumerate installed software, system configuration details, and potential persistence mechanisms. This behavior is commonly observed in the early stages of a post-compromise environment, as it allows threat actors to map out the system's security posture and identify interesting services or applications for further exploitation. Security teams should monitor for the combination of reg.exe execution with specific command-line arguments targeting keys related to auto-start locations, service configurations, and system policies.
Attack Chain
- Initial access is gained to the target system via a user-level shell or remote access tool.
- The attacker identifies the
reg.exeutility in the system path. - The attacker executes
reg queryto target specific registry hives, such asHKCUorHKLM. - The query focuses on paths like
currentVersion\runto identify persistence mechanisms. - The attacker proceeds to query
currentcontrolset\servicesto identify installed system services. - The gathered registry data is exfiltrated or parsed locally to identify future targets.
- The final objective includes leveraging the discovered information for privilege escalation or lateral movement.
Impact
Successful reconnaissance allows an attacker to build an accurate profile of the target environment, enabling the identification of weak configurations, security product paths, and persistent entry points. This data significantly reduces the time required for an attacker to move from initial access to full domain compromise.
Recommendation
- Deploy the provided Sigma rule to detect
reg.exeusage targeting sensitive registry hives in your SIEM. - Establish an allowlist of administrative tools or management scripts that legitimately use
reg.exeto query system configurations to reduce false positives. - Audit endpoint telemetry for frequent
reg querycommands from non-administrative service accounts.
Immediate actions
Deploy Sigma rule 970007b7-ce32-49d0-a4a4-fbef016950bd to SIEM
Threat Hunt
Search for excessive 'reg query' activity in process logs
Data: Process creation events
Detection coverage 1
Detect Configuration and Service Reconnaissance via Reg.exe
mediumDetects usage of 'reg.exe' to query registry keys related to system configuration, services, and persistence mechanisms.
Detection queries are available on the platform. Get full rules →