Free lesson · Module 1, lesson 2 of 8

How an attack unfolds: from one email to stolen data

Follow one attack on a college office through its stages (reconnaissance, initial access, execution, persistence, lateral movement, collection, exfiltration) and say where a defender could have stopped it.

Lessons in this module

Lesson notes

For the student

An attack is a chain of ordinary steps over days, not one moment. This lesson follows one attack on the college accounts office, made up for this course, through seven stages, and finds where a defender could have broken the chain. Nothing to install for this lesson.

The seven stages, in plain words and their names

  • Look (reconnaissance): the attacker learns names, emails and systems; often no evidence on your side
  • Get in (initial access): a fake page, a stolen password; evidence: a sign-in from a new place
  • Run (execution): a program is started; evidence: a new program, a new connection
  • Stay (persistence): the access is made to come back after a restart; evidence: a new scheduled task, service or account
  • Move (lateral movement): from one machine to the next; evidence: an inside sign-in, machine to machine
  • Gather (collection): the data is put in one place; evidence: many files read, one big archive
  • Take out (exfiltration): the data is sent outside; evidence: a large upload to an unknown site
  • The seven names are tactics in MITRE ATT&CK, which module 7 uses; it lists a few more, such as credential access

The accounts office attack (made up for this course)

  • Eleven days before the Monday it was found: the staff page of the college website read (look)
  • Three days later: a fake fee refund sign-in page takes the clerk Priya's password; at 9:40 pm the attacker signs in to the college's remote access as her (get in)
  • 9:52 pm: a remote control program started on her office computer (run), then a scheduled task that starts it at every boot (stay)
  • Late on Saturday night: a password saved in her browser opens the fee server (move)
  • Sunday, 02:14: the files in D:\fees\ copied into fees.zip (gather)
  • Sunday, 02:31: fees.zip uploaded to files.example.net (take out); seventeen minutes after the archive was made
  • Monday morning: the fee records of all 1,200 students found on a file sharing site

Where to stop it

  • Every stage leaves evidence, and a defender who sees any one can break the chain; the earliest stop costs least
  • Two-factor sign-in on staff accounts breaks it at get in, the first stage the college controls
  • Blocking the upload site acts only at take out; a backup restores lost data but stops nothing; suspending the clerk leaves the scheduled task running
  • Running a program once is run; making it come back is stay. A sign-in from a machine already taken is move, not get in

Say it in one sentence

  • Look, get in, run, stay, move, gather, take out
  • For any event ask: outside or already inside? What is new after it?
  • Interview: "Walk me through how an attack happens." Name the seven stages in order, with one piece of evidence for each

Try it

  • Worksheet task 2 in labs/m01/worksheet.md: eight shuffled events of a second made-up attack, on the library's book system. Put them in order, and give each its stage and one place a defender could have stopped it
  • You should have an ordered table of eight rows

Every technique in this course is practised only on the lab machines the course gives you, running on your own laptop.

Lesson quiz

Checked in your browser. Nothing is sent or saved.

5 questions

Question 1 · easy

In what order do the seven stages of an attack come?

Question 2 · medium

Sunday, 02:31: the fee server uploads fees.zip to files.example.net, a site outside the college. Which stage is that?

Question 3 · medium

Already on Priya's office computer, the attacker creates a new local account so they can sign in again even if her password is changed. Which stage is that?

Question 4 · medium

From Priya's computer, the attacker uses a password found in a text file on her desktop to sign in to the library's server. Which stage is that?

Question 5 · hard

After the fee records leak, the college suspends Priya's account and restores the fee records from last week's backup. Why is the case not closed?

Security, the law and the lab ruleNext: Confidentiality, integrity, availability and risk