
Server locale per la funzionalità Lumina di IDA
POC di un server offline per la funzionalità IDA Lumina.
Maggiori dettagli su https://www.synacktiv.com/publications/investigating-ida-lumina-feature.html
Scarica il progetto ed esegui python lumina/setup.py (oppure pip install .).
Il server può anche essere usato come script standalone. Tuttavia, il comando lumina_server non verrà registrato nel PATH. Dovrai eseguirlo manualmente usando python3 lumina/lumina_server.py.
Questo passaggio è facoltativo se non hai bisogno di usare TLS. In tal caso dovrai modificare LUMINA_TLS = NO in ida.cfg.
Genera un nuovo certificato e una nuova chiave ROOT CA usando una di queste righe (puoi rimuovere l'opzione -nodes per impostare una passphrase, ma tieni presente che dovrai passare l'argomento della passphrase allo script del server):
# sha256WithRSAEncryption
openssl req -nodes -x509 -newkey ec -pkeyopt ec_paramgen_curve:prime256v1 -sha256 -keyout luminaRootCAKey.pem -out luminaRootCAK.pem -days 365 -subj '/CN=www.fakerays.com/O=Fake Hexrays/C=XX'
# ecdsa-with-SHA256 (prime256v1)
openssl req -nodes -x509 -newkey rsa:4096 -sha512 -keyout luminaRootCAKey.pem -out luminaRootCA.pem -days 365 -subj '/CN=www.fakerays.com/O=Fake Hexrays/C=XX'
Copia il certificato CA (luminaRootCA.pem) nella directory di configurazione di IDA come hexrays.crt:
%APPDATA%\Hex-Rays\IDA Pro\hexrays.crt$HOME/.idapro/hexrays.crtes. (linux): cp luminaRootCA.pem $HOME/.idapro/hexrays.crt
modificare il file di configurazione di IDA (cfg/ida.cfg), sia nella directory di installazione che (consigliato) nella directory utente:
%APPDATA%\Hex-Rays\IDA Pro\cfg\ida.cfg$HOME/.idapro/hexrays.crt// Lumina related parameters
LUMINA_HOST = "localhost"; // Lumina server url (default : "lumina.hex-rays.com")
// warning: keep the the semicolon
LUMINA_MIN_FUNC_SIZE = 32 // default function size : 32
LUMINA_PORT = 4443 // default port : 443
LUMINA_TLS = YES // enable TLS (default : YES)
Utilizzo:
usage: lumina_server [-h] [-i IP] [-p PORT] [-c CERT] [-k CERT_KEY]
[-l {NOTSET,DEBUG,INFO,WARNING}]
db
positional arguments:
db database file
optional arguments:
-h, --help show this help message and exit
-i IP, --ip IP listening ip address (default: 127.0.0.1
-p PORT, --port PORT listening port (default: 4443
-c CERT, --cert CERT proxy certfile (no cert means TLS OFF).
-k CERT_KEY, --key CERT_KEY
certificate private key
-l {NOTSET,DEBUG,INFO,WARNING}, --log {NOTSET,DEBUG,INFO,WARNING}
log level bases on python logging value (default:info)
esempio:
lumina_server db.json --cert luminaRootCA.pem --key luminaRootCAKey.pem --ip 127.0.0.1 --port 4443 --log DEBUG
Avvia il server, (ri)avvia IDA con un database idb e invia la tua prima funzione usando Lumina.
Premi ctrl-c per terminare il server e salvare il database.
Importante: tieni presente che il database viene salvato o aggiornato solo all'uscita dal server (ctrl-c).