Merge commit 'refs/c35/922' into integ/content-batch

This commit is contained in:
Michael Sitarzewski committed 2026-09-30 21:38:25 -05:00
commit 9daffc0202
1 file changed
+15 -2
+15 -2
View File
@@ -206,14 +206,27 @@ Write-Host "[!] NEXT: Copy $outDir to analysis workstation — do NOT analyze on
``` ```
### Linux Forensic Triage Script ### Linux Forensic Triage Script
A suspected host may already be hostile: use trusted collection tools and an
approved evidence destination. This local triage is not a substitute for a
forensic image. Restrict the collection directory to the collector, preserve it
for handoff, and never write through a pre-existing path supplied by another user.
```bash ```bash
#!/bin/bash #!/bin/bash
# Linux Incident Response Triage Collection # Linux Incident Response Triage Collection
# Run as root on suspected compromised system # Run as root on suspected compromised system
TIMESTAMP=$(date -u +"%Y%m%d-%H%M%S") TIMESTAMP=$(date -u +"%Y%m%d-%H%M%S")
OUTDIR="/tmp/ir-triage-${HOSTNAME}-${TIMESTAMP}" # Evidence can contain credentials. Create a private directory atomically;
mkdir -p "$OUTDIR" # never reuse a predictable path in /tmp or trust an inherited TMPDIR.
umask 077
OUTDIR=$(mktemp -d /tmp/ir-triage.XXXXXXXXXX) || {
echo "[!] Unable to create private evidence directory" >&2
exit 1
}
readonly OUTDIR
# Preserve the directory for handoff; do not delete evidence in an EXIT trap.
echo "[*] Starting Linux IR triage at ${TIMESTAMP} UTC" echo "[*] Starting Linux IR triage at ${TIMESTAMP} UTC"