Forum Discussion
Restored a Windows Server after an incident: what do you check before it rejoins the domain?
Say a server was restored from a backup after an incident and it's about to go back on the domain. What do you check first? I'm thinking about persistence that could ride along in the image, like scheduled tasks, new services, local admin accounts, and GPO or startup script changes. Do you keep it isolated and diff it against a known baseline, or is it more manual review? Curious what your order of checks looks like. Disclosure: I work on CyberSnap, which scans snapshots for signs of compromise.
4 Replies
- WinEndpointOpsIron Contributor
My order, assuming the restore point may not be fully clean:
- Keep it isolated first (separate VLAN or NIC disconnected). Do not let it talk to the domain until the checks are done. It can also carry a stale machine account password.
- 2. Look at what runs on its own at boot: scheduled tasks that are not disabled, services and drivers with odd paths, Run and RunOnce keys, startup folders, and local GPO or startup scripts. WMI event subscriptions are easy to miss, so check root\subscription too (Get-CimInstance -Namespace root\subscription -ClassName __EventConsumer).
- 3. Local accounts and groups: members of local Administrators and Remote Desktop Users, new local users, and RDP or WinRM settings that changed.
- 4. Diff against a baseline, ideally a freshly built server of the same role: installed software, services, tasks, listening ports. That is quicker than reading everything by hand.
- 5. Rejoin carefully: reset the computer account or rejoin it as new, and rotate anything that lived on the box (local admin password, service account secrets, certificates). Assume those were exposed.
- 6. Find the earliest sign of the incident in the logs first and make sure the backup is from before it. Otherwise you may be restoring the foothold.
So it is both: baseline diff for speed, a manual pass for the spots a diff will not show, like WMI and GPO.
- UriShay-CyberSnapBrass Contributor
Good list, thanks. The WMI subscription point is easy to forget. One thing I'd add to the baseline diff step: if the incident had a long dwell time, even the newest restore point can already hold the attacker's persistence, so I'd mount each candidate in isolation and compare tasks, services and local admins across a few points rather than trusting the date alone. Whichever point shows the least drift against the rebuilt baseline is the recommended recovery point.
Disclosure: I work on CyberSnap, which scans existing snapshots for signs of compromise.
- adrelicata53Copper Contributor
Yes—keep the restored server isolated until it passes security validation. I would use a baseline comparison first, followed by manual investigation.
My checklist, in order:
1. Isolation: Keep it off the production network and disable domain connectivity.
2. Persistence checks: Review scheduled tasks, services, startup scripts, WMI subscriptions, and autoruns.
3. Accounts: Check local administrators, newly created accounts, and suspicious privilege changes.
4. Domain configuration: Review GPOs, logon scripts, Group Policy changes, and stored credentials.
5. Security checks: Scan for malware, suspicious binaries, web shells, and unexpected remote-access tools.
6. Baseline comparison: Compare registry, system files, services, configurations, and installed software against a known-good snapshot.
7. Credentials: Rotate potentially exposed credentials, service accounts, and machine secrets.
8. Reconnection: Rejoin production only after validation and security-team approval.
My recommendation: Combine automated snapshot diffing with manual investigation. A clean malware scan alone doesn't prove the server is safe.
The biggest thing is to establish whether the backup itself was taken before or after the initial compromise.
- StefanBlom44Tin Contributor
Yes. Keep the restored server isolated until you've verified it's clean. Don't reconnect it to the domain immediately.
I'd follow this order:
1. Verify the backup: Confirm it predates the incident and isn't already compromised.
2. Check persistence: Review scheduled tasks, Windows services, startup entries, WMI event subscriptions, and registry Run keys.
3. Review accounts: Check local administrators, unexpected users, privileged groups, and suspicious account changes.
4. Inspect Group Policy: Look for modified GPOs, logon scripts, startup scripts, and unexpected policy changes.
5. Check security: Review Defender status, exclusions, firewall rules, installed software, and security logs.
6. Compare baselines: Diff system configurations, services, accounts, scheduled tasks, and critical files against a known-good baseline.
7. Validate credentials: Rotate potentially exposed credentials, especially service account and administrative credentials.
8. Reconnect carefully: Only after investigation, patching, and security validation. Monitor authentication and endpoint activity closely.
My recommendation: Use automated baseline comparison for broad coverage, followed by manual investigation of suspicious differences.
One important point: If compromise is confirmed, rebuilding from trusted installation media is generally safer than trusting a restored image.
Golden rule: Restore data, not persistence.