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

Why this lab has no live malware

Find the source code behind every sample and see what the harmless imitations do instead of real damage.

mission

You are
You have just joined the malware triage desk at Kestrel Insurance.
Situation
The SOC has sent twelve files it cannot explain. Your lead asks you to read the house rules before you touch any of them.
Goal
Find out what the samples on this workstation are and how you know they are safe to study.
Hand in
The folder that holds the sample sources, and the one thing every sample writes.

Real malware is never handed out in a teaching lab. It can escape a badly configured virtual machine, it can be copied off the lab and reused, and in many countries passing it around is a crime even when the intent is good. A course cannot check how every learner's network is set up, so it cannot promise containment.

Every sample here is a training program written for this course. Each one imitates a trait you meet in real cases: odd imports, hidden strings, a packer, a macro, a beacon to a server that does not exist. None of them encrypts, deletes, spreads, steals or exploits anything. You still handle them as if they were live, because that habit is the real skill.

01

Read the house rules

notes.txt is also on the desktop. Open it there or print it in the Terminal.

analyst@triage-ws01
head -n 12 notes.txt
Kestrel Insurance, malware triage desk
Workstation triage-ws01

House rules
1. Every sample on this machine is a harmless training program.
   The source code of each one is in /opt/kestrel-lab/sources.
2. Treat every sample as if it were live anyway. That is the habit
   you will need when a real sample arrives on a real triage desk.
3. Never run anything from ~/intake or ~/capstone. Copy a sample into
   ~/detonate first, and only when a lesson tells you to.
4. This machine has no internet access. Do not try to get around that.
5. Defang indicators before you paste them into a ticket or chat:

you should see Rule 1 points to the source folder. Rule 3 says samples only run in ~/detonate.

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

List the intake

These are the files the SOC sent. Their names come from the ticket, so they prove nothing yet.

analyst@triage-ws01
ls intake
claim-form.docm
eicar.com
inv-reader.exe
invoice-viewer-signed.exe
invoice-viewer-upx.exe
invoice-viewer.exe
invoice.js
statement.pdf
syncd
syncd-stripped
syncd-upx
update.bat
ls
Lists the files in a folder. Built into Linux and macOS.
03

Find the sources

Every sample is built from the code in /opt/kestrel-lab/sources by the lab's generator. The C2 addresses and keys are in the config folder.

analyst@triage-ws01
ls /opt/kestrel-lab/sources
claim-form-Module1.bas
claim-form-ThisDocument.cls
config
invoice-inner.js
invoice-viewer.c
invoice-viewer.rc
label-print.c
syncd.c
timesheet.c
update-inner.ps1
04

Check what the samples leave behind

grep -rl searches a folder and lists the files that contain a pattern. sort puts them in order. The training programs leave a note or a marker that says what they are.

analyst@triage-ws01
grep -rl 'Kestrel lab training' /opt/kestrel-lab/sources | sort
/opt/kestrel-lab/sources/claim-form-Module1.bas
/opt/kestrel-lab/sources/invoice-inner.js
/opt/kestrel-lab/sources/invoice-viewer.c
/opt/kestrel-lab/sources/update-inner.ps1
grep -n 'training sample' /opt/kestrel-lab/sources/syncd.c
45:    fprintf(f, "[Desktop Entry]\nType=Application\nName=Sync helper\nExec=%s\nX-Kestrel-Lab=training sample\n", self);

you should see The Windows viewer, the macro, the PowerShell and the JavaScript each write a note. syncd marks its autostart entry as a training sample.

grep
Prints the lines of text that match a pattern. Built into Linux and macOS.
sort
Sorts lines of text. Built into Linux and macOS.

Commands in this lesson

CommandWhat it does
head -n 12 FILEPrint the first 12 lines of a file
grep -l TEXT FILESList only the names of files that contain TEXT

What a defender takes away

  1. 1Teaching labs use harmless imitations, never live malware.
  2. 2Imitations still teach the real workflow: identify, take apart, detect, report.
  3. 3Treat every sample as live. The habit matters more than the sample.

Questions

0 of 2 solved

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

  1. Show hint

    `ls intake | wc -l`