xamirhamza77/reverseops-skill/dotnet-reverse

Claude Code and agent skill by xamirhamza77/reverseops-skill

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

.NET / C# binary reverse engineering. Use when the target is a .NET assembly (CLR in the PE header, managed .exe/.dll programs), C# build artifacts (including NativeAOT), red team Sharp* tools (Rubeus / SharpHound, etc.), .NET obfuscated programs (ConfuserEx / SmartAssembly / Babel / Eazfuscator), or .NET loaders / info-stealers / packed malware. Prefer dnSpyEx + de4dot; when direct AI operation is needed, integrate with dnSpy MCP. Not for pure native binaries (use reverse-engineering / ida-reverse instead).

Install

npx vskill@latest install xamirhamza77/reverseops-skill/dotnet-reverse

SKILL.md

The same SKILL.md was published earlier as xamirhamza77/reverseops-skill/dotnet-reverse.

.NET / C# Reverse Engineering Standard Operating Procedure

ACTION REQUIRED (execute immediately after reading)

  1. NOW: Use DIE/file/CLR header to confirm the target is managed .NET (otherwise SWITCH to ida-reverse/ / reverse-engineering/)
  2. NOW: If obfuscation is suspected → run de4dot first to unpack, produce *-clean.exe, and preserve the original sample
  3. NEXT: Static analysis with dnSpyEx (or dnSpy MCP / ilspycmd): browse C# + use the IL view for key decision logic
  4. ACT: Debug dynamically when plaintext/C2 is needed; when logic changes are needed, prefer IL patching over C# recompilation
  5. At the end of each phase, give the user a 3–6 item next-step menu (including report export)

Scope

Prefer this skill when the task involves:

  • Identifying and reversing .NET / C# compiled artifacts (managed PE / .exe / .dll)
  • Analyzing red team Sharp* toolchains (Rubeus, SharpHound, SharpShell, etc.)
  • Deobfuscating ConfuserEx / SmartAssembly / Babel / Eazfuscator / .NET Reactor and similar protectors
  • Reversing the decryption and C2 logic of .NET loaders / info-stealers / RATs
  • Patching C# programs (modifying checks, constants, keygen)
  • Analyzing the pre-IL2CPP Mono/Unity managed layer (note: after IL2CPP compilation it is native; use reverse-engineering/ + seed-014)

If the target is a pure native binary (compiled C/C++/Go/Rust, no CLR), use reverse-engineering/, ida-reverse/, or radare2/ instead.

Core Principles

  • Identify before acting: Confirm it is a managed .NET program first (CLR in the PE header + #~ / #Strings streams + mscoree _CorExeMain), then decide to use dnSpy instead of IDA
  • IL over C#: dnSpyEx's C# decompiler can lose/distort information (compiler-generated state machines, async/await, yield); key decision logic and patches must be done in the IL editor. The C# view is only for quick browsing
  • de4dot first: When an obfuscator is encountered, run de4dot first before static analysis; otherwise strings/control flow are all garbage
  • MCP integration: If a dnSpy MCP (dnspy_* tools) is registered in the environment, prefer the MCP interface for decompilation / IL inspection to avoid switching back and forth to the GUI
  • Evidence-based output: Deobfuscated artifacts, extracted configs/C2/keys, and patch diffs must all be written to disk

Toolchain Mapping

CapabilityFirst ChoiceNotes
Decompile + debug + patchdnSpyExThe flagship; the only GUI with an IL editor. Old dnSpy is unmaintained — use the Ex branch
Lightweight CLI / headless decompilationILSpy (ilspycmd)Suitable for batch, scripted, Linux/macOS workflows
Deobfuscationde4dotDefault solution for mainstream protectors: the full ConfuserEx family, SmartAssembly, etc.
Obfuscator identificationDetect It Easy (DIE) / fileIdentify the protector type first, then decide de4dot parameters
Programmatic IL manipulationdnlibWrite C# scripts for batch metadata editing / string decryptors
Direct AI operationdnSpy MCPTool interfaces such as dnspy_decompile / dnspy_inspect_il
Prerequisite: Install dnSpyEx + de4dot on the Windows host (choco or releases); on Linux/macOS use ilspycmd + dotnet runtime. See the installation matrix in references/sharp-tools.md.

Six-Phase Workflow

1. Identify (.NET detection)

Confirm the target is a managed program; do not analyze a native PE as .NET:

powershell
# Windows
file target.exe # "PE32 executable ... for MS Windows" is not enough
# Key: check for the CLR
powershell -c "[System.Reflection.AssemblyName]::GetAssemblyName('target.exe')"
# or
Drag it straight into dnSpyEx — if it opens, it's managed
# General
strings target.exe | grep -iE "mscoree|_CorExeMain|mscorlib|System\\."

.NET identification markers:

  • PE header Data Directory[14] (CLR Runtime Header) is non-zero
  • mscoree.dll import / _CorExeMain entry point
  • #~, #Strings, #US, #GUID, #Blob metadata streams
  • mscorlib / System.Private.CoreLib strings

NativeAOT exception: Compiled to native, no CLR header, but has System.Private.CoreLib strings and restructured type metadata — these go to reverse-engineering/ (IDA/r2); this skill only provides identification hints.

2. Detect (obfuscator detection)
powershell
# DIE quick identification
diec target.exe # Detect It Easy CLI
# Or drag into dnSpyEx and check for large numbers of garbled class names / distorted control flow

Common obfuscators → unpacking strategy (details in references/obfuscators.md):

ObfuscatorCharacteristicsde4dot Handling
ConfuserEx (1.0.0 / 2.x)<module> anti-tamper, control flow distortion, string encryptionde4dot target.exe usually auto-detected
SmartAssemblycircular/string encoding, resource compressionde4dot target.exe
Babel.NETMethod body encryption, control flowde4dot target.exe
Eazfuscator.NETString/resource encryptionde4dot; some versions require manual work
.NET Reactoranti-tamper + necrobitde4dot; newer versions may fail and require manual work
3. Deobfuscate
powershell
# de4dot auto-detects most protectors by default
de4dot target.exe -o target-clean.exe
# Specify type (when auto-detection fails)
de4dot --type cfze target.exe # ConfuserEx
de4dot --type sa target.exe # SmartAssembly
# Multi-layer obfuscation / de4dot reports unknown
de4dot --detect target.exe # see what it identifies
# May need to patch anti-tamper first, then run de4dot (see references/obfuscators.md)

Output: target-clean.exe; use it for all subsequent analysis. Keep the original sample for comparison.

4. Static Analyze

Load the unpacked sample in dnSpyEx:

  • C# view: Quickly browse class structures, method signatures, strings (for locating)
  • IL view: Key decision logic, encryption logic, and state machines must be viewed in IL (right-click → Edit IL or IL view)
  • Find the entry point: Main / Startup / module initializer (Module .cctor)
  • Find key logic: search for flag, password, verify, check, encrypt, http, Config
text
Locate a string → find references → find the method using it → view decision logic in the IL view
5. Dynamic (dynamic debugging)

dnSpyEx debugger: attach to a process / start debugging, set breakpoints at key methods, and observe at runtime:

  • Decrypted plaintext strings (many obfuscators decrypt strings only at runtime)
  • C2 addresses, config decryption results
  • Exception-driven control flow (anti-debug commonly uses try/catch to hide the real path)
.NET dynamic debugging is far friendlier than native — you can directly see object values and string contents. Prefer dynamic over grinding through static analysis.
6. Patch (modify as needed)
text
dnSpyEx → right-click method → Edit Method (C#) or Edit IL
- Change a check: ldc.i4.0 → ldc.i4.1 (false→true)
- Change a constant: edit the string/number directly
- Remove validation: nop out the entire block
File → Save Module → replace the original file

IL patch reliability > C# patch: C# recompilation may fail (missing references, syntax issues); IL editing is almost never lossy. See references/common-workflow.md for details.

Trigger Scenario Routing

Enter this skill when the user says things like:

  • "Reverse a .NET / C# binary" / "decompile a C# program"
  • "dnSpy analysis" / "dnSpyEx patch"
  • "ConfuserEx / SmartAssembly / Babel deobfuscation / unpacking"
  • "Sharp* tool analysis" (Rubeus / SharpHound / SharpShell)
  • ".NET malware / loader / info-stealer reversing"
  • "C# program patch / keygen / modify a check"

When to Switch Out

  • IL2CPP-compiled Unity games → reverse-engineering/ + seed-014_unity-il2cpp-reverse.md (IL2CPP is native; dnSpy does not apply)
  • NativeAOT artifacts → reverse-engineering/ (same as above, native)
  • Pure native PE (no CLR) → reverse-engineering/ / ida-reverse/
  • Need batch migration of symbols/functions to another version → binary-diff/
  • Need to draw attack paths / call chain diagrams → diagram-generator/

Routing Context

Upstream entries: skills/SKILL.md (master), routing.md Downstream exits:

  • IL2CPP / NativeAOT (native) → reverse-engineering/
  • Deep native .so/.dll segment analysis → ida-reverse/ / radare2/
  • Need AI to directly operate dnSpy → register and integrate dnSpy MCP (see references/sharp-tools.md)

Peer related modules:

  • reverse-engineering/languages-compiled.md (.NET intro points to this module)
  • apk-reverse/ (Xamarin/MAUI Android reversing can switch back to this module for the C# layer)

Reference Documents

  • references/obfuscators.md — Detailed ConfuserEx / SmartAssembly / Babel / Eazfuscator / .NET Reactor deobfuscation + anti-tamper bypass
  • references/common-workflow.md — Complete workflow, IL patch reliability, string decryptor extraction, state machine identification
  • references/sharp-tools.md — Red team Sharp* tool analysis, tool installation matrix, dnSpy MCP integration, community resource index

Task Completion Self-Check

  • [ ] Have I confirmed CLR / managed identity (or already SWITCHED out of this skill)?
  • [ ] For obfuscated samples, did I run de4dot / equivalent unpacking before deep analysis?
  • [ ] Was key logic verified in the IL view (rather than relying only on C# pseudocode)?
  • [ ] Are artifacts (clean sample / config / patch diff) written to disk and reproducible?
  • [ ] Did I provide a next-step menu or report output?

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
4
7-day trend score
8

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/xamirhamza77/reverseops-skill/dotnet-reverse/badge)](https://verified-skill.com/skills/xamirhamza77/reverseops-skill/dotnet-reverse)

Something wrong with this skill or its page? Tell us.