Case 02: instructor's answer key

Working the case? Stop here. This is the answer key for Case 02: Friday night encryption.

See the attack path in Spoke

The four answers

How did they get in? By password spraying the VPN.

  • At 02:11 on Thursday 29 October, 203.0.113.45 tried three passwords against 37 account names, 112 attempts in nine minutes.
  • At 02:15:36 one of them worked for kwong, who is in the VPN-Legacy group, which is exempt from MFA. The attacker logged out after 109 seconds.
  • They came back 43 hours later, at 21:04 on Friday, from 203.0.113.46. Meanwhile, kwong had logged in normally from home (198.51.100.34) on both days.

What did they take? About 18.5 GB (19.8 billion bytes) from FS-01’s Billing and HR shares.

  • It left between 23:05 Friday and 01:28 Saturday, as 44 SFTP uploads from JUMP-01 to 198.51.100.200:22 using portable WinSCP.
  • Before that, at 21:41, a 61 MB upload carried JUMP-01’s registry hives.
  • The note’s “210 GB” is not supported: the firewall sees every way out, and nothing else left. The billing and HR data did leave, though. It holds patient account and claim data, so counsel needs to start the notification assessment today.

Are they still in? Assume yes until the following are done:

  • svc_ordbak exists and is in Domain Admins and Backup Operators.
  • adm.sstephens and kwong have known passwords.
  • The VPN-Legacy group still has no MFA, and JUMP-01 still gives every domain user local admin.
  • The attacker held Domain Admin from 22:47 Friday. Nothing in the evidence shows a DCSync, but nothing rules one out either, so plan for the krbtgt account being compromised.
  • Their last session ended at 03:02:10 Saturday on a VPN idle timeout. Nothing since then is theirs: the 07:02 vendor.ehr login is the vendor’s daily check.

What can be restored? The off-site copy that ran from 01:01 to 01:40 on Saturday.

  • It finished 13 minutes before the attacker stopped the backup agent, deleted the shadow copies, the catalog and every local backup file (D:\BackupRepo\*.shb), and disabled Windows recovery. Encryption began at 02:11, half an hour after the copy finished.
  • That makes it the recovery point for data, from 01:00 Saturday. It is not clean, though: it was taken four hours after the attacker became Domain Admin.
    • A restored DC-01 would bring svc_ordbak back.
    • A restored JUMP-01 would bring back the local-admin misconfiguration.
  • So restore data, not systems: rebuild servers, then restore files into them.
  • Check with the vault provider that svc_ordbak (Backup Operators) can’t reach or change the off-site copies. Also check their retention, before anyone touches the backup console.

Timeline

All times are UTC. Thursday is 29 October, Friday is 30 October and Saturday is 31 October.

Time Host What happened Source
Thu 02:11:08 VPN Password spray from 203.0.113.45: 112 attempts, 37 names, three passwords vpn_auth
Thu 02:15:36 VPN kwong succeeds. MFA “not required (group VPN-Legacy)”. Logs out after 109 s vpn_auth
Thu 16:42:10 JUMP-01 adm.sstephens logs on over RDP. Windows caches the credential, and this is what the attacker cracks later jump-01 4624
Fri 21:04:33 VPN kwong logs in from 203.0.113.46, gets 10.8.0.23. No MFA vpn_auth
Fri 21:06:09 JUMP-01 RDP logon (type 10) as kwong, with 4672 special privileges. Domain Users are local admins here jump-01 4624, 4672; firewall
Fri 21:07:51 JUMP-01 Checks the public IP at api.whatismyip.example firewall, Historian
Fri 21:10–21:12 JUMP-01 Downloads netscan.zip and WinSCP-6.3.5-Portable.zip from files.knowhere-share.example Historian, Sysmon 11, firewall
Fri 21:14–21:24 JUMP-01 Discovery: whoami /groups, net group "Domain Admins", nltest /dclist, net view \\FS-01, \\BKP-01 jump-01 4688
Fri 21:16:40 JUMP-01 netscan.exe scans 10.0.0.1–10.0.9.254; finds SMB, RDP and the backup console port (9392) jump-01 Sysmon 1, 3
Fri 21:31:12 JUMP-01 pd64.exe -ma lsass.exe: blocked and quarantined. The evening shift closes the alert, “no further action” edr_alerts, jump-01
Fri 21:33–21:34 JUMP-01 Searches for an alternative, and reads a forum post on dumping cached credentials from the registry Historian
Fri 21:38:44 JUMP-01 reg save of SAM, SECURITY and SYSTEM to C:\Users\Public. EDR alert (medium) never reviewed jump-01, edr_alerts
Fri 21:41:10 JUMP-01 WinSCP uploads the hives to 198.51.100.200:22 (61 MB) jump-01, firewall
Fri 22:44:40 JUMP-01 Downloads PSTools.zip Historian, firewall
Fri 22:47:15 JUMP-01 → DC-01 Explicit credentials (4648) for adm.sstephens: the cached hash was cracked in about an hour jump-01 4648, dc-01 4624
Fri 22:49:14 DC-01 PsExec as SYSTEM; PSEXESVC installed (7045) jump-01, dc-01, edr_alerts
Fri 22:51:30 DC-01 Creates svc_ordbak (4720), adds it to Domain Admins (4728, 22:51:44) and Backup Operators (22:51:58) dc-01, edr_alerts
Fri 22:58:12 DC-01 Lists every computer in the domain dc-01 4688
Fri 23:03:02 FS-01 svc_ordbak maps \\FS-01\D$ from JUMP-01 jump-01 4648, fs-01 4624, 5140
Fri 23:05:40 JUMP-01 WinSCP script up.txt starts uploading D:\Shares\Billing, then HR (from about 00:16) jump-01, fs-01 5140, firewall
Sat 01:01–01:40 BKP-01 The nightly off-site copy runs as normal: the last good copy firewall (backup-offsite), bkp-01 7036
Sat 01:28:05 JUMP-01 Last of 44 uploads; about 18.5 GB in all firewall
Sat 01:52:06 BKP-01 svc_ordbak arrives by PsExec bkp-01, jump-01
Sat 01:53–01:58 BKP-01 Stops SHBackupAgent, vssadmin delete shadows, wbadmin delete catalog, deletes D:\BackupRepo\*.shb, disables recovery with bcdedit bkp-01, edr_alerts
Sat 02:05:05 JUMP-01 Downloads ss.bin, the encryptor Historian, Sysmon 11
Sat 02:11:40–02:12:26 JUMP-01 Copies it to ADMIN$ on FS-01, EHR-APP01 and BKP-01 as C:\ProgramData\ss.exe and runs it with PsExec jump-01 4688, Sysmon 3
Sat 02:13:05 FS-01 EDR kills ss.exe and isolates the host; about 70 files already renamed .sxstn edr_alerts, fs-01 Sysmon 11
Sat 02:13:22 BKP-01 Same edr_alerts, bkp-01
Sat 02:12 onward EHR-APP01 No EDR, so nothing stops it. It is encrypted, which explains the outage jump-01 (PsExec to it), service desk
Sat 02:40:12 DC-01 svc_ordbak clears the Security log (1102). The SIEM already holds the copy you are reading dc-01, edr_alerts
Sat 02:44:01 JUMP-01 Deletes its tools, the hives and the script. Sysmon archives each delete (event 23) jump-01 Sysmon 23
Sat 02:58:30 JUMP-01 RDP session logs off jump-01 4634
Sat 03:02:10 VPN kwong session ends (idle timeout) after 5 h 58 m vpn_auth

Scope

Item Status Why
kwong Compromised Sprayed password, no MFA
adm.sstephens Compromised Cached credential cracked from JUMP-01’s SECURITY hive
svc_ordbak Attacker-created Domain Admins, Backup Operators. Disable, then delete once its use is recorded
krbtgt and every privileged account Presumed compromised Domain Admin for about four hours
JUMP-01 Compromised, still online The attacker’s base for the whole intrusion
DC-01 Compromised PsExec as SYSTEM; account changes; log cleared
FS-01 Encrypted (partly), data stolen Isolated by EDR at 02:13
EHR-APP01 Encrypted No EDR; PsExec from JUMP-01 at 02:12:06
BKP-01 Backups destroyed, encrypted (partly) Isolated by EDR at 02:13
Off-site vault Unknown Must be checked with the provider before it is used

The encrypted file

Open the two files in Hexes (the link loads both).

  • Partial encryption. The entropy graph has five high-entropy stripes. The encryptor scrambles the first 32 KiB of every 64 KiB, exactly half, and leaves the rest alone. That’s why it can encrypt a whole server in minutes, and why the note brags about “balance”.
  • Nearly half of the file is untouched. Of 300113 bytes, 163,840 are encrypted (55%: the last block is short, so it’s all scrambled half), and the other 45% matches the clean copy byte for byte. Rows outside the stripes of an encrypted CSV, database or VM disk can be recovered without paying, but not the ones in the stripes.
  • The footer. The last 320 bytes, from offset 0x49451, start with the magic SXSTN and hold:
    • the original size (0x49451 = 300113, as a little-endian 64-bit number);
    • the stripe and chunk sizes (0x10000, 0x8000);
    • the victim ID SNAP-7Q2K-1031, which matches the note;
    • 256 bytes of what is probably the per-file key, encrypted to the attacker’s public key;
    • the trailer SXEND.

    A YARA rule on SXSTN at filesize - 320 finds every encrypted file and nothing else.

Indicators

Type Value Note
IP 203.0.113[.]45 Password spray, Thursday
IP 203.0.113[.]46 VPN logins, Friday night
IP 198.51.100[.]200 SFTP exfiltration, port 22
Domain files.knowhere-share[.]example (203.0.113[.]80) Tool and encryptor downloads
Domain sixstone-support[.]example Ransom chat, from the note
Account svc_ordbak Created by the attacker
File C:\ProgramData\ss.exe, SHA-256 32961195f4cc4ef083bcded85775d91171819d8b70133d64da68529ca0c3ad5b (from the EDR alert) The encryptor
File pd64.exe, netscan.exe, WinSCP.com, PsExec64.exe in C:\Users\kwong\Downloads Tools, now deleted
File C:\Users\Public\{s,se,sy}.hiv, up.txt, scan.xml Staging, now deleted
Extension, note .sxstn, README_RESTORE.txt, ID SNAP-7Q2K-1031 Impact

Containment, in order

  1. Cut the attacker’s way back in, now. Disable svc_ordbak, kwong and adm.sstephens, and kill their sessions. Put the VPN-Legacy group on MFA or disable it. Block the three addresses and the two domains.
  2. Isolate JUMP-01 and DC-01’s remote management, but don’t wipe them: they are the evidence. Collect memory and disk from JUMP-01 first if you can.
  3. Protect the off-site copy. Freeze its retention with the provider and confirm the attacker had no access to it.
  4. Reset krbtgt twice, the second reset after replication has finished, and then every privileged account and service account. The attacker had Domain Admin, so any password they could reach counts as known.
  5. Fix what let them in:
    • MFA on every VPN account, with no exempt groups.
    • Remove Domain Users from JUMP-01’s local Administrators.
    • Admins stop logging on to shared hosts with domain admin accounts (tiering), so there are no cached admin credentials to steal.
  6. Rebuild, then restore. Bring up clean servers and restore data from the 01:00 off-site copy into them. Start with EHR-APP01, so the clinics come off paper. Hunt for the indicators before anything reconnects.
  7. Legal and communications. Billing and HR data left, including patient account data. Counsel decides on notification, and when the deadline starts.

Detection gaps and lessons learned

  • No MFA for an exempt group. One exception was the whole intrusion. Exceptions need an owner and an end date.
  • The spray went unseen for 43 hours. 112 failures from one address in nine minutes is an easy alert, and nobody had written it.
  • “Blocked” was treated as “over”. The LSASS alert was closed as “no further action” while the attacker was already saving the registry hives. A blocked credential-theft attempt is a confirmed intruder, not a non-event.
  • Medium alerts were never triaged. The hive dump, the PsExec on the DC and the new Domain Admin all came in during staffed hours, and nobody looked at them.
  • There was no overnight cover. Backup deletion at 01:53 was a high alert, and nobody saw it until 07:05.
  • There was an EDR blind spot. The one host with no agent was the one fully encrypted, and it was the one the clinics needed most.
  • Backups shared the domain. The attacker reached the backup server with a domain account. The off-site copy survived only because of its timing.
  • What went right:
    • The EDR’s automatic isolation limited FS-01 and BKP-01.
    • The SIEM kept DC-01’s log after it was cleared.
    • Sysmon recorded the clean-up.

Running it as a graded assignment

  • Before you hand it out, change something, because this key is public. Edit the seed (R = random.Random(1031)) or the times in _build.py and rerun it, then update this page.
  • The marking scheme on the case page is weighted for an analyst course. For a leadership audience, give the executive summary and the recovery section more weight.
  • For a group, split the work by host and keep one shared Tessera case file. One person owns the timeline, and everyone sends events to it.
  • The two closing exercises run well live. In Scrimmage, the ransomware scenario starts with a phish rather than a VPN, but it teaches the same thing: where the defenders had to act to stop it before Impact. The Huddle tabletop’s injects are written for a larger company. Read them as Sanctorum’s, and have the class decide the payment question and the notification clock.