Spies hide backdoors in GitHub and SharePoint traffic

Published

A spying operation against government networks in Asia and Africa has been running its command traffic through GitHub, Microsoft SharePoint and the Ably real-time messaging service, so that its instructions look like the cloud API calls every enterprise makes all day. Researchers Saurabh Sharma and Noushin Shabab at Kaspersky named the campaign Operation ShadowCloud and published it in two parts (part 1, part 2).

The two implants at its core are new. Kaspersky calls them GitDoor and GraphDoor, after the platforms they use for command and control (C2), and says it has seen several versions of each in the wild, a sign of a toolset that is actively maintained. Victims were primarily in the government sector.

A remote-support tool opened the door

The researchers found two instances of the MeshCentral Agent, a legitimate web-based remote desktop and file management tool, running inside a Taiwanese organization. The agent was hard-coded to call back to 27[.]102[.]66[.]162 over port 443. Kaspersky could not establish how it was installed, but says the evidence points to reuse of an earlier infection already on the network.

Through that agent the attackers dropped three files at a time: a legitimate program, a malicious DLL that the program loads in place of the real one (a trick called DLL sideloading), and an encrypted config.ini holding the backdoor. The trusted programs they abused included Sandboxie's start.exe, the OpenJDK javaw.exe, a Python binary and the Sysinternals ZoomIt magnifier. The loaders decrypt the payload and run it from memory, in one variant by converting the bytes to and from MAC address strings with Windows networking APIs to slip past defences.

Orders arrive as GitHub issues and SharePoint files

GitDoor talks to two GitHub repositories under an account named LatonyCharnleyaW: a public one it reads for commands and plug-ins, and a private one, reached with an embedded access token, where it uploads results. Each infected machine opens a GitHub issue titled "problem" plus a session GUID, then repeatedly adds and removes a "bug" label while polling for new command files. Victim data is also posted to Ably.

GraphDoor authenticates to Microsoft's login service as an application, not a user, then uses the Microsoft Graph API to write files disguised as JavaScript source maps into SharePoint document libraries. Kaspersky lists buildersemp[.]sharepoint[.]com and cskautogo[.]sharepoint[.]com among its sites.

Both backdoors fetch plug-ins on demand and run them in memory: a keylogger, a process lister, a screenshot tool, a module that relocates the implant, and two proxy plug-ins, one built on a modified copy of the open-source Erfrp reverse proxy and one tunnelling traffic over Ably. The backdoor carries no hard-coded C2 domain at all; the proxy plug-ins supply it at run time.

Chinese-speaking groups, but no firm name yet

Kaspersky says it lacks enough information to attribute the activity to a specific group. It did find GitDoor sharing staging directories with implants from FamousSparrow and CopperTurtle on several victim systems, deployed within a day of each other, including a FamousSparrow loader using an RC4 key previously tied to that group. The researchers say this does not prove a direct link but suggests a Chinese-speaking group may be developing or using the backdoors. The Sandboxie sideloading trick echoes another China-based espionage campaign we covered in October.

Treat new remote-support agents as a red flag

Kaspersky's main advice is to treat the appearance of tools such as MeshCentral as a suspicious event, since they are routinely abused. Defenders should also hunt for legitimate binaries running from unusual system paths next to a config.ini, unexpected application-only token requests to login.microsoftonline.com, and endpoint traffic to rest.ably.io or the GitHub API from hosts with no business reason to use them.

Selected indicators (defanged):

The lesson of ShadowCloud is that blocking bad domains does little against an operator who has none: when the C2 is GitHub and SharePoint, the signal has to come from which process is making the call.

This briefing is provided by IntelFusions for informational and defensive purposes only. It is based on sources assessed to be reliable at the time of writing, and analytic judgments carry the confidence levels indicated. Indicators of compromise are defanged; re-arm them only in controlled environments. IntelFusions is not affiliated with the organizations named and makes no warranty as to completeness or accuracy.

Detection coverage

Read the full analysis on IntelFusions