Chuyển đến nội dung
Skillpedia
Bảo mật5.4k · #14906

hunt-exceptional-conditions

Skill này làm gì

Skill này gửi đầu vào bất thường hoặc sai định dạng tới các endpoint web và kiểm tra xem lỗi có làm lộ chi tiết nội bộ hay không. Nó dành cho kiểm thử được ủy quyền các biểu mẫu, API và ô tìm kiếm.

Khi nào nên dùng

  • ✓Khi một API hoặc biểu mẫu mong đợi kiểu dữ liệu cụ thể và bạn muốn xem nó lỗi thế nào.
  • ✓Khi một trang lỗi có thể hiển thị đường dẫn file máy chủ hoặc phiên bản thư viện.
  • ✓Khi một ô tìm kiếm hoặc bộ lọc có thể không xử lý an toàn dữ liệu đầu vào bất thường.

Liên kết skill

https://github.com/elementalsouls/Claude-BugHunter/blob/main/skills/hunt-exceptional-conditions/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/elementalsouls/Claude-BugHunter/blob/main/skills/hunt-exceptional-conditions/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ể gửi một số dữ liệu đầu vào sai định dạng tới API phản hồi của chúng tôi và kiểm tra xem lỗi có lộ chi tiết nội bộ không trong kiểm thử được ủy quyền không?”

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

Cách hoạt động

Agent thay đổi một giả định mỗi lần, như sai kiểu dữ liệu hoặc JSON hỏng, rồi đọc các phản hồi lỗi. Nó báo cáo mọi chi tiết nội bộ mà lỗi tiết lộ.

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.

HUNT-EXCEPTIONAL-CONDITIONS — Verbose Errors / Fail-Open (A10:2025)

What actually pays

Well-built apps catch errors and return a clean, generic message. A broken app, when handed input it didn't expect, throws an unhandled exception and renders a developer error page straight to the client — leaking the stack trace, the ORM/query internals, server-side file paths, and framework/library versions. That disclosure is the finding (and it arms SQLi/RCE/path attacks next).

Recon

Any endpoint that parses input is a candidate; the richest are:

JSON APIs that expect typed fields:  POST /api/* with {numbers, ids, enums}
Endpoints with numeric/id path or query params:  /item/{id}, ?page=, ?quantity=
Search / filter / sort params
File or content-type sensitive uploads

Attack — send what the code didn't anticipate

Take a known-good request and break ONE assumption at a time:

  • Wrong type: a field the app expects to be a number/string is sent as an array or object — {"rating":"x","comment":[1,2,3]}, {"quantity":{}}.
  • Malformed body: truncated/!invalid JSON, an unterminated string, a stray brace, a wrong/missing Content-Type.
  • Boundary/oversized: a very long string, a huge/negative/overflow number.
  • Null byte / control chars embedded in a value.
POST /api/Feedbacks   {"rating":"notanumber","comment":[1,2,3]}
GET  /item/' OR /item/%00   (also exercises the error path)

Watch the RESPONSE BODY, not just the status: a 500 (or even a 200/400) whose body contains a stack trace or framework error page is the signal.

What counts as a leak (the success signal)

A finding is confirmed when the response body contains a cross-framework error-disclosure signature:

  • Node/Express + Sequelize: SequelizeDatabaseError, node_modules/sequelize, a JS stack with internal paths.
  • PHP: <b>Warning</b> ... /var/www/.../file.php on line N.
  • Python: Traceback (most recent call last), werkzeug.exceptions.
  • Java: at com.app.Foo(Foo.java:42) stack frames.
  • .NET: Server Error in '/' Application, a [System.XxxException: ...] YSOD.

A clean JSON error ({"error":"Invalid input"}) with no internals is NOT a finding — that's correct handling. Disclosure of internal structure is.

Validation discipline

  • Capture the exact leaked artifact (path, ORM class, version, stack frame) — that's the evidence. "It returned 500" alone is not disclosure.
  • Note what the leak enables next (e.g. a disclosed SQL error → hunt-sqli; a disclosed absolute path → hunt-lfi).
Câu hỏi thường gặp

Một thông báo lỗi thông thường có phải là phát hiện không?

Thường là không. Skill ghi rằng phát hiện là khi lỗi làm lộ chi tiết nội bộ như stack trace hoặc đường dẫn file.

Loại đầu vào nào được thử?

Kiểu sai, JSON hỏng, giá trị quá lớn và ký tự bất thường như byte null.

Vì sao điều này quan trọng?

Chi tiết nội bộ bị lộ có thể giúp kẻ tấn công lên kế hoạch các cuộc tấn công tiếp theo, nên skill coi đây là rủi ro thật.

Chi tiết

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

Hunt mishandling of exceptional conditions — feed an endpoint malformed/unexpected input (wrong type, broken JSON, oversized field, null byte) and make it fail OPEN or leak internals: a verbose stack-trace / framework error page that discloses ORM internals, server file paths, library versions, or a language traceback. Use on any input-accepting endpoint (JSON APIs, forms, query params). Medium-High when the leak exposes internal structure that arms a deeper attack.

repo: elementalsouls/Claude-BugHunter

Độ phổ biến

Sao GitHub
5.4k
Vị trí xếp hạng
#14906
Giấy phép
MIT
Cập nhật
2/11/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ự