detect-it-easy

Détecteur de packer, compilateur et linker pour fichiers binaires. Identifie l'obfuscation, le packing et les outils utilisés pour construire les exécutables : première étape essentielle de l'analyse de malware. Packer, compiler, and linker detector for binary files. Identifies obfuscation, packing, and the tools used to build executables — essential first step in malware analysis.

↗ https://github.com/horsicq/Detect-It-Easy

Overview

Detect It Easy (DiE) identifies the compiler, packer, linker, and protector used to build an executable. Before analyzing malware, you need to know if it’s packed (compressed/obfuscated) — DiE tells you what’s protecting the binary, which determines your next analysis step. Available as GUI and command-line.

Installation

Kali Linux

sudo apt install detect-it-easy
# Or download from GitHub releases
# https://github.com/horsicq/Detect-It-Easy/releases

GUI version

die malware.exe

Command-line version

diec malware.exe

Basic Usage

# Analyze a single file
diec malware.exe
die malware.exe      # GUI version

Analyze directory recursively

diec -r /path/to/samples/

JSON output (for scripting)

diec -j malware.exe

Verbose output

diec -v malware.exe

Example Output

$ diec malware.exe
PE64
    Packer: UPX(3.96)[NRV2B]
    Linker: Microsoft Linker(14.29)[GUI32]
    Compiler: Microsoft Visual C/C++(?)[-]

# Common results:
# "Packer: UPX" → unpack with `upx -d malware.exe`
# "Packer: MPRESS" → unpack with MPRESS unpacker
# "Compiler: Go" → go binary, different analysis approach
# "Compiler: Rust" → Rust binary
# ".NET" → analyze with dnSpy or de4dot
# No packer detected → static analysis is straightforward

Common Detections and Next Steps

# UPX packed → unpack
upx -d malware.exe -o malware_unpacked.exe
diec malware_unpacked.exe  # re-check

.NET binary → decompile with dnSpy

dnspy malware.exe

Obfuscated .NET → de-obfuscate first

de4dot malware.exe

NSIS installer → extract

7z x malware.exe -o extracted/

AutoIT script → decompile

myaut2exe malware.exe
# Go binary → strip, then analyze in Ghidra/IDA
# (GoReSym to recover function names)

Batch Analysis

# Analyze all files in a directory
diec -r /malware/samples/ -j | python3 -c "
import json, sys
for line in sys.stdin:
    try:
        d = json.loads(line)
        print(d.get('filePath'), '→', d.get('detects'))
    except: pass
"

Count packer types

diec -r /samples/ 2>/dev/null | grep "Packer:" | sort | uniq -c | sort -rn

Signature Updates

# DiE uses signature databases (.db files)
# Update signatures from GitHub
# They're in: /usr/share/die_script/db/

# Manual update:
git clone https://github.com/horsicq/Detect-It-Easy-signatures
cp -r Detect-It-Easy-signatures/db/* /usr/share/die_script/db/

Tips

  • Always run DiE before attempting static analysis — packed binaries are meaningless without unpacking
  • UPX is by far the most common packer — upx -d unpacks it trivially
  • “Unknown packer” doesn’t mean undetectable — check entropy manually with ImHex
  • DiE’s signature language is scriptable — community writes new signatures constantly
Help / Man page
diec [options] <file>

-r              Recursively scan directory
-j              JSON output
-v              Verbose
-s              Show signature matches
-e              Show entropy
--csv           CSV output
--xml           XML output
-d DIR          Custom signatures directory

Vue d’ensemble

Detect It Easy (DiE) identifie le compilateur, le packer, le linker et le protecteur utilisés pour construire un exécutable. Avant d’analyser un malware, vous devez savoir s’il est packé (compressé/obfusqué) : DiE vous dit ce qui protège le binaire, ce qui détermine l’étape d’analyse suivante. Disponible en GUI et en ligne de commande.

Installation

# Kali Linux
sudo apt install detect-it-easy
# Ou télécharger depuis les releases GitHub
# https://github.com/horsicq/Detect-It-Easy/releases
# Version GUI
die malware.exe

# Version en ligne de commande
diec malware.exe

Utilisation de base

# Analyser un seul fichier
diec malware.exe
die malware.exe      # version GUI

# Analyser un répertoire récursivement
diec -r /path/to/samples/

# Sortie JSON (pour le scripting)
diec -j malware.exe

# Sortie verbeuse
diec -v malware.exe

Exemple de sortie

$ diec malware.exe
PE64
    Packer: UPX(3.96)[NRV2B]
    Linker: Microsoft Linker(14.29)[GUI32]
    Compiler: Microsoft Visual C/C++(?)[-]

# Résultats courants :
# "Packer: UPX" → dépaqueter avec `upx -d malware.exe`
# "Packer: MPRESS" → dépaqueter avec le unpacker MPRESS
# "Compiler: Go" → binaire go, approche d'analyse différente
# "Compiler: Rust" → binaire Rust
# ".NET" → analyser avec dnSpy ou de4dot
# Aucun packer détecté → l'analyse statique est directe

Détections courantes et étapes suivantes

# Packé UPX → dépaqueter
upx -d malware.exe -o malware_unpacked.exe
diec malware_unpacked.exe  # revérifier
# Binaire .NET → décompiler avec dnSpy
dnspy malware.exe

# .NET obfusqué → dé-obfusquer d'abord
de4dot malware.exe

# Installeur NSIS → extraire
7z x malware.exe -o extracted/

# Script AutoIT → décompiler
myaut2exe malware.exe
# Binaire Go → strip, puis analyser dans Ghidra/IDA
# (GoReSym pour récupérer les noms de fonctions)

Analyse par lot

# Analyser tous les fichiers d'un répertoire
diec -r /malware/samples/ -j | python3 -c "
import json, sys
for line in sys.stdin:
    try:
        d = json.loads(line)
        print(d.get('filePath'), '→', d.get('detects'))
    except: pass
"
# Compter les types de packer
diec -r /samples/ 2>/dev/null | grep "Packer:" | sort | uniq -c | sort -rn

Mises à jour des signatures

# DiE utilise des bases de signatures (fichiers .db)
# Mettre à jour les signatures depuis GitHub
# Elles sont dans : /usr/share/die_script/db/

# Mise à jour manuelle :
git clone https://github.com/horsicq/Detect-It-Easy-signatures
cp -r Detect-It-Easy-signatures/db/* /usr/share/die_script/db/

Conseils

  • Lancez toujours DiE avant de tenter une analyse statique : les binaires packés n’ont aucun sens sans dépaquetage
  • UPX est de loin le packer le plus courant : upx -d le dépaquette trivialement
  • “Unknown packer” ne veut pas dire indétectable : vérifiez l’entropie manuellement avec ImHex
  • Le langage de signatures de DiE est scriptable : la communauté écrit de nouvelles signatures en permanence
Aide / Page de manuel
diec [options] <file>

-r              Recursively scan directory
-j              JSON output
-v              Verbose
-s              Show signature matches
-e              Show entropy
--csv           CSV output
--xml           XML output
-d DIR          Custom signatures directory