Steve Miller's Blog

A digital workshop for systems-minded tech commentary.

Microsoft Says Attackers Abuse GSocket for Linux Backdoor Persistence That Survives Patching: Hunting for the Access That Outlives the Fix

Three anonymous Linux server administrators in business-casual clothes review a plan at a conference table with a closed laptop and blank notepads in a bright, modern office.

Written by

in

Patching the hole an attacker came through is not the same as evicting the attacker. Microsoft’s latest threat research puts a sharp point on that: attackers are abusing GSocket, a legitimate open-source connectivity tool, to build Linux backdoor persistence that keeps working after the web application flaw behind the break-in is fixed. If you close an incident when the patch ships, the report suggests you may be closing it early.

What GSocket Is, and What Microsoft Reported

GSocket is the Global Socket Toolkit. Its project page describes it as a way for two users behind NAT or a firewall to establish a TCP connection with each other, using the Global Socket Relay Network, a free cloud relay, and a shared secret in place of IP addresses. Its gs-netcat tool can give a remote shell. It is released under the BSD-2-Clause license. The tool is not malware by nature, though Defender flags it as a “GsNetcat” hacktool. What matters here is how it is used.

In a report published November 11, 2026, Microsoft Security Research authors Yash Gund and Sumith Maniath said Microsoft observed multiple incidents in which threat actors deployed GSocket on compromised Linux servers “to maintain access even after the vulnerabilities used for initial compromise were remediated.” The report does not name a threat actor. It says “multiple unrelated threat actors have adopted it,” and it names no vulnerability used for initial access beyond saying internet-facing web applications were exploited.

Why a Patch Does Not Remove It

Microsoft’s explanation is brief: “Because GSocket runs independently of the exploited application, patching the vulnerability does not remove the relay client or its persistence.” The web exploit gives command execution only while the hole stays open. The relay client does not need the hole.

Microsoft describes three properties that make it attractive to attackers. Traffic passes through a shared public relay, so there is no attacker-owned IP address or domain to block. Both the server and the operator connect outbound, so inbound firewall rules never see the session. And the deployment script can rename the process, stage files in memory-backed directories, and install persistence that survives a reboot.

What the Linux Backdoor Persistence Looks Like

In the observed intrusions, attackers used curl to download and run a script, which profiled the host, picked a client for the architecture, and staged it in writable or memory-backed paths such as /dev/shm. Microsoft says attackers then disguised the process with kernel-thread-like names (one example is [kaluad]) and persisted through “cron, systemd, shell profiles, watchdogs, and redundant copies.” They also removed staging files. Microsoft’s examples include a defunct.service unit, a renamed payload at /usr/bin/defunct, a binary called systemd-remount-d, and a hidden /dev/shm/.gs-0 directory.

Reconnection works through a secret rather than an address. The deployment script typically generates it and, per Microsoft, the operator can read it from the console, retrieve it from a temporary file, or have it delivered through Telegram, Discord, or a webhook. With the secret, the operator can reconnect later from any compatible client.

In a few incidents, Microsoft says, attackers who had execution as the web-service account tried to escalate to root using CVE-2026-43284, one of the Linux kernel flaws known as Dirty Frag. Microsoft says “attempted,” and it does not say every attempt worked. Ubuntu’s advisory says the Dirty Frag flaws were publicly disclosed on May 7, 2026, covers two CVEs (CVE-2026-43284 and CVE-2026-43500), and says kernel updates are available and need a reboot. Check your own distribution for both.

What Microsoft’s Telemetry Shows

This is vendor telemetry, from Microsoft Defender for Endpoint, and it reflects Microsoft’s customers. From March through August 2026, Microsoft says devices with GSocket-related detections rose 356.2%, “although the increase was not consistent month to month.” Web applications and hosting made up 87.1% of attributable incidents. Within that group, PHP web applications and cPanel hosting were 63.9% and Apache 24.3%. Education and research was the largest sector at 30.7%, followed by technology and telecommunications at 22.9%. Microsoft cautions that exposure is the more likely factor than deliberate targeting, noting that academic institutions often run large, decentralized web estates maintained outside central IT.

Microsoft also notes limits. Not every stage occurred in every intrusion, and persistence across reboot and successful relay sessions were not confirmed in every case. The published indicators are specific observations, “rather than a complete inventory.”

A Hunting and Cleanup Plan for Patched Servers

Microsoft’s report includes Defender alert names, Advanced Hunting queries, and an IOC list of domains, file paths, and SHA-256 hashes. Its mitigation guidance tells defenders to remediate the host as well as the vulnerability: investigate and remove the client, its persistence, and staged files, “then verify that outbound connections to the relay infrastructure have stopped.” Using that guidance, here is how I would run it.

  1. Audit persistence first. Review cron entries, systemd units with plausible service names, shell startup files, and watchdog scripts. Microsoft notes persistence is often layered, so killing the process alone does not remove access. Remove the persistence before the process, or it comes back.
  2. Hunt by behavior. Look for shells launched by PHP, Java, or Node web processes, execution from hidden or world-writable paths, and processes whose names imitate kernel threads but do not belong to the kernel. Run Microsoft’s published queries if you use Defender XDR.
  3. Constrain egress. Microsoft recommends deny-by-default outbound rules and monitoring connections to relay infrastructure. A web server should not need to reach arbitrary hosts.
  4. Harden temp paths. Mount temporary and memory-backed directories non-executable where feasible, as Microsoft advises.
  5. Patch the local privilege escalation path. Prioritize kernel updates on internet-facing servers, including the Dirty Frag fixes, and schedule the reboots.
  6. Treat credentials as exposed. This one is my judgment, not Microsoft’s: if an attacker held a shell on the host, rotate the secrets the web application can read, such as database passwords and API keys.

When a Cleaned Server Is Still Suspect

Microsoft’s guidance is to remove the tool and verify. If you cannot establish whether the attacker reached root, or what else was changed, my view is that rebuilding from a known-good image is the safer path. That is an opinion, and the cost is real downtime. The report gives you the checks for the specific tool, and it cannot tell you what else an attacker with a working shell did.

The lesson is a change in what counts as done. A closed vulnerability is the start of the cleanup, so add a host check to the end of every web-compromise ticket.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *