hunt-xss
它能做什么
这项技能测试用户输入是否在没有适当编码的情况下显示在页面中,从而让脚本在访问者的浏览器中运行。它适用于对搜索、评论和资料字段进行的经授权测试。
适用场景
- ✓当搜索或评论字段把你的输入原样显示在页面上时。
- ✓当输入出现在链接、属性或脚本上下文中时。
- ✓当你想确认脚本能否在其他用户看到的页面中运行时。
技能链接
https://github.com/elementalsouls/Claude-BugHunter/blob/main/skills/hunt-xss/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我们的评论框会把文字原样显示在页面上。请帮我在经授权的测试中检查跨站脚本问题。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会输入一个独特的测试标记,然后检查页面是否在未转义的尖括号中返回它。接着它会尝试不同的页面上下文,并且只在安全的证明中确认脚本可以运行。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Autonomous Testing Priority
Verify reflection before claiming XSS — encoding is everything.
Your payload must appear in the response body with angle brackets UNESCAPED. <script> is XSS. <script> is safe encoding — not vulnerable.
Use a UNIQUE NUMERIC CANARY in your proof payload — e.g. <script>alert(91234)</script> or "><img src=x onerror=alert(91234)>. Pick a distinctive 4+ digit number, not alert(1). Practice pages are full of example payloads like alert(1)/alert('XSS') in their hint text; a unique number is how you tell YOUR reflected payload apart from the page's decoy examples. Proof = your alert(<canary>) shows up in the response with raw, unescaped angle brackets.
Try these contexts in order:
Inline script injection (works when HTML context allows new tags):
<script>alert(CANARY)</script>Use whatever canary string your proof contract specifies. Confirmed when
<script>alert(CANARY)appears literally (not HTML-encoded) in the response.Attribute event injection (when
<is filtered but attributes are injectable):" onmouseover="alert(CANARY) " onerror="alert(CANARY) " onload="alert(CANARY)URL/href context:
javascript:alert(CANARY)
Distinguishing success from failure:
- Vulnerable: response contains
<script>alert(unescaped — browser would execute it - Filtered/safe: response contains
<script>or<script>— properly encoded - Blocked: response is an error, or the reflected value is absent entirely
For stored XSS: inject into a field that other pages display (comments, usernames, ticket titles). Then fetch the rendering page and check for unescaped payload. The payload executes when any user views that page — higher severity than reflected.
Crown Jewel Targets
XSS is high-value when it combines privileged context + persistent delivery + scope escalation. The highest payouts come from:
- Admin panels and authenticated dashboards (e.g.,
*/admin,*/settings) — attacker can hijack sessions with elevated privileges, exfiltrate tokens, or pivot to account takeover - Payment/financial flows (
paypal.com, checkout pages, currency converters) — XSS here enables credential harvesting and financial fraud at scale - Stored XSS in collaborative features (wikis, markdown renderers, issue trackers, RDoc, labels, tags) — one payload infects every viewer, multiplying impact
- SSO/signin pages (e.g.,
paypal.com/signin) — XSS here is critical because it can steal auth tokens across the entire platform - Shared SaaS tenant surfaces (
*.myshopify.com,api.collabs.*) — XSS in one tenant's context can bleed across tenant boundaries - Help/documentation sites (
help.shopify.com) — lower severity individually, but often have looser sanitization and trusted user perception - SVG/file upload endpoints — frequently bypasses CSP and sanitization simultaneously
Asset types that pay most: Main product domains > Admin subdomains > API endpoints > Marketing/help sites
OOB-Or-It-Didn't-Happen Gate (Blind / Stored XSS)
For blind and stored XSS — claims require an out-of-band confirmation, the same as blind SSRF. The OOB receiver fires when the payload actually executes in a browser somewhere (an admin reviewing logs, a SOC analyst opening a ticket, an email rendering a stored payload).
What is NOT confirmation
- ASP.NET request validator rejected your
<and returned a different status code → not XSS, that's WAF noise. - Your payload appears in the response body URL-encoded or HTML-encoded → not XSS, that's correct output encoding.
- The form action attribute contains your payload string as
%22onclick%3D…→ not XSS, the browser does NOT decode URL encoding inside HTML attribute values; the%22stays as literal%22in the DOM. - Your
<script>tag appears in the response as<script>→ not XSS, that's escaping.
What IS confirmation
- A request to your unique Collaborator subdomain (e.g.,
bxss-err-<random>.<collab>.oastify.com) arrives in the OOB listener after your payload was stored / reflected / queued. - For stored XSS: the request arrives hours or days later when an admin views the affected resource. Plant payloads early in the engagement and keep the listener open.
- The User-Agent of the firing request is a browser (Mozilla/Chrome), not the server's own backend HTTP clie
常见问题
真正的 XSS 与安全文本有何不同?
安全文本返回时会被编码,尖括号以实体形式显示。不安全的文本则以原始尖括号返回。
为什么使用唯一的数字?
技能说明,独特的数字可以把你的测试与页面上已有的示例载荷区分开。
什么时候改由 HTML 注入覆盖?
技能说明,不运行脚本的标记内容由单独的 HTML 注入技能负责。
详情
作者的原始描述
Hunting skill for xss vulnerabilities. Built from 174 public bug bounty reports. Use when hunting xss on any target. For markup injection that reflects raw HTML but does NOT execute JavaScript (no `<script>`/event-handler execution), see hunt-html-injection — escalate here once script execution is possible.
热度
- GitHub 星标
- 5.4k
- 排名
- #14940
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
apk-redteam-pipeline
5.4k帮你的智能体测试 Android 应用的安全弱点,从找到 APK 文件、反编译,到检查是否暴露了敏感信息。
bugcrowd-reporting
5.4k帮你的智能体撰写更好的 Bugcrowd 漏洞报告,选择正确的类别,并回应“超出范围”的异议。
cloud-iam-deep
5.4k帮你的智能体在经授权的安全测试中,检查找到的云凭据在 AWS、Azure 或 Google Cloud 上能访问哪些内容。
enterprise-vpn-attack
5.4k帮你的智能体在经授权的测试中,检查 Cisco、Fortinet、Citrix 等厂商 VPN 和远程访问设备是否存在已知弱点。