trojan horse
termKept in this browser · My desk
A program that appears useful but also has a hidden, potentially malicious function.
That is the definition shared by RFC 4949 and the glossary of the US National Institute of Standards and Technology (NIST), which add that the hidden function evades security mechanisms, sometimes by riding on the legitimate permissions of whoever runs the program. What defines it is the disguise, not the way it spreads: NIST's malware guide calls it a self-contained, nonreplicating program, while a virus inserts copies of itself into other programs and a worm runs and spreads on its own. The attack was first described in a 1972 study for the US Air Force, which credits it to D. Edwards, a panel member from the National Security Agency.
The name and the first description. The name comes from the wooden horse of Greek legend, a gift that carried soldiers inside. The first written description is in James P. Anderson's Computer Security Technology Planning Study of October 1972, prepared for the United States (US) Air Force's Electronic Systems Division: the attack places code with trap doors into a target system by presenting its operators with a program so useful that they will use it even though it was not produced under their control, and it can only succeed where control over the programs put on a system is lax. A footnote credits the attack to D. Edwards; the panel behind the study included Daniel J. Edwards of the National Security Agency (NSA). In June 1974 Paul Karger and Roger Schell's evaluation of Multics for the Air Force took the idea further, describing a compiler trap door inserted so that trap doors in object code would survive a complete recompilation of the system, maintaining itself because the compiler was written in its own language.
The first ones in the field. An early documented case was harmless. John Walker wrote ANIMAL, a guessing game, in April 1974; its subroutine PERVADE copied the game into other users' directories on a UNIVAC 1100/42 under the Exec-8 operating system in January 1975, in what Walker calls a classic Trojan Horse attack. PERVADE took great care not to destroy unrelated programs, and its spreading stopped in 1976, when a new Univac operating system changed the format of the system tables it read. Ken Thompson's Turing Award lecture of August 1984, Reflections on Trusting Trust, made the Multics idea famous: a C compiler altered to miscompile the UNIX login command so that it also accepted a known password, and to put both changes back whenever it compiled itself, so the source could be cleaned and the trojan horse would remain with no trace in source anywhere. He credited the idea to an Air Force critique of an early implementation of Multics.
What the standards say. They have separated the trojan from its neighbours. The Internet Engineering Task Force's (IETF) Request for Comments (RFC) 4949 (August 2007) defines it by its hidden function and by evading security mechanisms; the glossary of the National Institute of Standards and Technology (NIST) records a second wording, a useful or seemingly useful program with hidden malicious code that runs when the program is invoked; and NIST's malware guide of July 2013 stresses that it does not replicate, describes trojans that replace existing files with malicious versions or add new ones, and notes that exploit toolkits install them to deliver keystroke loggers and rootkits. MITRE ATT&CK describes the step rather than the program: the user running the disguised file, filed under User Execution: Malicious File (T1204.002), where social engineering gets someone to open a document, an executable, a shortcut or a disk image, and the disguise is Masquerading (T1036), names, locations and metadata manipulated to look legitimate.
Extortion by post, 1989. Between 8 and 12 December 1989 several thousand "AIDS Information" disks were posted from London, in the United Kingdom, among others to the subscriber list of PC Business World magazine. Virus Bulletin reported that the installer, written in QuickBASIC 3.0, replaced the start-up batch file with one that routed every boot through its own program and printed an invoice for leasing the software, payable to a post office box in Panama; after a count of boots, usually 90 in tests, it hid the directories and scrambled the file names until a renewal was paid. The charge on which Joseph Popp was arrested in Ohio on 1 February 1990 named a demand of 189 or 378 US dollars.
The remote control, 1998 to 1999. Microsoft's Security Bulletin MS98-010 dated the Cult of the Dead Cow's release of Back Orifice to 21 July 1998 (the group says 3 August) and stressed that it exploits no flaw in Windows: a user must install it or be tricked into installing it, and the attacker must reach the machine directly, which a properly configured firewall prevents. F-Secure describes NetBus, whose server came in version 1.60 as PATCH.EXE, hid its process and ran at every start, and SubSeven, first seen in May 1999 with 113 capabilities, which announced each new victim to its operator by ICQ, Internet Relay Chat (IRC) or email.
Theft as a business. In October 2010 the Federal Bureau of Investigation (FBI) described a ring that used "a Trojan horse virus known as Zeus", sent by email, to capture the online banking credentials of companies, towns and churches and move the money through mules: $70 million stolen and some $220 million attempted. On 2 June 2014 the Department of Justice announced the court-ordered disruption of GameOver Zeus, a peer-to-peer variant on 500,000 to 1 million computers blamed for more than $100 million in losses, redirecting the infected computers' requests for instructions to substitute servers.
The trusted channel. Cisco Talos reported in September 2017 that the signed CCleaner 5.33 distributed by Avast carried a multi-stage payload. On 29 March 2024 Andres Freund reported that the upstream xz releases 5.6.0 and 5.6.1 had been backdoored (Common Vulnerabilities and Exposures, CVE-2024-3094), with part of the backdoor present only in the release tarballs and not in the source repository: Thompson's lesson in a modern form, since reading the repository showed nothing.
In Brazil. The word is attached above all to banking trojans. In August 2004 the Superior Court of Justice (STJ) denied habeas corpus to the programmer arrested in the Federal Police's Operação Cavalo de Tróia, whose group installed a keystroke-recording program through fake bank pages and may have diverted about R$ 100 million; in September 2007 Operação Carranca de Tróia arrested 26 people in three north-eastern states. Law 12.737 of 2012 made it a crime to invade a computing device, or to install vulnerabilities to obtain an unlawful advantage, and to produce or distribute a program for it; Law 14.155 of 2021 set four to eight years for theft by fraud committed through an electronic or computing device, with or without a malicious program. ESET reported on 30 January 2024 that it had worked with the Federal Police to disrupt Grandoreiro, one of many Latin American banking trojans, active since at least 2017 and aimed at Brazil, Mexico and, since 2019, Spain; ESET supplied technical analysis and the domains and addresses of its command and control servers, which its operators had hosted on Azure and Amazon Web Services, and the Federal Police identified and arrested the people controlling them.
What stops them. The trojan needs someone to run it, so the controls decide what may run: firewalls against direct connections, as Microsoft said in 1998; macros blocked by default in Office files from the internet; and the application whitelisting and scanning of critical components that NIST's guide asks for.
Also known as: trojan, trojan horse program, cavalo de troia, cavalo de tróia
Sources
- RFC 4949, Internet Security Glossary, Version 2, R. Shirey, August 2007 (read 2026-11-23): a Trojan horse is a computer program that appears to have a useful function but also has a hidden and potentially malicious function that evades security mechanisms, sometimes by exploiting legitimate authorizations of a system entity that invokes the program; a virus propagates by inserting a copy of itself into another program and cannot run by itself; a worm can run independently and propagate itself to other hosts
- NIST Computer Security Resource Center, glossary, Trojan horse (read 2026-11-23): two definitions, the RFC 4949 wording and a useful or seemingly useful program that contains hidden code of a malicious nature that executes when the program is invoked
- NIST SP 800-83 Revision 1, Souppaya and Scarfone, July 2013 (read 2026-11-23): a Trojan horse is a self-contained, nonreplicating program that, while appearing to be benign, actually has a hidden malicious purpose; Trojan horses replace existing files with malicious versions or add new malicious files; exploit toolkits install them to deliver keystroke loggers and rootkits
- James P. Anderson, Computer Security Technology Planning Study, ESD-TR-73-51, volume II, US Air Force Electronic Systems Division, October 1972, copy hosted by NIST (read 2026-11-23): the Trojan Horse attack places code with trap doors in a target system by presenting its operators with a program so useful that they use it although it was not produced under their control; a footnote credits the attack to D. Edwards; such an attack succeeds only where control over the programs put on a system is lax
- Paul A. Karger and Roger R. Schell, Multics Security Evaluation: Vulnerability Analysis, ESD-TR-74-193, volume II, June 1974, copy hosted by NIST (read 2026-11-23): trap doors inserted into Multics, among them a compiler trap door meant to let object-code trap doors survive a complete recompilation of the system, maintaining itself because the PL/1 compiler is itself written in PL/1
- John Walker, The ANIMAL Episode (read 2026-11-23): ANIMAL, a guessing game he wrote in April 1974, carried PERVADE, a subroutine that copied the program into other users' directories on a UNIVAC 1100/42 under Exec-8 in January 1975, spreading in what he calls a classic Trojan Horse attack; PERVADE took great care not to destroy unrelated programs; a new Univac operating system in 1976 changed the system tables it read
- Ken Thompson, Reflections on Trusting Trust, Turing Award lecture, Communications of the ACM 27(8), pages 761 to 763, 1 August 1984, read on the ACM Digital Library (read 2026-11-15): a C compiler altered to miscompile the UNIX login command so that it also accepts a particular known password, and to reinsert both Trojan horses whenever it compiles the compiler, so the login command remains bugged with no trace in source anywhere; the idea first read in an Air Force critique of an early implementation of Multics
- ESET WeLiveSecurity, ESET takes part in global operation to disrupt the Grandoreiro banking trojan, 30 January 2024 (read 2026-11-23): ESET supplied the Federal Police of Brazil with technical analysis, statistics and command and control domains and addresses; Grandoreiro, one of many Latin American banking trojans, active since at least 2017, targets Brazil and Mexico and since 2019 Spain; its operators hosted infrastructure on Azure and AWS; the Federal Police identified and arrested the people controlling the servers
- MITRE ATT&CK, User Execution: Malicious File, T1204.002, version 1.6, last modified 12 May 2026 (read 2026-11-23): an adversary may rely on a user opening a malicious file; social engineering; file types such as .doc, .pdf, .xls, .rtf, .scr, .exe, .lnk, .pif, .cpl, .reg and .iso; masquerading and obfuscation make users more likely to run it
- MITRE ATT&CK, Masquerading, T1036, version 2.0, last modified 12 May 2026 (read 2026-11-23): manipulating features of artifacts, names, locations and metadata, to make them appear legitimate or benign to users and security tools; sub-techniques include double file extensions and masqueraded file types
- Virus Bulletin, January 1990, editorial and Jim Bates on the AIDS Information disk (read 2026-11-23): several thousand disks posted from London between 8 and 12 December 1989; the PC Business World subscriber list; a trojan that hides directories and scrambles names after a count of boots, usually 90 in tests
- Virus Bulletin, February 1990, Jim Bates's analysis of the AIDS Information disk (read 2026-11-23): an installer written in QuickBASIC 3.0; the start-up batch file replaced; an invoice payable to a post office box in Panama
- Virus Bulletin, March 1990, report on the AIDS case and Fridrik Skulason's survey (read 2026-11-23): Joseph Popp arrested in Ohio on 1 February 1990 on a charge of demanding 189 or 378 US dollars
- Microsoft, Security Bulletin MS98-010, Information on the Back Orifice program (read 2026-11-23): released on 21 July 1998 by the Cult of the Dead Cow; exploits no security issue in Windows; the user must install it or be tricked into installing it; a properly configured firewall prevents the attacker's direct connection
- F-Secure, virus description: NetBus (read 2026-11-23): a backdoor with client and server; the server, version 1.60 as PATCH.EXE, runs at every Windows start-up, hides its process name and refuses deletion
- F-Secure, virus description: SubSeven (read 2026-11-23): first discovered in May 1999, distributed through newsgroups and email; 113 capabilities in its first version; notifies its operator of each new victim by ICQ, IRC or email
- Cult of the Dead Cow, response to Microsoft on Back Orifice, 10 August 1998 (read 2026-11-23): the group says it released Back Orifice on 3 August 1998 and that the program does nothing Windows 95 and 98 were not intended to do
- FBI, Cyber Banking Fraud: Global Partnership Lands Multiple Arrests, October 2010 (read 2026-11-23): a ring that used the Zeus Trojan horse sent by email to steal online banking credentials, $70 million stolen and about $220 million attempted, money mules
- US Department of Justice, U.S. Leads Multi-National Action Against GameOver Zeus Botnet and CryptoLocker Ransomware, 2 June 2014, copy made in Chrome by the viruses-and-trojans research (read 2026-11-23): a peer-to-peer Zeus variant on 500,000 to 1 million computers; more than $100 million in losses; court orders redirecting the infected computers to substitute servers
- Cisco Talos, CCleanup: A Vast Number of Machines at Risk, September 2017 (read 2026-11-23): the legitimate signed CCleaner 5.33 distributed by Avast contained a multi-stage malware payload
- Andres Freund, backdoor in upstream xz/liblzma leading to ssh server compromise, oss-security, 29 March 2024 (read 2026-11-23): xz 5.6.0 and 5.6.1 backdoored; part of the backdoor only in the distributed tarballs, not in the source repository
- Consultor Jurídico, STJ nega HC a hacker preso na Operação Cavalo de Tróia, 12 August 2004 (read 2026-11-23): the STJ's Fifth Panel denied habeas corpus to the programmer of the trojan; fake bank pages installed a program that recorded what users typed; about R$ 100 million possibly diverted
- Consultor Jurídico, PF deflagra operação contra hackers em três estados, 4 September 2007 (read 2026-11-23): Operação Carranca de Tróia arrested 26 people in Pernambuco, Ceará and Bahia; fake bank emails installed a trojan horse that captured account numbers and passwords
- Planalto, Lei nº 12.737, de 30 de novembro de 2012 (read 2026-11-23): article 154-A of the Penal Code: invading a computing device to obtain, alter or destroy data or to install vulnerabilities; the same penalty for producing, offering, distributing, selling or disseminating a device or program for it
- Planalto, Lei nº 14.155, de 27 de maio de 2021 (read 2026-11-23): invasion punished with one to four years; fraud committed through an electronic or computing device, with or without breaking a security mechanism or using a malicious program, four to eight years
- Microsoft Learn, Macros from the internet are blocked by default in Office (read 2026-11-23): the default behaviour of Office applications changed to block macros in files from the internet, such as email attachments