Loading...
Loading...
.NET / C# Binary Reverse Engineering. Use this when the target is a .NET assembly (managed .exe/.dll with CLR in PE header), C# compiled product (including NativeAOT), red team Sharp* tools (Rubeus / SharpHound / SharpShell, etc.), .NET obfuscated programs (ConfuserEx / SmartAssembly / Babel / Eazfuscator), or .NET loader / info-stealer / packed malware. Prioritize using dnSpyEx + de4dot; link with dnSpy MCP when direct AI operation is required. Not applicable for pure native binaries (use reverse-engineering / ida-reverse instead).
npx skill4agent add zhaoxuya520/reverse-skill dotnet-reverseNOWfileida-reverse/reverse-engineering/NOWde4dot*-clean.exeNEXTilspycmdACTreverse-engineering/reverse-engineering/ida-reverse/radare2/#~#Strings_CorExeMainde4dotdnspy_*| Capability | Preferred Tool | Remarks |
|---|---|---|
| Decompilation + Debugging + Patching | dnSpyEx | Ace tool, the only GUI with IL Editor; old dnSpy is no longer maintained, use the Ex branch |
| Lightweight CLI / headless decompilation | ILSpy ( | Suitable for batch processing, scripting, Linux/macOS |
| Deobfuscation | de4dot | Default solution for mainstream shells like ConfuserEx family, SmartAssembly, etc. |
| Obfuscator detection | Detect It Easy (DIE) / file | Determine the shell type first before deciding de4dot parameters |
| Programmatic IL operation | dnlib | Write C# scripts to batch modify metadata / string decrypters |
| Direct AI operation | dnSpy MCP | Tools like |
Prerequisites: Install dnSpyEx + de4dot on Windows host (via choco or release); use+ilspycmdon Linux/macOS. See the installation matrix indotnet runtime.references/sharp-tools.md
# Windows
file target.exe # "PE32 executable ... for MS Windows" is not sufficient
# Key: Check if CLR exists
powershell -c "[System.Reflection.AssemblyName]::GetAssemblyName('target.exe')"
# Or
drag directly into dnSpyEx —— if it can be opened, it's managed
# Cross-platform
strings target.exe | grep -iE "mscoree|_CorExeMain|mscorlib|System\\."Data Directory[14]mscoree.dll_CorExeMain#~#Strings#US#GUID#BlobmscorlibSystem.Private.CoreLibSystem.Private.CoreLibreverse-engineering/# Quick identification with DIE
diec target.exe # Detect It Easy CLI
# Or drag into dnSpyEx to check if there are a large number of garbled class names / control flow deformationsreferences/obfuscators.md| Obfuscator | Features | de4dot Processing |
|---|---|---|
| ConfuserEx (1.0.0 / 2.x) | | |
| SmartAssembly | | |
| Babel.NET | Method body encryption, control flow | |
| Eazfuscator.NET | String/resource encryption | |
| .NET Reactor | anti-tamper + necrobit | |
# de4dot automatically identifies most shells by default
de4dot target.exe -o target-clean.exe
# Specify type (when automatic identification fails)
de4dot --type cfze target.exe # ConfuserEx
de4dot --type sa target.exe # SmartAssembly
# Multi-layer obfuscation / de4dot reports unknown
de4dot --detect target.exe # Check what it identifies as
# May need to patch anti-tamper first before de4dot (see references/obfuscators.md)target-clean.exeMainStartupModule .cctorflagpasswordverifycheckencrypthttpConfigLocate strings → Reverse reference → Find methods using them → Check judgment logic in IL Viewtry/catch.NET dynamic debugging is much more user-friendly than native —— you can directly see object values and string content. Prioritize dynamic debugging over struggling with static analysis.
dnSpyEx → Right-click method → Edit Method (C#) or Edit IL
- Modify judgment: ldc.i4.0 → ldc.i4.1 (false→true)
- Modify constants: Directly edit strings/numbers
- Remove verification: Nop out the entire segment
File → Save Module → Replace original filereferences/common-workflow.mdreverse-engineering/seed-014_unity-il2cpp-reverse.mdreverse-engineering/reverse-engineering/ida-reverse/binary-diff/diagram-generator/skills/SKILL.mdrouting.mdreverse-engineering/ida-reverse/radare2/references/sharp-tools.mdreverse-engineering/languages-compiled.mdapk-reverse/