What Is a Remote Access Trojan (RAT)? How It Works and How to Spot One

Published On : 2026-11-26
Share :
What Is a Remote Access Trojan (RAT)? How It Works and How to Spot One

A remote access trojan (RAT) is malware designed to give an attacker covert remote control of an infected device. It typically arrives disguised as a legitimate file or app and then connects back to a server the attacker controls. RAT malware and legitimate remote access software can overlap in capability; authorization, provenance, intent, deployment and concealment help tell legitimate use from malicious activity. An infostealer, by contrast, is centered on collecting and exfiltrating credentials, session data and other information from a device, while a RAT is centered on ongoing remote control of it (see what an infostealer is).

Key takeaways

  • A remote access trojan gives an attacker hidden, interactive control: keylogging, file and credential theft, webcam capture and further malware.
  • RAT malware and legitimate remote access software can overlap in capability; authorization, provenance, intent, deployment and concealment help distinguish legitimate use from malicious activity.
  • Attackers also misuse legitimate remote monitoring and management (RMM) software, which, per the Cybersecurity and Infrastructure Security Agency (CISA), generally does not trigger antivirus or antimalware defenses.
  • Slowness and similar symptoms are weak hints; new persistence and long-lived outbound connections in telemetry are evidence to investigate.
  • A validated RAT infection can give an attacker hands-on access; an indicator match alone is a lead to investigate, not proof of an active operator session. If it is validated, isolate the device (preserving volatile evidence where responders can), then from a clean device revoke active sessions and tokens, rotate credentials and check what else the attacker reached.

How does a remote access trojan work?

A RAT commonly reaches a device through a lure or malicious download, executes and may establish persistence, then creates or uses a command-and-control (C2) channel for operator instructions.

Table 1: How a RAT intrusion unfolds

Stage What happens Illustrative example (hypothetical)
Delivery Phishing attachment or link, a malicious file the user runs, or a fake update prompt An “invoice” attachment from [email protected]
Execution and hiding Runs in the user’s context under an ordinary-looking name A “software updater” process in the user’s profile folder
Persistence Service or autorun entry on Windows, systemd on Linux, LaunchAgent or LaunchDaemon on macOS A new auto-start service
Command and control Long-lived outbound connection to external infrastructure A long-lived connection to c2.example.net (203.0.113.17)
Actions Keylogging, screenshots, file and credential theft, more malware Documents copied to the C2 server

Sources: Fortinet, TechTarget, Kaspersky and Proofpoint (delivery, actions); MITRE (persistence, C2).

What can a remote access trojan do?

A RAT gives an operator interactive control, so what it does depends on the operator and the family. MITRE ATT&CK maps RAT families such as njRAT and AsyncRAT to techniques that include:

  • Keylogging (001) to capture credentials as users type.
  • Screen capture (T1113), which MITRE says is often built into remote access tools, and video capture (T1125), which can use a webcam.
  • Credential theft from web browsers (003), mapped for njRAT.
  • Tool and file transfer (T1105) to bring in more malware, and exfiltration over the command-and-control channel (T1041) to take data out.

Which techniques apply varies by family.

RAT vs legitimate remote access tools: where is the line?

The main tests are authorization, provenance, intent, deployment and concealment: legitimate remote access runs with the owner’s approval; a RAT runs without it and typically hides.

  • Fortinet: a RAT acts without the owner’s consent or knowledge.
  • Proofpoint: RATs have the same remote-control functionality as the Remote Desktop Protocol (RDP) but serve malicious purposes and hide from anti-malware and the owner.
  • The MITRE Corporation’s ATT&CK (Adversarial Tactics, Techniques, and Common Knowledge) T1219, Remote Access Tools (page version 3.0, last modified 12 May 2026): adversaries use legitimate remote access tools as an interactive C2 channel, and installing them can create persistence.
  • **CISA advisory AA23-025A** (January 2023, with the National Security Agency and the Multi-State Information Sharing and Analysis Center): actors use legitimate RMM software as a backdoor, including portable executables needing no installation or administrator rights.

CISA recommends auditing authorized RMM tools, allowlisting approved ones and allowing RMM only over a virtual private network (VPN) or virtual desktop interface (VDI). MITRE’s mitigations add blocking unapproved remote access software (M1038), disabling unneeded remote features (M1042) and filtering remote access traffic (M1037).

Table 2: A RAT vs a misused legitimate tool

Aspect RAT Misused legitimate tool
What it is Malware built for covert control RMM or remote desktop software used without authorization
How it arrives Phishing or a malicious file the user runs (MITRE T1566, T1204) Installed by an intruder with access (MITRE T1219: AnyDesk by Akira, BlackByte, INC Ransom, Medusa; TeamViewer by Carbanak, Cobalt Group); in one campaign, help-desk phishing (CISA)
Antivirus Built to hide from anti-malware (Proofpoint) Generally does not trigger antivirus or antimalware defenses (CISA)
Main control Behavioral detection in telemetry (MITRE) Inventory, allowlisting, VPN or VDI-only access (CISA)

What is an Android RAT?

An Android RAT is a RAT packaged as a mobile app; it can gain much of its power from permissions the user grants. Check Point Research’s June 2024 analysis of Rafel RAT describes apps posing as social media, messaging, shopping and antivirus apps that may request Notifications or Device Admin rights, used to forward two-factor authentication (2FA) codes and resist uninstallation. CYFIRMA’s analysis of GhostSpy, a web-based Android RAT, describes a sideloaded dropper with a fake update prompt and Accessibility Service abuse for privilege escalation and blocking uninstalls. CYFIRMA also published an analysis of TaxiSpy, an Android banking trojan with integrated RAT functionality.

What are examples of well-known RAT families?

MITRE ATT&CK keeps software pages for many RAT families. Four examples:

  • PoisonIvy: a popular remote access tool that, per MITRE, many groups have used.
  • njRAT: first observed in 2012 and used by threat actors in the Middle East, per MITRE.
  • Remcos: marketed as remote control and surveillance software and observed in malware campaigns.
  • AsyncRAT: an open-source remote access tool, originally on the NYANxCAT GitHub repository, that has been used in malicious campaigns.

Remcos is marketed as remote control software and AsyncRAT is open source, which is another reason authorization, not capability, defines the line. CYFIRMA researchers have analyzed other families, listed below.

How is a RAT different from an infostealer, a backdoor and spyware?

An infostealer is centered on collecting and exfiltrating credentials, session data and other information from a device; a RAT is centered on ongoing remote control. The line can blur: CYFIRMA’s analysis of Salat Stealer describes a Go-based Windows infostealer that is also called WEB_RAT. For the infostealer side, see what an infostealer is.

The National Institute of Standards and Technology (NIST) glossary defines a backdoor as an undocumented way of gaining access to a computer system and spyware as software secretly installed to gather information about individuals or organizations without their knowledge. A RAT is defined by interactive control. It can act as a backdoor, as CISA describes for misused RMM software, and it can carry out spyware-like actions such as keylogging and screen capture.

How to spot a RAT: signs and telemetry

Look for behavior in endpoint and network telemetry; treat user-visible symptoms as weak hints.

  • Behavior chains. MITRE’s detection strategy DET0496 (version 1.0, last modified 12 May 2026) looks for a chain: a remote access tool running in a user context, persistence via a service or autorun entry, long-lived outbound connections and interactive child processes such as shells.
  • Unauthorized RMM. CISA recommends reviewing logs for RMM execution, especially portable versions, and detecting in-memory-only RMM.
  • Windows logging. MITRE’s Windows analytic (AN1366) includes Sysmon (System Monitor) Event IDs 1 (process creation) and 3 (network connection), System Event ID 7045 (service creation) and Sysmon Event IDs 12 and 13 (registry key creation and modification). Sysmon must be installed separately, and Event ID 3 is disabled by default.
  • Weak signs. TechTarget, Fortinet and Kaspersky list slowness, antivirus crashes, browser redirects, unfamiliar files and an unexplained webcam light; Fortinet notes they are not exclusive to RATs.

Important caveat: A RAT’s indicators of compromise in a threat report or external monitoring do not by themselves prove an environment is compromised. Outside evidence, such as a family name, domain or file hash, tells defenders where to look; endpoint and network telemetry establish what happened on a specific system.

What mistakes do teams make when dealing with RATs?

  1. No inventory of authorized remote access tools. An approved RMM agent and an attacker’s copy look the same (CISA).
  2. Relying on traditional antivirus alone. Legitimate RMM software generally does not trigger antivirus or antimalware defenses (CISA), and RATs are built to hide (Proofpoint).
  3. Treating one indicator match as a verdict. It is a reason to investigate (see the caveat).
  4. Deleting the file and moving on. Malwarebytes advises assuming data on the machine is compromised and changing passwords from a clean computer; ManageEngine adds rotating service, VPN and cloud credentials.

Which RAT families has CYFIRMA analyzed?

CYFIRMA researchers have analyzed the following RAT families.

More malware analyses are in the CYFIRMA research library.

Related reading: indicators of compromise explains how to judge an indicator match, and infostealers covers malware that harvests stored data rather than giving remote control.

Frequently asked questions

Is RAT malware the same as a remote access trojan?

In this article, RAT malware means a remote access trojan. The acronym RAT is also used for remote administration tool or remote access tool, including legitimate software (MITRE ATT&CK uses remote access tools), so context matters.

Is AnyDesk or TeamViewer a RAT?

AnyDesk and TeamViewer are legitimate products, although adversaries have abused both (MITRE T1219). Unexpected or unauthorized use should be investigated; evidence of malicious use should be handled as an intrusion.

How do RATs get onto a device?

Through phishing attachments and links, cracked or trojanized software, fake updates, and Office macros (Fortinet, TechTarget, Proofpoint) and, on phones, sideloaded apps or unofficial app stores (Fortinet).

Can antivirus detect a RAT?

Antivirus can detect some RAT malware, but detection varies by family and implementation. Attackers may obfuscate RAT payloads, while abused legitimate remote monitoring and management tools may not be flagged (CISA). Behavioral endpoint and network telemetry is therefore also needed.

What is the difference between a RAT and a keylogger?

A keylogger records keystrokes; a RAT gives interactive remote control and can be paired with, or include, keylogging (Fortinet, Malwarebytes).

Do RATs only affect Windows?

No. MITRE’s detection strategy covers Linux (systemd) and macOS (LaunchAgent or LaunchDaemon) persistence, and Android RATs run as mobile apps.

What is the difference between a RAT, a backdoor and spyware?

The NIST glossary defines a backdoor as an undocumented way of gaining access to a computer system and spyware as software secretly installed to gather information about individuals or organizations without their knowledge. A RAT is defined by interactive remote control, and it can act as a backdoor and carry out spyware-like actions such as keylogging.

How do you prevent a RAT infection?

No single control prevents every RAT, but the sources cited here point to four measures. Keep an inventory of authorized remote access tools and allowlist them (CISA). Use application control to block unapproved remote access software (MITRE M1038) and disable unneeded remote connection features (MITRE M1042). Restrict outbound traffic to remote access services (MITRE M1037), and add behavioral telemetry for what prevention misses.

What should you do if you find a RAT?

Validate the finding first, because an indicator match alone is not proof. Then isolate the device under the organization’s incident-response process, such as one based on the National Institute of Standards and Technology’s SP 800-61 Rev. 3, and, where trained responders and established procedures support it, preserve volatile evidence before shutdown or reimaging. From a clean device, revoke active sessions and tokens where the application allows it, then rotate affected credentials. Check what else the attacker reached, including lateral movement, and remediate or rebuild the device.

Conclusion

A remote access trojan is malware that gives an attacker covert, unauthorized control of a device. Knowing which remote access is authorized and watching for new persistence and long-lived outbound connections is more reliable than hunting symptoms.