dnr-hunt
하는 일
이 스킬은 웹 및 애플리케이션 로그에서 침해의 흔적을 능동적으로 찾습니다. 가설을 세우고, 로그와 소스 코드로 확인한 뒤, 확인된 내용을 정리합니다. 경보 없이 위협을 찾으려는 보안 담당자를 위한 스킬입니다.
사용하는 경우
- ✓경보 없이 공격의 흔적을 찾으려고 로그를 살펴보고 싶을 때.
- ✓누군가 캠페인을 찾거나 침해 흔적이 있는지 확인해 달라고 요청할 때.
- ✓무엇을 확인했고 무엇이 확인되었는지 적은 기록이 필요할 때.
스킬 링크
https://github.com/anthropics/defending-code-reference-harness/blob/main/.claude/skills/dnr-hunt/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“우리 웹 로그를 살펴보고, 누군가 사이트를 공격한 흔적이 있는지 찾아 주실 수 있나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 정상 활동의 기준선부터 시작한 뒤, 한 번에 하나씩 가설을 로그와 대조해 검사합니다. 발견 내용은 소스 코드에서 확인하고 테스트를 실행한 뒤에야 실제로 인정됩니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 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 (containsconfig.yamlwithkind: dnr, e.g.targets/dnrcanary), or a bare directory of log files. Defaults totargets/dnrcanaryif it exists, else cwd.--repo= source tree of the application that produced the logs. For a dnr target this defaults to itsapp/directory. Without source, no finding can rise abovesuspected(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)
- 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_exploitedrequires 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.
- Query, don't read. Log files are deliberately bigger than any
context window. Never
Reada log file; nevercatone. Profile withwc/du/head/tail, then interrogate withgrep/rg/awk/sort/uniqpipelines (orpython3for 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). - 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. - Local only. PoCs fire at
127.0.0.1against an app instance you started. Never send traffic to a remote host, no matter what the logs contain. - 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_commandwhen 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
자주 묻는 질문
로그만으로 공격이 성공했다는 것을 증명할 수 있나요?
아니요. 로그는 무엇이 시도되었고 앱이 어떻게 응답했는지만 보여 줍니다. 그래서 이 스킬은 소스 코드도 확인하고 테스트도 실행합니다.
이 스킬은 어떤 파일을 만드나요?
사건 파일과 사건 보고서를 작성합니다.
소스 코드가 필요한가요?
네. 소스 코드가 없으면 발견 내용은 최대 의심 단계까지만 올라가고, 확인된 것으로 인정되지 않습니다.
상세 정보
작성자의 원본 설명
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.
인기도
- GitHub 스타
- 7.7k
- 순위
- #13101
- 라이선스
- —
- 업데이트
- 2026. 8. 6.
댓글
- …
이 저장소의 다른 스킬
customize
7.7k에이전트가 AI 취약점 탐지 파이프라인에서 대상에 특화된 부분만 새 버그 유형, 언어, 대상에 맞게 고치도록 돕습니다.
dnr-respond
7.7k에이전트가 보안 경보나 침해 지표 하나를 검토해 공격이 성공했는지, 어디까지 퍼졌는지 확인하도록 돕습니다.
patch
7.7k에이전트가 검증된 보안 발견 사항의 코드 수정안을 diff 파일로 작성해, 사람이 검토할 수 있게 돕습니다.
quickstart
7.7k에이전트가 보안 스캔 도구 모음을 짧게 소개하고, 도구 사용법에 대한 질문에 답하도록 돕습니다.