Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Performs proactive threat hunting in Elastic Security SIEM using KQL/EQL queries, detection rules, and Timeline investigation to identify threats that evade automated detection. Use when SOC teams need to hunt for specific ATT&CK techniques, investigate anomalous behaviors, or validate detection coverage gaps using Elasticsearch and Kibana Security.
.claude/skills/performing-threat-hunting-with-elastic-siem/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-03 | ✗→✓ | ▲ Improved | — | — |
| case-19 | ✗→✓ | ▲ Improved | — | — |
| case-01 | ✗→✓ | ▲ Improved | — | — |
| case-06 | ✗→✓ | ▲ Improved | — | — |
| case-13 | ✗→✓ | ▲ Improved | — | — |
Use this skill when:
Do not use for real-time alert triage — that belongs in the Elastic Security Alerts queue with automated detection rules.
kibana_security_solution and read access to relevant indicesStart with a hypothesis based on threat intelligence, ATT&CK technique, or anomaly:
Example Hypothesis: "Attackers are using living-off-the-land binaries (LOLBins) for execution, specifically certutil.exe for file downloads (T1105 — Ingress Tool Transfer)."
Define scope:
logs-endpoint.events.process-*, logs-windows.sysmon_operational-*-urlcache, -split, or -decode flagsOpen Kibana Discover and query with KQL (Kibana Query Language):
kqlprocess.name: "certutil.exe" and process.args: ("-urlcache" or "-split" or "-decode" or "-encode" or "-verifyctl")
Refine to exclude known legitimate use:
kqlprocess.name: "certutil.exe" and process.args: ("-urlcache" or "-split" or "-decode") and not process.parent.name: ("sccm*.exe" or "ccmexec.exe") and not user.name: "SYSTEM"
For PowerShell-based hunting with encoded commands (T1059.001):
kqlprocess.name: "powershell.exe" and process.args: ("-enc" or "-encodedcommand" or "-e " or "frombase64string" or "iex" or "invoke-expression") and not process.parent.executable: "C:\\Windows\\System32\\svchost.exe"
Elastic Event Query Language (EQL) enables hunting for multi-step attack sequences:
Detect parent-child process anomalies (T1055 — Process Injection):
eqlsequence by host.name with maxspan=5m [process where event.type == "start" and process.name == "explorer.exe"] [process where event.type == "start" and process.parent.name == "explorer.exe" and process.name in ("cmd.exe", "powershell.exe", "rundll32.exe", "regsvr32.exe")]
Detect credential dumping sequence (T1003):
eqlsequence by host.name with maxspan=2m [process where event.type == "start" and process.name in ("procdump.exe", "procdump64.exe", "rundll32.exe", "taskmgr.exe") and process.args : "*lsass*"] [file where event.type == "creation" and file.extension in ("dmp", "dump", "bin")]
Detect lateral movement via PsExec (T1021.002):
eqlsequence by source.ip with maxspan=1m [authentication where event.outcome == "success" and winlog.logon.type == "Network"] [process where event.type == "start" and process.name == "psexesvc.exe"]
Create a Timeline investigation in Elastic Security for collaborative analysis:
kqlhost.name: "WORKSTATION-042" and event.category: ("process" or "network" or "file")
Add columns for key fields: @timestamp, event.action, process.name, process.args, user.name, source.ip, destination.ip
Convert successful hunting queries into Elastic detection rules:
json{ "name": "Certutil Download Activity", "description": "Detects certutil.exe used for file download, a common LOLBin technique", "risk_score": 73, "severity": "high", "type": "eql", "query": "process where event.type == \"start\" and process.name == \"certutil.exe\" and process.args : (\"-urlcache\", \"-split\", \"-decode\") and not process.parent.name : (\"ccmexec.exe\", \"sccm*.exe\")", "threat": [ { "framework": "MITRE ATT&CK", "tactic": { "id": "TA0011", "name": "Command and Control" }, "technique": [ { "id": "T1105", "name": "Ingress Tool Transfer" } ] } ], "tags": ["Hunting", "LOLBins", "T1105"], "interval": "5m", "from": "now-6m", "enabled": true }
Deploy via Elastic Security API:
bashcurl -X POST "https://kibana:5601/api/detection_engine/rules" \ -H "kbn-xsrf: true" \ -H "Content-Type: application/json" \ -H "Authorization: ApiKey YOUR_API_KEY" \ -d @certutil_rule.json
Create hunting dashboard with aggregations:
jsonGET logs-endpoint.events.process-*/_search { "size": 0, "query": { "bool": { "must": [ {"term": {"process.name": "certutil.exe"}}, {"range": {"@timestamp": {"gte": "now-30d"}}} ] } }, "aggs": { "by_host": { "terms": {"field": "host.name", "size": 20}, "aggs": { "by_user": { "terms": {"field": "user.name", "size": 10} }, "by_args": { "terms": {"field": "process.args", "size": 10} } } } } }
Record findings in a structured hunt report and update detection coverage:
| Term | Definition | |------|-----------| | KQL | Kibana Query Language — simplified query syntax for filtering data in Kibana Discover and dashboards | | EQL | Event Query Language — Elastic's sequence-aware query language for detecting multi-step attack patterns | | ECS | Elastic Common Schema — standardized field naming convention enabling cross-source correlation | | Timeline | Elastic Security investigation workspace for collaborative event analysis and annotation | | Hypothesis-Driven Hunting | Structured approach starting with a theory about attacker behavior, tested against telemetry data | | LOLBins | Living Off the Land Binaries — legitimate Windows tools (certutil, mshta, rundll32) abused by attackers |
THREAT HUNT REPORT — TH-2024-012
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Hypothesis: Attackers using certutil.exe for tool download (T1105)
Period: 2024-02-15 to 2024-03-15
Data Sources: Elastic Endpoint (process events), Sysmon
Findings:
Total certutil executions: 342
With -urlcache flag: 12 (3.5%)
Suspicious (non-SCCM): 3 confirmed anomalous
Affected Hosts:
WORKSTATION-042 (Finance) — certutil downloading payload.exe from external IP
SERVER-DB-03 (Database) — certutil decoding base64 encoded binary
LAPTOP-EXEC-07 (Executive) — certutil downloading script from Pastebin
Actions Taken:
[DONE] 3 hosts isolated for forensic investigation
[DONE] Detection rule "Certutil Download Activity" deployed (ID: elastic-th012)
[DONE] ATT&CK Navigator updated: T1105 coverage = GREEN
Verdict: HYPOTHESIS CONFIRMED — 3 true positive findings escalated to IR| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-16 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-08 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-09 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-03 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-20 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-19 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-21 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-22 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-11 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-05 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-17 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-14 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-04 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-23 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-18 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-12 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-01 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-06 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-13 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-10 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-07 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-02 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-15 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted. The headline lift of +39 percentage points is the difference between those two pass rates over the 23 comparable cases.
The per-case answers from this run were removed by the retention sweep, so the case table below shows the verdicts without the text either arm produced. The counts above were recorded at the time and are unaffected. Answers are now kept for 180 days.
Other measured skills in the registry, with their headline benchmark lift.