T1012 CrowdStrike LogScale · LogScale

Detect Query Registry in CrowdStrike LogScale

Adversaries may interact with the Windows Registry to gather information about the system, configuration, and installed software. The Registry contains a significant amount of information about the operating system, configuration, software, and security. Information can easily be queried using the Reg utility, though other means to access the Registry exist. Some of the information may help adversaries to further their operation within a network. Adversaries may use the information from Query Registry during automated discovery to shape follow-on behaviors, including whether or not the adversary fully infects the target and/or attempts specific actions. Threat actors including Turla (Epic), APT41 (DUSTTRAP), NOBELIUM (Sibot), Sandworm (TEARDROP), Lazarus (HOPLIGHT), Lyceum (Shark), and numerous commodity malware families leverage registry queries to fingerprint targets, locate credentials, identify installed security products, and discover network proxy configurations.

MITRE ATT&CK

Tactic
Discovery
Technique
T1012 Query Registry
Canonical reference
https://attack.mitre.org/techniques/T1012/

LogScale Detection Query

CrowdStrike LogScale (LogScale)
cql
// T1012 Query Registry — reg.exe and PowerShell sensitive path enumeration
#event_simpleName = ProcessRollup2
| FileName = /(?i)^(reg\.exe|powershell\.exe|pwsh\.exe)$/

// Classify query type
| case {
    FileName = /(?i)^reg\.exe$/ AND CommandLine = /(?i)(\squery\s|\sexport\s|\ssave\s)/
      | QueryType := "reg.exe";
    FileName = /(?i)^(powershell|pwsh)\.exe$/
      AND CommandLine = /(?i)(HKLM:|HKCU:|HKEY_LOCAL_MACHINE|HKEY_CURRENT_USER|Registry::)/
      AND CommandLine = /(?i)(Get-Item|Get-ItemProperty|Get-ChildItem|Get-ItemPropertyValue)/
      | QueryType := "PowerShell";
    * | QueryType := "Other"
  }
| QueryType != "Other"

// Flag sensitive registry path access
| SensitivePath := if(
    CommandLine = /(?i)(Windows NT.CurrentVersion|HARDWARE.DESCRIPTION.System|CurrentVersion.Uninstall|Microsoft.Cryptography|CurrentControlSet.Services|CurrentControlSet.Control.Lsa|SimonTatham.PuTTY|OpenSSH.Agent|Internet Settings|Terminal Server|Software.Policies|Bitcoin|Image File Execution Options|Classes.http.shell|CurrentVersion.Run|WinSCP.Sessions)/,
    "true", "false"
  )

// Flag recursive queries
| RecursiveQuery := if(
    CommandLine = /(?i)(\s\/s\b|\s-s\b|-Recurse)/,
    "true", "false"
  )

// Flag suspicious parent processes
| SuspiciousParent := if(
    ParentBaseFileName = /(?i)^(wscript|cscript|mshta|wmic|rundll32|regsvr32|msbuild|installutil|excel|winword|outlook|powerpnt)\.exe$/,
    "true", "false"
  )

// Require at least one suspicion indicator
| SensitivePath = "true" OR RecursiveQuery = "true" OR SuspiciousParent = "true"

// Extract target registry key from command line
| TargetKey := replace(CommandLine, /(?i).*(HKLM[:\\]|HKCU[:\\]|HKEY_LOCAL_MACHINE[\\]|HKEY_CURRENT_USER[\\]|HKEY_USERS[\\])([^\s"]+).*/,
    "$1$2")

| fields
    timestamp,
    ComputerName,
    UserName,
    FileName,
    CommandLine,
    ParentBaseFileName,
    ParentCommandLine,
    TargetKey,
    QueryType,
    SensitivePath,
    RecursiveQuery,
    SuspiciousParent,
    TargetProcessId,
    ContextProcessId
| sort timestamp desc
medium severity high confidence

CrowdStrike LogScale (Falcon) detection for T1012 Query Registry. Queries ProcessRollup2 events for reg.exe and PowerShell processes performing registry enumeration of sensitive paths. Enriches each event with QueryType classification, SensitivePath flag (covering credential, persistence, and security-relevant keys), RecursiveQuery flag, and SuspiciousParent detection covering Office applications and living-off-the-land binaries consistent with Turla, APT41, Lazarus, and commodity malware TTPs.

Data Sources

CrowdStrike Falcon EDRCrowdStrike Falcon LogScale (Humio)Falcon Insight XDR telemetry

Required Tables

ProcessRollup2 (Falcon event stream)

False Positives & Tuning

  • CrowdStrike Falcon sensor itself and competing security products performing integrity checks of LSA, boot configuration, and service registry entries
  • Windows Installer (msiexec.exe) and software packaging tools querying CurrentVersion\Uninstall and CurrentControlSet\Services during installation, patching, or rollback operations
  • IT automation frameworks including Puppet, Chef, and SaltStack that use PowerShell to read and assert registry state as part of idempotent configuration enforcement
Download portable Sigma rule (.yml)

Other platforms for T1012


Testing Methodology

Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1Registry Query for OS Version and Hardware Information

    Expected signal: Sysmon Event ID 1: Multiple Process Create events with Image=reg.exe, CommandLine containing 'query' and 'HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion' and 'HKLM\HARDWARE\DESCRIPTION\System'. Security Event ID 4688 with identical command line details if command line auditing is enabled. Prefetch entry updated at C:\Windows\Prefetch\REG.EXE-*.pf with current timestamp.

  2. Test 2Recursive Registry Query for Installed Software

    Expected signal: Sysmon Event ID 1: Two Process Create events for reg.exe — one per command — with CommandLine containing 'query', 'Uninstall', and '/s' flag. The recursive query generates a large stdout output but only one process creation event per reg.exe invocation. Security Event ID 4688 with command line if auditing enabled.

  3. Test 3PowerShell Registry Query for Proxy Configuration

    Expected signal: Sysmon Event ID 1: Process Create with Image=powershell.exe, CommandLine containing 'Get-ItemProperty', 'HKCU:', and 'Internet Settings'. PowerShell ScriptBlock Log Event ID 4104 from Microsoft-Windows-PowerShell/Operational with the full command content. Note: read-only registry access does not generate Sysmon Event IDs 12/13/14 — process-level telemetry is the primary detection source.

  4. Test 4Registry Query for Machine GUID and LSA Configuration

    Expected signal: Sysmon Event ID 1: Three sequential Process Create events for reg.exe with CommandLine targeting 'Cryptography', 'Control\Lsa' keys respectively. Security Event ID 4688 with command line if auditing enabled. Consecutive execution timestamps within milliseconds of each other, consistent with scripted automated enumeration rather than manual administrative queries.

Unlock Pro Content

Get the full detection package for T1012 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections