Chuyển đến nội dung
Skillpedia
Bảo mật7.7k · #13101

dnr-hunt

Skill này làm gì

Skill này chủ động tìm trong log web và log ứng dụng để phát hiện dấu hiệu bị xâm nhập. Nó đưa ra giả thuyết, kiểm tra với log và mã nguồn, rồi ghi lại những gì được xác nhận. Skill dành cho nhân viên bảo mật muốn tìm mối đe dọa mà không cần cảnh báo.

Khi nào nên dùng

  • ✓Khi bạn muốn xem log để tìm dấu hiệu tấn công mà không có cảnh báo cụ thể.
  • ✓Khi có người yêu cầu bạn tìm một chiến dịch hoặc kiểm tra dấu hiệu bị xâm nhập.
  • ✓Khi bạn cần một bản ghi chép về những gì đã kiểm tra và những gì đã được xác nhận.

Liên kết skill

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

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/anthropics/defending-code-reference-harness/blob/main/.claude/skills/dnr-hunt/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Bạn có thể xem qua log web của chúng tôi và tìm dấu hiệu có ai đang tấn công trang không?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent bắt đầu bằng một đường cơ sở về hoạt động bình thường, rồi kiểm tra từng ý tưởng một với log. Một phát hiện chỉ được coi là thật sau khi được kiểm tra trong mã nguồn và qua một bài kiểm thử.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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

Câu hỏi thường gặp

Log có thể chứng minh một cuộc tấn công đã thành công không?

Không. Log cho thấy những gì đã được thử và cách ứng dụng phản hồi, nên skill còn kiểm tra mã nguồn và chạy thử.

Nó tạo ra những file nào?

Nó ghi một file sự cố và một báo cáo sự cố bằng văn bản.

Có cần mã nguồn không?

Có. Nếu không có mã nguồn, một phát hiện cao nhất chỉ đạt mức nghi ngờ chứ không được xác nhận.

Chi tiết

Mô tả gốc của tác giả

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

Độ phổ biến

Sao GitHub
7.7k
Vị trí xếp hạng
#13101
Giấy phép
—
Cập nhật
6/8/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự