What is a Trojan Horse? Trojan Malware Fully Explained

8 minute read
Beginner

A Trojan is malware disguised as legitimate software. Learn how Trojans work, the types of Trojan malware, how they deliver ransomware, and what controls actually stop them.

How Trojans Work

A Trojan achieves its objective through deception at the point of installation. The victim installs software that appears to be one thing — a useful application, a software activation tool, a game modification, a productivity utility — and is actually another: malware designed to establish attacker access, steal data, or deliver additional payloads.

The installation vectors for Trojans exploit the same human tendencies that all social engineering attacks target. Software piracy — downloading cracked versions of paid applications from unofficial sources — is one of the most common Trojan delivery channels because the offer of free software that legitimately costs money creates strong motivation to download from untrusted sources. Malvertising — fake advertisements on legitimate websites promoting software downloads — delivers Trojans to users who believe they are downloading legitimate software from a known brand. Phishing emails with weaponized attachments deliver Trojans through the open action of a file that appears legitimate. And supply chain attacks deliver Trojans through the update mechanism of legitimate software that has been compromised at the source.

Types of Trojan Malware

Trojans are categorized by the payload they deliver after installation. Remote Access Trojans (RATs) are the most dangerous category — they establish persistent, covert remote access to the infected system, giving attackers a command-and-control channel through which they can issue instructions, exfiltrate data, capture keystrokes, access the camera and microphone, and deploy additional malware. RATs are the payload of choice for advanced persistent threat actors conducting long-term espionage operations and for financially motivated actors conducting targeted corporate data theft.

Banking Trojans specifically target financial credentials — online banking login details, credit card numbers, and financial account credentials. They use web injection techniques to insert form fields into banking websites that capture credential data before it is submitted to the legitimate site, or man-in-the-browser attacks that intercept transactions after authentication. Qakbot, Emotet, and IcedID are among the most active banking Trojan families, and they have evolved to serve as loaders for ransomware payloads in addition to their original credential theft function.

Dropper Trojans — sometimes called loaders — are Trojans whose primary function is downloading and executing a second-stage payload after initial installation. They do minimal malicious activity themselves, making them difficult to detect, and their payload — which may be ransomware, a RAT, or a cryptominer — is delivered after the initial infection has been established and any sandbox analysis period has passed.

Why Trojans Are Effective and How They Spread

The effectiveness of Trojans derives from the fundamental security limitation of trust: users must be able to install software to use their computers productively, and the decision of whether a specific piece of software is malicious requires judgment that users are not always equipped to apply correctly. Application control policies — restricting which software can be installed and from which sources — address this at the technical level, but are operationally difficult to implement comprehensively without disrupting legitimate productivity.

Trojans spread through multiple channels that vary in their targeting precision. Mass-distribution Trojans rely on high-volume delivery through email, malvertising, and software piracy networks — reaching large numbers of random users in the hope that a meaningful percentage will install the malicious software. Targeted Trojans are deployed against specific organizations or individuals — delivered through spear phishing, watering hole attacks on sites frequented by the target, or supply chain compromise. Nation-state actors specifically use Trojan delivery mechanisms for targeted intelligence operations, where the payload — a sophisticated RAT — is valuable enough to invest in precision delivery.

Trojans as the Entry Point for Ransomware

The relationship between Trojans and ransomware is significant for mid-market security planning. The majority of significant ransomware events in 2023-2026 followed a pattern where a Trojan — often delivered through phishing — established initial access and persistence, then acted as a loader for a second-stage payload that included reconnaissance tools and eventually the ransomware itself. Qakbot, which was disrupted by law enforcement in 2023 but replaced by successors, was the primary loader for LockBit and Black Basta ransomware across hundreds of documented incidents. The initial infection was a Trojan delivered through a phishing email. The ransomware was the end-stage payload that arrived weeks later.

Detecting and Preventing Trojan Infections

Trojan prevention operates at two levels: preventing installation and detecting execution. Email security gateways that sandbox attachments — executing them in isolated environments and analyzing their behavior before delivery — catch the majority of Trojan delivery through phishing. Application control policies that restrict installation of software from unmanaged sources eliminate one of the most common Trojan delivery channels. And user education about software download sources, while not a primary defense, reduces the probability that users will install software from untrusted sources.

Detection requires behavioral monitoring at the endpoint level. A Trojan that installs legitimately but then establishes an unusual outbound network connection, modifies system startup entries, or injects code into running processes generates behavioral signals that EDR platforms configured with appropriate rules will detect. The challenge is that sophisticated Trojans specifically design their behavior to minimize detectable signals during initial installation — remaining dormant, mimicking legitimate application behavior, and communicating through legitimate protocols and trusted domains.

For PE portfolio companies, the Trojan risk assessment question is: does the organization's email security sandbox attachments before delivery? Are users prevented from installing arbitrary software? Is EDR deployed with behavioral detection for post-installation Trojan activity? Organizations that can answer yes to all three have addressed the primary Trojan infection vectors. Organizations that allow users to install arbitrary software from any source and rely on signature-based antivirus to catch malicious installations are defending against a 2015 threat model, not a 2026 one.

90%+

Of ransomware events in 2024 involved a Trojan or loader malware as the initial access payload, delivered before the ransomware itself. Trojans are not the attack — they are the door that the attack walks through. Stopping Trojans is stopping the majority of ransomware before it starts.