Malware & ransomware

Trojan Horse Virus: What It Is, How It Works and How to Remove It

A Trojan horse virus does not break in — you let it in. Here is how the disguise works, what it does once it runs, and how to remove it safely.

Cysoro Security TeamPublished · 8 min read
MALWARE & RANSOMWARETrojan HorseVirusThe disguise is the attack — spot it before you run it.cysoro.com!.exehidden
Quick answer

A Trojan horse virus is malware disguised as legitimate software. It does not copy itself like a virus or worm; instead it tricks you into running it, then carries out a hidden malicious action such as stealing passwords, opening a backdoor for remote access, or downloading ransomware.

Key takeaways

  • A Trojan is defined by deception, not by what it does afterwards — the payload can be theft, spying, ransomware or a backdoor.
  • Trojans arrive through downloads, email attachments, fake updates and pirated software, and they need you to run them.
  • Remove one by disconnecting, running a full Microsoft Defender scan, then an offline scan, and changing passwords entered on the infected device.

A Trojan horse virus does not smash through your defenses. It walks through the front door, wearing a disguise you invited in — a free game, a software update, an invoice that looks routine. That is what makes it so effective, and so hard to spot until the damage is done.

What is a Trojan horse virus?

A Trojan horse virus is malware disguised as legitimate software. It looks like something useful or harmless — a free app, a document, a video player update — but it contains hidden code that performs a malicious action once you run it.

CISA defines it plainly: a Trojan horse is a computer program that is hiding a virus or other potentially damaging program, and it can be included in software you download for free or as an attachment in an email message. CISA's Virus Basics page is the clearest official starting point.

NIST describes it as a generally non-self-replicating type of malware that, when executed, carries out actions determined by the nature of the Trojan, typically causing loss or theft of data and possible system harm. You can read the full NIST definition for the technical wording.

The name comes from the Greek story of the wooden horse that hid soldiers inside it. The people of Troy wheeled the gift inside their walls themselves. Trojan malware works the same way: the victim does the installing.

Is a Trojan horse the same as a virus?

No, although people use the words interchangeably. A virus attaches itself to other files and copies itself when those files run or are shared. A worm copies itself across networks, often without any user action. A Trojan does neither — it relies on deception and on you running it.

TypeHow it spreadsCopies itself?Needs you to run it?
Trojan horseDisguised download, attachment or fake updateNoYes — always
VirusInfected files shared or openedYes, into host filesUsually
WormNetwork services, mass emailYes, as a standalone programOften no
RansomwarePhishing, stolen passwords, unpatched systemsNot by definitionOften, via a Trojan or phishing

The distinction matters for prevention. Patching stops worms that exploit vulnerabilities, but it does not stop a Trojan, because the Trojan arrives with your permission. That is why download habits and application controls matter as much as updates.

Real malware often mixes categories. A Trojan can be the delivery vehicle — the "dropper" — that installs ransomware, spyware or a worm once it is inside.

How does a Trojan horse virus work?

Almost every Trojan attack follows the same four stages: delivery, execution, persistence and payload. Understanding the chain shows you where to break it.

How a Trojan attack unfolds 1Deliveryfake download, emailattachment, USB drive 2Executionyou open or installthe disguised file 3Persistencestartup entry orscheduled task 4Payloadtheft, backdoor,ransomware Break the chain at stage 1 or 2: do not run files from untrusted sources.
The four stages of a Trojan attack. Illustration by Cysoro.

1. Delivery

The Trojan arrives through a channel that already feels normal: an email attachment, a free download, a fake software update, a cracked game or app, a malicious advert, or a USB drive. CISA notes that most viruses, Trojans and worms are activated when you open an attachment or click a link in an email message.

2. Execution

You run the file. The visible program may even work as promised — the game plays, the document opens — while the hidden code runs in the background. That working disguise is why victims often have no idea anything happened.

3. Persistence

The Trojan sets itself up to survive a restart, usually through a startup entry, a scheduled task or a registry change. Some hide their processes so they do not show up in a casual glance at Task Manager.

4. Payload and command and control

Finally it does its real job and often contacts a command-and-control server so the attacker can send instructions or download more tools. The payload is whatever the attacker built it for — see the types below.

What are the main types of Trojan horse?

Trojans are named by what they do after they get in. The same disguise can carry any of these payloads, and many samples combine several.

  • Backdoor Trojan: opens a hidden remote-access channel so the attacker can control your computer, browse files and install more tools.
  • Downloader / dropper Trojan: its first job is only to fetch and install other malware, often ransomware or spyware.
  • Banking Trojan: steals online banking logins, often by overlaying fake login screens or intercepting credentials.
  • Spyware Trojan: records keystrokes, screenshots and browsing, and sends the data to the attacker.
  • Ransomware Trojan: encrypts your files and demands payment for the decryption key.
  • Rootkit Trojan: hides the attacker's presence by altering system functions so the malware does not show up in normal scans or listings.
  • DDoS Trojan: turns your computer into part of a botnet that floods websites with traffic on command.
  • Fake antivirus Trojan: pretends to be security software, claims it found infections, and demands payment to "clean" them.

Fake antivirus is worth special attention because it inverts the warning signs: the malware itself is the thing shouting about a virus. Real antivirus software never asks you to call a phone number in a browser pop-up or pay by gift card. The same social-engineering tricks appear in spear phishing, where urgency and a trusted-looking sender do the work.

How do you know if you have a Trojan horse virus?

Trojans are built to be quiet, so there is rarely a single obvious symptom. Look for a pattern, not one clue.

  • Your computer suddenly runs much slower, fans spin constantly, or the battery drains fast.
  • New programs, browser toolbars or extensions appear that you did not install.
  • Your home page or search engine changes, or you see pop-ups and redirects you did not ask for.
  • Windows Security or your antivirus will not open, updates fail, or real-time protection keeps turning itself off.
  • Friends receive strange emails or messages from your accounts.
  • You get password-reset emails or login alerts for accounts you did not touch.
  • Files are renamed, encrypted or missing, or a ransom note appears.

None of these proves a Trojan on its own — a failing hard drive can also cause slowness — but several together, especially after a suspicious download, should trigger a full scan immediately.

Do not trust browser pop-up warningsPop-ups claiming your computer is infected with a Trojan and showing a phone number are tech-support scams, not real alerts. Close the browser with Alt + F4 or through Task Manager, never call the number, and run a scan with your installed antivirus instead.

How to remove a Trojan horse virus

Work through these steps in order. Do not skip the offline scan if the detection keeps coming back — that is the sign of a persistent component reinstalling the Trojan while Windows is running.

  1. Disconnect from the internet. Turn off Wi-Fi or unplug the Ethernet cable so the Trojan cannot send data or download more malware.
  2. Do not log in to anything sensitive on the infected device. No banking, email or work accounts until it is clean.
  3. Update Windows and your antivirus definitions, then open Windows Security, go to Virus & threat protection, and run a Full scan.
  4. Quarantine, then remove anything the scan finds. Check Protection history and choose Remove for quarantined items.
  5. Run a Microsoft Defender Offline scan from Scan options. The computer restarts and scans outside normal Windows, where persistent malware has more difficulty hiding.
  6. Run a second-opinion scan with a fresh copy of the Microsoft Safety Scanner (full scan). It expires 10 days after download, so always fetch a new copy.
  7. Delete the source file shown in Protection history — the installer, archive or download that brought the Trojan in — and empty the Recycle Bin.
  8. Change your passwords from a clean device, starting with email, banking and work accounts, and check for unfamiliar mail-forwarding rules, devices and MFA settings.
  9. Restore only from backups made before the infection, stored outside the PC, if files were damaged or encrypted.

If detections continue after the offline scan and Safety Scanner, back up personal documents and consider a clean reinstall of Windows. That is the only sure way to remove a deeply embedded rootkit. Microsoft's own removal guidance for persistent Trojans walks through the offline scan and second-opinion steps in detail.

How to prevent Trojan horse viruses

Prevention is mostly about download discipline, because the Trojan needs your cooperation. Layer the controls below so one mistake does not become an infection.

Six habits that stop most Trojans Download only from official sourcesvendor sites and official app stores, never mirrors Keep antivirus on and updatedreal-time protection on; scan new files first Never open unexpected attachmentsverify with the sender first, even if you know them Avoid pirated software and cracksthe most common Trojan delivery vehicle Use a standard account, not adminlimits what malware can install or change Back up offline, regularlyso ransomware Trojans cannot take your files hostage
Prevention checklist for Trojan horse malware. Illustration by Cysoro.
  • Download only from the vendor or official app store. Third-party download mirrors, "free" versions of paid software and game cracks are the most common Trojan sources.
  • Scan before you open. Right-click a new download and scan it with your antivirus before running it, and never open an attachment you were not expecting without checking with the sender first.
  • Keep real-time protection on. CISA advises installing antivirus from a reputable vendor, updating it and using it regularly, with an on-access scanner that checks every executable you run.
  • Use a standard user account for daily work instead of an administrator account, so malware has less it can install or change.
  • Keep Windows and apps updated so a Trojan cannot chain an unpatched flaw to deepen its access.
  • Back up regularly to a drive you disconnect or to cloud storage with version history, so a ransomware Trojan cannot take your only copy hostage.
  • Be careful in chat rooms and forums about files and links people send you, as CISA warns — a file from a stranger is a file from an untrusted source.

For small businesses, add application allowlisting so only approved software can run, and block macros from the internet. Those two controls stop a large share of Trojan deliveries before a user can click. Our small business cybersecurity checklist covers allowlisting alongside backups, updates and device security.

The bottom line

A Trojan horse virus succeeds because it looks like something you want. The defense is not a single tool but a habit: get software only from its maker, pause before opening attachments and installers, keep real-time antivirus on, and keep offline backups.

If you suspect an infection, disconnect, run a full scan and an offline scan, and change your passwords from a clean device. And if a browser pop-up ever claims you have a Trojan and shows a phone number, close it — that pop-up is the scam, not the warning. You can check your own website's security posture with our free security headers checker.

Frequently asked questions

What is a Trojan horse virus in simple terms?

It is malware pretending to be something useful, such as a free game, a software update or an invoice. You install or open it willingly, and the hidden code then does something harmful, like stealing passwords or giving an attacker remote access.

Is a Trojan horse a virus?

Not technically. A virus copies itself into other files, while a Trojan is non-replicating and depends on you running it. People still say Trojan virus in everyday speech, and for removal purposes the distinction matters little: both must be found and removed.

Can a Trojan horse virus spread to other computers?

A Trojan itself does not copy itself to other machines. It can, however, download a worm or ransomware, steal credentials that let an attacker log in elsewhere, or turn your computer into part of a botnet that attacks others.

How do I know if I have a Trojan horse virus?

Common signs are sudden slowness, new programs or browser extensions you did not install, changed home pages, security software that will not open, unexpected pop-ups, and logins or password-reset emails you did not trigger. A full antivirus scan is the only reliable check.

Can Windows Defender remove a Trojan?

Yes, in most cases. Run a full scan in Windows Security, then a Microsoft Defender Offline scan if the detection returns. Microsoft also publishes the free Microsoft Safety Scanner as a second-opinion full scan.

Do Macs and phones get Trojan horse viruses?

Yes. Macs get Trojans through fake installers and pirated apps, and Android phones through apps installed outside the official store or malicious APK files. iPhones are harder to infect because apps are sandboxed, but malicious profiles and phishing can still steal credentials.

What should I do first if I think I have a Trojan?

Disconnect from the internet, do not enter any more passwords or bank details on that device, run a full antivirus scan, and change important passwords from a clean device once the scan is clear.

Are Trojan pop-up virus warnings real?

Almost never. Browser pop-ups claiming your computer has a Trojan and showing a phone number to call are tech-support scams. Close the browser, do not call the number, and run a real scan with your installed antivirus software.

Sources

  1. CISA — Virus Basics
  2. NIST — Trojan Horse definition
  3. Microsoft Learn — Trying to clear pop up trojan virus windows
  4. Microsoft Learn — How to remove Trojan:Win32/Commando.A!ml permanently
Written & fact-checked byCysoro Security Team

The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.

  • Email authentication
  • Phishing & BEC
  • Domain & DNS security
  • Small-business security

Checked against CISA's Virus Basics, NIST's Trojan horse definition and Microsoft's malware removal guidance.

How we write and fact-check →

Free tools for this topic

No account needed.

See where your domain stands

Free for up to 3 domains. No card, no installs.

Start free