Sub topic 12
The seven-step malware removal process
This chapter assumes you know the common malware types (viruses, trojans, ransomware, spyware) and can use Windows Settings, Task Manager, and Safe Mode. The A+ Core 2 (220-1102) exam expects you to put the seven steps of malware removal in order and to pick the right step when a scenario describes a half-finished cleanup. The order matters because each step protects the next one.
The seven steps at a glance
CompTIA lists the best practice procedure for malware removal in this order:
- Investigate and verify malware symptoms.
- Quarantine the infected systems.
- Disable System Restore in Windows.
- Remediate the infected systems: update anti-malware software, scan and use removal techniques (Safe Mode, pre-installation environment).
- Schedule scans and run updates.
- Enable System Restore and create a restore point in Windows.
- Educate the end user.
A common memory aid is to read it as a story. You confirm the problem, stop it from spreading, remove the safe-harbor for malware, clean, keep watch, restore your safety net, and teach the user.
Step 1: Investigate and verify malware symptoms
Before you change anything, confirm that malware is the actual cause. Pop-ups, slow performance, and redirects can also come from a failing drive, low memory, or a misconfigured browser. This step follows the general troubleshooting method: identify the problem, gather information, and question the user.
Useful checks at this stage:
- Ask what changed. Did the user install software, open an attachment, or visit a new site shortly before the symptoms began?
- Look for symptoms covered in earlier chapters: unexpected pop-ups, browser redirects, certificate warnings, disabled antivirus, renamed or missing files, and high CPU or network use.
- Open Task Manager to see which process uses resources. Use
netstat -anoto match a suspicious remote connection to a process ID.
netstat -anoThe last column is the process ID (PID). Look the PID up on the Details tab of Task Manager to find the owning program.
You are verifying, not removing. Deleting files at this point can destroy evidence and may not fix the real problem.
Step 2: Quarantine the infected systems
Quarantine means isolating the system so the malware cannot spread to other devices or send data out. Do this as soon as you confirm infection.
Practical ways to quarantine:
- Unplug the Ethernet cable.
- Turn off Wi-Fi and Bluetooth.
- Move the device to an isolated network segment if your organization provides one.
- Disconnect or avoid removable media, which can carry the infection to other machines.
Quarantine also covers the people and devices around the system. Check other machines that the infected system recently shared files or a network with, because they may already be infected.
A related meaning of "quarantine" appears in anti-malware software, which can move a detected file to a protected folder where it cannot run. The exam step refers to isolating the whole system, not a single file.
Step 3: Disable System Restore in Windows
System Restore keeps restore points: snapshots of system files, drivers, and registry settings. Malware that is on the computer when a restore point is created is saved in that point. Later, restoring to that point could bring the malware back, and anti-malware tools usually cannot clean files inside the protected restore data.
So you turn System Restore off before cleaning. Turning it off also deletes the existing restore points, which removes the infected snapshots.
To disable it in Windows:
- Open System Properties and select the System Protection tab.
- Select the system drive and choose Configure.
- Select Disable system protection and apply.
The consequence is that you lose all earlier restore points. That is acceptable here because any of them may contain the malware.
Step 4: Remediate the infected systems
Remediation is the actual removal. It has three parts.
Update the anti-malware software
Scanners detect threats using signature and behavior definitions. An old definition set may miss the malware. Because the system is quarantined and offline, download updates on a clean computer and transfer them with removable media, or briefly reconnect only if your policy allows.
Scan and remove
Run a full scan and let the tool remove or quarantine what it finds. If the malware blocks the scanner, defends itself, or restarts after removal, use these techniques:
- Safe Mode. Windows loads only the core drivers and services, so most malware that starts through normal startup entries does not run. Scanning here is often more effective.
- Pre-installation environment (WinPE). Boot from removable media such as a rescue disc or USB drive. The infected operating system is not running at all, so the malware cannot hide or defend itself. This is the stronger option for rootkits and boot sector viruses.
- Safe Mode with Networking only when you need to download definitions, and only after weighing the risk of reconnecting.
Repair damaged files
Malware can alter protected Windows files. After removal, check them with System File Checker from an elevated command prompt.
sfc /scannowIf a threat modified the hosts file to redirect websites, inspect it too.
type %SystemRoot%\System32\drivers\etc\hostsRemove any entries that you do not recognize. The default hosts file contains only comments, and sometimes a localhost line.
If the damage is too deep, the best remediation may be to back up the user's data after scanning it, wipe the drive, and reinstall the operating system. Treat this as a last resort because it causes data loss.
Step 5: Schedule scans and run updates
After the system is clean, set it up to stay clean:
- Schedule regular anti-malware scans, for example a weekly full scan and daily quick scans.
- Run Windows Update and update the applications that the malware may have exploited, such as browsers and plug-ins.
- Confirm that real-time protection is on and definitions update automatically.
An unpatched vulnerability is a common way malware gets in. If you skip updates, the system can be reinfected the same way.
Step 6: Enable System Restore and create a restore point
Now that the system is clean, turn System Protection back on and create a new restore point. The new point is a known-good snapshot. If a future problem occurs, the technician can roll back to a clean state.
The order is the reason for the exam question. Enabling System Restore before the system is clean would save infected files into new restore points. Do it only after remediation and updates are finished.
Step 7: Educate the end user
Most infections begin with a human action: opening an attachment, clicking a link, installing a fake program, or using an unknown USB drive. Teach the user what happened and how to avoid it.
Good topics include:
- Recognizing phishing emails and suspicious links.
- Installing software only from trusted sources.
- Not plugging in unknown removable drives.
- Reporting pop-ups, fake security warnings, and odd behavior quickly instead of ignoring them.
- Keeping software updated and not disabling anti-malware protection.
Documenting what you found and fixed also belongs with this final step, since it helps the next technician and supports the organization's policies.
Why the order matters
| Step | If you skip or reverse it |
|---|---|
| Investigate | You may "fix" a problem that is not malware and miss the real fault. |
| Quarantine | Malware spreads to other devices or keeps contacting its controller. |
| Disable System Restore | Infected restore points can bring the malware back. |
| Remediate | The infection stays in place. |
| Schedule scans and update | The system is reinfected through the same hole. |
| Enable System Restore | You have no clean rollback point. |
| Educate | The user repeats the behavior that caused the infection. |
Edge cases and exam traps
- Restore points and "clean" scans. A scan cannot reliably clean malware inside restore data, so disabling System Restore is not optional, even if the scan looks complete.
- Safe Mode does not always work. Some malware survives Safe Mode. Move to a pre-installation environment before reaching for a reinstall.
- Quarantine is not deletion. Isolating the system does not remove the malware. You still must remediate.
- Do not skip ahead. If a scenario says the technician has already run a scan and the system is clean, the next step is scheduling scans and updates, not another scan.
- Ransomware. Quarantine immediately, since it can spread to network shares. Restoring from a clean backup is often the only recovery path. Do not assume that cleaning the malware decrypts the files.
- Non-Windows systems. The System Restore steps apply to Windows. The rest of the sequence still applies as a general approach.
- Best answer wording. When two choices both sound reasonable, choose the one that is the earliest unfinished step and avoids needless data loss. Wiping the drive is rarely the best first move.
Worked example
A user reports that their laptop shows constant pop-ups and the browser opens unknown sites. The antivirus icon is missing from the taskbar.
- Investigate. You confirm the symptoms, ask the user about recent downloads, and find an unfamiliar program running in Task Manager.
netstat -anoshows a connection to an unknown remote address owned by the same process. - Quarantine. You unplug the network cable and turn off Wi-Fi.
- Disable System Restore. You turn off System Protection on the system drive.
- Remediate. You copy the latest definitions to a USB drive from a clean computer. The scanner will not run in normal mode, so you boot into Safe Mode and scan. It finds and removes two items. You run
sfc /scannowand fix the hosts file. - Schedule scans and update. You install pending Windows updates and set a weekly full scan.
- Enable System Restore. You turn System Protection on and create a new restore point.
- Educate. You explain that the infection came from a free program bundled with an installer, and you show the user how to find trusted download sources.
Exercise
A technician has confirmed that a Windows PC is infected and has disconnected it from the network. What should the technician do next, and why must it happen before running the anti-malware scan?
Show answer
Disable System Restore (step 3). Restore points can contain copies of the malware, and anti-malware tools usually cannot clean them. If the technician cleans first and leaves System Restore on, a later restore could bring the infection back. Disabling it also deletes the existing, possibly infected, restore points.
Exercise
A scan has removed all detected malware from a PC, and the technician has applied Windows updates and set up weekly scans. Which step comes next, and which step follows it?
Show answer
Next is step 6, enabling System Restore and creating a new restore point. After that comes step 7, educating the end user.
Exercise
An anti-malware scanner will not start on an infected PC in normal mode. The technician tries Safe Mode, but the malware still interferes. What is the best next option before wiping the drive?
Show answer
Boot into a pre-installation environment from removable media, such as a rescue disc or USB drive, and scan from there. The infected operating system is not running, so the malware cannot block the scan. Wiping the drive causes needless data loss.