Computer Science · Ch 12 — Security Aspects
Trojan
Trojan
The story of the Trojan horse comes from ancient Greece. The Greeks could not break into the city of Troy by force, so they presented the king with a huge wooden horse. Hidden inside it were Greek soldiers, and once the horse was brought inside the city walls, those soldiers emerged and defeated the city. The name of this malware is borrowed directly from that tale.
A Trojan is a type of malware that disguises itself as legitimate, useful software. It looks harmless — often like a game, a utility, or an update — so that a user willingly installs it. The trick is the infection: the user has to be fooled into running it. Once installed, however, it behaves much like a virus or a worm, carrying out harmful actions on the system.
The key difference from a virus or worm is that a Trojan does not self-replicate. It does not copy itself to spread, and it does not infect other files on the machine. Instead, it spreads only through user interaction. Common ways include opening an email attachment that carries the Trojan, or downloading and executing a file from the Internet. Because it relies on the user's action, social engineering — deceiving the user into clicking or opening something — is central to how a Trojan works. …
Drawn by us to help you understand the concept clearly, and verified to make sure it's accurate. For exams, practice from your textbook's own diagram.
The figure is a single, storybook-style illustration rather than a technical diagram. It shows a large wooden Trojan horse standing in an open space before a tall wooden city gate and wall, all under a blue sky with clouds. The horse is the clear centrepiece — bulky, on four legs, with a rectangular opening cut into its belly. Through that gap, three small armed soldiers are visible, packed inside the hollow body. On the right, at the gate, two human figures stand; one of them points toward the horse, as if inviting it to be brought inside the city.
There are no arrows, labels, or panels in the image. The meaning is carried entirely by the scene itself: the horse looks like a harmless gift, but the soldiers hidden in its belly reveal the deception. That visual contrast — a grand, innocent-looking object concealing armed men — is the entire point.
What the figure teaches is the essence of a Trojan horse in computing. Just as the Greeks used a gift to sneak soldiers past the walls of Troy, a Trojan is malware disguised as legitimate software. It does not force its way in; it waits for the user to install it, often by opening an email attachment or downloading and running a file from the internet. Once inside, it can act like a virus or worm — but with a key difference: it does not self-replicate or infect other files. Instead, it spreads through user interaction, and some Trojans create backdoors that give malicious users remote access to the system. …