reverse-engineering-binaries-with-ghidra
Uses Ghidra to disassemble and decompile a binary, navigate to key routines via
v1.0.03 installazioni+3 in 7 giorni24 StelleApache-2.0sincronizzato 10 ore fa
Installa
Non hai ancora la CLI di NotHoly? Installala prima.
$ curl -fsSL https://notholy.com/install.sh | sh$ notholy skills install meltedinhex/reverse-engineering-binaries-with-ghidraScrive in ~/.notholy/skills dopo aver controllato la firma e lo SHA-256.
FirmaFirmato, ed25519
Pacchettoe089479b…fd2416db
e089479b2eb8…88dffd2416db4 file · 3.3 KBScansioneMedio2 segnalazioni
- Script eseguibile incluso nella skillscripts/analyst.py
- Link a domini esterni
Sorgentegithub.com/meltedinhex/analyst-ai-pack/tree/main/skills/reverse-engineering-binaries-with-ghidra@da7600a
Questa voce non è ancora scritta in italiano, quindi è mostrata in un'altra lingua: English.
In questa pagina
When to Use
- Static/dynamic triage has identified functionality that needs code-level understanding.
- You need to reverse a C2 protocol, decryption routine, or custom obfuscation.
- You want to extract hardcoded config (C2, keys, campaign IDs) from compiled code, or automate extraction across many samples via headless scripts.
Do not use Ghidra as a first step for unknown samples — triage statically and behaviorally first, and unpack before decompiling a packed binary.
Prerequisites
- Ghidra 11.x with JDK 17+.
- An isolated analysis host.
- Familiarity with x86/x64 (or the target arch) and OS API conventions.
- The sample unpacked (decompiling packed code wastes effort).
Safety & Handling
- Ghidra performs static analysis and does not run the sample, but still work in the lab.
- Treat any dumped/derived payloads as live samples.
Workflow
Step 1: Import and auto-analyze
Create a project, import the binary (Ghidra detects PE/ELF/Mach-O and arch), and run auto-analysis with default analyzers.
Step 2: Navigate to interesting code
Start from imports (Symbol Tree) and strings (Defined Strings). Cross-reference (X) from a
suspicious API or string to its callers to reach the relevant function quickly.
VirtualAlloc/WriteProcessMemory -> injection logic
InternetOpen/WinHttp* -> C2
CryptEncrypt / custom XOR loops -> crypto/config decodeStep 3: Annotate the decompiler output
Retype variables, rename functions, and add comments as you understand the code. Good naming turns the decompiler into readable pseudo-C and compounds across a session.
Step 4: Automate with headless scripts
For repeatable extraction, run Ghidra headless with a post-script. The bundled Python uses
analyzeHeadless to export functions/strings to JSON:
python scripts/analyst.py headless --ghidra /opt/ghidra --bin sample.bin --out out.jsonStep 5: Extract the target artifact
Recover the C2 string, key, or config and validate it against dynamic observations.
Validation
- Renamed/retyped routines produce coherent pseudo-C consistent with observed behavior.
- Extracted config (C2/keys) matches what the sample uses at runtime.
- Headless export reproduces the interactive findings.
Pitfalls
- Decompiling packed/obfuscated code — unpack first or the output is meaningless.
- Trusting decompiler types blindly; verify against the disassembly for crypto/pointer logic.
- Ignoring TLS callbacks/constructors that run before the entry point.
References
- See
references/api-reference.mdfor the headless wrapper. - Ghidra documentation and API (linked in frontmatter).
File di questa versione
references/11.2 KB
- api-reference.md1.2 KB
scripts/12.4 KB
- analyst.py2.4 KB
- LICENSE340 B
- SKILL.md3.5 KB
Permessi
| Permesso | Dichiarato | Trovato dalla scansione |
|---|---|---|
| Legge file | No | No |
| Scrive file | Sì | Sì |
| Esegue comandi shell | Sì | Sì |
| Usa la rete | Sì | Sì |
| Usa i connettori | No | No |
| Controlla un browser | No | No |
Segnalazioni della scansione
Rivisto il 13 nov 2026
- MediaFile · Script eseguibile incluso nella skillscripts/analyst.py
- InfoLink · Link a domini esterni
Una scansione pulita abbassa il rischio, ma non prova che il pacchetto sia sicuro. Leggi quello che installi.
| Versione | Pubblicata | Commit | SHA-256 | Firma | Cambio di permessi |
|---|---|---|---|---|---|
| v1.0.0 | 13 nov 2026 | da7600a | e089479b | Firmata | – |
Altro da meltedinhex
Tutto da questo editore- 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
Altro in Reverse engineering e fuzzing
Vai alla categoriaChiedi tutto quello che il tuo perimetro consente.
Crea un account, aggiungi crediti e fai la prima domanda in chat o nel terminale.
- 1/3
Crea l'account
Privato o azienda. Puoi passare ad azienda in seguito senza perdere saldo o chiavi.
PrivatoAzienda - 2/3
Aggiungi crediti
Con carta. Paghi a token, senza abbonamento.
$5.00ricarica minima - 3/3
Chiedi
In chat, oppure installa la CLI ed esegui notholy login nel terminale.
$ notholy login