Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

security-threat-hunting

БесплатноБез исполняемых скриптовНе проверен

Hypothesis-driven threat hunting in Elastic Security using iterative ES|QL exploration. Covers IOC search, anomaly identification, baseline comparison…

elasticот elastic★ 615 звёзд на GitHub

Об этом скилле

Threat Hunting

Hunt proactively for threats that detection rules have not surfaced. Start from a specific hypothesis, explore security data iteratively with ES|QL, separate anomalies from legitimate behavior, and document what you find.

Environment Configuration

This skill executes Elasticsearch operations through the elastic CLI. If the elastic CLI is not installed, tell the user what it is needed for. Do not guess credentials, call the HTTP API directly, or attempt other workarounds.

This skill references operations in HTTP-shorthand form (e.g., GET /, GET /_cat/indices, GET /{index}/_mapping, GET /{index}/_settings/index.mode, POST /_query). The Operations table at the end of this document maps each shorthand to the equivalent elastic CLI command — always use the CLI rather than calling the HTTP API directly.

Critical principles

  • Start with a hypothesis. Do not explore without direction. Tie each hunt to a MITRE ATT&CK technique, a threat report, or a specific question about your environment.
  • Rare is not malicious. A single-host, low-count result is a lead, not a finding. Corroborate it before escalating.
  • Zero rows does not mean clean. It means the hypothesis is not confirmed in this window, data source, and field set. Say so explicitly.
  • Report tool output verbatim. Copy hostnames, IPs, hashes, and counts exactly as returned. Do not invent details.

Hunting approaches

Method Description When to use
Hypothesis-driven Start with a specific theory about adversary behavior New threat intel, emerging technique, "could this happen here?"
CTI-driven Search for known IOCs or TTPs from threat reports After reading a threat report, advisory, or news
Data-driven Use frequency analysis and statistical outliers Baseline hunting, anomaly detection, "what's unusual?"

Process

Step 1 — Formulate a hypothesis

Every hunt starts with a question. Good hypotheses are specific, testable, and scoped:

  • Good: "Are there LOLBin processes making DNS queries to rare external domains in our Windows fleet?"
  • Good: "Has any process established persistence via Run keys on a single host in the last 7 days?"
  • Bad: "Is there malware in our environment?" (too broad, not testable)

Define the expected data sources and the time window. Use 7–30 days for behavioral patterns and shorter windows for IOC sweeps. Sources for hypotheses:

  • MITRE ATT&CK techniques relevant to your environment
  • Recent threat intelligence or advisories (CTI-driven)
  • Alert triage patterns, such as recurring false positives that hint at coverage gaps
  • Elastic Security Labs research

Data needed: a one-sentence hypothesis, the technique or actor it maps to, the data sources, and the time window.

Step 2 — Identify data sources

Discover which security indices exist with GET /_cat/indices, then confirm field availability before you query. Run POST /_query with FROM <pattern> | LIMIT 0 to list the available fields without returning documents. Use GET /{index}/_mapping only for a single concrete index: on a wildcard pattern it returns the mapping of every backing index, which can reach megabytes. Prefer ECS field names for cross-source portability.

Common sources are in the table under Common indices for hunting. If an index the hypothesis depends on is absent, say so and stop or adjust the hypothesis — do not query a pattern that matches nothing.

Data needed: confirmed index patterns and the fields available in each.

Step 3 — Explore iteratively

Run each query with POST /_query. Use an existing template from references/query-templates.md (lateral movement, C2 beaconing, brute force, rare process execution) or write a custom query.

Write custom ES|QL with these principles:

  • FROM: use the narrowest index pattern, such as logs-endpoint.events.process-*.
  • WHERE: scope every query with an @timestamp range, such as WHERE @timestamp >= NOW() - 7 DAYS, and filter early.
  • KEEP: select only the fields you need.
  • STATS: use COUNT(*), COUNT_DISTINCT(host.id), and VALUES() for frequency and outlier analysis. Aggregate before you pull raw events to understand data volume.
  • LIMIT: cap output, including aggregations.

Start broad to establish a baseline, then chain WHERE clauses to narrow. Avoid one overly complex query.

Data needed: aggregate results that sh

Полный SKILL.md на GitHub

Установить security-threat-hunting в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/hunting-guide.mdreferences/query-templates.md

FAQ

Что делает скилл security-threat-hunting?

Hypothesis-driven threat hunting in Elastic Security using iterative ES|QL exploration. Covers IOC search, anomaly identification, baseline comparison, lateral movement tracking, and turning hunt findings into cases and detection rules. Use when running a proactive hunt, investigating suspicious activity patterns, searching for indicators of compromise, or looking for rare events in security telemetry.

Как установить скилл security-threat-hunting?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл security-threat-hunting запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить security-threat-hunting с