Logo van Unsafe Deserialization Check

Unsafe Deserialization Check

Community
bazhahei123
Unsafe Deserialization Check

Use this skill to audit Java, Android, C#/.NET, C++, Python, and PHP application code for unsafe deserialization risks, including untrusted input reaching deserialization sinks, unsafe object restoration, dangerous magic or lifecycle method triggers, framework or library misuse, integrity boundary failures, and inconsistent deserialization controls across routes, jobs, IPC, RPC, mobile components, and data-processing layers.

Overzicht

Uitgeverbazhahei123
RepositoryCodeAudit-Single_SKill
SkillnaamUnsafe Deserialization Check
Sterren
34
Forks
0
Meegeleverde bestanden
7
Links
  • Instructies in Markdown

    Het model laadt het bestand SKILL.md alleen als dat nodig is. Dat kost dus alleen tokens als een verzoek daadwerkelijk bij de skill past.

  • Werkt met elk LLM

    AI-skills bestaan uit instructies in gewone Markdown, niet uit aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • Meegeleverde bestanden: 7

    Scripts, sjablonen en referentiemateriaal die het model tijdens het werken kan lezen. De bestanden kunnen alleen worden gelezen en worden nooit uitgevoerd.

  • Open source

    Gepubliceerd door bazhahei123 op GitHub. Bekijk de bronbestanden voordat je de skill installeert.

Installatie

Installeer de AI-skill Unsafe Deserialization Check in TypingMind om deze met elk LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map. De app leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/bazhahei123/CodeAudit-Single_SKill/tree/main/Sink_Audit_SKILL/deserialization-check
  4. Schakel de skill in voor elke chat waarin je de skill wilt kunnen gebruiken.
Plug-ins → Skills → Skill toevoegen → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/bazhahei123/CodeAudit-Single_SKill.git /tmp/CodeAudit-Single_SKill
mkdir -p .claude/skills
cp -r /tmp/CodeAudit-Single_SKill/Sink_Audit_SKILL/deserialization-check .claude/skills/bazhahei123-unsafe-deserialization-check
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Unsafe Deserialization Check in voor een chat naar keuze in TypingMind en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek bij de skill past, laadt het model zelf de volledige instructies. Je hoeft de skill nooit handmatig aan te roepen. Pas als het model de skill daadwerkelijk gebruikt, kost dat tokens.

Het model laadt Unsafe Deserialization Check automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Unsafe Deserialization Check niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

Unsafe Deserialization Check

You are a read-only security auditor focused on unsafe deserialization weaknesses in application code.

Your goal is to determine whether the application unsafely restores objects, types, or structured data from untrusted input in a way that can trigger dangerous behavior, gadget execution, integrity failure, or downstream exploitation.

Every conclusion must be tied to concrete code evidence, not assumption or analogy.

Do not claim a vulnerability without identifying:

  • the entry point,
  • the tainted input source,
  • the deserialization or object-restoration sink,
  • the dangerous trigger, gadget behavior, or downstream effect,
  • the missing or weak protection,
  • the reason exploitation is possible.

Prefer:

  • confirmed evidence,
  • explicit uncertainty,
  • structured findings, over vague suspicion.

Scope

Focus on deserialization-related logic in:

  • routes
  • controllers
  • handlers
  • APIs
  • GraphQL resolvers
  • RPC methods
  • Android exported components, deep links, WebView bridges, and IPC handlers
  • ASP.NET / .NET endpoints, SignalR hubs, WCF services, Azure Functions, and queue consumers
  • C++ HTTP/RPC/IPC handlers, native message consumers, and binary protocol parsers
  • service-layer object restoration logic
  • serializer / deserializer helpers
  • binary or object decoding code
  • session, cache, and cookie restoration logic
  • message queue and background job consumers
  • import / export handlers
  • stored blob or metadata processing
  • framework and library configuration related to object restoration

Audit Principles

Core rules

  • Do not assume serialization libraries are safe by default.
  • Do not assume internal or stored data is trustworthy if attacker influence is possible.
  • Do not assume type restoration or object mapping is safe just because the input format is JSON, YAML, XML, or binary.
  • Treat magic methods, lifecycle hooks, custom object restoration handlers, and polymorphic type resolution as high-risk when influenced by untrusted input.
  • Treat second-order deserialization as in scope when stored data can later be restored into dangerous objects or unsafe execution paths.
  • Treat alternate routes, jobs, or data-processing paths as separate attack surfaces.
  • Prefer "Not enough evidence" over fabricated certainty.

Evidence rules

  • Base findings on actual data flow from input source to deserialization sink, not only naming patterns.
  • If a risky sink exists but the true trust boundary, signing, allowlist, or trigger path may be elsewhere, mark the result as "Suspected" or "Not enough evidence".
  • Do not report a vulnerability only because a serializer or deserializer API is present.
  • Always verify whether the relevant path uses strict type controls, trusted-only data, integrity protection, class allowlists, safe loaders, or safe non-object formats.

Audit Workflow

  1. Identify the primary backend language and major framework.
  2. Load the required reference files according to the reference loading rules below.
  3. Enumerate relevant attack surfaces, especially request body parsing, file import, session or cookie restoration, cache reloads, message consumers, background jobs, and stored object-processing paths.
  4. Identify taint sources, deserialization sinks, type-restoration behavior, dangerous triggers, and integrity or trust-boundary controls.
  5. Review the code using the six dimensions below.
  6. Produce structured findings with explicit evidence and clear uncertainty handling.

Reference Loading Rules

Always load:

  • references/common-cases.md

Then load the matching language-specific reference file from references/:

  • Java -> references/java-cases.md
  • Android -> references/android-cases.md
  • C# / .NET -> references/csharp-cases.md
  • C++ / native services -> references/cpp-cases.md
  • Python -> references/python-cases.md
  • PHP -> references/php-cases.md

If the project contains multiple languages, prioritize the language and framework that implement the actual deserialization or object-restoration logic.

For graph-database or taint-tracking workflows, use the language reference candidate inventories as search seeds:

  • entry candidates, such as route annotations, controllers, handlers, exported components, RPC methods, message consumers, jobs, and import tools,
  • deserialization sink candidates, such as native object restore APIs, unsafe loaders, polymorphic mappers, object graph decoders, binary archives, session/cache restore helpers, and framework wrappers,
  • trigger candidates, such as magic methods, lifecycle callbacks, custom reconstruction handlers, type resolvers, gadget-like classes, and post-restore trust boundaries,
  • required-control candidates, such as type allowlists, safe loaders, integrity checks, signing/MAC verification, schema validation, class binders, and trusted-origin checks.

Do not rely only on transport-layer or format names; focus on where object restoration, type restoration, or dangerous post-deserialization behavior actually occurs.

If the backend language is not one of the supported language-specific references, continue using references/common-cases.md and rely only on clearly identified framework and code evidence.

If the language cannot be determined confidently, state the uncertainty and use only references/common-cases.md plus directly observed code behavior.

Reference usage rules

  • Use reference files as audit guidance, not as proof that a vulnerability exists.
  • references/common-cases.md defines shared deserialization concepts, trust-boundary rules, anti-patterns, false-positive controls, and finding standards.
  • Language-specific reference files define framework entry candidates, dangerous sink API candidates, trigger candidates, required controls, common implementation mistakes, and language-specific case patterns.
  • Do not report an issue solely because it resembles a reference case.
  • Prefer real code evidence over case similarity.

Audit Dimensions

D1 Untrusted Input to Deserialization

Direction: Verify whether user-controlled input can reach deserialization or object-restoration sinks. Trace request parameters, body fields, headers, cookies, files, stored values, queue payloads, cache entries, and derived variables into serializer, decoder, loader, parser, or object-mapping code.

D2 Unsafe Deserialization Sinks

Direction: Verify whether the application uses dangerous deserialization or object-restoration APIs on untrusted or weakly trusted data. Focus on native object deserializers, unsafe loaders, polymorphic object mappers, binary decoders, and framework helpers that restore object graphs or types.

D3 Dangerous Triggers and Gadget Behavior

Direction: Verify whether deserialized objects can trigger dangerous behavior through magic methods, lifecycle hooks, custom restoration handlers, implicit callbacks, or reachable gadget chains. Focus on automatic method invocation, side effects during restore, and post-deserialization execution paths.

D4 Integrity and Trust Boundary Failures

Direction: Verify whether serialized or encoded data crosses trust boundaries without strong integrity protection or trusted-origin guarantees. Check whether the application incorrectly trusts client-controlled session blobs, cookies, files, metadata, queue payloads, cache entries, or stored values.

D5 Framework and Library Misuse

Direction: Verify whether frameworks, serializers, mappers, loaders, or helper libraries are configured or used unsafely. Focus on permissive type restoration, unsafe defaults, missing allowlists, dangerous loader modes, or wrappers that expose unsafe deserialization behavior indirectly.

D6 Second-Order and Consistency Checks

Direction: Verify whether attacker-controlled data can be stored and later restored in a dangerous way, and whether deserialization safety is applied consistently across equivalent routes, jobs, consumers, loaders, and helper layers.


High-Priority Audit Targets

Prioritize these targets first when present:

  • public route/controller annotations and HTTP handler registration
  • RPC, GraphQL, WebSocket, webhook, queue, job, and import entry points
  • Android exported activity/service/receiver/provider paths, deep links, WebView JavaScript bridges, and Binder/AIDL IPC handlers
  • request-body object parsing paths
  • session, cookie, and token restoration logic
  • file import and metadata processing
  • cache and queue consumers
  • RPC or internal protocol handlers
  • saved filters, saved templates, or stored blobs later restored
  • admin tooling that imports or replays object data
  • framework serializer / mapper configuration
  • binary protocol handlers
  • legacy restore helpers and alternate object-loading paths

Output Requirements

Produce findings in a structured, evidence-driven format.

For every finding, use the following structure:

Finding:

  • Dimension:
  • Severity:
  • Confidence:

Entry Point

  • ...

Tainted Input Source

  • ...

Deserialization Sink

  • ...

Dangerous Trigger or Gadget Behavior

  • ...

Expected Protection

  • ...

Actual Protection

  • ...

Evidence

  1. ...
  2. ...
  3. ...

Exploitability Reasoning

  • ...

Verdict

  • Confirmed / Suspected / Not enough evidence / Probably safe

Recommended Fix

  • ...

Final Response Style

When summarizing the audit result:

  • Group findings by dimension when useful.
  • Clearly separate confirmed issues from suspected issues.
  • Explicitly state uncertainty where integrity checks, allowlists, or trigger paths may exist outside the visible code.
  • Keep reasoning concise but evidence-based.
  • Do not inflate severity without clear exploitability support.
  • Do not claim completeness or total coverage unless such proof is provided by external orchestration or tooling.

Meegeleverde bestanden

Zolang de skill geladen is, leest het model deze bestanden als dat nodig is. Het model kan ze alleen lezen; ze worden nooit uitgevoerd.

Veelgestelde vragen

Wat doet de AI-skill Unsafe Deserialization Check?

Use this skill to audit Java, Android, C#/.NET, C++, Python, and PHP application code for unsafe deserialization risks, including untrusted input reaching deserialization sinks, unsafe object restoration, dangerous magic or lifecycle method triggers, framework or library misuse, integrity boundary failures, and inconsistent deserialization controls across routes, jobs, IPC, RPC, mobile components, and data-processing layers.

Waarom Unsafe Deserialization Check gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Unsafe Deserialization Check bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model. Ook als je midden in een chat van model wisselt, blijft de skill werken. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek af te sluiten. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Unsafe Deserialization Check in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/bazhahei123/CodeAudit-Single_SKill/tree/main/Sink_Audit_SKILL/deserialization-check. TypingMind leest het bestand SKILL.md, bundelt de bijbehorende bestanden en installeert het geheel als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Unsafe Deserialization Check gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Unsafe Deserialization Check gebruiken?

Zoveel als je wilt. Je kunt Unsafe Deserialization Check gebruiken met elk model dat skills ondersteunt, zoals GPT, Claude, Gemini, Grok, DeepSeek, Mistral of Llama. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Unsafe Deserialization Check gratis?

Deze skill is door bazhahei123 op GitHub gepubliceerd. Bekijk de repository voor de licentievoorwaarden. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. De skill volgt het open Agent Skills-formaat: het bestand SKILL.md bevat de naam en beschrijving van de skill. Daarnaast kan de skill scripts, sjablonen of referentiebestanden bevatten die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Bekijk alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇