2023-07-31 10:28:25 -03:00
|
|
|
[metadata]
|
2024-05-23 00:45:10 +05:30
|
|
|
bypass_bbr_timing = true
|
2023-07-31 10:28:25 -03:00
|
|
|
creation_date = "2023/07/13"
|
|
|
|
|
integration = ["endpoint"]
|
|
|
|
|
maturity = "production"
|
2024-12-19 13:03:50 -05:00
|
|
|
updated_date = "2024/12/19"
|
2023-07-31 10:28:25 -03:00
|
|
|
|
|
|
|
|
[rule]
|
|
|
|
|
author = ["Elastic"]
|
2023-10-11 09:43:26 +02:00
|
|
|
building_block_type = "default"
|
2023-07-31 10:28:25 -03:00
|
|
|
description = """
|
|
|
|
|
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.
|
|
|
|
|
"""
|
2023-12-14 17:55:36 -09:00
|
|
|
from = "now-24h"
|
2024-04-01 20:45:12 -03:00
|
|
|
index = ["logs-endpoint.events.process-*"]
|
2024-12-19 13:03:50 -05:00
|
|
|
interval = "12h"
|
2023-10-11 09:43:26 +02:00
|
|
|
language = "kuery"
|
2023-07-31 10:28:25 -03:00
|
|
|
license = "Elastic License v2"
|
|
|
|
|
name = "Query Registry using Built-in Tools"
|
|
|
|
|
risk_score = 21
|
|
|
|
|
rule_id = "ded09d02-0137-4ccc-8005-c45e617e8d4c"
|
|
|
|
|
severity = "low"
|
2024-05-23 00:45:10 +05:30
|
|
|
tags = [
|
|
|
|
|
"Domain: Endpoint",
|
|
|
|
|
"OS: Windows",
|
|
|
|
|
"Use Case: Threat Detection",
|
|
|
|
|
"Tactic: Discovery",
|
|
|
|
|
"Rule Type: BBR",
|
|
|
|
|
"Data Source: Elastic Defend",
|
|
|
|
|
]
|
2023-07-31 10:28:25 -03:00
|
|
|
timestamp_override = "event.ingested"
|
2023-10-11 09:43:26 +02:00
|
|
|
type = "new_terms"
|
2023-07-31 10:28:25 -03:00
|
|
|
|
|
|
|
|
query = '''
|
2023-12-14 17:55:36 -09:00
|
|
|
host.os.type:windows and event.category:process and event.type:start and
|
|
|
|
|
(
|
|
|
|
|
(process.name.caseless:"reg.exe" and process.args:"query") or
|
|
|
|
|
(process.name.caseless:("powershell.exe" or "powershell_ise.exe" or "pwsh.exe") and
|
|
|
|
|
process.args:(
|
|
|
|
|
("get-childitem" or "Get-ChildItem" or "gci" or "dir" or "ls" or
|
|
|
|
|
"get-item" or "Get-Item" or "gi" or
|
|
|
|
|
"get-itemproperty" or "Get-ItemProperty" or "gp") and
|
|
|
|
|
("hkcu" or "HKCU" or "hkey_current_user" or "HKEY_CURRENT_USER" or
|
|
|
|
|
"hkey_local_machine" or "HKEY_LOCAL_MACHINE" or
|
|
|
|
|
"hklm" or "HKLM" or registry\:\:*)
|
|
|
|
|
)
|
|
|
|
|
)
|
2024-04-08 09:34:26 -03:00
|
|
|
) and
|
|
|
|
|
not process.command_line : (
|
|
|
|
|
"C:\\Windows\\system32\\reg.exe query hklm\\software\\microsoft\\windows\\softwareinventorylogging /v collectionstate /reg:64" or
|
|
|
|
|
"reg query \"HKLM\\Software\\WOW6432Node\\Npcap\" /ve "
|
2023-12-14 17:55:36 -09:00
|
|
|
)
|
2023-07-31 10:28:25 -03:00
|
|
|
'''
|
|
|
|
|
|
2024-05-23 00:45:10 +05:30
|
|
|
|
2023-07-31 10:28:25 -03:00
|
|
|
[[rule.threat]]
|
|
|
|
|
framework = "MITRE ATT&CK"
|
|
|
|
|
[[rule.threat.technique]]
|
|
|
|
|
id = "T1012"
|
|
|
|
|
name = "Query Registry"
|
|
|
|
|
reference = "https://attack.mitre.org/techniques/T1012/"
|
|
|
|
|
|
2024-05-23 00:45:10 +05:30
|
|
|
|
2023-07-31 10:28:25 -03:00
|
|
|
[rule.threat.tactic]
|
|
|
|
|
id = "TA0007"
|
|
|
|
|
name = "Discovery"
|
|
|
|
|
reference = "https://attack.mitre.org/tactics/TA0007/"
|
2023-10-11 09:43:26 +02:00
|
|
|
|
|
|
|
|
[rule.new_terms]
|
|
|
|
|
field = "new_terms_fields"
|
|
|
|
|
value = ["host.id", "user.id"]
|
|
|
|
|
[[rule.new_terms.history_window_start]]
|
|
|
|
|
field = "history_window_start"
|
2023-12-14 17:55:36 -09:00
|
|
|
value = "now-7d"
|
2024-05-23 00:45:10 +05:30
|
|
|
|
|
|
|
|
|