reverse-engineering-dotnet-malware-with-dnspy

Featured

Reverse engineers .NET malware using dnSpy decompiler and debugger to analyze C#/VB.NET source code, identify obfuscation techniques, extract configurations, and understand malicious functionality including stealers, RATs, and loaders. Activates for requests involving .NET malware analysis, C# malware decompilation, managed code reverse engineering, or .NET obfuscation analysis.

AI & Automation 36,355 stars 4443 forks Updated 2 months ago Apache-2.0

Install

View on GitHub

Quality Score: 94/100

Stars 20%
100
Recency 20%
75
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Reverse Engineering .NET Malware with dnSpy ## When to Use - A malware sample is identified as a .NET assembly (C#, VB.NET, F#) requiring decompilation - Analyzing .NET-based malware families (AgentTesla, AsyncRAT, RedLine Stealer, Quasar RAT) - Deobfuscating .NET code protected by ConfuserEx, SmartAssembly, or custom obfuscators - Extracting hardcoded C2 configurations, encryption keys, and credentials from managed assemblies - Debugging .NET malware at runtime to observe decryption routines and dynamic behavior **Do not use** for native (unmanaged) PE binaries; use Ghidra or IDA for native code analysis. ## Prerequisites - dnSpy or dnSpyEx installed (https://github.com/dnSpyEx/dnSpy - community maintained fork) - de4dot for automated .NET deobfuscation (`https://github.com/de4dot/de4dot`) - ILSpy as an alternative decompiler for cross-validation - .NET SDK installed for recompiling modified assemblies during analysis - Isolated Windows VM for running dnSpy debugger on live malware - Detect It Easy (DIE) for identifying the .NET obfuscator used ## Workflow ### Step 1: Identify .NET Assembly and Obfuscator Verify the sample is a .NET binary and detect protection: ```bash # Check if file is .NET assembly file suspect.exe # Output should contain "PE32 executable" with .NET metadata # Detect obfuscator with Detect It Easy diec suspect.exe # Python-based .NET detection python3 << 'PYEOF' import pefile pe = pefile.PE("suspect.exe") # Check for .NET COM descriptor if...

Details

Author
mukul975
Repository
mukul975/Anthropic-Cybersecurity-Skills
Created
8 months ago
Last Updated
2 months ago
Language
Python
License
Apache-2.0

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category