feat: integrate ghidra-cli v0.1

This commit is contained in:
hermes 2026-07-28 20:20:05 +00:00
52 changed files with 6689 additions and 126 deletions

14
fixtures/README.md Normal file
View file

@ -0,0 +1,14 @@
# Reproducible native fixtures
`fixtures/src/known.c` is compiled by Nix into two tiny, dependency-free test
programs from the same reviewed source:
- `elf-x86_64/known.elf`: static ELF, x86-64 little-endian;
- `pe32plus-x86_64/known.exe`: PE32+, x86-64.
Both builds disable timestamps and build IDs, set `SOURCE_DATE_EPOCH=1`, avoid
host libraries, and are stripped only of non-semantic comments/notes. Build
them with `nix build .#fixtures`. Version 0.1 intentionally does not claim an
unverified third target until that target is exercised by the real-Ghidra
suite; recognizing a file format without a maintained cross-toolchain test is
not sufficient evidence.

View file

@ -13,8 +13,33 @@
"data": {
"ready": true,
"components": {
"ghidra": { "status": "ready", "details": { "version": "12.1.2" } },
"java": { "status": "ready", "details": { "version": "21" } }
"ghidra": {
"status": "ready",
"version": "12.1.2",
"launcher": {
"encoding": "utf8",
"value": "/nix/store/ghidra/bin/ghidra-analyzeHeadless"
}
},
"java": {
"status": "ready",
"version": "21",
"executable": {
"encoding": "utf8",
"value": "/nix/store/jdk/bin/java"
}
},
"analysis_store": {
"status": "ready",
"path": { "encoding": "utf8", "value": "/tmp/ghidr-store" },
"source": "cli",
"usage": { "logical_bytes": 1048576, "allocated_bytes": 1114112 }
},
"sandbox": {
"status": "ready",
"backend": "bubblewrap",
"verification": "verified"
}
}
},
"warnings": []

18
fixtures/src/known.c Normal file
View file

@ -0,0 +1,18 @@
// SPDX-License-Identifier: CC0-1.0
volatile unsigned long fixture_marker = 7;
__attribute__((noinline)) unsigned long fixture_add(unsigned long value) {
return value + fixture_marker;
}
void _start(void) {
(void)fixture_add(35);
for (;;) {
__asm__ volatile("" ::: "memory");
}
}
void mainCRTStartup(void) {
_start();
}