Skip to content

Known Clean Rebuild

github-actions[bot] edited this page Nov 29, 2026 · 1 revision

Last reviewed: 2026-11-29 (assembled from NIST and CISA guidance; the restore-verification step is the only part exercised, in the backup & restore lab)

Prerequisites: Recovery index ยท Recovery dependency mapping ยท Destructive-event evidence collection

๐ŸŽฏ Purpose

Describe how to rebuild affected systems from sources you can trust, and what to check before a rebuilt or restored system is allowed back into production.

โš™๏ธ Function

Separates the three things that come back during a rebuild (the platform, the application, and the data), names the trusted source for each, and lists the gate checks the standards require before production use.

๐Ÿ† Goal

No restored system reintroduces the attacker's code, accounts or persistence, and each system's return to production is confirmed by its owner and recorded.

๐Ÿ“‹ When To Use

  • After containment and eradication, when the recovery plan moves from "stop the damage" to "bring services back".
  • When preparing golden images, IaC templates and offline software copies in advance.

๐Ÿงฑ Trusted Sources

Layer Trusted source Guidance
Operating system & base software Golden images CISA: "Maintain and regularly update 'golden images' of critical systems", that is, image templates with a preconfigured OS and applications [CPG 2.O]
Cloud resources Infrastructure as code (IaC) CISA: use IaC "and keep backups of template files offline to quickly redeploy resources. IaC code should be version controlled and changes to the templates should be audited."
Installers & licences Offline copies CISA: "Store applicable source code or executables with offline backups (as well as escrowed and license agreements)", because some images will not install on different hardware
Data Verified pre-event backup See backup isolation & restore testing

NIST SP 800-209 RA-SS-R9 explains why data and application are separate layers: the data should be separated from the application "to allow for the data to be restored without restoring infected code or software."

๐Ÿ” Rebuild Sequence

CISA #StopRansomware Guide, Part 2, steps 16 to 19 (paraphrased; quotes marked):

  1. Rebuild by priority. "Rebuild systems based on prioritization of critical services (e.g., health and safety or revenue-generating services), using pre-configured standard images, if possible. Use infrastructure as code templates to rebuild cloud resources."
  2. Reset credentials and close gaps after the rebuild. Issue password resets for all affected systems and accounts, remove or remediate malicious persistence, patch, and "Update customer-managed encryption keys as needed", once the environment has been fully cleaned and rebuilt.
  3. Declare the incident over on criteria. "The designated IT or IT security authority declares the ransomware incident over based on established criteria". Record the criteria and the decision; see decision records.
  4. Reconnect and restore data. "Reconnect systems and restore data from offline, encrypted backups based on a prioritization of critical services." If a recovery VLAN is used, "ensure only clean systems are added."

Use the order from your dependency map; for directory services follow identity & DNS recovery.

โœ… Gate Checks Before Production

Check Source
Restoration assets checked "for indicators of compromise, file corruption, and other integrity issues before use" NIST SP 800-61r3, RC.RP-03 R1
Restored assets checked "for indicators of compromise", and "the root causes of the incident" remediated "before production use"; correctness verified before the system goes online NIST SP 800-61r3, RC.RP-05 R1 and R2
"Ensure that recovered executables, applications, containers, and OS images are free from infection prior to deploying them in production." NIST SP 800-209, IR-SS-R3
Recovery copies of mission-critical information scanned "with various anti-malware scanning tools"; if only a subset can be scanned, record which NIST SP 800-209, RA-SS-R11
Essential services restored in the appropriate order, system owners confirm successful restoration, restored systems monitored NIST SP 800-61r3, RC.RP-04
Files restored match a pre-event hash manifest Worked example: the lab's restore-pre-event-snapshot case (10 of 10 SHA-256 matches)

Warning

A clean image restored into an environment where the attacker still holds credentials is not clean for long. Credential resets (step 2) and the identity steps in identity & DNS recovery belong before production reconnection, not after.

๐Ÿ“ Per-System Record

Field Example (illustrative)
System app01.corp.example.test
Image / template and version Golden image ID and the date it was last updated
Data restore point Snapshot ID and its timestamp, chosen as the last one before the event
Integrity checks run Hash manifest comparison, malware scan, configuration review
Credentials rotated Local admin, service accounts, keys
Owner confirmation Name, date and time
Monitoring in place Detections enabled for the rebuilt host

See also

Related Files


โฌ…๏ธ Recovery index | Incident Response index | Master Index | ๐ŸŽฏ Role Navigation | Legal Notice


๐Ÿ“„ Source: IncidentResponse/Recovery/known-clean-rebuild.md | โœ๏ธ Suggest an edit | โฌ…๏ธ Back to Incident Response

Clone this wiki locally