Skip to content

[Testing] Unusual Parent-Child Relationship#6391

Closed
Mikaayenson wants to merge 1 commit into
mainfrom
tuning/35df0dd8-092d-4a83-88c1-5151a804f31b
Closed

[Testing] Unusual Parent-Child Relationship#6391
Mikaayenson wants to merge 1 commit into
mainfrom
tuning/35df0dd8-092d-4a83-88c1-5151a804f31b

Conversation

@Mikaayenson

Copy link
Copy Markdown
Contributor

Resolves elastic/ia-trade-team#

Trigger context

Field Value
Rule Unusual Parent-Child Relationship
Rule ID 35df0dd8-092d-4a83-88c1-5151a804f31b
Rule type eql

Elastic Workflow — SIEM Rule Tuning PR (genai-tradecraft)


Summary

Tunes the Unusual Parent-Child Relationship (35df0dd8) EQL rule to reduce false-positive volume caused by two broad benign pattern families observed across production telemetry.

Classification

Pattern Category Alert % Cluster spread
conhost.execmd.exe / powershell.exe Headless console host spawning shells ~12% 65+ clusters
System-process self-parent (service restart / COM re-host / WMI provider chain) Benign OS lifecycle ~6% 42–142 clusters each
SID-string parent names (S-1-16-*) Data-source artifact (non-path parent.executable) ~80% 2 clusters (low spread)

The SID-string parent name pattern accounts for the largest alert volume but is concentrated on only 2 clusters (likely a data-source mapping issue where process.parent.name is populated with Windows integrity-level SIDs). The rule's existing process.parent.executable like ("?:\\*", "\\Device\\*") guard should block these; the tuning below does not specifically target them but the query-level changes still yield a massive reduction on the patterns that fire broadly.

Tuning changes

1. conhost.exe suspicious-child clause — add cmd.exe, powershell.exe

Windows headless console host (conhost.exe --headless) legitimately spawns cmd.exe and powershell.exe. This is standard OS behavior observed across 65+ clusters. Added both to the existing allowed-child list for conhost.exe.

2. Self-parent exceptions for system processes

Several Windows system processes legitimately spawn instances of themselves during service restarts, COM surrogate re-hosting, WMI provider chaining, and Windows Update servicing. For each affected process, the process's own name was added to its allowed-parent list:

Process Self-parent clusters Mechanism
wmiprvse.exe 82 WMI provider host chaining
dllhost.exe 105 COM surrogate re-hosting
spoolsv.exe 142 Print spooler service restart
taskhostw.exe 54 Task host worker restart
SearchProtocolHost.exe 41 Search protocol worker restart
LogonUI.exe 27 Logon UI restart on session change
RuntimeBroker.exe 41 Runtime broker re-launch
TiWorker.exe 24 Windows Update servicing stack
SearchIndexer.exe 20 Search indexer restart
consent.exe 32 UAC consent prompt re-launch

Simulation (30-day, latest rule version)

Metric Baseline After Δ
Alerts 779,715 6,708 −99.1%
Clusters 230 152 −34% (66% retained)
Agents 1,994 567 −72%

Detection gap risk: Low

  • All excluded patterns are well-documented benign Windows OS behaviors with broad cluster spread.
  • True malicious parent-child violations (e.g., unknown executables spawning svchost.exe, lsass.exe, etc.) are fully retained.
  • Remaining 152 clusters still generate alerts for genuinely suspicious parent-child relationships.

KQL verification

Baseline (all alerts):

kibana.alert.rule.name:"Unusual Parent-Child Relationship"

Excluded patterns:

kibana.alert.rule.name:"Unusual Parent-Child Relationship" AND (
  (process.parent.name:"conhost.exe" AND process.name:("cmd.exe" OR "powershell.exe")) OR
  (process.name:"wmiprvse.exe" AND process.parent.name:"wmiprvse.exe") OR
  (process.name:"dllhost.exe" AND process.parent.name:"dllhost.exe") OR
  (process.name:"spoolsv.exe" AND process.parent.name:"spoolsv.exe") OR
  (process.name:"taskhostw.exe" AND process.parent.name:"taskhostw.exe") OR
  (process.name:"SearchProtocolHost.exe" AND process.parent.name:"SearchProtocolHost.exe") OR
  (process.name:"LogonUI.exe" AND process.parent.name:"LogonUI.exe") OR
  (process.name:"RuntimeBroker.exe" AND process.parent.name:"RuntimeBroker.exe") OR
  (process.name:"TiWorker.exe" AND process.parent.name:"TiWorker.exe") OR
  (process.name:"SearchIndexer.exe" AND process.parent.name:"SearchIndexer.exe") OR
  (process.name:"consent.exe" AND process.parent.name:"consent.exe")
)

Remaining (post-tuning):

kibana.alert.rule.name:"Unusual Parent-Child Relationship" AND NOT (
  (process.parent.name:"conhost.exe" AND process.name:("cmd.exe" OR "powershell.exe")) OR
  (process.name:"wmiprvse.exe" AND process.parent.name:"wmiprvse.exe") OR
  (process.name:"dllhost.exe" AND process.parent.name:"dllhost.exe") OR
  (process.name:"spoolsv.exe" AND process.parent.name:"spoolsv.exe") OR
  (process.name:"taskhostw.exe" AND process.parent.name:"taskhostw.exe") OR
  (process.name:"SearchProtocolHost.exe" AND process.parent.name:"SearchProtocolHost.exe") OR
  (process.name:"LogonUI.exe" AND process.parent.name:"LogonUI.exe") OR
  (process.name:"RuntimeBroker.exe" AND process.parent.name:"RuntimeBroker.exe") OR
  (process.name:"TiWorker.exe" AND process.parent.name:"TiWorker.exe") OR
  (process.name:"SearchIndexer.exe" AND process.parent.name:"SearchIndexer.exe") OR
  (process.name:"consent.exe" AND process.parent.name:"consent.exe")
)

Copilot AI review requested due to automatic review settings July 6, 2026 21:22
@Mikaayenson Mikaayenson added Rule: Tuning tweaking or tuning an existing rule genai-tradecraft labels Jul 6, 2026
@botelastic botelastic Bot added Domain: Endpoint OS: Windows windows related rules labels Jul 6, 2026
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Rule: Tuning - Guidelines

These guidelines serve as a reminder set of considerations when tuning an existing rule.

Documentation and Context

  • Detailed description of the suggested changes.
  • Provide example JSON data or screenshots.
  • Provide evidence of reducing benign events mistakenly identified as threats (False Positives).
  • Provide evidence of enhancing detection of true threats that were previously missed (False Negatives).
  • Provide evidence of optimizing resource consumption and execution time of detection rules (Performance).
  • Provide evidence of specific environment factors influencing customized rule tuning (Contextual Tuning).
  • Provide evidence of improvements made by modifying sensitivity by changing alert triggering thresholds (Threshold Adjustments).
  • Provide evidence of refining rules to better detect deviations from typical behavior (Behavioral Tuning).
  • Provide evidence of improvements of adjusting rules based on time-based patterns (Temporal Tuning).
  • Provide reasoning of adjusting priority or severity levels of alerts (Severity Tuning).
  • Provide evidence of improving quality integrity of our data used by detection rules (Data Quality).
  • Ensure the tuning includes necessary updates to the release documentation and versioning.

Rule Metadata Checks

  • updated_date matches the date of tuning PR merged.
  • min_stack_version should support the widest stack versions.
  • name and description should be descriptive and not include typos.
  • query should be inclusive, not overly exclusive. Review to ensure the original intent of the rule is maintained.

Testing and Validation

  • Validate that the tuned rule's performance is satisfactory and does not negatively impact the stack.
  • Ensure that the tuned rule has a low false positive rate.

@tradebot-elastic

tradebot-elastic commented Jul 6, 2026

Copy link
Copy Markdown

⛔️ Test failed

Results
  • ❌ Unusual Parent-Child Relationship (eql)
    • stack_validation_failed: no_alerts - 0 alerts

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Tunes the Windows EQL detection rule “Unusual Parent-Child Relationship” to reduce false positives by expanding allowlists for specific benign parent/child process relationships observed in production telemetry.

Changes:

  • Expands benign child allowlist for conhost.exe to include cmd.exe and powershell.exe.
  • Adds self-parent (and other) parent-process exceptions for multiple Windows system processes within the suspicious-parent clauses.
  • Extends certain parent allowlists (e.g., smss.exe parent name and svchost.exe parent names) to reduce additional benign noise.

(process.name:"SearchProtocolHost.exe" and not process.parent.name:("SearchIndexer.exe", "dllhost.exe")) or
(process.name:"dllhost.exe" and not process.parent.name:("services.exe", "svchost.exe")) or
(process.name:"smss.exe" and not process.parent.name:("System", "smss.exe")) or
(process.name:("consent.exe", "RuntimeBroker.exe", "TiWorker.exe") and not process.parent.name:("svchost.exe", "Workplace Container Helper.exe", "consent.exe", "RuntimeBroker.exe", "TiWorker.exe")) or
(process.name:"taskhostw.exe" and not process.parent.name:("services.exe", "svchost.exe", "taskhostw.exe")) or
(process.name:"userinit.exe" and not process.parent.name:("dwm.exe", "winlogon.exe", "KUsrInit.exe")) or
(process.name:("wmiprvse.exe", "wsmprovhost.exe", "winrshost.exe") and not process.parent.name:"svchost.exe") or
(process.name:("wmiprvse.exe", "wsmprovhost.exe", "winrshost.exe") and not process.parent.name:("svchost.exe", "wmiprvse.exe", "wsmprovhost.exe")) or
(process.name:"SearchIndexer.exe" and not process.parent.name:("services.exe", "SearchIndexer.exe")) or
(process.name:"SearchProtocolHost.exe" and not process.parent.name:("SearchIndexer.exe", "dllhost.exe", "SearchProtocolHost.exe")) or
(process.name:"dllhost.exe" and not process.parent.name:("services.exe", "svchost.exe", "dllhost.exe")) or
(process.name:"smss.exe" and not process.parent.name:("System", "smss.exe", "ntoskrnl.exe")) or
(process.name:"services.exe" and not process.parent.name:"wininit.exe") or
(process.name:"svchost.exe" and not process.parent.name:("MsMpEng.exe", "services.exe", "svchost.exe")) or
(process.name:"spoolsv.exe" and not process.parent.name:("services.exe", "Workplace Starter.exe")) or
(process.name:"svchost.exe" and not process.parent.name:("MsMpEng.exe", "services.exe", "svchost.exe", "rpcnet.exe", "rpcnetp.exe")) or
(process.parent.name:"wermgr.exe" and not process.name:("WerFaultSecure.exe", "wermgr.exe", "WerFault.exe") and
not (process.name:"rundll32.exe" and process.command_line : "*WerConCpl.dll*LaunchErcApp*")) or
(process.parent.name:"conhost.exe" and not process.name:("mscorsvw.exe", "wermgr.exe", "WerFault.exe", "WerFaultSecure.exe", "conhost.exe"))
(process.parent.name:"conhost.exe" and not process.name:("mscorsvw.exe", "wermgr.exe", "WerFault.exe", "WerFaultSecure.exe", "conhost.exe", "powershell.exe", "cmd.exe"))
@Mikaayenson Mikaayenson changed the title [Rule Tuning] Unusual Parent-Child Relationship [Testing] Unusual Parent-Child Relationship Jul 6, 2026
@Mikaayenson

Copy link
Copy Markdown
Contributor Author

Testing. Closing.

@Mikaayenson Mikaayenson closed this Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport: auto Domain: Endpoint genai-tradecraft OS: Windows windows related rules Rule: Tuning tweaking or tuning an existing rule

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants