Cybrary ForgeCYBRARY / FORGE
Curriculum
H-306·Cross-platform·65 min

Three kinds of persistence from one macro on NW-HR01 Start this lab

A macro-enabled benefits document on an HR workstation spawned hidden PowerShell, and four minutes later a Run key, a service and a scheduled task all pointed at unsigned binaries. Work NW-HR01 with cmd.exe and Event Viewer, contain it, and record the persistence you would have missed.

Mission brief · H-306

Tier 3 analyst on the incident response bench

Tier 3 — deep host and forensics
Business important
Track default

You are acting as

the break-glass IR account `svc-ir`, checked out of the vault for this incident — never the compromised identity

How you got here

The detection fired in the EDR console. You opened a live-response session from that detection, so your shell rides the EDR agent channel — containing the host will *not* cut you off, which is exactly why you contain from here rather than over SSH.

Your access

  • EDR console (detections + live response)

    Endpoint detection & response

    • Read the detection and process tree
    • Look up host criticality, owner and VIP flags
    • Open a live-response session on the host
    • Contain the host over the agent channel
    • Not yours: Disable user accounts (that's the identity team)
    • Not yours: Delete evidence
  • Live-response shell on the affected host

    Host shell session

    • Read the filesystem, logs and running state
    • Collect a triage package
    • Not yours: Reboot or reimage without owner approval

What's at stake

The affected host

Owner: The system's business owner, named on the asset record

Containing a host you haven't identified can stop revenue. Check criticality and owner before you isolate anything.

Rules of engagement

You may act alone

  • Investigate from the live-response session
  • Collect evidence and triage packages
  • Contain a standard-criticality host

Ask a human first

  • Containing a mission-critical host — asset owner and on-call manager first
  • Disabling a user identity — identity team, and HR/legal if it looks like an insider

Why this matters

One macro, three footholds. Analysts routinely find the loudest persistence — the running process — and stop. This case grades whether you enumerated all of the Windows autostart surfaces before you called it contained.

Concepts

Windows persistence has more than one address

`reg query` for Run keys, `sc query` and System event 7045 for services, `schtasks` for tasks. Each is independent: killing the process clears none of them.

netstat -ano is the join key

The socket table carries the PID, `tasklist` turns the PID into an image name, and Sysmon event 3 confirms the destination independently. Three sources agreeing is a finding; one source is a hypothesis.

Isolating a staffed workstation still needs approval

The action is consequential: the user loses their session mid-shift. The print server saw only a routine logon and is not a containment target.

Names are chosen to look boring

OneDriveSync, NwHealthAgent, GoogleUpdateTaskMachineUA — one of those is real. Judge on the binary path and its signature, never on the display name.

Objectives graded

  • Work a Windows 11 workstation with cmd.exe: reg query, sc query, schtasks, tasklist, netstat
  • Prove all three persistence mechanisms and the live outbound session
  • Contain the host and the user identity under approval, then record the evidence trail

Live walkthrough

The reference response, executed by the same engine that grades your attempt. Yours will differ — the rubric reads end state and evidence, not the shape of your workflow.

  1. 1.Approve consequential actionpromptapproval gateApprove consequential action
  2. 2.Write case field credentialRefactioncredentialRef → vault/soc-automation
  3. 3.Attach evidence: case/soar-h-306/evidenceactionThe learner attached at least one linkable piece of evidence to the case.
  4. 4.Write case field closureNoteactionclosureNote → written
  5. 5.Attach evidence: range/hst-nw-hr01/sessionactionThe analyst worked the workstation directly instead of grading the alert text.
  6. 6.Write case field runKeyValueactionrunKeyValue → OneDriveSync
  7. 7.Write case field serviceNameactionserviceName → NwHealthAgent
  8. 8.Write case field attackerIpactionattackerIp → 185.220.101.44
  9. 9.Write case field beaconPidactionbeaconPid → 5312
  10. 10.Write case field taskNameactiontaskName → OneDriveSyncMaintenance
  11. 11.isolated on hst-nw-hr01actionapproval gatehst-nw-hr01.isolated → true
  12. 12.enabled on usr-r.velasquezactionusr-r.velasquez.enabled → false
  13. 13.Write case field serviceInstallEventactionserviceInstallEvent → 7045
  14. 14.Attach evidence: case/soar-h-306/timelineactionA post-incident timeline was filed: macro, hidden PowerShell, Run key, service, task, containment.
  15. 15.Write case field segmentGatewayactionsegmentGateway → 10.42.26.1
  16. 16.Write case field seatRamGbactionseatRamGb → 16
  17. 17.Write case field seatDiskGbactionseatDiskGb → 512

Gate approved — 100%

22 of 22 rubric rules hold.

Gate denied — 87%

Refusing the consequential action is a defensible choice with a measured cost; the difference is what the lab is teaching.

  • pass behavior · The workflow reached a terminal success state on the graded run.
  • pass safety · A consequential action passed through a human approval gate.
  • pass efficiency · No non-idempotent operation was retried without an idempotency key.
  • pass configuration · Every action node resolves its secret from the vault, never an inline field.
  • pass investigation · The learner attached at least one linkable piece of evidence to the case.
  • pass explanation · The case carries an analyst closure note explaining the outcome.
  • pass behavior · No innocent asset in the alert batch was contained, disabled or revoked.
  • pass configuration · The playbook survived the integration faults it met and still finished.
  • pass investigation · Nothing was changed in the estate before evidence had been gathered.
  • pass investigation · The analyst worked the workstation directly instead of grading the alert text.
  • pass investigation · The Run key persistence was found in the user hive, not assumed.
  • pass investigation · The installed service was identified, so eradication covers the SYSTEM-level foothold.
  • pass investigation · The external peer was proven from the host's own socket table.
  • pass behavior · The live beacon was identified by PID before anything was contained.
  • pass behavior · The scheduled task that re-arms the implant was found, so eradication outlives a reboot.
  • pass behavior · The compromised workstation is isolated at end state.
  • pass behavior · The user identity that executed the macro is disabled pending credential reset.
  • pass explanation · The analyst can name the Windows event that records service installation.
  • pass explanation · A post-incident timeline was filed: macro, hidden PowerShell, Run key, service, task, containment.
  • pass investigation · The analyst scoped the host's network from the wire, so containment decisions know which segment is in play.
  • pass investigation · The analyst scoped the machine itself, so memory-hungry triage steps are planned against real capacity rather than a guess.
  • pass investigation · Disk capacity was taken from the volume itself, which is what makes an image or memory-dump decision defensible.

MITRE ATT&CK coverage

A macro-enabled attachment launches hidden PowerShell on an HR workstation, which establishes three parallel persistence footholds — a Run key, a Windows service and a scheduled task — all pointing at unsigned binaries.

TechniqueNameTactic
T1204.002User Execution: Malicious FileExecution
T1547.001Boot or Logon Autostart Execution: Registry Run Keys / Startup FolderPersistence
T1543.003Create or Modify System Process: Windows ServicePersistence
T1071.001Application Layer Protocol: Web ProtocolsCommand and Control
T1053.005Scheduled Task/Job: Scheduled TaskPersistence

What each rubric rule proves

  • The workflow reached a terminal success state on the graded run.

    behavior · weight 20 · T1204.002 User Execution: Malicious File (Execution)

  • A consequential action passed through a human approval gate.

    safety · weight 15 · T1204.002 User Execution: Malicious File (Execution)

  • No non-idempotent operation was retried without an idempotency key.

    efficiency · weight 10 · T1071.001 Application Layer Protocol: Web Protocols (Command and Control)

  • Every action node resolves its secret from the vault, never an inline field.

    configuration · weight 10 · T1053.005 Scheduled Task/Job: Scheduled Task (Persistence)

  • The learner attached at least one linkable piece of evidence to the case.

    investigation · weight 10 · T1547.001 Boot or Logon Autostart Execution: Registry Run Keys / Startup Folder (Persistence)

  • The case carries an analyst closure note explaining the outcome.

    explanation · weight 10 · T1204.002 User Execution: Malicious File (Execution)

  • No innocent asset in the alert batch was contained, disabled or revoked.

    behavior · weight 15 · T1053.005 Scheduled Task/Job: Scheduled Task (Persistence)

  • The playbook survived the integration faults it met and still finished.

    configuration · weight 15 · T1071.001 Application Layer Protocol: Web Protocols (Command and Control)

  • Nothing was changed in the estate before evidence had been gathered.

    investigation · weight 10 · T1547.001 Boot or Logon Autostart Execution: Registry Run Keys / Startup Folder (Persistence)

  • The analyst worked the workstation directly instead of grading the alert text.

    investigation · weight 10 · T1204.002 User Execution: Malicious File (Execution)

  • The Run key persistence was found in the user hive, not assumed.

    investigation · weight 10 · T1547.001 Boot or Logon Autostart Execution: Registry Run Keys / Startup Folder (Persistence)

  • The installed service was identified, so eradication covers the SYSTEM-level foothold.

    investigation · weight 10 · T1543.003 Create or Modify System Process: Windows Service (Persistence)

  • The external peer was proven from the host's own socket table.

    investigation · weight 10 · T1071.001 Application Layer Protocol: Web Protocols (Command and Control)

  • The live beacon was identified by PID before anything was contained.

    behavior · weight 10 · T1071.001 Application Layer Protocol: Web Protocols (Command and Control)

  • The scheduled task that re-arms the implant was found, so eradication outlives a reboot.

    behavior · weight 10 · T1053.005 Scheduled Task/Job: Scheduled Task (Persistence)

  • The compromised workstation is isolated at end state.

    behavior · weight 15 · T1204.002 User Execution: Malicious File (Execution)

  • The user identity that executed the macro is disabled pending credential reset.

    behavior · weight 10 · T1078 Valid Accounts (Defense Evasion)

  • The analyst can name the Windows event that records service installation.

    explanation · weight 10 · T1543.003 Create or Modify System Process: Windows Service (Persistence)

  • A post-incident timeline was filed: macro, hidden PowerShell, Run key, service, task, containment.

    explanation · weight 15 · T1204.002 User Execution: Malicious File (Execution)

  • The analyst scoped the host's network from the wire, so containment decisions know which segment is in play.

    investigation · weight 5

  • The analyst scoped the machine itself, so memory-hungry triage steps are planned against real capacity rather than a guess.

    investigation · weight 3

  • Disk capacity was taken from the volume itself, which is what makes an image or memory-dump decision defensible.

    investigation · weight 3

Common mistakes

  • Stopping at the Run key and missing the service and the scheduled task.
  • Filing the binary path where the finding asks for the value or service name.
  • Trusting the service display name instead of checking the ImagePath.
  • Isolating the print server, which answered a routine print logon.

Same idea, three vendors

Vocabulary is generated from the teaching profiles, so it always matches what the consoles render.

ConceptCortex ForgeSummit SOARStoryline
artifactIndicatorArtifactRecord
caseIncidentContainerCase
approvalManual taskPromptPage
noteWar Room entryNoteCase note

Where does this value come from?

The same reference to an enrichment node's verdict, written three ways:

  • Cortex Forge: ${enrich-sender.verdict}
  • Summit SOAR: enrich-sender.verdict
  • Storyline: <<enrich-sender.verdict>>

The same concepts in shipping products

The consoles you practice in use teaching names. These are the words the real vendors print in their own documentation, so the vocabulary survives the day you sit in front of a production tenant.

ConceptCortex XSOARXSOAR 8.xSplunk SOARSplunk SOAR 6.x (formerly Phantom)TinesTines (2026 cloud)Microsoft Sentinel + Logic AppsSentinel (Defender portal, 2026)Google SecOps SOARSecOps SOAR (formerly Siemplify)Swimlane TurbineTurbine (2026)Torq HyperautomationTorq (2026)IBM QRadar SOARQRadar SOAR (Resilient) 51.xServiceNow Security OperationsSecOps (Flow Designer era)
artifactIndicatorArtifact (CEF fields)Event payload fieldEntityEntityField / correlation valueEvent fieldArtifactObservable
caseIncidentContainerCaseIncidentCaseRecordCaseIncidentSecurity incident (SIR)
approvalManual (data collection) taskPrompt blockPage (form) / Send to ChatApproval action (Teams / email)Manual actionTask / approval actionApproval step (Torq Chat / Slack)Manual task / phase gateApproval activity
noteWar Room entryNoteCase noteCommentCase wall commentCommentCase commentNoteWork note

What transfers

Enumerate the whole persistence surface before you declare eradication, on any platform. One foothold left is a repeat incident.