Skip to main content
Sticky

Chronicle Rule → Outcome → SOAR Playbook Workflow

  • May 20, 2026
  • 3 replies
  • 31 views

mccrilb
Forum|alt.badge.img+12

I wanted to share the workflow we’ve been using to connect Chronicle detection rules with SOAR (Gemini) playbooks, specifically focusing on how rule design directly drives playbook effectiveness.

The key idea is:

The rule is not just a trigger — it is responsible for providing all the context the playbook needs to make a decision.

1. Rule as the Context Engine

Instead of relying on the playbook to “figure things out,” we push as much structure and meaning as possible into the rule itself.

Each rule is responsible for:

  • Identifying the behavior
  • Normalizing key fields
  • Providing investigation-ready context via the outcome section

By the time the alert reaches the playbook, it should already answer:

  • What happened?
  • Who did it?
  • On what system?
  • Why is it suspicious?

2. Outcome Section as the Contract

The outcome section acts as a contract between the detection rule and the playbook.

We standardize outcomes across rules so every playbook receives consistent inputs.

Core pattern we use:

  • $outcomeUserIsTechnical (true/false)
  • $outcomeUserRoleHint (technical vs non-technical + elevated context)

These are derived from datatables (title + department), not hardcoded logic.

Why this matters

The playbook doesn’t need to:

  • Parse job titles
  • Infer privilege
  • Guess intent

It can immediately reason with:

  • “This is a non-technical user running a recon tool”
  • “This is an elevated admin performing a sensitive action”

3. Passing High-Value Fields Only

We intentionally keep outcome fields:

  • Concise
  • High signal
  • Consistent across rules

Typical fields include:

  • Command line
  • File path
  • Process name
  • Target resource
  • User role indicators

We avoid:

  • Excessive raw telemetry
  • Fields that don’t influence decisions

This keeps playbook prompts clean and performant.

4. Playbook Design (Driven by Rule Output)

Playbooks are designed with the assumption that:

  • The rule already identified suspicious behavior
  • The outcome already provides structured context

So the playbook focuses on decisioning, not discovery.

Playbook Responsibilities

Given the alert + outcome data, the playbook:

  1. Evaluates context

    • User type (technical vs non-technical)
    • Execution context (host, process, command line)
    • Action being performed
  2. Determines verdict

    • Malicious
    • Suspicious
    • Benign
  3. Provides reasoning

    • Based strictly on the current alert context
  4. Recommends next steps

    • Investigate
    • Escalate
    • Close

5. Key Design Constraint

Each playbook execution is context-isolated.

This means:

  • No linking to other alerts
  • No historical correlation assumptions

Because of this, the rule + outcome must be self-sufficient.

If the rule doesn’t provide enough context, the playbook cannot compensate.

6. Workflow in Practice

The flow looks like this:

  1. Rule triggers on high-fidelity behavior
  2. Rule populates standardized outcome fields
  3. Alert is sent to SOAR
  4. Playbook consumes:
    • Detection metadata
    • Outcome variables
  5. Playbook produces:
    • Verdict
    • Reasoning
    • Recommended actions

7. Handling Noise (Critical Insight)

If alerts are noisy, we do not fix that in the playbook.

We go back to the rule and:

  • Refine conditions
  • Add exclusions
  • Tighten logic

Reason:

A playbook should not be responsible for compensating for weak detections.

Cleaner rules = better automation decisions.

8. Where This Model Works Best

This workflow is especially effective for:

  • Behavioral detections (execution, configuration changes, discovery activity)
  • Privilege-sensitive actions
  • High-confidence signals with clear intent

9. Outcome

This approach gives us:

  • Consistent playbook inputs across all rules
  • Simpler and more reliable automation logic
  • Better triage quality (especially with Gemini)
  • Reduced need for complex playbook branching

Closing

The biggest shift for us was treating the rule as the primary source of truth, and the playbook as a decision layer, not a discovery layer.

Curious how others are structuring:

  • Outcome sections
  • Rule-to-playbook contracts
  • Context standardization across detections

Happy to compare approaches.

3 replies

mccrilb
Forum|alt.badge.img+12
  • Author
  • Silver 2
  • May 20, 2026

this is a template of a rule and how it creates the output fields for the playbook. FYI, we are using Legacy Chronicle still.

 

!--scriptorstartfragment-->

rule sh_template_rule_workflow_context_to_playbook {

 

  meta:

    author = "template"

    description = "TEMPLATE: Demonstrates the Chronicle rule → standardized outcome context → Gemini playbook workflow. This rule detects a high-signal suspicious command execution pattern (example technique) and emits consistent outcome fields (host, user, process chain, target process, event metadata, and user role hints). The intent is to show how the detection rule provides the context contract that the SOAR/Gemini playbook consumes to produce a verdict and recommended actions. MITRE: (template) Defense Evasion (TXXXX), Discovery (TXXXX)."

    gemini_prompt = "This alert was generated by a TEMPLATE Chronicle rule designed to demonstrate the workflow where the rule provides structured context to a SOAR/Gemini playbook via standardized outcome fields. The detection data includes the hostname (alertHostname), user (alertPrincipalUser), user role hints (outcomeUserRoleHint, outcomeUserIsTechnical), target process (alertTargetProcessPath, alertTargetProcessCommandLine), principal/parent process context (alertPrincipalProcessPath, alertPrincipalProcessCommandLine, alertParentProcessPath, alertParentProcessCommandLine), and event metadata (alertEventType, alertProductEventType) plus an event count (alertDistinctEventCount). Use ONLY the data in this alert; do not assume related alerts, prior cases, or historical context. Evaluate: 1) Who ran it (alertPrincipalUser) and whether their role hint suggests this is expected; non-technical users performing high-risk actions are more suspicious. 2) The process chain and execution method; interactive shells and unusual parents increase suspicion. 3) Whether the command line indicates high-risk intent versus routine administration. 4) Identify what additional validation steps an analyst should take to confirm maliciousness or benign intent (e.g., corroborating process tree, verifying change tickets, checking follow-on behaviors). Provide a verdict of Suspicious or Malicious by default unless there is clear evidence of an approved/admin scenario. Output valid JSON with exactly three fields: explanation, verdict, verdict_explanation. Do not include any additional text."

    reference = "https://example.com/template-reference"

    tags = "attack.example, workflow.template, rule-to-playbook, gemini"

    rule_inspiration = "Community workflow example: rule provides context contract for playbook"

    rule_validation = "Template / Not validated"

    severity = "Medium"

    dataTables = "UserRole_Technical_Titles, UserRole_Technical_Depts, UserRole_Elevated_Titles, UserRole_Elevated_Depts"

   

 

  events:

    // TEMPLATE: Replace vendor/product filters with what your environment uses.

    ($e1.metadata.vendor_name = "Crowdstrike" or $e1.metadata.product_name = "Microsoft-Windows-Sysmon")

    and ($e1.metadata.event_type = "PROCESS_LAUNCH"

            or $e1.metadata.event_type = "STATUS_UPDATE"

            or $e1.metadata.event_type = "PROCESS_UNCATEGORIZED"

    )

    and $e1.principal.hostname = $hostname

 

    // TEMPLATE DETECTION: Example suspicious command execution patterns (safe to share).

    // Swap this section to match your actual use case (bcdedit, vssadmin, netsh, schtasks, etc.)

    and (

      // --- PATH 1: High-signal discovery/admin commands launched interactively ---

      ($e1.target.process.command_line = /\b(cmd\.exe|powershell\.exe)\b/ nocase

            and $e1.target.process.command_line = /\b(whoami|nltest|net\s+user|net\s+group|dsquery|wmic|systeminfo)\b/ nocase

      )

 

      // --- PATH 2: High-risk configuration change keywords (template) ---

      or ($e1.target.process.command_line = /\b(set|config|disable|delete)\b/ nocase

            and $e1.target.process.command_line = /\b(policy|logging|security|firewall|defender)\b/ nocase

      )

    )

 

    // TEMPLATE: Exclude common enterprise tooling (keep generic)

    and not $e1.principal.process.file.full_path = /\\Tanium\\|\\BigFix\\|\\ConfigMgr\\|\\SCCM\\|\\Lansweeper\\|\\Defender\\/ nocase

 

  match:

    $hostname over 5m

 

  outcome:

    // --- Host & User Context (4) ---

    $alertHostname = array_distinct($e1.principal.hostname)

    $alertPrincipalUser = array_distinct($e1.principal.user.userid)

 

    // Use your established "service/machine account aware" role-hinting pattern

    $outcomeUserIsTechnical = array_distinct(

      if(

        ($e1.principal.user.userid = /\$$/)

        or ($e1.principal.user.windows_sid = "S-1-5-18")

        or ($e1.principal.user.windows_sid = "S-1-5-19")

        or ($e1.principal.user.windows_sid = "S-1-5-20")

        or ($e1.principal.user.windows_sid = /S-1-5-93-/),

        "true",

        if(

          ($e1.principal.user.title in regex %UserRole_Technical_Titles.Title nocase)

          or

          ($e1.principal.user.department in %UserRole_Technical_Depts.dept nocase),

          "true",

          "false"

        )

      )

    )

 

    $outcomeUserRoleHint = array_distinct(

      if(

        ($e1.principal.user.userid = /\$$/)

        or ($e1.principal.user.windows_sid = "S-1-5-18")

        or ($e1.principal.user.windows_sid = "S-1-5-19")

        or ($e1.principal.user.windows_sid = "S-1-5-20")

        or ($e1.principal.user.windows_sid = /S-1-5-93-/),

        "service",

        if(

          (

            ($e1.principal.user.title in regex %UserRole_Technical_Titles.Title nocase)

            or

            ($e1.principal.user.department in %UserRole_Technical_Depts.dept nocase)

            or

            ($e1.principal.user.title in regex %UserRole_Elevated_Titles.Title nocase)

            or

            ($e1.principal.user.department in %UserRole_Elevated_Depts.dept nocase)

          ),

          "technical",

          "non-technical"

        )

      )

    )

 

    // --- Process Chain (4) ---

    $alertPrincipalProcessPath = array_distinct($e1.principal.process.file.full_path)

    $alertPrincipalProcessCommandLine = array_distinct($e1.principal.process.command_line)

    $alertParentProcessPath = array_distinct($e1.principal.process.parent_process.file.full_path)

    $alertParentProcessCommandLine = array_distinct($e1.principal.process.parent_process.command_line)

 

    // --- Target Process (2) ---

    $alertTargetProcessPath = array_distinct($e1.target.process.file.full_path)

    $alertTargetProcessCommandLine = array_distinct($e1.target.process.command_line)

 

    // --- Event Metadata (2) ---

    $alertEventType = array_distinct($e1.metadata.event_type)

    $alertProductEventType = array_distinct($e1.metadata.product_event_type)

 

    // --- Count (1) ---

    $alertDistinctEventCount = count_distinct($e1.metadata.id)

 

  condition:

    $e1

}!--scriptorendfragment-->


mccrilb
Forum|alt.badge.img+12
  • Author
  • Silver 2
  • May 20, 2026

then a simple playbook outline to show how we inject the information to gemini and parse the response:

Playbook name: Rule and Gemini Integration
Purpose: When a Chronicle detection generates a case, this playbook:

  1. Pulls the rule metadata (especially metadata.gemini_prompt, plus description/tags)
  2. Builds a Gemini prompt that includes:
    • the rule’s gemini_prompt
    • the rule’s description/tags
    • up to 20 outcome fields from the detection event
  3. Calls “Ask Gemini”
  4. Cleans Gemini’s response (because the result comes back HTML-wrapped / code-block-wrapped)
  5. Parses the JSON (unflattens it so key/value fields are easy to reference)
  6. Branches based on verdict (Benign vs not Benign)
  7. Writes Gemini’s verdict/explanation into the case as a “General Insight”

matthewnichols
Community Manager
Forum|alt.badge.img+20

Now that’s what I’m talking about! Thanks ​@mccrilb for sharing this with the Community! Would love to hear feedback from Community members on this. Keep ‘em coming ​@mccrilb