How to Completely Remove a Trojan, Virus, Worm or Other Malware

To remove malware, disconnect the computer from the internet, back up your personal files (not programs), and run a full offline scan with Microsoft Defender Offline, which starts before Windows loads so malware cannot hide. Follow with a second-opinion scan such as Microsoft Safety Scanner, review startup programs with Sysinternals Autoruns, and update Windows and all apps.

Jul 15, 2025 - 15:27
Updated: 
105.5k

Cyber Threats, Scams & Online Safety in Cybersecurity & Ethical Hacking · Tutorial

How to Completely Remove a Trojan, Virus, Worm or Other Malware

Quick answer: To remove malware, disconnect the computer from the internet, back up your personal files (not programs), and run a full offline scan with Microsoft Defender Offline, which starts before Windows loads so malware cannot hide. Follow with a second-opinion scan such as Microsoft Safety Scanner, review startup programs with Sysinternals Autoruns, and update Windows and all apps. Then change your important passwords from a different, clean device and turn on multi-factor authentication. If infection persists, or it is ransomware, a rootkit or a banking trojan, the only fully reliable fix is to reset or reinstall the operating system.

Key takeaways

  • Disconnect first to stop data theft and spreading.
  • Offline scanning catches malware that hides while Windows is running.
  • Assume passwords used on the infected device are stolen.
  • A clean reinstall is the only guaranteed removal for serious infections.
  • Back up documents and photos, never executables, before cleaning.

Table of Contents

How Do You Know a Computer Is Infected?

  • Security software disabled or unable to update.
  • New browser extensions, changed home page or constant pop-ups.
  • Unknown programs at startup, high CPU or network use when idle.
  • Friends receive messages you did not send; accounts show unknown logins.
  • Files renamed or encrypted with a ransom note (ransomware).

Do Trojans, Viruses and Worms Need Different Removal?

TypeHow it spreadsRemoval notes
TrojanDisguised as legitimate softwareOften installs backdoors; change all passwords
VirusAttaches to filesInfected files may need restoring from backup
WormSpreads over networks by itselfIsolate the device; check others on the network
RootkitHides deep in the systemOffline scan or reinstall
RansomwareEncrypts filesIsolate, report, restore from backup; reinstall

The basic procedure is the same for all; the difference is how much you must clean up afterwards. NIST SP 800-83 describes malware incident handling for organisations.

What Are the Removal Steps on Windows?

  1. Disconnect Wi-Fi and Ethernet.
  2. Back up documents and photos to an external drive. Do not copy programs or downloads.
  3. Run Defender Offline: Windows Security, Virus and threat protection, Scan options, Microsoft Defender Offline scan. The PC restarts and scans.
  4. Get a second opinion with Microsoft Safety Scanner, downloaded on a clean device if needed.
  5. Remove unknown programs and browser extensions.
  6. Update Windows, browsers and all applications.
# Start a full Defender scan from an administrator PowerShell window
Start-MpScan -ScanType FullScan

# Start an offline scan (the PC will restart)
Start-MpWDOScan

# See what Defender found
Get-MpThreatDetection | Select-Object ThreatID, ActionSuccess, Resources

How Do You Check for Leftover Startup Entries?

Autoruns from Microsoft Sysinternals lists everything that starts automatically. Use Options, Hide Microsoft Entries, then look for unsigned entries in odd folders such as AppData or Temp. Untick suspicious entries rather than deleting them, so you can undo a mistake.

When Should You Reset or Reinstall?

  • The infection returns after cleaning.
  • Scanners report a rootkit or cannot remove a threat.
  • It is ransomware or a remote access trojan.
  • The device is used for banking or work and you cannot be sure it is clean.

Use Windows' "Reset this PC" with "Remove everything", or a clean reinstall from Microsoft's media as described in Microsoft's reinstall guide. Scan your backups before restoring them.

What About macOS and Android?

macOS includes XProtect, which detects and removes known malware automatically (Apple Platform Security). Remove unknown apps, login items and profiles in System Settings, and update macOS. On Android, boot into safe mode, uninstall suspicious apps, revoke Device Admin and Accessibility access for unknown apps, and run Google Play Protect; factory reset if problems continue. CERT-In's Cyber Swachhta Kendra lists free cleaning tools for Indian users.

What Should You Do After Cleaning?

  1. Change passwords for email, banking and social accounts from a clean device.
  2. Turn on multi-factor authentication.
  3. Check bank statements and email forwarding rules.
  4. Keep automatic updates and real-time protection on.
  5. Report fraud at cybercrime.gov.in or call 1930 in India.

Related: protecting your data from ransomware and avoiding phishing emails. WebAsha offers malware analysis training.

What Should a Business Do Differently?

On a company device, do not clean it yourself. Report to IT or the security team, because the infection may be part of a wider intrusion.

  1. Isolate the device using EDR network containment rather than wiping it straight away.
  2. Collect evidence: alerts, memory and disk images where needed.
  3. Check other devices for the same indicators.
  4. Reset the user's credentials and revoke sessions.
  5. Rebuild from a known-good image.
  6. Report to CERT-In within six hours if the incident is a reportable type.

NIST SP 800-61 Rev. 3 describes incident response for organisations, and CISA's StopRansomware site has ransomware-specific guidance.

References

Frequently Asked Questions

Disconnect the device from the internet to stop data theft and spreading, then back up your personal files.

A scan that restarts the PC and runs before Windows loads, so malware that hides while Windows runs can be found.

Not always. Rootkits, ransomware and some remote access trojans may need a full reset or reinstall to be sure.

Yes. Change important passwords from a different clean device and turn on multi-factor authentication for those accounts.

Reset with Remove everything usually works, though firmware-level malware is rare and may need specialist help.

Use Microsoft Sysinternals Autoruns, hide Microsoft entries, and look for unsigned items running from AppData or Temp folders.

Yes. macOS has built-in XProtect, but users should still remove unknown apps and login items and keep macOS updated.

Report financial fraud at cybercrime.gov.in or call 1930, and use CERT-In Cyber Swachhta Kendra tools for cleaning.

What's Your Reaction?

Like Like 0
Dislike Dislike 0
Love Love 0
Funny Funny 0
Wow Wow 0
Sad Sad 0
Angry Angry 0
Vaishnavi

Vaishnavi is a skilled tech professional at the Ethical Hacking Training Institute in Pune, responsible for managing and optimizing the technical infrastructure that supports advanced cybersecurity education. With deep expertise in network security, backend operations, and system performance, she ensures that practical labs, online modules, and assessments run smoothly and securely. Her behind-the-scenes contributions play a vital role in delivering a seamless and secure learning experience for aspiring ethical hackers.