ArticleslgStudy

computer science

Trojan horse (computing)

Trojan horse (computing) is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Trojan horse (computing) rather than just read about it. In short: In computing, a trojan horse or trojan 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.

Trojan horse (computing) — main illustration
Trojan horse (computing) — illustration

Key takeaways

  • Trojan horse (computing) belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Trojan horse (computing) to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Trojan horse (computing) from memory before moving on to harder problems.

Reference excerpt

In computing, a trojan horse or trojan 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. 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. Trojan horses are named after the Trojan Horse of Greek mythology.

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. 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.

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. Examples of govware trojans include the Swiss MiniPanzer and MegaPanzer 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. 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. Zeus and TrickBot are among the most studied examples of this type. Another category is the remote access trojan, (RAT), which allows attackers to gain full remote control over an infected system, enabling them to install additional software, access files, or monitor user activity. 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. Information-stealing trojans are also common, collecting sensitive data such as browser cookies, stored credentials, or documents without the user's knowledge. Furthermore, fake antivirus trojans imitate legitimate security software, tricking users into paying for unnecessary or harmful services. Because trojans can be adapted for multiple purposes, many modern types have overlapping features, mixing elements of backdoors, spyware, and downloaders. This adaptability has been a major factor in their prevalence as one of the most common forms of malware.

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.

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.

… excerpt ends here. Continue reading the full article.

Illustrations

Trojan horse (computing): Screenshot of MiniPanzer
Screenshot of MiniPanzer
Trojan horse (computing): Map of countries touched by ANOM
Map of countries touched by ANOM

Worked examples

Example 1 — a first encounter with Trojan horse (computing)

Start with the simplest possible case. Write down what Trojan horse (computing) claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Trojan horse (computing) before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Trojan horse (computing) ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Trojan horse (computing)

In research
Trojan horse (computing) appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Trojan horse (computing) in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Trojan horse (computing) is common in secondary-school and first-year university syllabi. It links to neighbouring topics Cyberwarfare, Security breaches, Social engineering (security), so understanding it makes those chapters shorter.
In everyday life
Look for Trojan horse (computing) outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Trojan horse (computing)” →

How to study Trojan horse (computing) in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Trojan horse (computing) means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Trojan horse (computing) out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Trojan horse (computing) in simple terms?

In computing, a trojan horse or trojan 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.

Why does Trojan horse (computing) matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Trojan horse (computing)?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Trojan horse (computing).

Tags

  • Cyberwarfare
  • Security breaches
  • Social engineering (security)
  • Spyware
  • Trojan horses
  • Words and phrases derived from Greek mythology

Keep exploring