When the Spy Talks Through SharePoint: How the GraphDoor and GitDoor Backdoors Hide in Everyday Cloud Traffic, Step by Step
Kaspersky has detailed two new backdoors that take orders through Microsoft Graph and SharePoint, GitHub and the Ably messaging service, so their traffic looks like normal business use. Here is the attack chain step by step, and the layered defenses that still catch it when network filters alone cannot.
Why Blocking ‘Bad’ Websites Is No Longer Enough, and the Layers That Still Expose a Backdoor Using Trusted Microsoft and Developer Services
Most network defenses look for computers talking to suspicious places. A newly documented espionage campaign avoids that by talking only to places every business trusts. Kaspersky calls it Operation ShadowCloud and has described two previously unknown backdoors, GraphDoor and GitDoor, that receive commands and send stolen data through Microsoft SharePoint via the Microsoft Graph API, through GitHub, and through the Ably messaging service. Targets so far are government organizations in Asia and Africa. The walkthrough below follows The Hacker News’s breakdown of Kaspersky’s two-part analysis.
The attack chain, step by step
- A legitimate remote access agent is already there. The chain starts with a MeshCentral agent (MeshAgent), an open-source remote management tool used for remote desktop, command line and file transfers. In the documented case, involving an unnamed Taiwanese organization, Kaspersky does not know exactly how it was installed, but the evidence points to reuse of an earlier infection on the network.
- The agent calls home and drops three files. The agent contacts a hard-coded server and stages a legitimate program, a malicious DLL and an encrypted backdoor on the machine.
- A trusted program loads the bad DLL. Ordinary executables such as start.exe, pythonw.exe and zoomit.exe are used for DLL sideloading, so the malicious library runs inside a legitimate-looking process.
- The backdoor is unpacked in memory. Two loader types have been seen: one decrypts with RC4 and then an XOR mask, the other with XOR alone. The backdoor itself is heavily obfuscated to slow analysis.
- GraphDoor signs in to Microsoft. It authenticates through login.microsoftonline.com on port 443 using a malicious application, then uses the access token with the Microsoft Graph API to stage data on a SharePoint drive and to collect its commands from SharePoint.
- GitDoor uses GitHub instead. It reads commands from one public repository and uploads results to a private one. The repositories’ creation dates suggest preparation since at least late 2024. GitDoor supports 26 commands.
- Plugins do the spying. Modules handle keylogging, screenshots, process listing, file and registry changes, firewall rule changes, adding Windows user accounts, dumping Chrome and Edge cookies from memory and forcing NTLM authentication to an attacker’s server.
- Traffic is tunneled through a messaging service. Plugins use Ably, including a covert SOCKS5 proxy over its WebSocket service, plus a modified Erfrp client, so the attacker can relay traffic without opening obvious connections.
Kaspersky has not identified the operator but notes overlaps with China-nexus activity, including groups that used the same staging directories on several victim systems within a day of GitDoor appearing. It stresses that this is not proof of a direct link. Its core warning is that calls to Microsoft Graph, GitHub and Ably look the same as normal enterprise use, which defeats many network-based detections.
The layered defenses
- Layer 1: control remote access tools. Keep an approved list of remote management software and alert on any other, such as an unexpected MeshCentral agent. This campaign starts with a tool that is not malware at all.
- Layer 2: endpoint detection that watches behavior. Sideloaded DLLs in odd folders, in-memory payloads, keyloggers and cookie theft are behaviors an endpoint detection and response (EDR) product can flag even when the network traffic looks clean.
- Layer 3: govern app registrations and consent. GraphDoor relies on an application authenticating to Microsoft’s identity platform. In your own Microsoft 365 or other cloud tenant, restrict who can register apps or grant consent, review enterprise apps and their permissions regularly, and alert on new ones. Tools such as Microsoft Entra ID’s consent settings are one example of where to do this.
- Layer 4: tenant restrictions for cloud traffic. Allowing “SharePoint” or “GitHub” broadly also allows an attacker’s SharePoint or GitHub. Where your proxy, firewall or identity platform supports it, limit company devices to your own tenants and organizations.
- Layer 5: least privilege on endpoints. Without local admin rights, adding accounts, changing firewall rules and dumping process memory become much harder.
- Layer 6: hunt for the leftovers. Look for unexpected folders such as an “Intel_Log” directory in Application Data, unknown files under the SystemCertificates cache path, and processes making steady Graph, GitHub or Ably calls from machines that have no reason to.
What this means for your company
This campaign targets governments, but the technique is spreading: attackers increasingly hide in services you cannot block, such as Microsoft 365, GitHub and popular messaging platforms. For a small or midsize business that means a firewall and web filter alone will not show you this kind of activity. The protection comes from stacking layers: knowing which remote tools are allowed, watching what software does on each device, keeping tight control over which cloud apps can connect to your tenant, and limiting what any compromised account or computer can do. None of those depends on a single product, and together they catch what any one of them would miss.
If you are not sure which apps and remote tools have quiet access to your Microsoft 365 tenant and devices today, we can help you find out and close the gaps. Reach out to Layer 7 Data Solutions to discuss how we’ve helped companies similar to yours.
