Deobfuscation

Deobfuscation is a skill for Claude Code, Codex from buzzer-re/Rikugan. It costs 114 tokens per session (2,003 once invoked), scanned A, original, MIT.

A guide for making deliberately confusing binary code easier to read. It covers techniques such as decrypting hidden strings, simplifying tangled control flow, removing fake branches, and fixing patterns that hinder disassembly.

In plain words
What is it for?
Use it to uncover encrypted strings, simplify flattened or substituted code, remove dead paths, eliminate opaque conditions, and repair anti-disassembly tricks.
Why use it?
Obfuscation can hide a program's real behavior and mislead analysis; this workflow puts clarification before interpretation.

Skill for Claude CodeCodex

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

Good fit Use it to uncover encrypted strings, simplify flattened or substituted code, remove…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/buzzer-re/rikugan/deobfuscation
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 buzzer-re/Rikugan --skill deobfuscation
Clone the repo
git clone --depth 1 https://github.com/buzzer-re/Rikugan

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 Deobfuscation

README.md
[![agentmods](https://agentmods.dev/badge/skills/buzzer-re/rikugan/deobfuscation.svg)](https://agentmods.dev/skills/buzzer-re/rikugan/deobfuscation)
Your own site
<a href="https://agentmods.dev/skills/buzzer-re/rikugan/deobfuscation"><img src="https://agentmods.dev/badge/skills/buzzer-re/rikugan/deobfuscation.svg" alt="Measured on agentmods" height="20"></a>
Per session 114 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,003 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00114 $0.02003
Opus 5 $0.00057 $0.01001
Sonnet 5 $0.00023 $0.00401
Haiku 4.5 $0.00011 $0.00200

Measured 7d ago against content hash 524830a1c773, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

Deobfuscation scanned grade A with 0 findings 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 7d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

rikugan/skills/builtins/deobfuscation/SKILL.md · 181 lines

How it starts

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

Deobfuscation Mode

Deobfuscate fully first. Analyze afterward. Never draw conclusions from obfuscated code — it misleads.

Host-specific tools, API details, and full algorithm implementations are in the auto-loaded references:

  • IDA: references/ida/tools.md (available tools), guide.md (workflow & technique rules), microcode-guide.md (reading/writing microcode), algorithm-reference.md (recognition & methodology)
  • Binary Ninja: references/binja/tools.md (available tools), guide.md (workflow & technique rules), il-guide.md (reading/writing BNIL), algorithm-reference.md (recognition & methodology)

Read the host-specific tools reference first to know what primitives are available.

Order of Operations

1. String Decryption (always first — unlocks context)

Skip only if the user asked for a specific deobfuscation type.

Strings are the fastest path to understanding a binary. Encrypted strings signal intentional obfuscation.

  1. Check for readable strings — very few in a large binary means strings are encrypted.
  2. Find the decode stub: a small function called frequently, often before string use.
  3. Decompile it and identify the algorithm (XOR, RC4, custom).
  4. Use xrefs on the decode function to locate all call sites.
  5. At each call site, trace arguments to extract encrypted data and key.
  6. Reimplement the decode logic to compute plaintext.
  7. Annotate decrypted strings at each call site (C2 addresses, file paths, registry keys, API names).
  8. Rename the decode function (e.g., decrypt_string).

2. Structural Deobfuscation

You are the deobfuscator. Read the IL/pseudocode, understand the obfuscation, then use write primitives to undo it. Read, understand, modify, verify.

Work through these techniques in order — each one may reveal patterns hidden by the previous layer.

Control Flow Flattening (CFF)

A state machine dispatcher replaces linear control flow.

What it looks like:

  • A loop with a back edge to a header block.
  • The header compares a variable (state variable) against many constants.
  • Each case body assigns a new constant to the state variable.
  • At low optimization: state var may appear as memory stores ([rbp-0x10].d = 0x25), not register vars.

Read the full file on GitHub · 181 lines

Files

What ships with it

8 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 7d ago First seen · 181 lines · 114 tokens per session scan A 524830a1c773

Subscribe to this mod's changes

Deobfuscation is a skill published in the GitHub repository buzzer-re/Rikugan (672 stars, last pushed 2mo ago), licensed MIT. It adds 114 tokens to every session and 2,003 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

defeating-control-flow-flattening

Defeats control-flow-flattening obfuscation by identifying the dispatcher/state- variable structure and reconstructing the original control flow so the logic becomes readable. Activates for requests to defeat control-flow flattening, deobfuscate an OLLVM-flattened function, or recover original control flow from a…

meltedinhex/analyst-ai-pack · 74 tokens

deobfuscating-powershell-obfuscated-malware

Systematically deobfuscate multi-layer PowerShell malware using AST analysis, dynamic tracing, and tools like PSDecode and PowerDecode to reveal hidden payloads and C2 infrastructure.

adriannoes/awesome-agentic-ai · 48 tokens

deobfuscating-powershell-obfuscated-malware

Systematically deobfuscate multi-layer PowerShell malware using AST analysis, dynamic tracing, and tools like PSDecode and PowerDecode to reveal hidden payloads and C2 infrastructure.

26zl/cybersec-toolkit · 48 tokens

deobfuscating-powershell-obfuscated-malware

Systematically deobfuscates multi-layer PowerShell malware using AST analysis, dynamic tracing, and tools like PSDecode and PowerDecode to reveal hidden payloads and C2 infrastructure. Use during incident response or malware analysis when a PowerShell script is obfuscated with encoding, string manipulation, or…

Youngmaidainon/Agent-Level-Up · 90 tokens

dynamic-instrumentation

Expertise in LLVM-based dynamic binary instrumentation, runtime tracing, and program monitoring. Use this skill when implementing runtime analysis tools, code coverage systems, profilers, or dynamic security monitors.

gmh5225/awesome-llvm-security · 42 tokens

llvm-optimization

Expertise in LLVM optimization passes, performance tuning, and code transformation techniques. Use this skill when implementing custom optimizations, analyzing pass behavior, improving generated code quality, or understanding LLVM's optimization pipeline.

gmh5225/awesome-llvm-security · 44 tokens