
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).
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).
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:
Which techniques apply varies by family.
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.
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).
| 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) |
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.
MITRE ATT&CK keeps software pages for many RAT families. Four examples:
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.
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.
Look for behavior in endpoint and network telemetry; treat user-visible symptoms as weak hints.
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.
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.
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.
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.
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).
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.
A keylogger records keystrokes; a RAT gives interactive remote control and can be paired with, or include, keylogging (Fortinet, Malwarebytes).
No. MITRE’s detection strategy covers Linux (systemd) and macOS (LaunchAgent or LaunchDaemon) persistence, and Android RATs run as mobile apps.
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.
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.
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.
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.