Post-Incident Malware Scrub
This guide covers the systematic removal of malware following a cyber incident — including evidence collection before remediation, where to look for persistence mechanisms on maritime OT workstations, the data sanitisation workflow, and post-scrub verification. Under IACS UR E26 §4.5.1.2, recovery actions must not inadvertently destroy evidence. This means collection always precedes remediation.
Malware often uses “Living off the Land” techniques — hiding inside legitimate Windows tools, startup scripts, or scheduled tasks rather than obvious executable files. Re-importing backed-up data without scrubbing can cause an immediate re-infection loop. The scrub procedure must be thorough and must follow a specific sequence: collect evidence first, then remediate, then verify.
Step 1 — Evidence collection before any scrubbing
Per E26 §4.5.1.2, this step must happen before any file deletion or system wipe. Evidence collected here feeds the Post-Incident Debriefing and supports insurance and Class documentation.
netstat -an in CMD and save the output. This captures RAM-resident malware before shutdown.Step 2 — Where to look for persistence mechanisms
On maritime Windows CBS workstations, malware commonly hides in these locations. Check every location on every affected system — do not assume that removing the obvious payload is sufficient.
C:\Users\[user]\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup
schtasks /query /fo LIST /v | more
sc query type= all state= all
HKCU\Software\Microsoft\Windows\CurrentVersion\Run
HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
Maritime-specific risk: OEM vendor scripts and PLC configuration tools are sometimes installed directly in startup locations for convenience during commissioning and never removed. Before flagging an entry as malicious, confirm with the OEM whether it is a legitimate installer left behind. Document the confirmation in the scrub log either way.
Step 3 — Sandbox scan method
Never scan backup data or recovered files on the live OT network. Use an isolated standalone scanning station — a dedicated laptop in the ETO office — completely disconnected from all vessel networks.
Dual-engine scan
Use two different AV engines. One signature-based for known malware families, one behavioural/heuristic to catch zero-day variants and fileless malware. Single-engine scans miss behavioural threats that have no known signature.
Macro and script inspection
Disable macros in all recovered Office documents before scanning. Any macro-enabled file (.xlsm, .docm) used on CBS workstations must be manually inspected by shore-side IT or OEM before being returned to service.
Step 4 — Data sanitisation workflow
Follow this sequence for every piece of data returning to the OT network after an incident. Do not skip steps under time pressure — an incomplete scrub is worse than a delayed return to service.
.exe .bat .ps1 .vbs .wsf .js .docm .xlsm .cmd .msi .dll. Any file with these extensions requires individual inspection before return to service — not just an AV scan.Evidence log — malware scrub record
Every identified and actioned file must be logged. This record is submitted with the Post-Incident Review report and retained in the vessel’s SMS records.
OEM coordination note
When restoring PMS, AMS, or SCADA historian databases, coordinate with the OEM before re-importing. They can often provide a clean verification script to check data structure integrity. Do not re-import OEM-proprietary database files without OEM guidance — a corrupted configuration file can cause a CBS to behave unexpectedly weeks after recovery with no obvious link to the original incident.
Document all OEM communications during the scrub — including the date, name of OEM contact, and any guidance received. This documentation is part of the evidence package for Class and insurance.
The specific regulatory requirements this playbook satisfies. Use these references when preparing for Class survey or responding to a surveyor's checklist.
