Pular para o conteúdo
Skillpedia
Segurança6,5 mil · #14164

reverser-dotnet-malware

O que ela faz

Descreve como examinar malware .NET, desde identificar o arquivo até ler seu código decodificado e suas configurações. É para analistas de malware que trabalham com amostras .NET.

Quando usar

  • ✓Quando um analista recebe um programa suspeito do Windows escrito em .NET e precisa do seu código-fonte.
  • ✓Quando um pesquisador precisa remover a ofuscação de um arquivo .NET antes de lê-lo.
  • ✓Quando uma equipe quer extrair valores de configuração ocultos de uma amostra .NET.

Link da skill

https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/reverser/dotnet-malware/SKILL.md

Copie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.

Como usar

O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.

Mensagem pronta para colar

Use esta skill para me ajudar: https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/reverser/dotnet-malware/SKILL.md Leia o arquivo SKILL.md desse link e siga as instruções dele na minha tarefa.
Quer que a sua IA encontre skills como esta sozinha?Instale o MCP grátis do Skillpedia: uma linha, e ela pesquisa entre 15.000+ skills antes de cada tarefa.Instalar em 1 minuto →

Exemplo do que pedir para a IA

“Este arquivo .NET está muito embaralhado. Como posso ler o que ele faz?”

5 skills novas por semana. 1 minuto de leitura.

Como funciona

A skill traz passos para identificar o arquivo, limpar sua ofuscação, descompilá-lo em código legível e extrair sua configuração. Cada etapa registra o que revela.

Conteúdo técnico (SKILL.md original)

Texto original do autor, em inglês, direto do GitHub.

.NET Malware Analysis

Analyze .NET malware from initial triage through full decompilation, de-obfuscation, config extraction, and behavioral mapping.

Quick Reference

# Identify .NET assembly
file <TARGET>
python3 -c "import pefile; pe=pefile.PE('<TARGET>'); print('CLR:', pe.OPTIONAL_HEADER.DATA_DIRECTORY[14].VirtualAddress)"

# Fast metadata check
monodis --assembly <TARGET>
strings -n 10 <TARGET> | grep -iE 'System\.Reflection|Assembly\.Load|FromBase64|Invoke|WebClient|DownloadString'

# De-obfuscate with de4dot
de4dot <TARGET> -o <TARGET>.cleaned.exe

# Decompile to C# project
ilspycmd -p -o ./decompiled/ <TARGET>

# Extract embedded resources
python3 -c "
import dnfile
dn = dnfile.dnPE('<TARGET>')
for r in dn.net.resources:
    print(f'{r.name}  offset={r.offset}  size={r.size}')
"

MITRE ATT&CK Mapping

Technique ID How It Appears
Software Packing T1027.002 ConfuserEx, .NET Reactor, SmartAssembly, Babel packing
Deobfuscate/Decode T1140 Base64 decode + Assembly.Load, XOR decryption of payloads
PowerShell T1059.001 Cradle execution: powershell -enc <base64> from managed code
Obfuscated Files T1027 String encryption, control flow flattening, anti-tamper
Reflective Code Loading T1620 Assembly.Load(byte[]) for in-memory stage loading

1. Identify .NET Assembly

Confirm the sample is managed code before committing to .NET tooling.

# Check PE headers for CLR data directory (index 14)
python3 << 'EOF'
import pefile, sys
pe = pefile.PE("<TARGET>")
clr_dir = pe.OPTIONAL_HEADER.DATA_DIRECTORY[14]
if clr_dir.VirtualAddress > 0:
    print(f"[+] .NET assembly confirmed — CLR RVA: {hex(clr_dir.VirtualAddress)}")
    # Check runtime version
    import struct
    clr_offset = pe.get_offset_from_rva(clr_dir.VirtualAddress)
    pe.__data__.seek(clr_offset + 8)
    major, minor = struct.unpack('<HH', pe.__data__.read(4))
    print(f"    Runtime: v{major}.{minor}")
else:
    print("[-] Not a .NET assembly")
    sys.exit(1)
EOF

# Alternative quick checks
file <TARGET>                    # Look for "Mono/.Net assembly"
exiftool <TARGET> | grep -i "assembly\|\.net\|framework"

2. Detect Obfuscator

Identify what protection was applied before attempting decompilation.

# de4dot auto-detects most obfuscators
de4dot --detect-only <TARGET>
# Output example: "Detected .NET Reactor 6.x"

# Detect It Easy (DIE) for packer/protector identification
diec <TARGET>

# Manual signature checks
strings <TARGET> | grep -iE 'ConfuserEx|Reactor|SmartAssembly|Babel|Crypto Obfuscator|Dotfuscator|Eazfuscator|AgileDotNet'

# Check for anti-tamper / anti-debug module initializers
monodis --method <TARGET> | grep -i "cctor\|InitializeComponent\|Module"

# Entropy per section — high entropy in .text = packed/encrypted
python3 << 'EOF'
import pefile, math
pe = pefile.PE("<TARGET>")
for s in pe.sections:
    data = s.get_data()
    if len(data) == 0: continue
    counts = [data.count(bytes([b])) for b in range(256)]
    total = len(data)
    ent = -sum((c/total)*math.log2(c/total) for c in counts if c)
    name = s.Name.decode().rstrip('\x00')
    print(f"  {name:10s}  entropy={ent:.2f}  {'PACKED' if ent > 7.2 else 'normal'}")
EOF

3. De-obfuscate

Strip protections layer by layer.

# de4dot — handles ConfuserEx, .NET Reactor, SmartAssembly, Babel, etc.
de4dot <TARGET> -o <TARGET>.cleaned.exe

# If de4dot detects "Unknown obfuscator", try force mode:
de4dot <TARGET> --strtyp delegate --strtok 0x06000042 -o <TARGET>.cleaned.exe

# For ConfuserEx specifically:
# 1. Remove anti-tamper first (patches module cctor)
de4dot <TARGET> --un-name "!^<Module>$&!^<" -o step1.exe
# 2. Then full clean
de4dot step1.exe -o <TARGET>.cleaned.exe

# For .NET Reactor:
# Use .NET Reactor Slayer or NETReactorSlayer
NETReactorSlayer.CLI <TARGET>

# Verify result decompiles cleanly
ilspycmd <TARGET>.cleaned.exe | head -50

4. Decompile and Analyze

Full source recovery from cleaned assembly.

# ILSpy command-line — full project decompilation
ilspycmd -p -o ./decompiled/ <TARGET>.cleaned.exe

# Search decompiled source for key behaviors
grep -rn "WebClient\|HttpClient\|WebRequest" ./decompiled/
grep -rn "Registry\|RegistryKey\|SetValue" ./decompiled/
grep -rn "Process\.Start\|ProcessStartInfo" ./decompiled/
grep -rn "Assembly\.Load\|Activator\.CreateInstance" ./decompiled/
grep -rn "FromBase64String\|Convert\.FromBase64" ./decompiled/
grep -rn "R
Perguntas frequentes

O que é .NET?

É um framework de software da Microsoft, e muitos programas do Windows são feitos com ele.

Ela lida com código embaralhado?

Sim. Ela descreve a remoção das proteções adicionadas por ferramentas comuns de ofuscação antes da leitura do código.

Quem a utiliza?

Analistas de malware e equipes de segurança que estudam amostras .NET.

Detalhes

Descrição original do autor

.NET malware analysis — dnSpy/ILSpy decompilation, de-obfuscation (ConfuserEx, .NET Reactor, Babel, Crypto Obfuscator), behavioral analysis of managed assemblies, PowerShell cradle extraction, and config decryption for common .NET RAT families.

repo: BitterSecurity/Decepticon

Popularidade

Estrelas no GitHub
6,5 mil
Posição no ranking
#14164
Licença
Apache-2.0
Atualizada em
01/11/2026

Essa skill é útil?

0

Entre para votar.

Comentários

  • …

Mais skills deste repositório

Skills parecidas