A Trojan, or Trojan horse, is malware that disguises itself as legitimate software so you install and run it yourself. Unlike a virus, it does not copy itself to other files. Once it runs, it can steal passwords, open a backdoor for remote access, spy on you, or download ransomware and other malware.
Key takeaways
- A Trojan is defined by deception: you run it because it looks like a useful file, app or update.
- It does not spread on its own, so stopping it depends on downloads, attachments and links you choose.
- Remove it with a full anti-malware scan, change passwords from a clean device, and check for persistence.
You would not invite a burglar into your home. A Trojan works because you invite it in without knowing: it arrives as a game, an invoice, a free app or a software update, and you open it yourself. Once inside, it can steal, spy or open the door for worse malware.
What is a Trojan?
A Trojan, short for Trojan horse, is malware that pretends to be legitimate software. It claims to do one useful thing while secretly doing something harmful, such as stealing data or giving an attacker remote access.
The name comes from the Greek story of Troy, where soldiers hid inside a wooden horse left as a gift. Malwarebytes describes Trojans the same way: they use deception and social engineering to trick you into running a program that hides malicious intent.
A Trojan is defined by how it gets in, not by what it does next. The payload can be almost anything: password theft, spying, remote control, downloading more malware or preparing ransomware. That is why security teams call it a delivery method as well as a type of malware.
Malwarebytes explains the same definition in its Trojan horse guide, including how Trojans differ from viruses and worms.
For a wider view of the threats that use this trick, see our guide to what spear phishing is, since many Trojans arrive inside targeted phishing messages.
How does a Trojan work?
A Trojan works in four stages: disguise, execution by you, persistence, and contact with the attacker. It stays quiet in between, so you may not notice anything at first.
1. Disguise
The file looks safe and useful: a PDF invoice, a game crack, a video codec, a free photo editor or an urgent update. Attackers copy real branding, file names and icons to make it believable.
2. You run it
Nothing happens until you open the file or install the app. MITRE ATT&CK calls this User Execution (T1204): TrickBot, for example, has tried to get users to launch a malicious Excel attachment to deliver its payload.
3. Persistence and payload
Once it runs, the Trojan often sets itself to start again after a reboot, using a startup entry, scheduled task or registry change. Then it runs its payload: stealing credentials, logging keys, taking screenshots or downloading a second stage.
4. Command and control
Many Trojans contact an attacker-controlled server and wait for instructions. That channel lets the attacker steal data, install ransomware, add your device to a botnet or move to other devices on your network.
Trojan vs virus vs worm: what is the difference?
The difference is how the malware spreads. A Trojan needs you to run it and does not copy itself. A virus attaches to other files and spreads when those files run. A worm spreads on its own across a network.
| Trojan | Virus | Worm | |
|---|---|---|---|
| Spreads on its own? | No | Only when an infected file runs | Yes, across networks |
| Needs you to run it? | Yes | Yes, indirectly | No |
| Main trick | Disguise as safe software | Hiding inside a real file | Exploiting a network flaw |
| Typical damage | Data theft, remote access, more malware | File damage and spread | Fast network-wide infection |
| Example | Zeus, TrickBot | File-infecting viruses | ILOVEYOU used email spread |
Malwarebytes makes the same point: a virus is a file infector that can self-replicate, while worms do not need to attach to another program to spread. Trojans are neither, even though people often call them Trojan viruses.
The labels matter for defense. If you only look for self-spreading malware, you will miss a Trojan that arrived as a single convincing download and then sat quietly.
What are the main types of Trojans?
The main types are backdoor, remote access, banking, downloader, spyware, rootkit and botnet Trojans. Each type describes the payload, not the disguise, so one file can combine several jobs.
Backdoor Trojan
A backdoor Trojan opens a hidden way back into your device. It changes security settings so the attacker can return, control the device and download more malware without you noticing.
Remote access Trojan (RAT)
A RAT gives the attacker full control: files, webcam, microphone and installed programs. Attackers use it to spy, steal data or use your device as a step into a work network.
Banking Trojan
A banking Trojan steals online banking logins, card details and one-time codes, often by logging keys or injecting fake fields into banking pages. Zeus, first seen in 2007, targeted Windows users to steal banking information with a keylogger.
Downloader and dropper Trojan
A downloader Trojan is stage one: it fetches and installs other malware, such as ransomware or a keylogger. Emotet started as a banking Trojan and later became known for delivering other malware, including other Trojans.
Spyware Trojan
A spyware Trojan watches what you do: accounts you open, card details you type and messages you send. It then sends that data back to the attacker.
Rootkit Trojan
A rootkit Trojan hides itself and other malware deep in the system, so scans and task lists miss it. It is built for long-term, quiet access rather than a quick theft.
Botnet Trojan
A botnet Trojan turns your device into a slave in a network under the attacker's control. That network, a botnet, is often used for distributed denial-of-service attacks that flood a target with traffic.
What are real examples of Trojans?
Real Trojans show how one disguise can lead to very different damage. Zeus stole banking logins, Emotet delivered ransomware, and TrickBot combined banking theft with network access.
Zeus appeared in 2007 and used keylogging to steal banking credentials on Windows. Torpig, also known as Sinowal, turned off antivirus software so attackers could access the computer, change data and steal passwords and other sensitive data.
In 2013, CryptoLocker arrived as a Trojan and encrypted files on the hard drive, then demanded a ransom for the decryption key. Copycat ransomware Trojans followed the same year.
Emotet, seen in 2018 delivering other types of malware, shows why removal must be thorough: deleting the first file does not help if it already downloaded a second payload. TrickBot is listed by MITRE as Trojan spyware mainly used against banking sites in the United States, Canada, the UK and other countries.
Older history helps too. A program called ANIMAL, released in 1975, is generally considered an early Trojan: it presented itself as a simple guessing game while copying itself to shared folders. The AIDS Trojan of 1989, mailed on floppy disks, was the first known ransomware.
How do you know if you have a Trojan?
You may not know at all, because Trojans are built to stay quiet. Watch for a cluster of changes rather than one symptom, and confirm with a scan.
- Slow or unstable device: programs crash, the fan runs hard, or the battery drains fast for no clear reason.
- New programs or browser changes: software you did not install, a new homepage, extra toolbars or changed search settings.
- Pop-ups and redirects: ads or warnings appear even when you are not browsing, or links send you to strange pages.
- High data use: the device uploads or downloads a lot in the background, which can mean data theft or botnet traffic.
- Accounts acting strangely: password resets, sent messages you did not write, or logins from places you have never been.
- Security tools disabled: antivirus turns off, updates fail, or you cannot open security settings.
None of these proves a Trojan on its own. A slow computer can be old hardware, and a strange login can be a reused password. Use the signs as a reason to scan, not as a diagnosis.
If you reuse passwords, check whether one has already appeared in a breach with our pwned password checker before you reuse it anywhere else.
How do Trojans spread?
Trojans spread through social engineering, not through self-replication. Attackers place a convincing file where you will find it, then wait for you to run it.
Email attachments are the classic route: an invoice, delivery notice or job application that launches the Trojan when opened. Cracked apps and key generators are another, because the promise of a free paid program makes people ignore the risk.
Fake updates are common too. Malwarebytes notes that Zlob was distributed disguised as a required video codec, and a fake Intel patch called Smoke Loader installed a Trojan after a real hardware flaw made headlines.
On phones, Trojans hide in fake versions of popular apps, often in unofficial stores. They can also arrive as browser extensions. iPhones are harder to infect because of App Store controls, unless the phone is jailbroken and apps come from outside the store.
How do you prevent a Trojan infection?
Prevention is mostly about downloads and updates. A Trojan cannot run until you launch it, so the habits around that moment matter more than any single tool.
- Download from the official source only. Get software from the vendor site or official app store, not from a search result, a forum link or a free-download site.
- Do not use cracked software. A free copy of paid software is one of the most reliable Trojan delivery routes.
- Check before you open attachments. If an invoice or document is unexpected, contact the sender through a known channel first.
- Keep software updated. Updates close the flaws that a Trojan's second payload may exploit.
- Use reputable anti-malware and keep it on. Real-time protection can block a known Trojan before it runs.
- Limit admin rights. Do not run daily work as an administrator, so a Trojan you launch has less power.
- Back up regularly. A clean backup is your fastest recovery if a Trojan delivers ransomware.
Strong, unique passwords also limit the damage. Use our password strength checker when you create a new one, and store it in a password manager.
For a broader baseline, work through our small business cybersecurity checklist, which covers updates, backups and device security together.
How do you remove a Trojan?
Remove a Trojan in this order: disconnect, scan, clean, then change passwords from a clean device. Do not log into banking or email from the infected device first.
- Disconnect from the network. Unplug ethernet or turn off Wi-Fi so the Trojan cannot send data or download more malware.
- Run a full anti-malware scan. Use a reputable tool and a full system scan, not a quick scan. Quarantine or delete what it finds, then scan again.
- Check startup items and scheduled tasks. Look for programs you do not recognize that start with the system, and remove them.
- Update everything. Apply operating system and browser updates, then update your anti-malware definitions.
- Change passwords from a clean device. Start with email, banking and password manager accounts, and turn on multi-factor authentication.
- Check for extra damage. Look for new mail-forwarding rules, unknown devices on your accounts, and unfamiliar transactions.
- Restore from backup if needed. If the scan cannot clean it, or ransomware arrived, restore from a backup made before the infection.
If the device is a work computer, tell your IT team at once, even if the scan looks clean. A Trojan that reached a work network may have tried to move to other devices, and your team needs to check logs and shared drives.
Learn the warning signs on your phone too in our guide to how to know if your phone is hacked.
The bottom line
A Trojan is not clever code that breaks in. It is a convincing disguise that you open yourself. That is bad news and good news: the same habit that lets it in can stop it, if you pause before you download, install or open an unexpected file.
Keep your software updated, use reputable anti-malware, back up your files, and use unique passwords with multi-factor authentication. If you suspect an infection, disconnect, scan, and change passwords from a clean device — and check whether any password was already exposed with the free pwned password checker.
Frequently asked questions
What is a Trojan in simple terms?
A Trojan is a harmful program wearing a disguise. You think you are opening a document, installing a free app or updating software, but the file also runs hidden code for an attacker. The disguise is the whole trick, because you install it yourself.
Is a Trojan a virus?
No, although people often say Trojan virus. A virus copies itself into other files and spreads. A Trojan does not self-replicate. It needs you to run it, and then it delivers its payload, such as stealing data or opening remote access.
How do Trojans get on your computer?
Most arrive through email attachments, fake software updates, cracked or pirated software, malicious ads, and look-alike download pages. They also hide in fake mobile apps and browser extensions. The common thread is a file or link that looks trustworthy.
Can a Trojan steal my passwords?
Yes. Many Trojans include keyloggers or steal saved credentials, cookies and banking details. Banking Trojans are built for exactly that job. If you suspect one, change passwords from a clean device and turn on multi-factor authentication.
How do I know if I have a Trojan?
Look for slow performance, new programs you did not install, changed browser settings, pop-ups, high data use, or accounts acting strangely. No single sign proves it, so run a full anti-malware scan rather than guessing from symptoms alone.
Can antivirus remove a Trojan?
A reputable anti-malware tool can detect and remove most known Trojans with a full scan. After removal, still change important passwords, check startup programs and mail rules, and update your software, because some Trojans drop a second payload.
Are Trojans dangerous on phones?
Yes. Fake apps can carry Trojans that steal logins, show ads, or send premium texts. They are most common outside official app stores, but some have slipped into official stores too. Only install apps from trusted sources and check reviews and permissions.
What is the difference between a Trojan and ransomware?
A Trojan is a delivery method, while ransomware is a payload. A Trojan can install ransomware, spyware or a remote access tool after it runs. Ransomware encrypts your files and demands payment, and it often arrives through a Trojan first.
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 Malwarebytes' Trojan guide, MITRE ATT&CK entries for TrickBot and related Trojan software, and standard malware definitions.
How we write and fact-check →