ChipBench packages Ghidra, radare2, binwalk, chip-programming tools,
simulators, and firmware-unpacking utilities into one reproducible container
for analyzing raw chip dumps entirely from the command line or an AI CLI.
Headless Jython scripts drive import, forced-disassembly sweeps, live
queries, and bulk decompilation exports without any GUI.
Derived from a private engagement environment, generalized for public
release under AGPLv3. No engagement-specific artifacts are included.
💘 Generated with Crush
Assisted-by: Crush:glm-5.2
26 lines
1.1 KiB
Bash
Executable File
26 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Quick first-pass triage of an artifact: file type, header bytes, strings,
|
|
# binwalk signatures, and radare2 architecture hints. Nothing is written.
|
|
#
|
|
# Usage: ./re-identify <file-in-artifacts>
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")"
|
|
if [ "$#" -ne 1 ]; then
|
|
echo "usage: $0 <file-in-artifacts>" >&2
|
|
exit 2
|
|
fi
|
|
ART="$1"
|
|
exec docker compose run --rm -T -e ART="$ART" --entrypoint /bin/bash tools -lc '
|
|
set -euo pipefail
|
|
F="/data/artifacts/$ART"
|
|
echo "################ file ################"; file "$F"
|
|
echo; echo "################ size / hashes ################"
|
|
ls -l "$F"; sha256sum "$F"
|
|
echo; echo "############## first 256 bytes ##############"; xxd -l 256 "$F"
|
|
echo; echo "############## last 256 bytes ###############"; tail -c 256 "$F" | xxd
|
|
echo; echo "############## ascii strings (top 40) ########"; strings -n 4 "$F" | head -40
|
|
echo; echo "############## binwalk signatures ############"; binwalk "$F"
|
|
echo; echo "############## rabin2 -I (arch hints) ########"
|
|
rabin2 -I "$F" 2>/dev/null || echo "(rabin2 could not identify a known format)"
|
|
'
|