Files
docker_hayabusa/start.sh
2024-06-13 13:41:34 +02:00

39 lines
1.6 KiB
Bash

#!/bin/sh
#check if folder was mounted under /data
if [[ ! -d /data ]] ; then
echo "[!] No Folder was mounted to /data"
echo "[=] Make sure a folder containig the Windows Logs (evtx) is mounted. Example:"
echo "[=]"
echo "[>] # docker run -it --rm --network=none -v /path/to/logfiles:/data tabledevil/hayabusa"
exit 1
fi
#check which destination is writeable /data or /output
if [[ ! -f /output/notmounted ]] && [[ -w /output ]] ; then
echo "[!] Output folder was mounted and is writeable"
echo "[>] Using /output as destination for report"
output="/output"
else
if [[ -w /data ]] ; then
echo "[!] Mounted folder /data can be written"
echo "[>] Using /data as destination for report"
output="/data"
else
echo "[!] No writeable output folder available"
echo "[=] Make sure either the folder mounted under /data is writable ..."
echo "[>] # docker run -it --rm -v /path/to/logfiles:/data tabledevil/hayabusa"
echo "[=] ... or mount a writable folder to /output"
echo "[>] # docker run -it --rm -v --network=none /path/to/logfiles:/data:ro -v /path/for/report:/output tabledevil/hayabusa"
exit 1
fi
fi
#set output-destination
outdir="${output}"
output="${output}/hayabusa_$(date +%s)"
echo "output is goint to : ${output}"
hayabusa csv-timeline -p timesketch-verbose -r /opt/hayabusa/rules/ -w -m low -U -H "${output}".html -o "${output}.ts.csv" -C -d /data
hayabusa json-timeline -p verbose -r /opt/hayabusa/rules/ -w -L -o "${output}_takajo.jsonl" -d /data
takajo automagic -t "${output}_takajo.jsonl" -o "${outdir}/takajo"