Azure AZ-801 study materials
Azure AZ-801 study resources

Recovering a Domain After Ransomware Encrypts a DC

Azure AZ-801 · Put your knowledge to work in context.

All case studies

Recovering a Domain After Ransomware Encrypts a DC

Northwind has three domain controllers: DC1 (PDC emulator, in HQ), DC2 (in a branch office), and DC3 (virtual, on a host in HQ). Ransomware encrypted DC1 and DC3 last Tuesday at 02:00. DC2 was offline for patching and survived, but it has not replicated since Monday 18:00. System State backups exist: a daily backup at 23:00 to a tape library, and an offline copy from Sunday 23:00 stored offsite. The forest functional level is Windows Server 2016; all DCs run Server 2022. The business needs authentication restored within 4 hours and wants to know whether a forest recovery is required.

1. Is a full forest recovery required? Justify the decision using the state of DC2 and the backup options.

Read the worked answer

A full forest recovery is not automatically required - but it depends on whether DC2 holds clean, authoritative data.

DC2 was offline and has not replicated since Monday 18:00, which is before the Tuesday 02:00 encryption. That means DC2's database does not contain any changes the ransomware made to AD (if it made any). If the compromise was limited to file encryption on DC1/DC3 and did not alter AD objects, DC2 is a clean survivor and can be promoted as the authoritative source: seize the FSMO roles (especially PDC emulator, RID master, and Infrastructure master) to DC2, metadata-clean DC1 and DC3, then rebuild them and let them replicate from DC2. That is a domain/DC recovery, not a forest recovery, and fits the 4-hour window.

A forest recovery becomes mandatory if: DC2 is also suspect (e.g., it received malicious changes before going offline), the schema or configuration partition was altered, or no clean DC exists. In that case you restore the Sunday offsite System State to an isolated DC, set it authoritative, and rebuild the forest.

Decision rule: verify DC2's replication watermark and check for unauthorized AD changes; if clean, recover to DC2. If not, forest recovery from the Sunday offsite copy - which costs the Monday changes but is the only trustworthy baseline.

2. If DC2 is chosen as the recovery source, list the ordered steps and the risk of using the Tuesday 23:00 tape backup instead.

Read the worked answer

Ordered steps.

  1. Isolate DC2 from the compromised network; confirm it is clean (check for rogue accounts, GPO changes, SYSVOL modifications).
  2. On DC2, seize FSMO roles with ntdsutil → roles → seize (PDC, RID, Infrastructure, Schema, Domain Naming).
  3. Metadata-clean DC1 and DC3 (ntdsutil → metadata cleanup), and remove their DNS records and replication links.
  4. Reset the krbtgt password twice (two resets, separated by at least one replication cycle) to invalidate any Kerberos tickets the attacker may hold.
  5. Rebuild DC1 and DC3 from clean media, join, promote, and verify replication and SYSVOL.
  6. Restore business data from clean backups; rotate privileged credentials.

Risk of the Tuesday 23:00 tape. That backup was taken after the 02:00 encryption, so it likely contains the compromised state - restored DCs would reintroduce the attacker's persistence. It also lacks Monday's changes, so it is both less current and less trustworthy. The Sunday offsite copy predates the incident and is the safe baseline; the Tuesday tape should be treated as evidence, not a restore source.

3. What should be changed so the next incident meets the 4-hour RTO, given the current backup cadence?

Read the worked answer

Close the gaps that made recovery slow and uncertain.

  • Add a clean, isolated DC. A DC that is offline or in a protected segment (not reachable from production) gives a known-good authoritative source without a restore. This alone can cut recovery to minutes.
  • Shorten and verify backups. Daily 23:00 System State is fine, but the offsite copy is weekly (Sunday). Increase offsite frequency to daily and test restores quarterly - an untested backup is a hope, not a control.
  • Protect the backup path. The Tuesday tape was written after encryption began, meaning the backup system was reachable from the compromised network. Put backups on immutable/offline storage and separate credentials so ransomware cannot overwrite them.
  • Document and rehearse the forest-recovery plan. The 4-hour target fails on process time, not technology: seizing roles, cleaning metadata, and double-resetting krbtgt must be practiced.
  • Monitor for AD changes. Alert on new Domain Admin accounts, GPO modifications, and krbtgt resets so tampering is caught before it becomes a recovery event.