A sophisticated backdoor tied to the China-linked APT group Webworm can remotely replace every stolen credential it uses, rendering standard token revocation ineffective as a containment strategy. The finding comes from a detailed reverse-engineering analysis of the GraphWorm implant published on CSO Online, which reveals that the malware can swap its entire identity in response to a single remote command without changing anything on the infected endpoint. The analysis challenges a core step in nearly every identity-compromise incident response playbook: the assumption that revoking tokens removes access.

GraphWorm operates without a traditional command-and-control domain, instead authenticating to Microsoft Graph as an OAuth application and using a OneDrive account as a dead drop. The operator writes encrypted task files into a job folder, the implant polls that folder and executes tasks, then uploads encrypted results into a result folder. All traffic rides over graph.microsoft.com via TLS, from a host already communicating with Microsoft 365 throughout the day, leaving no unusual destination for firewalls to flag and no freshly registered domain for reputation engines to penalize. The implant carries five credential strings in cleartext within the binary: a client ID, a client secret, a tenant ID, and a refresh token exceeding 1,300 characters. It identifies victims by hashing the network adapter's hardware address together with CPU and disk serial numbers pulled through WMI, meaning hostname changes, subnet reassignments, or new egress addresses won't prevent the operator from recognizing the same machine.

The critical function is one called "upgrade," which parses a configuration blob from an incoming task, destroys all five credential strings held in the beacon object, copies five new ones in, rebuilds the OAuth scope structure, tests a connection against the new OneDrive account, writes the replacement configuration to disk, and swaps the live API instance. The analysis notes that "revocation removed a credential. It did not remove access." If an investigation identifies the application and revokes the tokens, the implant's next poll fails, but an attentive operator can queue an upgrade task pointing at a second OneDrive account registered months earlier, allowing the implant to rotate and resume with the same file on disk and no new binary, persistence mechanism, or process. The author confirmed the capability twice, first from extracted strings and again from the decompiled function itself, verifying that credential field offsets recovered from strings aligned with offsets the constructor actually reads.

The analysis recommends treating revocation as a delay rather than an eviction whenever command-and-control rides an application identity, since the registration is the durable object, not the tokens it issues. Containment that stops at revoking "has started a timer rather than closed a door," and investigators should assume the operator holds a spare credential, since rotation costs an attacker almost nothing but costs defenders an entire response cycle. The report advises removing the endpoint's ability to reach the channel at the same moment credentials are burned, not afterward, through host isolation or blocking the specific application from authenticating in the defender's tenant. Detection relies on cloud telemetry queries rather than network signatures: the operator's application ID appearing in sign-in events, authentication against an unfamiliar tenant, non-browser HTTP library user agents hitting OneDrive, and beacon and fingerprint file names showing up in file telemetry. The wider pattern is that adversaries have answered a decade of infrastructure hunting by not having any infrastructure, and when the channel is a folder in a cloud tenant with an identity that can be swapped by remote command, the artifacts defenders are trained to chase are precisely the ones an operator can replace most cheaply. Containment planning must now ask what specifically was killed and whether the adversary can hand themselves a replacement without ever touching the victim's machine—in this sample, the answer was yes, and it took one function to prove it.