GitHub Kept Every Order: 80,409 GitDoor Spy Commands Decoded
Apiiro decoded 80,409 deleted commands from the GitHub repositories behind the GitDoor backdoor: two years of espionage against 23 countries, from Taiwan's KMT to the Philippine Coast Guard, still running after exposure.
The spies used GitHub to stay hidden, and GitHub kept the receipts. Apiiro says it pulled 80,409 deleted commands out of the commit history of 104 public repositories behind the GitDoor backdoor, the core of the espionage campaign Kaspersky exposed on Nov. 17 as Operation ShadowCloud. The log covers two years, victims in 23 countries and 2,902 distinct files the operators asked for, from Taiwan’s opposition KMT party to the Philippine Coast Guard, an Italian think tank and a US union. The operators kept working after Kaspersky’s report, and GitHub took all 104 repositories down by Nov. 25, Apiiro says. The Hacker News also covered the findings.
For defenders
How the channel works: each implant polls a public repository for a command file named main.<session code>.<4 chars>.js (older builds: main.<code>.js). The operator commits the file, the implant runs it, and the file is deleted later in bulk. Because Git keeps deleted files, every order survived (T1102.002 (Web Service: Bidirectional Communication)). Commits and deletes carry the author INSOMNIA <INSOMNIA@github.com> and the message “commit from INSOMNIA”.
What they did after being exposed: 23 minutes after Kaspersky published, a new command hit a KMT machine holding domain policy files. That day they wrote a Group Policy task to run their program on 16 party machines, then a second policy with no host filter (T1484.001 (Domain or Tenant Policy Modification: Group Policy Modification)). They also uploaded SockTail, an open-source tool that joins a machine to a private Tailscale network, as a route in that doesn’t need GitHub.
Tooling: 494 Windows programs, 347 never seen by VirusTotal; 117 of 170 side-loading DLLs share one codebase (T1574.001 (Hijack Execution Flow: DLL)). A rebuilt public exploit for the Windows kernel bug CVE-2026-42980 (CVSS 7.8, patched in June, not on CISA’s KEV list) was uploaded once, on Nov. 17, to an Exchange 2010 server reached through the KMT repository; Apiiro says it can’t tell whether it worked (T1068 (Exploitation for Privilege Escalation)). Other tools decrypt Signal Desktop messages, steal Exchange keys and split archives for upload to OneDrive and Google Drive (T1567.002 (Exfiltration Over Web Service: Exfiltration to Cloud Storage)).
Who: Apiiro assesses an office team in mainland China, based on Beijing working hours, the mainland holiday calendar and Simplified Chinese tool paths, and calls that an assessment, not proof. Sophos tracks part of the same operation as BRONZE SANDCASTLE. Background: our Nov. 17 story on Kaspersky’s report.
commit author INSOMNIA <INSOMNIA@github.com>, message “commit from INSOMNIA”
command files main.<code>.<4 chars>.js or main.<code>.js, optionally ending .kmap .pmap .apmap .swp .tmp
wdiag.exe (rebuilt CVE-2026-42980 kernel exploit, uploaded 2026-11-17)
PowerShell netdiag.ps1, proxy_cred_probe.ps1, gl_proxy_probe.ps1 (GitLab/GitHub reachability probes)
loader build folders gitlab2_autoproxy, ssv_gitlab3_autoproxyWhat it means for you
Unless you work for a government, a political party, a defense supplier or a think tank in one of the targeted countries, this isn’t aimed at you. The bigger point for anyone running a company network: attackers like GitHub, OneDrive and Google Drive because nobody blocks them. A file server that talks to GitHub at 3 a.m. on a Sunday is worth a question, even if GitHub itself is perfectly legitimate.
Do this now
- Search any GitHub data you can see for commits by INSOMNIA and for files named like main.<code>.js.
- Find servers and non-developer machines that poll api.github.com around the clock, NAS boxes included.
- Install Microsoft’s June 2026 update for CVE-2026-42980 everywhere, and retire anything still on Exchange 2010.
- Alert on new Group Policy scheduled tasks; that’s how the operators pushed their program to 16 machines at once.
Source article: GitDoor: Chinese espionage commands decoded from GitHub
Publisher: Apiiro
Published: Dec. 2, 2026
URL: https://apiiro.com/blog/gitdoor
Executive Summary
A Chinese-speaking espionage operation, exposed by Kaspersky on Nov. 17, 2026 as Operation ShadowCloud and tracked in part by Sophos as BRONZE SANDCASTLE (Kaspersky found implants of the Chinese-speaking groups FamousSparrow and CopperTurtle in the same staging folders but does not name one group), ran its GitDoor implants from 104 public GitHub repositories for two years, and Apiiro decoded 80,409 deleted commands from their commit history. The operation is organized as regional teams (Taiwan; the Philippines; Vietnam and Southeast Asia; Zambia and Uganda; South and Central Asia; Latin America and Italy) and reached government, political, military-supplier, infrastructure-contractor, think-tank and union victims in 23 countries. Initial access is not described by Apiiro; once inside, each implant polls a public repository for an encrypted command file, the operator commits the file, the implant executes verbs such as scanDir, downloadFile, uploadFile and shell, and the file is later deleted in bulk commits by INSOMNIA. The operators side-loaded custom DLLs next to signed programs, harvested passwords, hashes and session cookies, used a rebuilt public exploit for the Windows kernel flaw CVE-2026-42980 and public Linux kernel exploits for privilege escalation, pushed their program through Group Policy scheduled tasks, built Signal Desktop, WhatsApp Desktop and Exchange key-theft tools, split stolen data into archives and sent it to OneDrive and Google Drive, and probed GitLab, Tailscale (via SockTail), Ably and Pusher as channels outside GitHub. The objective is political, military and diplomatic intelligence collection; activity continued after public exposure until GitHub removed the repositories by Nov. 25. Hunt leads, false positive expectations and indicators are detailed below; Apiiro published detection guidance but no YARA, Sigma or network rules, and its public indicator appendix lists only the shared GitHub artifacts.
ATT&CK chain: Execution → Persistence → Privilege Escalation → Defense Evasion → Credential Access → Discovery → Lateral Movement → Collection → Command and Control → Exfiltration
Hunt Lead Grid
| Hunt Lead Level | Hunt Lead Name | ATT&CK | Risk of False Positives |
|---|---|---|---|
| 1 (Junior) | INSOMNIA Commits and main.js Command Files | T1102.002 (Web Service: Bidirectional Communication) | Low. The commit author, message and file naming pattern are the operators’ own; legitimate repositories rarely churn files named main.<code>.js with .kmap or .pmap suffixes that are deleted in bulk. |
| 1 (Junior) | wdiag.exe and GitLab Probe Scripts on Servers | T1068 (Exploitation for Privilege Escalation) | Medium. wdiag.exe is a generic-sounding name; the sweep anchors on it appearing on Exchange or domain servers, outside signed Microsoft paths, alongside the named probe scripts. |
| 2 (Pro) | Servers and Non-Engineering Hosts Polling the GitHub API | T1102.002 (Web Service: Bidirectional Communication) | Medium. CI agents, developer workstations and update checkers talk to GitHub; the rule anchors on servers, NAS devices and desktops outside engineering polling repository contents on a steady cadence at all hours. |
| 2 (Pro) | Group Policy Scheduled Task Pushed to Many Hosts | T1484.001 (Domain or Tenant Policy Modification: Group Policy Modification) | Medium. Administrators deploy scheduled tasks via Group Policy; the rule anchors on new or changed ScheduledTasks.xml in SYSVOL outside change windows, especially with no item-level targeting, launching a binary from a user-writable path. |
| 3 (Elite) | GitHub Polling to Split-Archive Exfiltration to Cloud Storage | T1560.001 (Archive Collected Data: Archive via Utility), T1567.002 (Exfiltration Over Web Service: Exfiltration to Cloud Storage) | Medium. Backups and sync clients archive and upload; the correlation fires only when a host that polls GitHub also creates split archives of mailbox or document shares and uploads them to OneDrive or Google Drive through a non-sanctioned process. |
INSOMNIA Commits and main.js Command Files
Each GitDoor session polls a public repository for a command file named main.<session code>.<4 chars>.js, or in older repositories main.<code>.js rewritten in place, optionally ending in .kmap, .pmap, .apmap, .swp or .tmp. The file is base64, XORed with its own file name, around an AES-256 blob whose key sits in the same file. The operator commits it, the implant runs it, and the file is deleted hours later in bulk commits authored by INSOMNIA <INSOMNIA@github.com> with the message “commit from INSOMNIA”, the same message the operators use for their own commits. The detection is a search of any GitHub data your organization can see (audit logs, GitHub Enterprise logs, code-scanning of mirrored repositories, and endpoint file events in cloned working trees) for that author and message, and for files matching the naming pattern that appear and are deleted in bulk.
Use GitHub audit and push logs where you have them, and proxy or TLS-inspection logs that record repository paths on api.github.com and raw.githubusercontent.com requests, sweeping back to November 2024, when the earliest commands date from. GitHub removed all 104 known repositories by Nov. 25, 2026, so this lead finds historical contact and any new repository the operators stand up with the same habits. Do not block github.com or api.github.com wholesale, which breaks development and software updates; detect the repository paths instead. Any endpoint whose proxy history shows requests for main.*.js files under an unknown user’s repository should be treated as an implant host and handed to incident response.
Hunt Lead Level: 1 (Junior Analyst)
ATT&CK: Command and Control → T1102.002 (Web Service: Bidirectional Communication)
Sources: “GitDoor: Chinese espionage commands decoded from GitHub”, Apiiro, Dec. 2, 2026, https://apiiro.com/blog/gitdoor (source article)
wdiag.exe and GitLab Probe Scripts on Servers
Fifteen minutes before Kaspersky’s report went live, at 07:45 UTC on Nov. 17, 2026, the operators uploaded wdiag.exe, a rebuild of the public exploit for the Windows kernel flaw CVE-2026-42980 with renamed log strings, Microsoft’s dialog boxes removed and output returned through the implant, to an Exchange 2010 server reached through the repository that served the KMT; directory listings followed, and Apiiro cannot tell whether the exploit ran or the server was patched. Separately, on Oct. 21 and 22, 2026, on a machine in a Caribbean ministry, the Latin America team uploaded and ran netdiag.ps1, proxy_cred_probe.ps1 and gl_proxy_probe.ps1 (six versions over two days) to test whether GitLab, api.github.com, github.com and raw.githubusercontent.com were reachable, GitLab through the ministry’s own web proxy with the proxy’s credentials, from loader builds in folders named gitlab2_autoproxy and ssv_gitlab3_autoproxy. The detection is a file and script-block sweep for wdiag.exe outside signed Microsoft locations and for those three script names, plus a patch-state check for CVE-2026-42980.
Use EDR file inventory, PowerShell script block logging (event 4104) and vulnerability management data, sweeping back to October 2026. Prioritize Exchange servers, domain controllers and file servers, the roles the operators worked. A legitimate Microsoft binary with a similar name would be signed and in a system path, so allowlist by signer and path, not by name. Do not rely on hash blocking: Apiiro says only two of the 355 tools it analyzed match any published hash, and the operators recompile constantly. Any hit on the script names, or an unsigned wdiag.exe on a server, should be escalated as a confirmed intrusion; patching CVE-2026-42980 is the control, since the exploit is a public proof of concept anyone can rebuild.
Hunt Lead Level: 1 (Junior Analyst)
ATT&CK: Privilege Escalation → T1068 (Exploitation for Privilege Escalation)
Sources: “GitDoor: Chinese espionage commands decoded from GitHub”, Apiiro, Dec. 2, 2026, https://apiiro.com/blog/gitdoor (source article); “GitHub Commit History Exposes 80,409 Espionage Commands From Chinese-Speaking Hackers”, The Hacker News, Dec. 2026, https://thehackernews.com/2026/12/github-commit-history-exposes-80409.html (additional source, same campaign)
Servers and Non-Engineering Hosts Polling the GitHub API
GitDoor implants poll api.github.com repository contents for their session’s command file around the clock, and Apiiro’s own detection guidance is that what gives GitDoor away is who talks to GitHub and how: a server, or a desktop outside engineering, polling repository contents at night and on weekends, and GitHub polling from storage appliances, since on Linux the operators ordered an autorun script written on a QNAP NAS. The behavioral anchor is a host whose role has no reason to call the GitHub contents API making regular requests to it at a steady interval, with no matching developer tool, package manager or CI agent process.
Use proxy, secure web gateway or TLS-inspection logs with the request path, DNS logs as a fallback, and EDR network telemetry to tie the connection to a process; NetFlow alone cannot separate GitHub API calls from other GitHub traffic. Sweep 90 days back, because the implants persisted for months on the same victims. Build an allowlist of hosts and signed processes that legitimately use GitHub (developer workstations, build agents, sanctioned update clients) by role and signer, then alert on everything else, including NAS and other appliances that EDR does not cover. Expect some update checkers to poll on timers; tune by process and destination path rather than suppressing GitHub as a whole. A persistent poll from a server or appliance to an unfamiliar user’s repository should be paired with the INSOMNIA lead and escalated. The lead generalizes to any code-hosting C2, GitLab included.
Hunt Lead Level: 2 (Pro)
ATT&CK: Command and Control → T1102.002 (Web Service: Bidirectional Communication)
Sources: “GitDoor: Chinese espionage commands decoded from GitHub”, Apiiro, Dec. 2, 2026, https://apiiro.com/blog/gitdoor (source article)
Group Policy Scheduled Task Pushed to Many Hosts
After Kaspersky’s report on Nov. 17, 2026, the operators queued 188 commands to a KMT machine holding the party’s domain policy files and wrote a Group Policy scheduled task set to run their program on 16 of the party’s machines; at 07:31 UTC on Nov. 18 they added a second Group Policy task with no host filter, and planted two loaders and a disguised driver signed through Microsoft’s driver attestation. The detection is a monitoring rule on SYSVOL for new or modified Policies\{GUID}\Machine or User\Preferences\ScheduledTasks\ScheduledTasks.xml files, and on directory service changes to Group Policy objects (event 5136), flagging tasks whose action launches a binary from a user-writable or unusual path, and tasks with no item-level targeting that would run on every machine in scope.
Use domain controller security logging with directory service change auditing, file integrity monitoring on SYSVOL, and EDR on domain controllers and file servers, sweeping 90 days back. Baseline legitimate Group Policy task changes by the accounts and change windows that normally make them; changes made from a member server or a non-administrator workstation, or outside change control, deserve immediate review. Deleting the task does not remove the program it already launched, so collect the referenced binary and look for the side-loading pattern next to it. Any unexplained GPO scheduled task is an incident, because it gives an attacker code execution across the domain in one step.
Hunt Lead Level: 2 (Pro)
ATT&CK: Defense Evasion, Privilege Escalation → T1484.001 (Domain or Tenant Policy Modification: Group Policy Modification)
Sources: “GitDoor: Chinese espionage commands decoded from GitHub”, Apiiro, Dec. 2, 2026, https://apiiro.com/blog/gitdoor (source article)
GitHub Polling to Split-Archive Exfiltration to Cloud Storage
The operators’ commands follow a consistent sequence: list a drive, open a folder from the listing, then order files from it, often mailbox stores (a folder named pst at Peru’s defense ministry, 14 mailboxes at an Italian think tank) packed into split archives (81 RAR parts over seven days in Peru, at least 300 MB at the think tank), and sent out either through the implant or with one of 27 custom uploaders that encrypt files and send them to OneDrive and, from September 2026, Google Drive. The correlation joins a host flagged for GitHub API polling with archive-utility process events creating multi-volume archives of mail or document shares, followed within hours by large uploads to OneDrive or Google Drive from a process that is not the sanctioned sync client.
This needs EDR process and file telemetry (archiver command lines with volume-split switches, new .rar or .7z part files), proxy logs with upload byte counts and destination tenant where available, and the host list from the GitHub polling lead. Baseline backup jobs and sanctioned sync clients by signed image path and service account; uploads to a personal or unknown OneDrive or Google Drive tenant from a server are the strongest signal. Sweep 90 days back and scope first to mail, file and domain servers. Blocking OneDrive or Google Drive outright is the wrong control where the business uses them; restrict by tenant instead. A full sequence on one host is a confirmed exfiltration and should go straight to incident response, with mailbox owners notified.
Hunt Lead Level: 3 (Elite)
ATT&CK: Collection → T1560.001 (Archive Collected Data: Archive via Utility); Exfiltration → T1567.002 (Exfiltration Over Web Service: Exfiltration to Cloud Storage)
Sources: “GitDoor: Chinese espionage commands decoded from GitHub”, Apiiro, Dec. 2, 2026, https://apiiro.com/blog/gitdoor (source article)
Hash Appendix
Apiiro published no file hashes in its public report and says case-specific indicators went to national CERTs through verified channels; the tools were uploaded to VirusTotal on publication day but no hash list was released, so none are reproduced here. For Kaspersky’s published GitDoor and GraphDoor hashes, see our Nov. 17 story.
References Appendix
- “GitDoor: Chinese espionage commands decoded from GitHub”, Apiiro, Dec. 2, 2026, https://apiiro.com/blog/gitdoor (command channel, timeline, tools, detection guidance)
- “GitHub Commit History Exposes 80,409 Espionage Commands From Chinese-Speaking Hackers”, The Hacker News, Dec. 2026, https://thehackernews.com/2026/12/github-commit-history-exposes-80409.html (exploit and probe script details)
- “Operation ShadowCloud: cloud service–based backdoors targeting government networks in Asia and Africa. Part 2”, Kaspersky Securelist, Nov. 17, 2026, https://securelist.com/operation-shadowcloud-graphdoor/122005/ (prior reporting, group overlaps)
- “BRONZE SANDCASTLE deploys modified Meterpreter shells”, Sophos, https://www.sophos.com/en-us/blog/bronze-sandcastle-deploys-modified-meterpreter-shells (alias reconciliation)
- MITRE ATT&CK Enterprise technique pages linked above, MITRE, https://attack.mitre.org/
CVE at a glance
- CVSS
- 7.8 High (v3.1)
- EPSS
- 9.7% chance of exploitation in the next 30 days (higher than 95.6% of CVEs)
- Exploited in the wild
- Not on CISA’s KEV list
- Public exploit
- Yes, reported in 1 GitHub repository
Data from NVD, FIRST EPSS and CISA KEV, refreshed automatically. We report whether public exploit code exists but never link to it: fake proof-of-concepts that infect researchers are common.