SSZcreate/Pentab_server / .agents/skills/cybersecurity/skills/exploiting-insecure-deserialization
exploiting-insecure-deserialization
UnverifiedIdentifying and exploiting insecure deserialization vulnerabilities in Java, PHP, Python, and .NET applications to achieve remote code execution during authorized penetration tests.
| File | Kind | Size |
|---|---|---|
| LICENSE | other | 11.0 KB |
| SKILL.md | skill md | 11.5 KB |
| references/api-reference.md | markdown | 2.0 KB |
| scripts/agent.py | script | 6.2 KB |
references/api-reference.md
View on GitHub# API Reference: Insecure Deserialization Detection Agent
## Dependencies
| Library | Version | Purpose |
|---------|---------|---------|
| requests | >=2.28 | HTTP requests for scanning cookies and responses |
| pickle | stdlib | Python pickle payload generation for testing |
## CLI Usage
```bash
python scripts/agent.py --url https://target.example.com/dashboard \
--callback oob.attacker.com --output deser_report.json
```
## Functions
### `detect_serialization_format(data) -> str`
Identifies serialization format from a string: `java_serialized`, `dotnet_viewstate`, `php_serialized`, `python_pickle`.
### `scan_cookies(url, session) -> list`
Fetches the URL and checks each response cookie value for serialization markers.
### `scan_response_body(url, method, data) -> list`
Scans the HTTP response body for Java Base64 (`rO0AB`), PHP serialized objects, and `__VIEWSTATE` fields.
### `test_java_deserialization(url, cookie_name, callback_host) -> dict`
Injects a URLDNS-style probe into a cookie to trigger DNS callback on deserialization.
### `test_php_deserialization(url, param_name) -> dict`
Sends PHP serialized object payloads attempting role escalation.
### `test_python_pickle(url, param_name, callback_host) -> dict`
Generates a pickle payload with `__reduce__` that triggers a DNS lookup for OOB detection.
### `run_assessment(url, callback_host) -> dict`
Orchestrates cookie and body scanning.
## Serialization Markers
| Format | Magic / Prefix | Example |
|--------|---------------|---------|
| Java binary | `\xac\xed\x00\x05` | Raw bytes |
| Java Base64 | `rO0AB` | Base64-encoded |
| .NET ViewState | `/wE` | `__VIEWSTATE` hidden field |
| PHP | `O:4:`, `a:2:` | Object/array notation |
| Python pickle | `\x80` (protocol byte) | Base64-encoded |
## Output Schema
```json
{
"target": "https://target.example.com/",
"serialized_data_found": 2,
"cookie_findings": [{"name": "session", "format": "java_serialized"}],
"formats_detected": ["java_serialized"]
}
```
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 466k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 466k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 466k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 193k | Updated | Claude CodeCodex | Verified | Install |