Skip to content
Back to skills

Xss Methodology

ASecurity

反射型/存储型/DOM XSS 的检测、利用和绕过。当 Web 应用有用户输入回显(搜索/评论/表单/URL参数)、或发现存储型内容输出点时使用。包含上下文分析决策树、WAF绕过技巧、CSP绕过方法、DOM Clobbering、mXSS、SVG XSS。优先于其他漏洞测试——XSS 是最低成本的高危漏洞,发现后立即构造 PoC

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added October 17, 2026
developmentjavascriptgojava

Security analysis

A100/100

Pro scans all 6 files and shows the line behind each finding

Scanned October 17, 2026

npx -y skills add NetVar1337/agent-skill-canon --skill xss-methodology --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Xss Methodology?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Xss Methodology
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/netvar1337-xss-methodology/badge)](https://www.skillsdirectory.com/skills/netvar1337-xss-methodology)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: xss-methodology
description: "反射型/存储型/DOM XSS 的检测、利用和绕过。当 Web 应用有用户输入回显(搜索/评论/表单/URL参数)、或发现存储型内容输出点时使用。包含上下文分析决策树、WAF绕过技巧、CSP绕过方法、DOM Clobbering、mXSS、SVG XSS。优先于其他漏洞测试——XSS 是最低成本的高危漏洞,发现后立即构造 PoC"
metadata:
  tags: "xss,cross-site scripting,injection,bypass,dom,reflected,stored,csp"
  category: "exploit"
  mitre_attack: "T1189,T1059.007"
---

# XSS 跨站脚本完整方法论

## ⛔ 深入参考(遇到 WAF/CSP 时必读)

- WAF/过滤绕过 payload 大全、CSP 绕过进阶、DOM Clobbering、mXSS、SVG XSS、存储型/DOM XSS → [references/xss-bypass-and-types.md](references/xss-bypass-and-types.md)
- CSP 绕过与 DOM XSS 深入技术 → [references/csp-bypass-and-dom-xss.md](references/csp-bypass-and-dom-xss.md)

---

## Phase 0: 回显点发现(最先执行!)

1. 每个参数发送唯一标记(`xss123test`),在响应中搜索
2. 不仅检查 HTML body,也检查响应头(`Location:`, `Set-Cookie:`)
3. 常见:搜索结果页、错误页面、用户资料页

## Phase 1: 上下文分析(决定 payload)

| 上下文 | 示例 | 基础 Payload |
|--------|------|-------------|
| HTML 标签间 | `<div>INJECT</div>` | `<script>alert(1)</script>` |
| 属性值(双引号) | `<input value="INJECT">` | `" onfocus=alert(1) autofocus="` |
| 属性值(单引号) | `<input value='INJECT'>` | `' onfocus=alert(1) autofocus='` |
| JavaScript 字符串 | `var x="INJECT"` | `";alert(1)//` |
| URL/href | `<a href="INJECT">` | `javascript:alert(1)` |
| JS 模板字面量 | `` var x=`INJECT` `` | `${alert(1)}` 或 `` `+alert(1)+` `` |

**关键**:不同上下文需要不同 payload!先确定上下文再选择。

## Phase 2: 基础 XSS 测试

```
1. <script>alert(1)</script>
2. <img src=x onerror=alert(1)>      ← script 被过滤时
3. <svg onload=alert(1)>
4. " onfocus=alert(1) autofocus="    ← 属性注入
```

**验证**:检查响应 HTML 中 payload 是否被原样保留(未编码)。`<` 变成 `&lt;` → 已转义,换参数。

## Phase 3: 绕过与高级利用

遇到 WAF/过滤 → [references/xss-bypass-and-types.md](references/xss-bypass-and-types.md)

速查:
- `<script>` 被过滤 → `<img>`, `<svg>`, `<details>`, `<video>`
- `alert` 被过滤 → `confirm()`, `prompt()`, `print()`
- `()` 被过滤 → `` alert`1` ``
- CSP 限制 → 检查 `unsafe-inline` / nonce / JSONP 端点

## 注意事项
- **先测回显再测注入**:没有回显就没有 XSS
- **HTTP-only Cookie 无法通过 XSS 窃取**
- 记录每个参数的编码行为

Files in this skill

  • AGENT.md830 B
  • SKILL.md2.7 KB
  • evals/evals.json3.7 KB
  • evals/recall.json1.1 KB
  • references/csp-bypass-and-dom-xss.md14.6 KB
  • references/xss-bypass-and-types.md8.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.