跳到正文
Skillpedia
安全5.4k · #14906

hunt-exceptional-conditions

它能做什么

这项技能向 Web 端点发送意外或格式错误的输入,并检查错误信息是否暴露内部细节。它适用于对表单、API 和搜索框进行的经授权测试。

适用场景

  • ✓当 API 或表单要求特定类型,你想看看它如何失败时。
  • ✓当错误页面可能显示服务器文件路径或库版本时。
  • ✓当搜索或筛选字段可能无法安全处理异常输入时。

技能链接

https://github.com/elementalsouls/Claude-BugHunter/blob/main/skills/hunt-exceptional-conditions/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/elementalsouls/Claude-BugHunter/blob/main/skills/hunt-exceptional-conditions/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请帮我在经授权的测试中向我们的反馈 API 发送一些格式错误的输入,并检查错误是否显示内部细节。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体每次只改变一个假设,例如错误的数据类型或损坏的 JSON,然后读取错误响应。它会报告错误所泄露的任何内部细节。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

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).
常见问题

普通的错误消息算是发现的问题吗?

通常不算。技能说明,只有当错误暴露堆栈跟踪或文件路径等内部细节时,才构成发现的问题。

会尝试哪些输入?

错误的类型、损坏的 JSON、超大的值,以及空字节等不寻常字符。

这为什么重要?

泄露的内部信息可能帮助攻击者规划后续攻击,因此技能将其视为真实风险。

详情

作者的原始描述

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

热度

GitHub 星标
5.4k
排名
#14906
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能