GraphDoor backdoor uses SharePoint and Microsoft Graph for command and control
A Windows backdoor tracked as GraphDoor uses Microsoft authentication and SharePoint document libraries to exchange data, retrieve plug-ins and receive commands. The malware’s use of Microsoft Graph can make its traffic resemble activity involving legitimate cloud services, complicating investigations that rely on blocking suspicious infrastructure alone.
Researchers Saurabh Sharma and Noushin Shabab describe GraphDoor as part of Operation ShadowCloud, an activity set involving cloud-service-based backdoors targeting government networks in Asia and Africa. Their analysis links the operation to Chinese-speaking threat groups, based on attribution clues discussed in the investigation. The available findings describe GraphDoor’s behavior and components; they do not provide a patch or indicate that a product vulnerability is involved.
Authentication and data exchange through Microsoft services
At startup, GraphDoor creates a named pipe using its process ID and makes a directory under ProgramData named Intel_Log, followed by a randomly generated GUID. It collects host and network details, including the operating-system version, adapter information, public and private IP addresses, username, hostname, current directory, process ID and running-process list.
The backdoor resolves Windows APIs at runtime using hashed names. To invoke them, it installs a vectored exception handler and deliberately raises an exception that the handler catches before carrying out the requested call. GraphDoor combines the collected details with embedded configuration values, encrypts the result with AES, encodes it in Base64 and sends it to its command-and-control infrastructure.
For cloud access, GraphDoor establishes a TLS connection to login.microsoftonline.com over port 443. It uses embedded, encrypted authentication values to request an access token through the OAuth client-credentials grant. This authenticates a registered application rather than an interactive user. With the token, the malware communicates with graph.microsoft.com and uploads the encoded victim data to a SharePoint document library. The uploaded file uses a dynamically generated name resembling a JavaScript source-map file: main.victim-unique-code.js.map.
The same SharePoint environment supplies plug-ins and command files. GraphDoor retrieves plug-ins named scr.ts, pr.ts and kl.ts, corresponding to screenshot capture, process listing and keylogging. It downloads them in separate threads and decrypts them after retrieval. The malware queries SharePoint lists through Microsoft Graph, filtering items by names that match the expected plug-in or victim-specific command-file prefixes.
Commands and plug-in capabilities
GraphDoor checks downloaded command-file extensions against an allowed set that includes .js, .swp, .tmp, .kmap, .pmap and .apmap. It supports commands similar to those found in the related GitDoor backdoor, along with two additional shellcode-loading commands identified by the researchers: shell and adsmload. The latter decodes data represented as ASCII MAC-address strings and can place payloads or arguments into memory. These capabilities give operators a route to run commands or load additional code without relying solely on a conventional executable file.
Plug-ins contain a loader stub and a COFF object. The stub locates a marker in the binary, allocates executable memory, copies code into it, applies relocations and calls the object’s go entry point. This structure allows the backdoor to load modular functionality fetched from the cloud-hosted infrastructure.
The keylogger records keystrokes and mouse activity, including window titles and timestamps, in a file at %APPDATA%\Microsoft\SystemCertificates\Cache\logs.dat. It encrypts recorded data with a randomly generated XOR key and masks that key with a hard-coded value before writing it. The plug-in also installs low-level keyboard and mouse hooks and creates a named object that can signal it to stop logging. These details provide defenders with behavioral and host-based evidence to investigate alongside network telemetry.
Defensive considerations
Organizations should review unexpected application-only authentication activity and Microsoft Graph access to SharePoint, especially when it is associated with endpoints that do not normally use those services. Investigators can examine authentication records, application registrations, token use, SharePoint uploads and list access together rather than treating successful connections to Microsoft domains as inherently benign.
On Windows hosts, detection efforts can look for the Intel_Log directory under ProgramData, the named pipe pattern based on a process ID, and the keylogger’s logs.dat path. These artifacts should be assessed in context; their presence alone does not establish compromise. Security teams can also correlate suspicious Graph activity with unusual plug-in execution, memory activity and command-line behavior, then investigate relevant accounts, applications and affected endpoints.