Open-source cross-platform RAT

SparkRAT

SparkRAT is an open-source, cross-platform remote access trojan written in Go by the Chinese-speaking developer XZB-1248, first published on GitHub in March 2022. It runs a web-based control panel and talks to its implants over WebSocket, with builds for Windows, Linux, and macOS out of the box. It is marketed as a remote administration tool, but it is tracked here as malware because threat actors adopted it for real intrusions, most visibly the DragonSpark campaign against East Asia and a later DPRK operation against macOS users.

For a defender, the useful part is that SparkRAT is consistent. Its C2 server defaults to port 8000, it answers with a recognizable HTTP response, and it beacons over WebSocket, so the server is findable even though the RAT itself changes hands between unrelated actors.

Quick facts
  • Aliases: SparkRAT, Spark
  • Type: open-source cross-platform remote access trojan (RAT)
  • Author: XZB-1248, a Chinese-speaking developer
  • Project: github.com/XZB-1248/Spark (open-source RAT source, referenced as text only)
  • Written in: Go, with builds for Windows, Linux, and macOS
  • First published: March 2022, on GitHub
  • C2 channel: WebSocket, with HTTP POST version and upgrade checks
  • Default port: 8000 for the C2 server
  • Actively tracked
  • First seen 2022
The C2 fingerprint

The WebSocket C2 and the 401 that give it away

SparkRAT nodes on port 8000 in Hunt.io's C2 Infrastructure view, plotted across the monthFigure 01. SparkRAT in Hunt.io's C2 Infrastructure view. Every live node here answers on port 8000, plotted across the month.

A SparkRAT implant connects back to its C2 over a WebSocket, preceded by HTTP POST requests that check the server version and handle the agent's self-update. The server side is where the detection lives: SparkRAT defaults to port 8000, and the control server answers with a distinctive HTTP response that is missing the standard Server and Content-Type headers and typically returns an HTTP/1.1 401 Unauthorized.

Hunt.io uses those response characteristics rather than the port alone, since an operator can move 8000 but rarely changes the server's behavior. The JSON the server returns carries identifiers specific to SparkRAT deployments, and the hosting leans toward Asia, which is consistent with a RAT whose developer and earliest adopters are Chinese-speaking.

Live servers

SparkRAT IOC feed: servers on port 8000

Last updated on {{date}}.

Hunt.io tracks {{count}} live SparkRAT C2 servers over the trailing 30 days. It is a small set, and every one of them answers on the default port 8000, which is exactly why the port is a useful starting filter for this family. The hosting is spread across cloud providers in China, Hong Kong, the United States, Russia, and Mexico, a reminder that an open-source RAT ends up in several unrelated hands at once.

The feed is useful two ways. It gives you the current fingerprint and hosting so you can recognize a SparkRAT panel, and it lets you check whether an IP from an incident is a known SparkRAT controller.

HuntSQL

Pinpointing SparkRAT servers on port 8000 with HuntSQL

SparkRAT has a family tag, so the live-server count comes from one query over the C2 infrastructure data:

count unique active servers
SELECT uniq(ip) AS unique_ips
FROM malware
WHERE malware.name = 'SparkRAT'
  AND is_active = true

SparkRAT leans hard on 8000, so a port grouping is the quickest way to confirm whether that default still dominates the live set before you filter on it:

group results
SELECT port, uniq(ip) AS servers
FROM malware
WHERE malware.name = 'SparkRAT'
  AND is_active = true
GROUP BY port
ORDER BY servers DESC

Active servers, deduplicated by host, port, and network:

group results
SELECT ip, port, asn.name, asn.country_code
FROM malware
WHERE malware.name = 'SparkRAT'
  AND is_active = true
GROUP BY ip, port, asn.name, asn.country_code
ORDER BY ip DESC

Output example:

Live SparkRAT C2 servers in Hunt.io's SQL results, all on port 8000 across several countriesFigure 02. SparkRAT servers from the query, deduplicated, every one on the default port 8000, spread across Chinese, US, Russian, and Latin American hosting.
In the wild

SparkRAT in espionage campaigns

SparkRAT stayed obscure until Chinese-speaking actors started using it, and it has since turned up in both Chinese and DPRK-linked operations.

Detection

Detection beyond the default port

Port 8000 narrows the field, but it is a starting point, not a conclusion, so confirm the server before you act on it. The reliable tells are the response shape, a reply missing the usual Server and Content-Type headers and often returning a 401, and the WebSocket handshake the implant uses to connect. Hunt.io's detection walkthrough for SparkRAT steps through the server and sandbox traits in detail.

From a confirmed controller, pivot the way you would with any C2: group related servers on hosting and certificate traits, watch for the Asia-heavy clustering typical of this family, and treat the box as an anchor for detecting the wider C2 and the C2 beaconing behind it. The same infrastructure threat hunting that works on open-source frameworks like Sliver applies to SparkRAT, since both are Go tools that different crews pick up and reuse.

Questions

SparkRAT, answered

Is SparkRAT a virus?

SparkRAT is a remote access trojan, which is a type of malware. It is published as an open-source remote administration tool, but once it is installed without consent it works as a backdoor, giving an operator remote control of the machine.

What does SparkRAT do?

It gives an operator remote control of an infected Windows, Linux, or macOS system, including command execution, file access, and system management, through a web-based panel. It communicates over WebSocket to a C2 server.

How do I remove SparkRAT?

Isolate the machine from the network, and because a RAT gives full remote control, the safe path is to rebuild the system from a known-good image rather than trust a cleanup. Rotate any passwords and keys used on that machine afterward, since they should be treated as compromised.

What port does SparkRAT use?

Its C2 server defaults to port 8000, and in the live set every tracked server answers there. Validate on the server's HTTP response and WebSocket behavior too, since the port can be changed.

How do you detect a SparkRAT server?

Look for the default port 8000 plus the distinctive HTTP response, missing standard headers and often a 401, pull the live set from Hunt.io's SparkRAT family data with HuntSQL, and pivot on hosting. On the host, watch for a Go binary beaconing over WebSocket.

Who made SparkRAT?

A Chinese-speaking developer who goes by XZB-1248 published it as an open-source project on GitHub in March 2022. It is maintained as open-source software, which is why unrelated threat actors have been able to adopt it.