GSocket keeps attackers connected after Linux web server fixes
Microsoft traced persistent GSocket access on compromised Linux web servers to an outbound relay client and layered host persistence that application patches leave behind.

Attackers kept remote access to compromised Linux web servers after their initial web application vulnerabilities were repaired. In intrusions investigated by Microsoft Security Research, they installed GSocket, an open-source relay client that runs independently of the vulnerable application. For a team restoring a PHP site or hosting server, an application patch is one part of the repair; the host may still be calling out to the relay.
Microsoft saw GSocket-related detections on devices rise 356.2% from March to August 2026 in its Defender for Endpoint telemetry. Web applications and hosting represented 87.1% of attributable incidents in the analyzed data. Use those telemetry shares to prioritize your own host inventory: look for a relay client, a startup hook and outbound activity on repaired servers.
The application fix leaves access
An attacker first gets command execution through an internet-facing application, in the web-service account context. In the cases Microsoft analyzed, the attacker then transferred a GSocket client to the Linux host, sometimes into the memory-backed directory /dev/shm/.gs-0. The client and the operator each initiate an outbound connection to the Global Socket Relay Network, which pairs them using a shared secret and carries an end-to-end encrypted session. The compromised machine needs neither a public address nor an inbound listener.
Microsoft puts the network problem plainly: “there is no threat actor-owned IP address or domain to block.” The relay is a shared service used for legitimate remote administration too. Block or constrain outbound access to it according to your organization’s authorized use, rather than treating the service itself as attacker-owned. Patching the exposed application stops the original entry route; it leaves an independently running client and its startup mechanisms in place until the host is investigated and cleaned.
Disguised clients and startup hooks
The observed clients used service-like filenames, including /usr/bin/systemd-remount-d, and a hidden /tmp/.gsn_ora file. Microsoft also observed a payload at /usr/bin/defunct, a defunct.service persistence reference and cron entries. Other deployment paths used shell startup files, systemd units, watchdogs and redundant copies. Microsoft did not confirm persistence across reboot in every incident, so check these launch hooks and the relay connection after restart. A process dressed as a kernel thread deserves examination when its ancestry or on-disk path points back to a web server.
The investigators observed attempts in a few incidents to escalate from the web-service account using CVE-2026-43284. The Linux CVE record describes a local kernel flaw involving shared packet fragments and ESP decryption; check the distribution kernel advisory and backport status on affected servers. For those attempted escalations, examine host privilege and file integrity before deciding what else needs to be rebuilt.
Trace process and relay activity
Start with internet-facing Linux web and hosting servers, especially the PHP applications, cPanel installations and Apache servers represented in Microsoft’s incident categories. In Defender XDR Advanced Hunting, correlate DeviceProcessEvents for gs-netcat, gsocket or gsnetcat with web-service parent processes. Check DeviceFileEvents for /dev/shm/.gs-0, /tmp/.gsn_ora, /usr/bin/systemd-remount-d and /usr/bin/defunct; then inspect cron, systemd units and shell profiles for launch hooks. Microsoft’s “Suspicious cron job creation” and “Suspicious Linux service created” alerts help place those changes on the same host timeline.
Microsoft reported these SHA-256 values for observed files: d94f75a70b5cabaf786ac57177ed841732e62bdcc9a29e06e5b41d9be567bcfa for an x86-64 client in the hidden staging directory; f95c4d029e6784e3849b4d1e2e2ae1a661187236ef7c5d487c71158a290a03b5 for an AArch64 client there; 55d141bb2f62c527c3fea3413b8429fed7d52633d0b123b5e611bfa42165229f for the service-like binary; and 12450bafc7a4398040e1ad3a16dbf4dbc79b6a8f83ef306c4f0f73f59886f06c for the hidden temporary file. Match a hit to the corresponding path, execution context and timeline before drawing a conclusion; different builds and removed staging files call for behavioral checks too.
For egress, correlate DeviceNetworkEvents with process ancestry and relay traffic. Microsoft lists gsocket.io and gsgg.b-cdn.net as shared tool distribution endpoints. Investigate matches in host context because authorized GSocket activity also reaches these hosts. An inbound-firewall check will miss the outbound-only connection path.
Remove the client and hooks
On a host where the process chain and artifacts point to an intrusion, contain its outbound relay access, repair the exposed web application and remove the GSocket client together with its cron jobs, systemd units, shell-profile entries and redundant copies. Preserve the host timeline before cleanup. Patch the Linux kernel according to the distribution advisory where CVE-2026-43284 applies, and examine privileges if escalation was attempted.
Then restart the affected services or reboot as appropriate and check the process list, persistence surfaces and outbound network telemetry again. The expected result is that the repaired application is current, the suspicious client and launch hooks stay gone, and the host stops making the associated relay connections. A quiet distribution-domain search alone leaves a blind spot: the established relay channel uses shared infrastructure, and staged download files may already have been removed.