The idea
Anneke takes the orders at Emberline Ceramics, a ten-person tile studio, and looks after its three machines on the side. October brought three security incidents, and Bettina, who owns the studio, wants to know whether somebody is out to get them. Read the logs each incident left and work out who was behind each one, and why.
Steps
-
Three incidents, one question
Bettina asks one question, "who attacked us?", and it has a different answer for each incident.
Security people call whoever is behind an attack a threat actor. The evidence almost never gives you a threat actor's name. What it gives you is the kind: where they stood (inside the studio or outside it), what they wanted (their motivation) and how much skill, time and money they brought (their capability).
Anneke keeps a note of every incident on
files, the studio's file server. The lab has put October's logs back on all three machines, as the machines wrote them. Start with her notes.files:~# cat /srv/office/it/incidents-october.txt
-
Case 1: the burst that was never about Emberline
At 03:12 on Tuesday 6 October the studio's log watcher mailed Anneke: a burst of errors on the web shop. An attack in the middle of the night feels personal.
A web server writes one line per request to its access log: the address that asked, the time, the page and a status number.
200means the page was served,404means the server has no such page. The last part of each line is the name the visiting program gives for itself.Emberline's shop has five pages:
/,/tiles,/studio,/newsand/contact. Pull every404from the log and read what was asked for.shop:~# grep ' 404 ' /var/log/nginx/access.log
-
Case 2: the login that broke nothing
On Saturday 17 October, Dario's account logged in to
filesat 23:41. Two days earlier Dario, who packs the orders, had handed in his notice.Staff open the office folders on
filesover SSH. The server writes a line to/var/log/auth.logfor each login and for each file a login opens:Accepted passwordis a login that worked, andopennames a file it read. Anneke turned that file record on; it is off by default. The lab trimmed these logs to the lines that matter; a real month runs to thousands.To judge a login, learn what normal looks like first. Read an ordinary Friday, then the Saturday night.
files:~# grep 'Oct 16' /var/log/auth.log files:~# grep 'Oct 17' /var/log/auth.log
-
Case 3: slow, quiet, and it knew the names
On Wednesday 21 October, Bettina's account logged in to
remote, the one machine staff may reach from home. The login came from203.0.113.77, an address outside the studio, while Bettina was loading the kiln.remotefaces the internet, so its log also holds failed logins from scanners like the one in case 1: eight guesses in a quarter of a minute at names such asrootandadmin. A login that works after noise like that could be a scanner that got lucky.Pull everything this one address did on
remote. Then askshopwhether the same address ever visited the website, and fetch the page it read.remote:~# grep '203.0.113.77' /var/log/auth.log shop:~# grep '203.0.113.77' /var/log/nginx/access.log remote:~# curl -s http://10.0.4.10/studio
-
A valid login is not always an insider
Cases 2 and 3 end with the same words:
Accepted password. If a valid login meant an insider, Bettina robbed her own studio.Staff who log in to
remotefrom home go on from it tofiles, and the outsider did the same. Sofilesrecorded the visitor's address asremote's own,10.0.4.30. Bettina's own desk is10.0.4.40. Read what her account did onfileson 21 October, then on 22 October. In these linesopendirmeans a folder was listed.files:~# grep 'Oct 21' /var/log/auth.log files:~# grep 'Oct 22' /var/log/auth.log
Run these steps on real machines