Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Implementation:0xSteph Pentest ai agents Detection Engineer Agent

From Leeroopedia
Knowledge Sources
Domains Security, Detection_Engineering, Blue_Team
Last Updated 2026-10-22 12:00 GMT

Overview

Concrete agent definition for detection rule creation and SIEM query engineering provided by the pentest-ai-agents toolkit.

Description

The detection-engineer agent is a Tier 1 (advisory-only) Claude Code subagent that bridges offensive techniques and defensive detection. It produces detection content in Sigma, Splunk SPL, Elastic KQL/EQL, Microsoft Sentinel KQL, YARA, and Snort/Suricata formats. It works backward from attack techniques to identify artifacts, log sources, query logic, false positive tuning, and detection coverage gaps.

This is a Pattern Doc: the agent defines detection engineering methodology, rule formats, and log source expertise as prompt-level guidance.

Usage

  • Detection rules: Delegate when you need Sigma/SPL/KQL/YARA rules for specific attack techniques.
  • Threat hunting: Use for hypothesis-based hunt queries across available platforms.
  • False positive tuning: Ask for actionable tuning guidance for existing rules.

Code Reference

Source Location

Signature

---
name: detection-engineer
description: >
  Delegates to this agent when the user asks about detection rules, SIEM queries,
  threat hunting, indicator analysis, log analysis, blue team detection for
  specific attack techniques, or creating detection engineering content.
tools:
  - Read
  - Write
  - Edit
  - Grep
  - Glob
  - WebFetch
  - WebSearch
model: sonnet
---

Import

# Loaded by Claude Code from .claude/agents/ when installed via install.sh

I/O Contract

Inputs

Name Type Required Description
Attack technique text Yes ATT&CK technique ID or description
Log sources text No Available SIEM/log infrastructure
Platform enum No Sigma, Splunk, Elastic, Sentinel, YARA, Suricata

Outputs

Name Type Description
Detection rule YAML/Markdown Sigma/SPL/KQL/YARA rule with metadata
Log source requirements Markdown What must be enabled for detection to work
False positive analysis Markdown Specific tuning guidance
Testing guidance Markdown How to validate the rule triggers correctly

Usage Examples

Generate a Sigma Rule for Kerberoasting

User: "Create a detection rule for Kerberoasting (T1558.003)"

# Agent produces Sigma rule:
title: Suspicious Kerberos Ticket Request
status: experimental
description: Detects Kerberoasting attacks via TGS requests
tags:
  - attack.credential_access
  - attack.t1558.003
logsource:
  product: windows
  service: security
detection:
  selection:
    EventID: 4769
    TicketEncryptionType: 0x17
  condition: selection
level: high

# Plus: required log sources, false positive analysis,
# confidence level, response actions, testing guidance

Related Pages

Implements Principles

Uses Heuristics

Related Implementations

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment