Microsoft observed multiple incidents in which threat actors deployed GSocket, an open source remote access tool, on compromised Linux servers. Threat actors used Gsocket to maintain access even after the vulnerabilities used for initial compromise were remediated. This turned a single web application compromise into persistent access that outlasted the remediation of the original vulnerabilities. Defenders investigating affected hosts should look for evidence of GSocket deployment, persistence, privilege escalation, and outbound connections, rather than treating application patching alone as complete remediation.
Microsoft Defender for Endpoint telemetry shows this activity growing over recent months and concentrated on web applications and hosting environments. GSocket relays traffic through a shared public network, so there is no threat actor-owned IP address or domain to block.
Exploiting a web application vulnerability gives a threat actor command execution in the context of the web server process. That access lasts only while the vulnerability remains unpatched and the service keeps running. Patching the application or restarting the service can remove it.
To keep access, threat actors typically add a persistence mechanism, and each common option has drawbacks. SSH keys added to authorized_keys are easy for administrators to find during an audit. Reverse shells depend on threat actor-controlled servers that defenders can block or sinkhole. Custom implants require ongoing development and maintenance. The same trade-offs apply when initial access comes through remote access services or cloud shell sessions.
GSocket addresses these drawbacks, which helps explain why multiple unrelated threat actors have adopted it.
The same relay model that supports legitimate remote administration also gives threat actors a way to maintain access without operating dedicated C2 infrastructure. Once GSocket runs on a compromised server, the server and the operator each connect outbound to the Global Socket Relay Network, which pairs the two sessions over an end-to-end encrypted channel.

Because GSocket runs independently of the exploited application, patching the vulnerability does not remove the relay client or its persistence.
Microsoft Defender for Endpoint telemetry shows that this activity is not limited to a single compromise. From March through August 2026, devices with GSocket-related detections increased 356.2%, although the increase was not consistent month to month.

Web applications and hosting accounted for 87.1% of attributable Microsoft Defender for Endpoint incidents in the analysed telemetry. Within that group, PHP web applications and cPanel hosting represented 63.9% of incidents and Apache represented 24.3% (Figure 3).

Education and research accounted for the largest share of affected organizations (30.7%), followed by technology and telecommunications (22.9%).

These figures reflect the share of affected organizations and do not indicate that threat actors selected these sectors deliberately. Exposure is the more likely factor: academic institutions often run large, decentralized web estates maintained outside central IT, which are harder to inventory and patch.
The RCE-based intrusions in this analysis followed a similar sequence after initial access. Threat actors compromised an internet-facing application, profiled the host, transferred and concealed the relay tooling, and used the resulting channel for command and control. Some intrusions also included persistence and privilege escalation. Figure 5 combines these behaviours into a generalized attack chain. Not every stage occurred in every intrusion.

Initial access and deployment: Threat actors exploited internet-facing web applications and used curl to download and execute a remote script. The script profiled the host, selected a GSocket client matching the system architecture, staged it in writable or memory-backed paths such as /dev/shm, and established encrypted outbound command and control through the Global Socket Relay Network.

Defense evasion and persistence: Threat actors disguised GSocket with kernel-thread-like process names, persisted through cron, systemd, shell profiles, watchdogs, and redundant copies, then removed staging files and other deployment indicators.


Privilege escalation: After gaining execution as the web-service account, in few observed incidents, threat actors attempted to exploit CVE-2026-43284, one of the recent Linux kernel vulnerabilities also known as Dirty Frag, to elevate privileges to root.
GSocket identifies endpoints by a shared secret instead of an IP address or hostname. During installation, the deployment script typically generates a random secret and writes it to standard output. The threat actor can choose to read the secret from the console, redirect it to a temporary file and retrieve the file before is deleted, or have it delivered through a supported notification channel, such as Telegram (configured with GS_TG_TOKEN and GS_TG_CHATID), Discord, or a webhook. With this secret, the operator can reconnect later from any compatible GSocket client, without knowing the victim’s IP address, hostname, or network location.
A traditional reverse shell connects to a threat actor-controlled IP address written into the payload. GSocket instead derives its connection identifier and authentication material from the shared secret. The compromised host and the operator each connect outbound to the Global Socket Relay Network (GSRN), which matches them and brokers an end-to-end encrypted session. Neither endpoint needs a public IP address, an inbound listener, or a permissive inbound firewall rule.
As a result, blocking an IP address or domain is unlikely to cut off access. The connection relies on a shared relay service, outbound traffic that is commonly permitted, and a secret that does not need to be hardcoded in the payload. Anyone with the shared secret can reconnect through the relay without knowing the compromised host’s IP address or hostname.
For an affected Linux server, remediation should address both the initial compromise and the GSocket deployment.
Microsoft Defender for Endpoint provides visibility into activity associated with GSocket-related Linux intrusions, including suspicious shell execution, payload delivery, persistence, defense evasion, and remote communication. The alerts below were observed in the analyzed telemetry. An individual alert does not establish the initial access method or confirm that every stage of an intrusion succeeded.
| Tactic | Observed activity | Example alerts observed in analyzed telemetry |
| Initial access, Execution | Shells and commands launched from web servers and application runtimes | – Possible Web Server compromise activity – Suspicious shell execution from PHP application – Suspicious shell execution from web server application – Suspicious shell execution from a scripting application runtime – Suspicious remote command execution via Java Web application – Suspicious remote command execution through Node web application |
| Execution | GSocket and gs-netcat tooling launched on the host | – ‘GsNetcat’ hacktool was prevented – ‘GsNetcat’ hacktool was blocked and was active – An active ‘GsNetcat’ hacktool was blocked – An active ‘GsNetcat’ hacktool process was detected while executing and terminated |
| Execution, Payload delivery | Shell commands and scripts used to retrieve, prepare, and launch payloads | – Suspicious shell command execution – Suspicious piped command launched – Suspicious script launched – Executable permission added to file or directory – Suspicious file dropped and launched – Suspicious file or content ingress |
| Persistence | Cron jobs and Linux services created for recurring execution and continued access | – Suspicious cron job creation – Suspicious Linux service created |
| Defense evasion | Hidden file execution, obfuscation, timestomping and removal of binaries or history traces. | – Hidden file executed – Suspicious file or information obfuscation detected – Suspicious deletion of launched process binary – Attempt to clear command history – Suspicious timestamp modification |
| Discovery | Reconnaissance and collection of local system information | – Reconnaissance activity – Suspicious process collected data from local system |
| Command and control | Reverse-shell behavior and communication with GSocket domains | – Possible reverse shell – Suspicious communication with a remote target |
Security Copilot customers can use the standalone experience to create their own prompts or run prebuilt promptbooks to automate incident response or investigation tasks related to this threat:
Microsoft Defender XDR customers can use the following queries to surface GSocket-related activity. The queries use public Advanced Hunting tables populated by Microsoft Defender for Endpoint and cover deployment patterns observed in the analyzed intrusions.
Matches should be investigated in context with process ancestry, execution context, persistence changes, and related network activity.
GSocket process activity
Looks for GSocket tooling by name or command line.
DeviceProcessEvents
| where Timestamp > ago(7d)
| where FileName has_any ("gs-netcat", "gsocket")
or ProcessCommandLine has_any ("gsocket.io", "gs-netcat", "gsnetcat")
| project Timestamp, DeviceName, AccountName, FileName, FolderPath,
ProcessCommandLine, InitiatingProcessFileName
| order by Timestamp desc
Installer download activity
Looks for the download-and-execute pattern used to fetch GSocket.
DeviceProcessEvents
| where Timestamp > ago(7d)
| where ProcessCommandLine has "gsocket.io"
or ProcessCommandLine has "gsgg.b-cdn.net"
| project Timestamp, DeviceName, AccountName, FileName,
ProcessCommandLine, InitiatingProcessFileName
| order by Timestamp desc
Connections to observed distribution hosts
These are tool distribution endpoints, not threat actor-owned command and control.
DeviceNetworkEvents
| where Timestamp > ago(7d)
| where RemoteUrl has_any ("gsocket.io", "gsgg.b-cdn.net")
| project Timestamp, DeviceName, ActionType, RemoteUrl, RemoteIP, RemotePort,
InitiatingProcessFileName, InitiatingProcessAccountName
| order by Timestamp desc
Known file hashes
Matches the SHA-256 hashes published in the indicators of compromise section.
let badSHA256 = dynamic([
"d94f75a70b5cabaf786ac57177ed841732e62bdcc9a29e06e5b41d9be567bcfa",
"f95c4d029e6784e3849b4d1e2e2ae1a661187236ef7c5d487c71158a290a03b5",
"55d141bb2f62c527c3fea3413b8429fed7d52633d0b123b5e611bfa42165229f",
"12450bafc7a4398040e1ad3a16dbf4dbc79b6a8f83ef306c4f0f73f59886f06c"
]);
DeviceFileEvents
| where Timestamp > ago(7d)
| where SHA256 in~ (badSHA256)
| project Timestamp, DeviceName, ActionType, FileName, FolderPath, SHA256,
InitiatingProcessFileName, InitiatingProcessCommandLine
| order by Timestamp desc
Staging and persistence artifacts
Useful when hashes are missing or a different build is used.
DeviceFileEvents
| where Timestamp > ago(7d)
| where FolderPath startswith "/dev/shm/.gs-"
or FileName in~ ("systemd-remount-d", ".gsn_ora", "defunct", "defunct.service")
| project Timestamp, DeviceName, ActionType, FileName, FolderPath, SHA256,
InitiatingProcessFileName, InitiatingProcessCommandLine
| order by Timestamp desc
The following techniques were observed across the analyzed intrusions. Not every technique occurred in every intrusion, and some outcomes, such as persistence across reboot and successful relay session establishment, were not confirmed in every case.
Initial access
Execution
Execution, Persistence
Persistence
Defense evasion
Command and control
The indicators below were observed in the analyzed telemetry. They represent specific observations from these intrusions rather than a complete inventory of GSocket tooling or infrastructure.
| Indicator | Type | Description |
| gsocket[.]io | Domain | Script and installer retrieval |
| cdn[.]gsocket[.]io | Domain | Client binary distribution |
| gsgg[.]b-cdn[.]net | Domain | Client binary distribution |
| hxxps://gsocket[.]io/y | URL | Script retrieval in download-and-execute commands |
| hxxps://gsocket[.]io/install.sh | URL | Installer retrieval target; successful retrieval not established |
| hxxps://gsgg[.]b-cdn[.]net/bin/gs-netcat_mini-linux-x86_64 | URL | Download source associated with the x86-64 file below |
| hxxps://cdn[.]gsocket[.]io/bin/gs-netcat_mini-linux-aarch64 | URL | Download source associated with the AArch64 file below |
| /dev/shm/.gs-0/gs-netcat_mini-linux-x86_64 | Filepath | Identified as HackTool:Linux/GsNetcat.A!MTB; hidden staging directory |
| d94f75a70b5cabaf786ac57177ed841732e62bdcc9a29e06e5b41d9be567bcfa | SHA256 | SHA-256 for /dev/shm/.gs-0/gs-netcat_mini-linux-x86_64; Identified as HackTool:Linux/GsNetcat.A!MTB; hidden staging directory |
| /dev/shm/.gs-0/gs-netcat_mini-linux-aarch64 | Filepath | Identified as HackTool:Linux/GsNetcat.A!MTB; AArch64 payload |
| f95c4d029e6784e3849b4d1e2e2ae1a661187236ef7c5d487c71158a290a03b5 | SHA256 | SHA-256 for /dev/shm/.gs-0/gs-netcat_mini-linux-aarch64; Identified as HackTool:Linux/GsNetcat.A!MTB; AArch64 payload |
| /tmp/systemd-remount-d | Filepath | Identified as HackTool:Linux/GsNetcat!rfn at both paths; service-like filename |
| /usr/bin/systemd-remount-d | Filepath | Identified as HackTool:Linux/GsNetcat!rfn at both paths; service-like filename |
| 55d141bb2f62c527c3fea3413b8429fed7d52633d0b123b5e611bfa42165229f | SHA256 | SHA-256 for /tmp/systemd-remount-d, /usr/bin/systemd-remount-d; Identified as HackTool:Linux/GsNetcat!rfn at both paths; service-like filename |
| /tmp/.gsn_ora | Filepath | Hidden file identified as HackTool:Linux/GsNetcat.A!MTB |
| 12450bafc7a4398040e1ad3a16dbf4dbc79b6a8f83ef306c4f0f73f59886f06c | SHA256 | SHA-256 for /tmp/.gsn_ora; Hidden file identified as HackTool:Linux/GsNetcat.A!MTB |
For the latest security research from the Microsoft Threat Intelligence community, check out the Microsoft Threat Intelligence Blog.
To get notified about new publications and to join discussions on social media, follow us on LinkedIn, X (formerly Twitter), and Bluesky.
To hear stories and insights from the Microsoft Threat Intelligence community about the ever-evolving threat landscape, listen to the Microsoft Threat Intelligence podcast.
Review our documentation to learn more about our real-time protection capabilities and see how to enable them within your organization.