Glossary
Trojan horse (malware)
Definition
Trojan horse: A program that appears useful or harmless but contains a hidden malicious function that runs when someone opens it. It doesn't replicate on its own and often installs other attacker tools, such as keyloggers or rootkits.
Also known asTrojanTrojan malwareTrojan horse program
In short
A Trojan horse is a program that looks useful or harmless but hides a malicious function that runs when someone opens it. Unlike a virus or worm, it doesn't copy itself; it relies on a person to install it, usually through a fake attachment, update or download. Once running, Trojans often install other attacker tools, such as keyloggers.
Key takeaways
- A Trojan needs you to run it, so the disguise is the whole attack.
- It doesn't replicate, which is why "Trojan virus" is a misnomer.
- Trojans often act as a delivery step for keyloggers, rootkits and remote access.
- A file's real type is its last extension; "invoice.pdf.exe" is a program.
Last reviewed 3 December 2026 by Foxcolab Team
A Trojan horse is a program that looks useful or harmless but hides a malicious function that runs when someone opens it. NIST defines it as "a computer program that appears to have a useful function, but also has a hidden and potentially malicious function that evades security mechanisms" (NIST glossary). The name comes from the wooden horse of the Greek legend: the gift gets carried inside, and the danger comes out later.
How it works#
A Trojan can't break in on its own. It needs someone to download it, open it or install it, so the disguise is the whole attack: an invoice attachment, a delivery label, a "required" browser update, a free version of paid software. NIST describes Trojans as "self-contained, nonreplicating" programs that "often deliver other attacker tools to hosts" (NIST SP 800-83 Rev. 1). In practice the Trojan is often a first step. Once it runs, it installs a keylogger, opens remote access for the attacker or pulls down ransomware.
A worked example#
An accounts clerk at example.com receives "Remittance advice" with remittance.pdf.exe attached. On a computer set to hide file extensions, it shows as remittance.pdf with a document-like icon. Double-clicking opens a real-looking PDF, while a second program quietly installs in the background and starts recording keystrokes. Nothing seems wrong until the company's banking password is used from another country.
Common mistakes#
- Calling it a virus. A virus copies itself into other files; a Trojan doesn't spread on its own. The distinction matters for cleanup, because a Trojan usually means someone ran it and other tools may have followed.
- Trusting the icon or name. Icons can be faked, and only the last extension counts.
- Assuming documents are safe. Office files with macros can run code once you enable them, which is why the Canadian Centre for Cyber Security advises disabling embedded macros in email attachments (ITSAP.00.166).
- Thinking one cleanup is enough. Because Trojans deliver other tools, treat the whole device as compromised and change passwords from a clean one.
In Foxcolab#
Foxcolab Mail checks every file on the sender's device before it uploads. Programs, names with a hidden double extension like remittance.pdf.exe, and archives that contain them can't be attached: the sender sees This file can't be attached. Documents that can run macros go out with a warning. On the web, before you download an attachment that can run a program, Foxcolab Mail asks first: This kind of file can harm your device. If something does damage your files, Foxcolab Drive keeps earlier versions you can bring back. Create a free account.
Keep exploring
Related terms
- MalwareMalware is any software or file built to harm a device or steal its data, from viruses and trojans to ransomware and spyware. Most of it still arrives through email attachments and links.
- KeyloggerA keylogger records what you type, passwords included, and passes it to an attacker. Here's how keyloggers work, what limits the damage and what to do if you suspect one.
- SpywareSpyware is software installed secretly to watch what you do on a device. Here's how it gets in, why encryption can't stop it, and what keeps it out.
- RansomwareRansomware encrypts your files and demands payment for the key, and most attacks also steal data first. What helps is a copy the attacker can't reach.
- Social engineeringSocial engineering is manipulating people, rather than breaking software, to get passwords, money or access. Phishing is the best-known form, but phone calls and chat work just as well.
- Endpoint securityEndpoint security protects the laptops, phones and desktops people use to reach data. Here's what it covers and why it matters more when data is end-to-end encrypted.
- PhishingPhishing is impersonation used to trick people into handing over passwords, approving payments or opening malware. Here's how it works and what actually stops it.
Where Foxcolab uses it

Foxcolab
Private work tools, without the ads.
Mail, files, documents, spreadsheets and meetings in one account. Files, documents and spreadsheets are end-to-end encrypted.