MagicRAT
- Type
- RAT
- Capabilities
- ExfiltrationPersistencePost exploitationDefense evasionReconnaissance
- Delivery
- Exploit kit
- Platforms
- Windows
MagicRAT is a Windows remote access trojan associated with the North Korean state-sponsored Lazarus Group and its Andariel subgroup. Publicly documented in 2022, it was deployed following exploitation of internet-facing VMware Horizon servers, including through Log4Shell (CVE-2021-44228). It was used in an espionage campaign targeting energy organizations, particularly in the United States, Canada, and Japan, to support sustained access and data theft.
MagicRAT is written in C++ and statically links the Qt framework in both 32-bit and 64-bit builds despite having no graphical interface. Its use of Qt increases reverse-engineering complexity. It stores configuration using Qt's QSettings functionality, encodes command-and-control addresses, and disguises configuration artifacts as legitimate operating-system resources. Persistence is established through Windows scheduled tasks and a Startup-folder shortcut.
The implant performs initial reconnaissance to identify the current user, system details, and network configuration. It provides a remote shell for arbitrary command execution, supports file renaming, movement, and deletion, and exfiltrates data through existing HTTP command-and-control channels. Operators can adjust sleep intervals, replace command-and-control addresses, download additional executable payloads, and remove the implant. Downloaded payloads have masqueraded as GIF images, including a separate lightweight port scanner. MagicRAT infections have shared infrastructure with TigerRAT, and some deployments were subsequently removed and replaced with VSingle. QuiteRAT is a smaller Qt-based derivative that retains similar command-execution and command-and-control functionality.
Associated vulnerabilities
1 CVE Mallory has correlated with this family across public research and vendor advisories. Each card links to the full Mallory page for that vulnerability.
Associated threat actors
3 distinct threat actors Mallory has associated with this family across public reporting. Open in Mallory to see the full evidence chain and overlapping campaigns.
[MagicRAT](https://attack.mitre.org/software/S1182) is exclusively associated with [Lazarus Group](https://attack.mitre.org/groups/G0032) operations in 2022.(Citation: Cisco MagicRAT 2022)
특히 과거 공격에 사용된 Andarat, Andaratm, Phandoor, Rifdoor 외에도 수년 전부터 확인되고 있는 TigerRAT, MagicRAT 등 백도어 유형이 많다.
Over the last 15 years, the group has developed RATs, including the following... ▪ MagicRAT
Techniques & procedures
22 distinct techniques documented for this family, organized by ATT&CK tactic.
Resource Development
1 technique
Resource Development
“These tools include functionality for executing arbitrary commands... and uploading content to command and control (C2) [T1587.001, T1587.004].”
Initial Access
1 technique
Initial Access
Cisco Talos identified the exploitation of the Log4Shell vulnerability on VmWare Horizon public-facing servers as the initial attack vector [T1190].
Execution
3 techniques
Execution
“Sandworm Team leveraged Scheduled Tasks through a Group Policy Object (GPO) to execute CaddyWiper at a predetermined time.” / “APT29 used scheduler and schtasks to create new tasks on remote host as part of their lateral movement… updating an existing legitimate task to execute their tools and then returned the scheduled task to its original configuration.”
This scenario creates a new scheduled task using the schtasks utility with the name HPSync that was observed being used in these attacks.
[MagicRAT](https://attack.mitre.org/software/S1182) allows for the execution of arbitrary commands on the victim system.(Citation: Cisco MagicRAT 2022)
Persistence
4 techniques
Persistence
“Sandworm Team leveraged Scheduled Tasks through a Group Policy Object (GPO) to execute CaddyWiper at a predetermined time.” / “APT29 used scheduler and schtasks to create new tasks on remote host as part of their lateral movement… updating an existing legitimate task to execute their tools and then returned the scheduled task to its original configuration.”
This scenario creates a new scheduled task using the schtasks utility with the name HPSync that was observed being used in these attacks.
The malicious Office Document used for the deployment of the Rising Sun implant, which obtains persistence through the Startup folder.
The content repeatedly notes creation of '.lnk shortcut' files in the Startup folder, such as BACKSPACE creating a shortcut in CSIDL_STARTUP, DarkGate creating an LNK object in the victim startup folder, and Operation Dream Job placing LNK files into victims' startup folder.
Privilege Escalation
4 techniques
Privilege Escalation
“Sandworm Team leveraged Scheduled Tasks through a Group Policy Object (GPO) to execute CaddyWiper at a predetermined time.” / “APT29 used scheduler and schtasks to create new tasks on remote host as part of their lateral movement… updating an existing legitimate task to execute their tools and then returned the scheduled task to its original configuration.”
This scenario creates a new scheduled task using the schtasks utility with the name HPSync that was observed being used in these attacks.
The malicious Office Document used for the deployment of the Rising Sun implant, which obtains persistence through the Startup folder.
The content repeatedly notes creation of '.lnk shortcut' files in the Startup folder, such as BACKSPACE creating a shortcut in CSIDL_STARTUP, DarkGate creating an LNK object in the victim startup folder, and Operation Dream Job placing LNK files into victims' startup folder.
Stealth
8 techniques
Stealth
The content repeatedly describes payloads, strings, configuration files, scripts, URLs, and binaries being obfuscated or encoded using Base64, XOR, RC4, AES, RSA, hex encoding, custom algorithms, and other methods across many malware families and threat actors.
[MagicRAT](https://attack.mitre.org/software/S1182) stores base64 encoded command and contorl URLs in a configuraiton file, with each URL prefixed with the value `LR02DPt22R`.(Citation: Cisco MagicRAT 2022)
During the 2016 Ukraine Electric Power Attack, DLLs and EXEs with filenames associated with common electric power sector protocols were used to masquerade files.
[MagicRAT](https://attack.mitre.org/software/S1182) stores configuration data in files and file paths mimicking legitimate operating system resources.(Citation: Cisco MagicRAT 2022)
[MagicRAT](https://attack.mitre.org/software/S1182) can download additional executable payloads that masquerade as GIF files.(Citation: Cisco MagicRAT 2022)
Many entries explicitly describe deleting artifacts 'to cover tracks,' 'evade detection,' 'remove evidence,' 'reduce their footprint,' or as part of 'post-intrusion cleanup process.' Examples include APT28 deleting files to cover tracks, FIN5 using SDelete to clean up the environment, and Dragonfly deleting operational files as part of cleanup.
[MagicRAT](https://attack.mitre.org/software/S1182) can delete files on victim systems, including itself.(Citation: Cisco MagicRAT 2022)
[MagicRAT](https://attack.mitre.org/software/S1182) stores command and control URLs using base64 encoding in the malware's configuration file.(Citation: Cisco MagicRAT 2022)
Discovery
2 techniques
Discovery
[MagicRAT](https://attack.mitre.org/software/S1182) collects system network information using commands such as `ipconfig /all`.(Citation: Cisco MagicRAT 2022)
[MagicRAT](https://attack.mitre.org/software/S1182) collects basic system information from victim machines.(Citation: Cisco MagicRAT 2022)
Lateral Movement
1 technique
Lateral Movement
VSingle deployment on new hosts was done by using WMIC to start a remote process. This process was, in fact, a PowerShell snippet that would download VSingle from a remote system.
Command and Control
3 techniques
Command and Control
The actors disguise their malware within HTTP packets to appear as benign network traffic... [T1090, T1071].
[MagicRAT](https://attack.mitre.org/software/S1182) uses HTTP POST communication for command and control.(Citation: Cisco MagicRAT 2022)
[MagicRAT](https://attack.mitre.org/software/S1182) can import and execute additional payloads.(Citation: Cisco MagicRAT 2022)
Exfiltration
1 technique
Exfiltration
Files are sent to an AttackIQ controlled server using HTTP POST requests.
Observables
31 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
20 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.