dnr-hunt
A Claude Code skill for proactive threat hunting over web/application logs:
profiles the corpus, runs a hypothesis-driven hunt loop with a written
ledger, confirms suspects in source, fires a local PoC, and writes
INCIDENTS.json + INCIDENT_REPORT.md. The no-alert entry to the
detection & response track — pairs with /dnr-respond (lead-in-hand
workup) and feeds /triage → /patch; demo target: targets/dnrcanary.
For how the track fits together, see
docs/detection-response.md.
Requirements
Claude Code CLI installed and authenticated
A directory of logs. For the demo target they must be generated first (~82 MB, gitignored, byte-deterministic per seed on the same machine):
pip install flask pyyaml # flask runs the app; pyyaml runs the grader python3 targets/dnrcanary/generate_logs.py --seed 42The scenario briefing is in
targets/dnrcanary/README.md.Optionally the application source (
--repo) — without it, findings cannot rise abovesuspected
Usage
/dnr-hunt # defaults to targets/dnrcanary
/dnr-hunt targets/dnrcanary # explicit dnr target
/dnr-hunt /var/log/myapp --repo ~/src/app # your own logs + source
/dnr-hunt targets/dnrcanary --fresh # ignore checkpoint, restartOutput
Outputs land in a per-run directory, results/<target>/<timestamp>/ — the
same layout the other runbook skills use, so a new hunt never clobbers a
previous one. /dnr-respond adopts the run dir automatically; /triage and
/patch write to the directory they're invoked from, so run them from
inside the run dir to keep their outputs beside the incidents.
<run>/INCIDENTS.json— incidents with verdicts (confirmed_exploited/suspected), attacker entities, timeline, quantified impact, evidence pipelines, and PoC; plusruled_outfor everything verdictedattempted_not_vulnerableorbenign.<run>/INCIDENT_REPORT.md— executive summary, campaign timeline, evidence per incident, and the full hypothesis ledger as the audit trail.
Example output: targets/dnrcanary/example_skill_runs/
On the demo target, score the result yourself afterwards:
python3 targets/dnrcanary/grade.py <run>/INCIDENTS.json. The target README
marks its answer-key files (ground truth, grader, log-generator source) as
spoilers — keep them out of the hunt; grading is your move after the
write-up. The autonomous harness enforces this structurally by excluding
those files from the hunt container.
What it does and doesn't do
- Does: query logs (grep/awk/DuckDB), maintain a hypothesis ledger, read source, start the demo app on 127.0.0.1 and fire minimal PoCs at it.
- Does not: confirm anything from logs alone; execute response actions; send traffic to remote hosts. Blocking, rotation, and the like appear only as /dnr-respond proposals.
Installation and support are the same for all skills in this repo: see the repo README. Both DNR skills checkpoint their phase state under the run directory, so an interrupted session resumes where it left off.