PE-bear (by hasherezade) è uno strumento gratuito, multi-piattaforma PE (Portable Executable) analysis con una GUI user-friendly. Parsa e mostra ogni parte di un eseguibile Windows — DOS/NT headers, sezione table, data directories, imports/exports, risorse, e il rich header — ed è deliberatamente robusto contro PE files malformati che rompono altri parser, che è esattamente quello che il malware spesso spedisce. Inoltre compara binari affiancati, rendendolo uno strumento essenziale per quick malware triage e unpacking verification.
Installazione
| Piattaforma | Come |
|---|
| Windows / Linux | Scarica una build dalla pagina GitHub Releases |
| From source | Build con Qt + il submodule bearparser |
| Portable | Nessuna installazione necessaria; esegui il binario estratto |
| Verifica | Lancia PE-bear; trascina un PE dentro |
Caricamento File
| Azione | Come |
|---|
| Apri un PE | File → Open, o trascina .exe/.dll/.sys dentro |
| File multipli | Carica parecchi; ciascuno ottiene una tab |
| Ricarica | Riparsa dopo cambiamenti esterni |
| Salva | Salva modificazioni back to disk |
Cosa Puoi Ispezionare
| Panel | Mostra |
|---|
| DOS Header | MZ header, e_lfanew offset |
| Rich Header | Compiler/toolchain fingerprint (great for attribution) |
| NT Headers | File header + optional header (entry point, subsystem) |
| Section Headers | Names, virtual/raw sizes, characteristics, entropy |
| Imports | DLLs e funzioni che il binario chiama |
| Exports | Funzioni che il binario espone |
| Resources | Icons, manifests, embedded data |
| Data Directories | Import/export/reloc/TLS/etc. tables |
Lettura delle Sezioni (Triage Signals)
| Signal | Suggerisce |
|---|
| High entropy section | Packed/encrypted (e.g. .text ~7.9+) |
| Unusual section names | UPX0, .vmp0, nomi random → packer |
| Writable + executable section | Self-modifying / unpacking stub |
| Tiny imports table | Imports resolved at runtime (packed) |
| Odd entry point section | Entry not in .text → suspicious |
Comparazione di Binari
PE-bear può mostrare due file affiancati — inestimabile per prima/dopo unpacking o comparazione di malware variants.
| Usa | Come |
|---|
| Packed vs unpacked | Compara headers/sections/imports |
| Variant analysis | Diff due campioni della stessa famiglia |
| Verifica un dump | Compara un memory dump all”originale |
Editing
| Capability | Nota |
|---|
| Edit header fields | Aggiusta o modifica i valori dell”header |
| Edit sections | Aggiusta le caratteristiche della sezione |
| Add/convert | Alcuni edits strutturali per riparazione |
| Save As | Scrivi il PE modificato |
Workflow Comuni
# Triage di un campione Windows sconosciuto
1. Trascina il campione in PE-bear
2. Controlla l''entropy della sezione → high = likely packed
3. Guarda gli imports → tiny/odd = runtime resolution (packed)
4. Leggi il Rich Header per toolchain/attribution hints
5. Ispeziona le risorse per embedded payloads
# Verifica un dumped unpacked
- Compara il dumped PE contro l''originale in side-by-side view
- Conferma che l''IAT e entry point sembrano sani
| Aspetto | PE-bear | CFF Explorer | Detect It Easy | PEStudio |
|---|
| Focus | PE structure + diff | PE editing | Packer/format ID | Threat indicators |
| Malformed PEs | Very robust | Moderate | Robust | Moderate |
| Compare files | Yes | No | Limited | No |
| Best for | Triage + structural analysis | Editing | Identifying packers | IOC-style triage |
Pairs well with Detect It Easy per packer identification e PE-sieve per in-memory implant detection.
Risorse