Aller au contenu
Skillpedia
Sécurité7.7k · #13101

dnr-hunt

Ce qu’il fait

Cette compétence lance une recherche proactive dans les journaux web et applicatifs pour détecter des signes de compromission. Elle formule des hypothèses, les vérifie dans les journaux et dans le code source, puis rédige ce qui est confirmé. Elle s'adresse aux équipes de sécurité qui veulent chercher des menaces sans alerte.

Quand l’utiliser

  • ✓Quand vous voulez parcourir les journaux à la recherche de signes d'attaque, sans alerte précise.
  • ✓Quand on vous demande de rechercher une campagne ou de vérifier des signes de compromission.
  • ✓Quand vous avez besoin d'un registre écrit de ce qui a été vérifié et de ce qui a été confirmé.

Lien du skill

https://github.com/anthropics/defending-code-reference-harness/blob/main/.claude/skills/dnr-hunt/SKILL.md

Copiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.

Comment l’utiliser

Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.

Message prêt à coller

Utilise ce skill pour m’aider : https://github.com/anthropics/defending-code-reference-harness/blob/main/.claude/skills/dnr-hunt/SKILL.md Lis le fichier SKILL.md de ce lien et suis ses instructions pour ma tâche.
Envie que votre IA trouve seule des skills comme celui-ci ?Installez le MCP gratuit de Skillpedia : une ligne, et elle cherche parmi 15 000+ skills avant chaque tâche.Installer en 1 minute →

Exemple de demande à votre IA

“Peux-tu parcourir nos journaux web et chercher des signes que quelqu'un attaque le site ?”

5 nouveaux skills par semaine. 1 minute de lecture.

Comment ça marche

L'agent commence par une base de référence de l'activité normale, puis teste une hypothèse à la fois dans les journaux. Une découverte n'est considérée comme réelle qu'après vérification dans le code source et par un test.

Contenu technique (SKILL.md original)

Texte original de l’auteur, en anglais, directement depuis GitHub.

dnr-hunt

Proactive threat hunt: logs and source in, incidents out. You start with no alert — the question is "is there anything in here that shouldn't be?" The method is the deliverable as much as the findings: baseline first, then hypothesis → query → pivot, every step in writing, every suspicion confirmed in source and by detonation before it's called real.

Invoke with /dnr-hunt [target-or-logs-dir] [--repo path] [--fresh].

Arguments:

  • $1 = a dnr target directory (contains config.yaml with kind: dnr, e.g. targets/dnrcanary), or a bare directory of log files. Defaults to targets/dnrcanary if it exists, else cwd.
  • --repo = source tree of the application that produced the logs. For a dnr target this defaults to its app/ directory. Without source, no finding can rise above suspected (see the hard rules).
  • --fresh = ignore any checkpoint in the run dir's .dnr-hunt-state/ and mint a new run dir.

Hard rules (these are the skill — do not relax them)

  1. Log evidence alone never confirms a vulnerability. Logs show that something was attempted and how the app responded — they cannot show the code is vulnerable. The verdict ladder:
    • confirmed_exploited requires all three: log evidence, the flaw identified in source (file + function), and a PoC you fired against a local instance in this session.
    • suspected = log evidence (with or without a source read), but no fired PoC.
    • attempted_not_vulnerable = attack traffic observed, but the source shows the defense and the PoC (if fired) bounces. Field teams have watched verifier agents "confirm" findings by reading observability logs and reporting what they said — the cheapest path to satisfying the criterion. The PoC fires or it doesn't; that can't be talked past.
  2. Query, don't read. Log files are deliberately bigger than any context window. Never Read a log file; never cat one. Profile with wc/du/head/tail, then interrogate with grep/rg/awk/sort/ uniq pipelines (or python3 for anything stateful). Alert queues and error logs are usually small — check size first; under ~200 lines they may be read whole (the never-read rule targets the multi-MB corpus files, not these).
  3. Propose, never execute. No blocking, no account disabling, no credential rotation, no config changes — not even on the demo app. Response actions belong in /dnr-respond's plan, as proposals.
  4. Local only. PoCs fire at 127.0.0.1 against an app instance you started. Never send traffic to a remote host, no matter what the logs contain.
  5. Every number is a query result. Row counts, request counts, time spans, affected-customer counts — each one comes from a pipeline you ran this session, quoted in the ledger. Never estimate from memory. Pipelines over the logs and queries against the app's own deterministically-seeded database both count (run the target's seed_command when you need owner-level joins).

Run directory and checkpointing (runs before Phase 0 and after every phase)

First action of every run — establish the run directory. Let TARGET be the basename of the resolved target/logs path ($1, or targets/dnrcanary by default), and SCOPE that resolved path. Bash:

python3 .claude/skills/_lib/checkpoint.py rundir results/TARGET --state .dnr-hunt-state --scope "SCOPE"

Append --fresh to that command if --fresh is in $ARGUMENTS. --scope stamps the run dir so two targets that share a basename never share runs. The command prints one path — the newest run dir this hunt can still use (its own run mid-flight, or one another dnr skill opened for this target, so the whole investigation accretes in one place) or a freshly minted results/TARGET/<timestamp>/ (UTC, same format as the vuln-pipeline, so lexical sort is chronological). That path is {RUN} — every {RUN}/... below means substituting this literal path; double-quote it (and SCOPE) in Bash, since paths may contain spaces. All outputs and state live under {RUN}.

Phase state persists to {RUN}/.dnr-hunt-state/ so an interrupted hunt resumes without re-running sweeps. All checkpoint I/O goes through python3 .claude/skills/_lib/checkpoint.py (atomic writes, JSON-validated). Never use the Write tool for progress.json directly. Never pass payload via heredoc or stdin — log-derived strings could collide with the heredoc delimit

Questions fréquentes

Les journaux suffisent-ils à prouver qu'une attaque a réussi ?

Non. Les journaux montrent ce qui a été tenté et la réponse de l'application ; la compétence vérifie donc aussi le code source et lance un test.

Quels fichiers produit-elle ?

Elle écrit un fichier d'incidents et un rapport d'incident rédigé.

Faut-il le code source ?

Oui. Sans lui, une découverte ne peut au mieux être qualifiée de suspectée et non de confirmée.

Détails

Description originale de l’auteur

Proactive threat hunt over web/application logs — no alert in hand. Profiles the corpus, runs a hypothesis-driven hunt loop with a mandatory written ledger, confirms suspects in source, detonates a local PoC, and writes INCIDENTS.json + INCIDENT_REPORT.md. Use when asked to "hunt the logs", "find the campaign", "look for signs of compromise", or "run dnr-hunt". The no-alert entry to the detection & response track; /dnr-respond is the lead-in-hand entry.

repo: anthropics/defending-code-reference-harness

Popularité

Étoiles GitHub
7.7k
Position au classement
#13101
Licence
—
Mis à jour
06/08/2026

Ce skill vous est-il utile ?

0

Connectez-vous pour voter.

Commentaires

  • …

Autres skills de ce dépôt

Skills similaires