LoFP LoFP / it is possible some agent based products will generate false positives. filter as needed.

Techniques

Sample rules

Windows Sensitive Registry Hive Dump Via CommandLine

Description

The following analytic detects the use of reg.exe to export Windows Registry hives, which may contain sensitive credentials. This detection leverages data from Endpoint Detection and Response (EDR) agents, focusing on command-line executions involving save or export actions targeting the sam, system, or security hives. This activity is significant as it indicates potential offline credential access attacks, often executed from untrusted processes or scripts. If confirmed malicious, attackers could gain access to credential data, enabling further compromise and lateral movement within the network.

Detection logic


| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time)
as lastTime from datamodel=Endpoint.Processes where
(
  (
    (Processes.process_name=reg.exe OR Processes.original_file_name=reg.exe)
    Processes.process IN ("*save*", "*export*")
  )
  OR
  (
    (Processes.process_name=regedit.exe OR Processes.original_file_name=REGEDIT.exe)
    Processes.process IN ("*/E *", "*-E *")
  )
)
Processes.process IN (
  "*HKEY_LOCAL_MACHINE\\SAM*",
  "*HKEY_LOCAL_MACHINE\\Security*",
  "*HKEY_LOCAL_MACHINE\\System*", 
  "*HKLM\\SAM*",
  "*HKLM\\Security*",
  "*HKLM\\System*",
) 
by Processes.action Processes.dest Processes.original_file_name
Processes.parent_process Processes.parent_process_exec Processes.parent_process_guid
Processes.parent_process_id Processes.parent_process_name Processes.parent_process_path
Processes.process Processes.process_exec Processes.process_guid Processes.process_hash
Processes.process_id Processes.process_integrity_level Processes.process_name Processes.process_path
Processes.user Processes.user_id Processes.vendor_product

| `drop_dm_object_name(Processes)`

| `security_content_ctime(firstTime)`

| `security_content_ctime(lastTime)`

| `windows_sensitive_registry_hive_dump_via_commandline_filter`