analyzing-dotnet-malware-internals
Reverses .NET/managed malware: decompiling MSIL back to C#, defeating common
v1.0.03 instalaciones+3 en 7 días24 EstrellasApache-2.0sincronizado hace 10 horas
Instalar
¿Aún no tienes la CLI de NotHoly? Instálala primero.
$ curl -fsSL https://notholy.com/install.sh | sh$ notholy skills install meltedinhex/analyzing-dotnet-malware-internalsEscribe en ~/.notholy/skills después de comprobar la firma y el SHA-256.
FirmaFirmado, ed25519
Paquetea4a1eed8…b29a337d
a4a1eed8df18…753fb29a337d4 archivos · 3.0 KBEscaneoMedio2 hallazgos
- Script ejecutable incluido con la skillscripts/analyst.py
- Enlaces a dominios externos
Fuentegithub.com/meltedinhex/analyst-ai-pack/tree/main/skills/analyzing-dotnet-malware-internals@da7600a
Esta entrada todavía no está escrita en tu idioma, así que aparece en English.
En esta página
When to Use
- A sample is a managed (.NET) assembly — confirmed by a CLR header /
mscoreeimport orBSJBmetadata signature. - You need readable C# from MSIL and want to defeat .NET-specific obfuscation.
- A loader uses reflection (
Assembly.Load) to run an in-memory payload you must recover.
Do not use native disassembly workflows (Ghidra for x86) as the primary tool — managed code decompiles far more cleanly with a .NET decompiler.
Prerequisites
- ILSpy / dnSpyEx for decompilation and (with dnSpyEx) managed debugging.
- de4dot or equivalent for known protectors; familiarity with common .NET obfuscators.
Workflow
Step 1: Confirm it is managed
Check for the CLR runtime header and the BSJB metadata magic:
python scripts/analyst.py identify sample.exeStep 2: Decompile
Open in ILSpy/dnSpyEx and review the entry point, Main, and module initializer
(<Module>.cctor), which protectors often abuse.
Step 3: Handle obfuscation
Recognize and undo common schemes:
- String encryption — a decryptor method called everywhere; run/trace it to recover plaintext (de4dot can often static-decrypt).
- Control-flow flattening — follow the dispatcher state machine.
- Proxy methods / renaming — rely on decompiler analysis rather than names.
Step 4: Trace reflection loaders
Find Assembly.Load(byte[]) / Activator.CreateInstance; dump the byte array argument at
runtime (managed debugger breakpoint) to recover the real second-stage assembly, then recurse.
Step 5: Analyze the payload
Decompile the recovered stage; extract C2, configuration, and capabilities for the report.
Validation
- Decompiled C# is coherent (named or recovered) and the entry path is traced.
- Encrypted strings are recovered to plaintext.
- The reflection-loaded stage is dumped and itself decompiles.
Pitfalls
- Treating the loader as the payload — managed malware is frequently multi-stage.
- Ignoring the module initializer where protectors install hooks.
- Static-decrypting strings when the scheme is runtime-keyed; debug and dump instead.
References
- See
references/api-reference.mdfor the CLR identifier. - ECMA-335 and ILSpy (linked in frontmatter).
Archivos de esta versión
references/11.1 KB
- api-reference.md1.1 KB
scripts/12.0 KB
- analyst.py2.0 KB
- LICENSE340 B
- SKILL.md3.1 KB
Permisos
| Permiso | Declarado | Hallado en el escaneo |
|---|---|---|
| Lee archivos | No | No |
| Escribe archivos | No | No |
| Ejecuta comandos de shell | Sí | Sí |
| Usa la red | Sí | Sí |
| Usa conectores | No | No |
| Controla un navegador | No | No |
Hallazgos del escaneo
Revisado el 13 nov 2026
- MediaArchivo · Script ejecutable incluido con la skillscripts/analyst.py
- InfoEnlace · Enlaces a dominios externos
Un escaneo limpio baja el riesgo, pero no prueba que el paquete sea seguro. Lee lo que instalas.
| Versión | Publicada | Commit | SHA-256 | Firma | Cambio de permisos |
|---|---|---|---|---|---|
| v1.0.0 | 13 nov 2026 | da7600a | a4a1eed8 | Firmada | – |
Más de meltedinhex
Todo de este publicador- writing-yara-rules-from-reversed-codemeltedinhex/writing-yara-rules-from-reversed-code4
- validating-detections-with-atomic-testsmeltedinhex/validating-detections-with-atomic-tests4
- writing-suricata-and-snort-rulesmeltedinhex/writing-suricata-and-snort-rules3
- writing-sigma-detection-rulesmeltedinhex/writing-sigma-detection-rules3
Más en Análisis de malware y ransomware
Ver la categoría- yara-sigsdariushoule/yara-sigs4
- monitoring-darkweb-sourcesmukul975/monitoring-darkweb-sources3
- deploying-ransomware-canary-filesmukul975/deploying-ransomware-canary-files3
- implementing-honeypot-for-ransomware-detectionmukul975/implementing-honeypot-for-ransomware-detection3
- yaraaeondave/yara3
- testing-ransomware-recovery-proceduresmukul975/testing-ransomware-recovery-procedures3
Pregunta todo lo que tu alcance permite.
Crea la cuenta, añade créditos y haz la primera pregunta en el chat o en la terminal.
- 1/3
Crea la cuenta
Individual o empresa. Puedes pasar a empresa después sin perder saldo ni claves.
IndividualEmpresa - 2/3
Añade créditos
Con tarjeta. Pagas por token, sin suscripción.
$5.00recarga mínima - 3/3
Pregunta
En el chat, o instala el CLI y ejecuta notholy login en tu terminal.
$ notholy login