MISP-Ghidra is a python library and scripts to extend Ghidra for exporting ghidra decompilation indicators (functions names, FID hashes, BSIM vectors) to MISP Objects
This is a work in progress.
Ghidra 12.0.2 with PyGhidra and BSIM plugin activated
Install requirements with your pyghidra venv
~/.config/ghidra/ghidra_12.0.2_PUBLIC/ghidra_12.0.2_PUBLIC/venv/bin/pip install -r requirements.txtCopy the MISP config.toml template and edit with your own API keys
cp mispghidra/misp/config/config.template.toml mispghidra/misp/config/config.tomlLaunch ghidra with PyGhidra : pyghidra -g or ghidra_12.0.2_PUBLIC/support/pyghidraRun
Add the ghidra_scripts directory from this git repository to the Ghidra Bundle Manager
The scripts are under the category MISP
Run MISP/Test connection to the MISP instance to test the connection to the MISP instances API (configured in config.toml)
Check the /test/ directory bash scripts for more examples.
pyghidraRun --headless ${PROJECT_PATH} ${PROJECT_NAME} \
-import ${BINARY_PATH} \
-postScript ghidra_scripts/ghidra-functions-to-MISP.py \
--event-uuid ${EVENT_UUID_EXISTING} \
--function-address ${FUNCTION_ADDRESS}pyghidra \
pyghidraRun --headless ${PROJECT_PATH} ${PROJECT_NAME} \
-import ${BINARY_PATH} \
-postScript ghidra_scripts/ghidra-functions-to-MISP.py \
--new-event \
--function-address ${FUNCTION_ADDRESS}pyghidraRun --headless ${PROJECT_PATH} ${PROJECT_NAME} \
-import ${BINARY_PATH} \
-postScript ghidra_scripts/ghidra-functions-to-MISP.py \
--new-event \
--all-functionsThis is still a work in progress.
You can filter on which functions to send based on function types (thunk, defined, external, internal) and function names (regex)
pyghidraRun --headless ${PROJECT_PATH} ${PROJECT_NAME} \
-import ${BINARY_PATH} \
-postScript ghidra_scripts/ghidra-functions-to-MISP.py \
--new-event \
--all-functions
--name-include "entry" \
--name-exclude "^_|^abort|^plt" \
--ignore thunks \
--new-event \misp-ghidra creates by default the objects:
file | file
ghidra | ghidra-function
Event correlation graph
Event graph


