Unit 1: A safe triage bench · Lesson 3 of 4 · 16 min

Handle samples as evidence

Check the intake against the hashes the SOC took, and keep every file read only.

mission

You are
The analyst receiving ticket SOC-4471.
Situation
The SOC hashed each file when it collected it. If a file changed on the way to you, your findings would describe the wrong file.
Goal
Confirm the intake matches the SOC's hashes and that nothing can be run by accident.
Hand in
A verified hash list and the permissions on the intake files.
01

Read the ticket

The ticket says where each file came from. Keep that context. A file from a build server's /dev/shm means something different from an email attachment.

analyst@triage-ws01
head -n 13 evidence/ticket-SOC-4471.txt
Ticket      SOC-4471
Opened      2026-10-30 08:12 UTC
From        SOC tier 2 (detection queue)
To          Malware triage desk
Priority    P3

Summary
Files collected over three days from the email gateway quarantine,
two EDR file captures and one Linux build server. None has been
confirmed malicious. The SOC needs to know what each file is, what
it would do, and what to block or hunt for.

Files
head
Prints the first lines of a file or of piped text. Built into Linux and macOS.
02

Check every hash

sha256sum -c reads a list of hashes and file names and checks each file.

analyst@triage-ws01
sha256sum -c evidence/intake.sha256
intake/claim-form.docm: OK
intake/eicar.com: OK
intake/inv-reader.exe: OK
intake/invoice-viewer-signed.exe: OK
intake/invoice-viewer-upx.exe: OK
intake/invoice-viewer.exe: OK
intake/invoice.js: OK
intake/statement.pdf: OK
intake/syncd: OK
intake/syncd-stripped: OK
intake/syncd-upx: OK
intake/update.bat: OK

you should see Twelve OK lines. Nothing changed between collection and your desk.

sha256sum
Prints the SHA-256 hash of a file, a fingerprint that changes if one byte changes. Built into Linux. On a Mac, use shasum -a 256.
03

Look at the permissions

stat -c prints chosen fields. %A is the permission string and %n the name.

analyst@triage-ws01
stat -c '%A %n' syncd invoice-viewer.exe update.bat
-r--r--r-- syncd
-r--r--r-- invoice-viewer.exe
-r--r--r-- update.bat

you should see Read only for everyone and no execute bit. A double click or a stray ./syncd will fail.

stat
Shows a file's size, owner, permissions and timestamps. Built into Linux and macOS.
04

Check that nothing can run

[ -x FILE ] tests whether a file is executable for you. The permissions stop a stray ./syncd from starting anything.

analyst@triage-ws01
[ -x syncd ] && echo runnable || echo 'not executable'
not executable

you should see Not executable. Running a sample is always a deliberate step in ~/detonate.

echo
Prints its arguments. Built into Linux and macOS.

When you send a sample to another team, put it in a zip protected with the password infected. The password is not for secrecy. It stops mail filters and endpoint agents from catching the file in transit, and stops anyone opening it by accident.

What a defender takes away

  1. 1Hash on arrival and compare with the hash taken at collection.
  2. 2Keep samples read only, with no execute bit.
  3. 3Record where each file came from. Context changes the verdict.

Questions

0 of 3 solved

Answer each one from what you find on your lab machine.

  1. Show hint

    `grep syncd-upx evidence/ticket-SOC-4471.txt`