Sub topic 10
The malware removal steps in order
This chapter assumes you can use Windows Settings, Control Panel and Safe Mode. It also assumes you know basic networking terms such as IP address, Wi-Fi and DNS, and that you know what antivirus software does. The earlier chapters on malware types and symptoms cover what you are removing. This chapter covers the order in which you remove it.
Why the order matters
CompTIA tests malware removal as a fixed seven-step sequence. Exam questions usually describe a situation and ask what to do next, or which step was skipped. Each step exists for a reason, and that reason lets you rebuild the order even if you forget the list.
The sequence is:
- Investigate and verify malware symptoms.
- Quarantine the infected systems.
- Disable System Restore in Windows.
- Remediate the infected systems: update the anti-malware software, then scan and remove using the appropriate techniques.
- Schedule scans and run updates.
- Enable System Restore and create a restore point in Windows.
- Educate the end user.
Step 1: Investigate and verify malware symptoms
Confirm that malware is the cause before you change anything. Pop-ups, a slow system, a hijacked browser home page, disabled security tools and unexpected network traffic can have other causes, such as a failing disk or a misconfigured proxy. Ask the user what changed, what they clicked and when the problem began. Then check the system.
On a Windows machine running Microsoft Defender, a quick status check is a good first look. It shows whether the antivirus service and real-time protection are running and how old the signatures are:
Get-MpComputerStatus | Select-Object AMServiceEnabled, AntivirusEnabled, RealTimeProtectionEnabled, AntivirusSignatureLastUpdatedMalware often turns off real-time protection or blocks updates. A protection setting that is off, or signatures that are weeks old, supports the diagnosis. It does not prove it. Keep gathering evidence.
Step 2: Quarantine the infected systems
Quarantine means isolating the system so the malware cannot spread or send data out. Disconnect the network cable, turn off Wi-Fi, and move the machine off the network. Disable Bluetooth and keep removable media out of the machine, because USB drives can carry the infection to other computers.
Quarantine comes second because every minute the system stays connected, a worm can spread and a trojan can contact its command server. You verify first, because isolating a healthy machine disrupts a user for no reason.
Do not confuse this with the antivirus "quarantine" feature, which moves a detected file to a locked folder. The exam step means isolating the whole machine.
Step 3: Disable System Restore in Windows
System Restore saves copies of system files and settings as restore points. Malware can hide inside those copies. If you leave System Restore on, a restore point containing the infection can survive your cleanup, and a later restore can bring the malware back. Also, anti-malware tools typically cannot clean files in the protected restore store.
Disable System Restore before you scan. You can do this from System Properties under the System Protection tab, where you select the drive and choose Configure, then Turn off system protection. Disabling it deletes the existing restore points. That is intended here.
Step 4: Remediate the infected systems
Remediation has two parts, and the order within it matters too.
Update the anti-malware software
Update first. An outdated scanner cannot detect new variants. If the quarantined machine has no network access, download the signature update on a clean computer and move it over on trusted media. This approach is a common exam answer for an isolated machine.
Update-MpSignature
Start-MpScan -ScanType QuickScanUpdate-MpSignature pulls the latest definitions. Start-MpScan -ScanType QuickScan scans the locations malware most often uses. Both commands need an elevated PowerShell window.
Scan and remove using the appropriate techniques
Pick the technique that matches how stubborn the malware is.
- Safe Mode. Windows loads only essential drivers and services, so many malware programs do not start. Scan from here when the infection fights the scanner or blocks normal removal.
- Pre-installation environment (WinPE or other bootable rescue media). You boot a clean operating system from USB or disc and scan the offline Windows installation. This is the right choice for rootkits and other malware that loads before or hides from the running OS. A boot sector virus is another case.
- Full scan. Run one when you need the whole disk checked, not just the common locations.
- Review detections. List what Defender found so you know what was removed and can note it in your ticket.
Get-MpThreatIf a system cannot be cleaned with confidence, or the damage is deep, reimaging or reinstalling from known-good media is a legitimate end point. Restore the user's data from a backup taken before the infection.
Step 5: Schedule scans and run updates
After cleanup, set the system up so that the next infection is caught early. Schedule regular scans and automatic signature updates. Run another full scan to confirm the system is clean, and apply operating system and application patches so the entry point the malware used is closed.
Start-MpScan -ScanType FullScanA full scan takes much longer than a quick scan, so scheduling it for off-hours is common practice. You can schedule scans in Defender settings or with Task Scheduler.
Step 6: Enable System Restore and create a restore point
Now that the system is clean, turn System Restore back on and create a fresh restore point. This gives you a known-good state to return to. It comes after remediation for the same reason that disabling it came before: you do not want an infected state saved as a restore point.
Step 7: Educate the end user
Last, explain what happened and how to avoid it. Cover the likely cause, such as a phishing link, a pirated download or an unpatched browser. Show the user how to spot the warning signs and whom to contact. User education closes the loop. Without it, the same user and the same habits produce the same infection.
Common mistakes and exam traps
| Situation in the question | Likely correct answer |
|---|---|
| A user reports pop-ups and a slow computer | Investigate and verify symptoms first |
| Malware is confirmed on a networked PC | Quarantine the system (disconnect it from the network) |
| The tech is about to scan, and System Restore is on | Disable System Restore first |
| The scanner has not been updated in weeks | Update anti-malware before scanning |
| Malware blocks the scanner from running | Boot into Safe Mode, or use a pre-installation environment |
| A rootkit is suspected | Scan from bootable rescue media |
| Cleanup is finished | Schedule scans, re-enable System Restore, create a restore point |
| Everything is clean and working | Educate the end user |
Exercises
Exercise
A technician has confirmed that a laptop is infected with a worm and has disconnected it from the network. What are the next two steps, in order, before running a scan?
Show answer
Disable System Restore, then update the anti-malware software. Quarantine is already done. System Restore is disabled so that infected restore points cannot survive the cleanup, and the signatures are updated so the scanner can detect current variants.
Exercise
A technician starts a scan on an infected PC, but the malware ends the scanner's process every time. Which technique should the technician try, and which step of the removal process is this?
Show answer
Reboot into Safe Mode and scan from there. If that fails, scan from a pre-installation environment on bootable media. Both techniques belong to step 4, remediate the infected system, under scanning and removal techniques.
Exercise
Put these actions in the correct order: educate the end user, quarantine the system, schedule scans and updates, investigate and verify symptoms, enable System Restore and create a restore point, remediate, disable System Restore.
Show answer
Investigate and verify symptoms; quarantine the system; disable System Restore; remediate; schedule scans and updates; enable System Restore and create a restore point; educate the end user.