A Trojan horse, or Trojan, is malware that disguises itself as a legitimate program or file to trick you into installing it. Once installed, it can steal data, spy on you, open a backdoor for remote control, or install more malware. Unlike viruses and worms, Trojans do not copy themselves to other files or computers — they rely on you to run them.
Key takeaways
- A Trojan horse is malware disguised as a legitimate file or program — it cannot spread itself, so it relies on tricking you into running it.
- Common types include remote access Trojans, banking Trojans, downloaders, keyloggers, and ransomware droppers.
- Remove a Trojan by disconnecting from the network, running a full antivirus scan, and changing passwords from a clean device.
You download what looks like a free PDF converter, a game crack, or an urgent invoice. It opens, works normally — and quietly hands your computer to someone else. That is a Trojan horse, and it is still one of the most common ways malware gets in.
What is a Trojan horse in a computer?
A Trojan horse, usually just called a Trojan, is malware that disguises itself as a normal, legitimate program so you install it yourself. Once it runs, it carries out its hidden job — stealing data, spying, or opening a backdoor.
The name comes from the Greek story of the wooden horse left outside Troy: soldiers hid inside a gift, and the Trojans wheeled it through their own gates. A computer Trojan works the same way. It arrives as something you want, and you bring it inside yourself.
Trojans are generally spread by social engineering. You might be tricked into opening an email attachment that looks like a routine form, or clicking a fake advertisement that offers a free download. The disguise is the whole point — as Wikipedia's overview explains, many modern Trojans act as a backdoor, contacting a controller who can then access the affected device.
Unlike viruses and worms, Trojans do not try to inject themselves into other files or spread to other computers. They rely entirely on deception. That also makes them harder to spot: a Trojan can sit quietly for weeks, doing nothing obviously wrong.
How is a Trojan different from a virus or a worm?
Trojans, viruses, and worms are all malware, but they spread and behave differently. Knowing the difference tells you what to expect and how to respond.
| Trojan horse | Virus | Worm | |
|---|---|---|---|
| Spreads by itself? | No — needs you to run it | Yes — infects other files | Yes — spreads over networks |
| Disguise | Pretends to be legitimate software | Hides inside a real file | Often needs no disguise |
| Main trick | Social engineering | Attaching to programs you run | Exploiting network flaws |
| Typical goal | Steal data, remote access, install more malware | Corrupt or delete files | Spread fast, overload systems |
| Needs user action? | Yes — download and run it | Yes — run the infected file | No — spreads automatically |
The practical difference: a virus announces itself by damaging files, and a worm announces itself by spreading. A Trojan's job is to stay quiet while it steals or spies, which is why a full antivirus scan matters more than waiting for symptoms.
For a broader look at how malware gets in, see our guide to how to know if your phone is hacked, which covers many of the same warning signs on mobile.
How does a Trojan horse work?
A Trojan attack follows four stages: disguise, delivery, execution, and remote control. Understanding the chain shows you where to break it.
1. Disguise
The attacker dresses the Trojan as something you trust: a software update, a free utility, a game, or a document. Icons are changed to match common file types, and file names use double extensions such as invoice.pdf.exe to hide the real type.
2. Delivery
Trojans usually arrive through email attachments, fake download buttons, pirated software, or compromised websites. Malvertising — malicious ads on otherwise legitimate sites — is another common route.
3. Execution
Nothing happens until you run the file. That is the Trojan's weakness and its strength: antivirus software can catch it at this point, but if you grant it permission, the payload activates with your privileges.
4. Remote control
Many modern Trojans contact a command-and-control server and wait for instructions. The attacker can then steal files, install more malware, record keystrokes, or use your computer as part of a botnet.
What are the main types of Trojan horse?
Trojans are usually classified by what they do once inside. Here are the types you are most likely to meet.
Remote access Trojan (RAT)
A RAT gives the attacker full remote control: they can browse files, take screenshots, turn on the webcam, and install other software. RATs are the most dangerous type because the attacker can do almost anything you can do on the machine.
Banking Trojan
Banking Trojans target online banking and payment systems. They steal login credentials, intercept one-time codes, or overlay fake login screens on real banking apps. Zeus and TrickBot are among the most studied examples of this type.
Downloader Trojan
A downloader's only job is to fetch and install more malware. It is often the first stage of a ransomware attack: the downloader gets in quietly, then pulls down the real payload later.
Keylogger Trojan
Keyloggers record every keystroke you type — passwords, card numbers, messages — and send the log to the attacker. They often load automatically when the operating system starts.
Ransomware Trojan
Some Trojans encrypt your files and demand payment for the decryption key. Ransomware is often delivered by a Trojan, which is why the two terms appear together so often.
SMS Trojan
On phones, SMS Trojans send or intercept text messages, often subscribing victims to premium-rate services or stealing two-factor authentication codes sent by SMS.
Rootkit Trojan
A rootkit Trojan buries itself deep in the operating system, hiding its files and processes from antivirus software and from you. These are the hardest Trojans to remove and sometimes require a full reinstall.
What are the signs of a Trojan horse infection?
Trojans try to stay quiet, but they still leave clues. Watch for these warning signs, especially if several appear together.
- Sudden slowness or crashes. Programs freeze, the computer takes far longer to start, or the fan runs constantly when nothing is open.
- New programs or toolbars. Apps, browser extensions, or toolbars appear that you did not install.
- Changed settings. Your home page, search engine, or security settings change without you touching them.
- Pop-ups and redirects. Frequent pop-up ads, or your browser sending you to pages you did not ask for.
- Strange network activity. High data usage when you are not downloading anything, or your firewall warning about unknown programs.
- Missing files or locked files. Files disappear, change, or become encrypted — a sign of a ransomware payload.
- Contacts report strange messages. Friends receive odd emails or messages from your accounts.
No single symptom proves a Trojan — a slow computer can just be old. But new programs plus redirects plus slowness is a pattern worth investigating with a full scan.
Famous Trojan horse examples
Real Trojans show how much damage a single disguised file can do. Three cases are worth knowing.
Zeus (2007 onwards). A banking Trojan that stole credentials from infected Windows computers and was used to siphon money from bank accounts. It became a toolkit that many criminals reused and adapted.
Emotet. Originally a banking Trojan, Emotet became a delivery service for other malware, including ransomware. It spread through malicious email attachments disguised as invoices and shipping notices, and was disrupted by a coordinated law-enforcement operation in 2021.
AIDS Trojan (1989). One of the first ransomware Trojans: it was mailed on about 20,000 floppy disks to attendees of a World Health Organization AIDS conference, then demanded payment after encrypting files. It showed, decades ago, that a Trojan could hold data hostage.
These cases share one lesson: the infection always started with a person opening something that looked legitimate. Technology helps, but the decision to run a file is the real security control.
How do you remove a Trojan horse?
Act in this order. Do not skip the disconnect step — a live Trojan can download more malware or send your data while you work.
- Disconnect from the internet. Unplug the network cable or turn off Wi-Fi. This stops the Trojan talking to its server.
- Boot into Safe Mode. On Windows, Safe Mode loads only essential programs, which can stop the Trojan from running while you clean up.
- Run a full antivirus scan. Use up-to-date antivirus or anti-malware software and run a full system scan, not a quick scan. Quarantine or delete what it finds.
- Remove unknown programs. Check installed programs and browser extensions for anything you do not recognize, and uninstall it.
- Change your passwords. From a clean device, change passwords for email, banking, and any account you used on the infected machine. Start with email, since it can reset the others.
- Check for damage. Look for missing files, changed settings, and new forwarding rules in your email. Restore files from a backup made before the infection.
- Reinstall if needed. If the infection persists, especially with a rootkit Trojan, back up your personal files and reinstall the operating system. It is the only way to be sure.
After cleanup, check whether your passwords have appeared in known breaches with our free pwned password checker.
If a password was exposed, replace it with a strong, unique one — our password strength checker can verify the new one.
How do you prevent Trojan horse infections?
Prevention is mostly about the download decision, plus a few technical controls that catch mistakes.
- Download only from official sources. Use the vendor's site or your device's app store. Avoid pirated software, cracks, and key generators — they are among the most common Trojan carriers.
- Show file extensions. In Windows, turn on file extensions so
invoice.pdf.execannot hide as a harmless PDF. - Keep software updated. Updates close the flaws that Trojans and their downloaders exploit. Turn on automatic updates for your operating system, browser, and antivirus.
- Use antivirus with real-time protection. It can block a Trojan at the moment you try to run it, even if you were fooled by the disguise.
- Be skeptical of urgency. An attachment that demands you open it now is a red flag. Verify with the sender through another channel first — the same habit that stops spear phishing.
Keep antivirus updated, be cautious with email attachments, and avoid downloads from untrusted sources — the same advice Norton gives in its Trojan guide. Small businesses can build these habits into a routine with our small business cybersecurity checklist.
The bottom line
A Trojan horse is dangerous precisely because it does not look dangerous. It cannot spread itself, so it has to convince you to open the gate — and the disguise is usually convincing.
The defense is simple in principle: download only from sources you trust, check files before you run them, keep your software updated, and run a full scan the moment something feels off. If you do get infected, disconnect, scan, and change your passwords from a clean device — then check them with the pwned password checker.
Frequently asked questions
What is a Trojan horse in a computer?
A Trojan horse is malware that pretends to be a legitimate program, such as a free game, a software update, or a document. When you run it, the hidden malicious code activates and can steal data, spy on you, or give an attacker remote access.
Is a Trojan horse a virus?
No. A virus copies itself into other files and spreads on its own. A Trojan cannot replicate itself. It needs you to download and run it, usually because it looks like something useful or harmless.
What is the difference between a Trojan and a worm?
A worm spreads itself automatically from computer to computer over a network, without any action from the user. A Trojan does not spread itself at all; it must be downloaded and run by a person who believes it is legitimate.
Can a Trojan horse infect a phone?
Yes. Trojans target Android and, less often, iOS devices, usually through fake apps, malicious links, or files shared in messages. On phones they often steal login codes, intercept text messages, or subscribe victims to premium services.
How do I know if my computer has a Trojan?
Common signs include sudden slowness, programs crashing, new toolbars or apps you did not install, changed browser settings, pop-ups, and unusual network activity. A full antivirus scan is the reliable way to confirm it.
Can antivirus remove a Trojan horse?
Usually, yes. A full scan with up-to-date antivirus software can detect and quarantine most Trojans. Some deeply embedded ones, such as rootkit Trojans, may need a dedicated removal tool or a full system reinstall.
What was the first Trojan horse?
One early example was ANIMAL, a guessing game from the 1970s that secretly copied itself. In the late 1980s the AIDS Trojan, mailed on floppy disks to a World Health Organization conference audience, became one of the first Trojans used as a real threat.
Can a Trojan steal my passwords?
Yes. Password-stealing Trojans and keyloggers are built for exactly that. They record what you type or extract saved passwords and send them to the attacker, which is why you should change passwords from a clean device after an infection.
Sources
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.
Checked against Norton and Huawei explainers and Wikipedia's Trojan horse article.
How we write and fact-check →