GitDoor: 80,409 Spy Commands Left Readable on GitHub

By 12 min read
GitDoor espionage commands recovered from public GitHub commit history by Apiiro

For two years an espionage team ran its backdoors from public GitHub repositories, deleted every order it sent, and assumed that was the end of it. Git keeps deleted files, so on 2 December 2026 Apiiro Research published 80,409 of those orders, decoded, with timestamps down to the minute.

In short: GitDoor is the GitHub-controlled backdoor behind Operation ShadowCloud, which Kaspersky exposed on 17 November 2026. Apiiro, an application security company, recovered the command files from the repositories’ commit history and found victims in 23 countries, from Taiwan’s ruling and opposition parties to the Philippine Coast Guard. SecurityWeek reported the findings on 3 December.

This article explains what the GitDoor commands reveal, how a C2 channel turned into a permanent log, who was targeted, and what defenders can hunt for now. It builds on our earlier explainer on how GitDoor and GraphDoor hide C2 in GitHub and SharePoint.

What is GitDoor?

GitDoor is a backdoor that receives its orders from files in a GitHub repository instead of from a server its operators own. C2, short for command and control, is the channel an attacker uses to send commands to infected machines; GitDoor uses GitHub’s own API as that channel.

Kaspersky’s Global Research and Analysis Team described it on 17 November 2026 in a two-part report on Operation ShadowCloud. Kaspersky found it in mainly government networks in Asia and Africa, often next to a second backdoor, GraphDoor, which uses SharePoint the same way. Sophos had earlier tracked a fragment of the same activity as BRONZE SANDCASTLE, a China-based group it reported in October 2026.

These are three names for overlapping views of one operation: Operation ShadowCloud is Kaspersky’s campaign name, BRONZE SANDCASTLE is Sophos’s group name, and GitDoor is the implant. Apiiro adds that the operators call their own framework medusa.

What did Apiiro find in GitHub’s commit history?

Apiiro found the operators’ task list. Kaspersky had named nine operator accounts but did not publish the commands in them. Apiiro identified 104 operator repositories, 97 of them never reported before, and 92 connected to victim machines.

Three headline figures from Apiiro's GitDoor research: 80,409 commands, 2,902 files, 23 countries
Two years of espionage orders, recovered from files the operators believed they had deleted. Data: Apiiro Research.
Finding Figure, per Apiiro
Commands decoded 80,409
Distinct files ordered from victims 2,902
Countries with named victims 23
Operator repositories 104 (92 tied to victims)
Programs uploaded by operators 494, of which 347 unseen by VirusTotal
Distinct GitDoor versions 87
Regional teams 6

The report reads like a log of intent rather than a list of malware hashes. Apiiro puts it this way: espionage is usually seen through malware and servers, “and rarely through their orders.”

How did a C2 channel become a public log?

Every command was a Git commit, and every deletion was another commit. That is the whole flaw.

How the channel worked

Each implant polls a public repository for a command file named after its session, in the form main.<code>.js or main.<code>.<4 chars>.js. To send an order, the operator commits that file. The implant reads it, runs it, and returns the result to a separate private repository. The command file is deleted later, usually hours later and in bulk sweeps.

Five-step flow showing how GitDoor commands were committed, executed, deleted and kept in Git history
Deleting a file from a Git repository removes it from the latest version only; the history keeps every earlier commit. Data: Apiiro Research.

Why the encryption did not help

Apiiro says each file was Base64 text, XORed with its own file name, wrapped around an AES-256 blob whose key sits inside the same file. Inside is a JSON verb and its arguments, such as scanDir to list a folder, downloadFile to send a file back, uploadFile to drop a tool, and shell for a command line. With the key shipped next to the ciphertext, the encryption only hid the commands from a casual look.

The files are also unsigned. Apiiro says it tested this offline by writing its own command file, which its decoder read like a real one. It did not send anything to an implant.

Why the timestamps can be trusted

Git commit times can be set by whoever commits. Apiiro says it checked the times it cites against GitHub’s own push records, which log the account whose token made each push.

Who did GitDoor target?

Apiiro counts victims in 23 countries, but it uses a strict rule: a country counts only when decoded commands show a named organisation’s machine or internal files. It also says more than half of all decoded commands went to machines it could not tie to any named organisation.

Taiwan’s parties, suppliers and infrastructure

Taiwan received the most detailed attention. According to Apiiro, on 5 April 2026 the operators ordered the final talking points that KMT chair Cheng Li-wun later used when she met Chinese President Xi Jinping in Beijing on 10 April. They also ordered files from the ruling DPP and the smaller TPP ahead of the 28 November local elections.

Beyond politics, they went after two drone suppliers to Taiwan’s military, a contractor that automates military bases, a metro maintenance system, a water utility’s smart-meter documentation and industrial control configs from Kaohsiung.

The Philippine Coast Guard and US forces

The Philippine Coast Guard drew more commands than any other victim: 3,696 in a year, asking for 248 distinct file names. Apiiro says the dated Coast Guard papers the operators ordered were a median of two days old, against 32 days across all victims, which suggests close, near-real-time monitoring.

Those files included material on the Balikatan exercise and a US Marine Corps rotation. In October 2026 the operators also uploaded a small tool that decrypts the Signal Desktop message database and ordered a military user’s messages exported.

United States and the rest of the world

In the US, Apiiro says the operators targeted a company that builds websites for private clubs and ordered 32 Trump-named site folders zipped, covering about 20 clubs and resorts including Mar-a-Lago, Bedminster and Doral. Apiiro is explicit that nothing in the log shows access to the Trump Organization’s own network. They also targeted a large industrial union’s headquarters IT and a federal contractor’s accounting database and software vendor.

Elsewhere, Apiiro names an Italian foreign-policy think tank, Argentina’s foreign ministry, Peru’s Ministry of Defense, Mexico’s economy ministry, Eswatini’s national data center, a toll-plaza server in India, a Laotian bank’s SWIFT records and the Philippine Department of Justice’s Office of Cybercrime.

Did the operators stop after Kaspersky’s report?

No. The decoded commands show they kept working, and partly sped up.

Timeline of GitDoor operator activity from Kaspersky's 17 November report to the 25 November takedown
Public exposure did not pause the operation; the GitHub takedown eight days later ended this channel. Data: Apiiro Research.

Apiiro’s timeline, in UTC:

  • 17 November, 07:45. Fifteen minutes before Kaspersky’s report went live, the operators uploaded a rebuild of a public exploit for CVE-2026-42980, a Windows kernel bug Microsoft patched in June, to the repository serving the KMT.
  • 17 November, 08:23. Twenty-three minutes after the report, a new command reached a KMT machine holding domain policy files. They queued 239 commands that day and wrote a Group Policy task to run their program on 16 party machines.
  • 18 November. A second Group Policy task with no host filter and 454 more commands across 12 repositories.
  • 19 November. They uploaded a modified build of SockTail, an open-source tool that joins a machine to a private Tailscale network, which would give them access that does not depend on GitHub.
  • 23 November. A new session at the KMT on a machine holding the party’s website and payment-site folders, five days before Taiwan’s elections, and 236 commands that day.

Apiiro reported the repositories to GitHub on 19 November. By 25 November GitHub had taken down all 104.

What tools did the operators use?

Mostly their own. Of the 494 programs uploaded, VirusTotal had never seen 347, and of the 355 Apiiro analysed only two matched a hash Kaspersky or Sophos had published.

Bar chart comparing GitDoor toolkit counts: programs, unseen files, DLLs and implant versions
Most of the toolkit was custom and unknown to public malware databases before this research. Data: Apiiro Research.

Side-loading as the delivery method

DLL side-loading is a technique where a trusted, signed program is made to load a malicious library placed next to it. Apiiro counts 170 side-loading DLLs, 117 of them from one codebase, paired with programs such as javaw.exe, Sandboxie’s Start.exe, zoomit.exe and pythonw.exe. Sophos describes the same Sandboxie sbiedll.dll pairing as BRONZE SANDCASTLE’s most distinctive marker.

Mail, messages and passwords

Apiiro says custom work focused on mail and messaging: 28 versions of a tool that steals an Exchange server’s keys built over two days, a plugin that targets 11 messaging apps including WeChat, LINE, Telegram and WhatsApp, and a dedicated WhatsApp Desktop toolchain. On Linux servers they used public kernel exploits for root, and at one ministry they dropped a signed driver built to kill security software.

Channels beyond GitHub

The operators were not tied to one platform. Apiiro reports implant builds named for GitLab, proxies over the Ably and Pusher messaging services, uploaders that send files to OneDrive and Google Drive, and a Rust implant named antino that takes commands through Microsoft Graph. That name matches the Antino backdoor we covered in our Falcon C2 article, though Apiiro does not say the two are the same build.

Who is behind GitDoor?

Apiiro assesses that the operators are an office team based in mainland China, and calls that an assessment, not proof.

Its evidence is behavioural. According to Apiiro, 85% of commands were written between 8 a.m. and 7 p.m. Beijing time with a lunch break, activity nearly stops on Chinese public holidays, and it picks up on the Saturdays China declares official workdays. Folder names in uploaded tools are in Simplified Chinese, and accounts use Yahoo and NetEase 163.com addresses.

That fits the other vendors’ wording. Sophos calls BRONZE SANDCASTLE China-based and could not reliably link it to BRONZE PRESIDENT or BRONZE ATLAS. Kaspersky does not name one group but found implants linked to FamousSparrow and CopperTurtle in the same staging folders. Apiiro also notes that one operator test machine had CC Switch installed, a tool for coding agents, but says nothing in the commands suggests an AI agent at work.

How does GitDoor compare with other cloud C2 cases?

Hiding C2 in trusted services is common. Leaving a complete public audit trail of it is not.

Case C2 channel What defenders got to see
GitDoor (Apiiro, Dec 2026) Public GitHub repositories 80,409 decoded operator commands
GitDoor and GraphDoor (Kaspersky, Nov 2026) GitHub, SharePoint, Ably Implants, loaders, relays, 9 accounts
BRONZE SANDCASTLE (Sophos, Oct 2026) Ably, file.io, GitHub configs Sideloaders, modified Meterpreter
PlugX takedown (FBI, announced Jan 2025) The malware’s own self-delete command Removal from about 4,200 US computers

Compared with the EAGERBEE and PhantomNet espionage toolkit, where researchers saw what the implants could do, GitDoor shows what operators actually asked for. Apiiro also points out that anyone with write access to the repositories, GitHub or law enforcement with a court order, could have sent the implants their own exit command, as the FBI did with PlugX in 2025.

How do you detect GitDoor?

Look at who talks to GitHub, not whether they do. Few networks block github.com, which is why the operators chose it.

Network and GitHub signals

  • Servers, storage appliances or non-engineering desktops polling api.github.com/repos/<owner>/<repo>/contents around the clock, including nights and weekends. Apiiro notes polling from a QNAP NAS.
  • Commits authored by INSOMNIA with the message “commit from INSOMNIA” in any repository your organisation can see.
  • Files matching main.<code>.js or main.<code>.<4 chars>.js, optionally ending in .kmap, .pmap, .apmap, .swp or .tmp, that appear and are later deleted in bulk.
  • Connections to openclawapi.webredirect.org and n.deepso.org, which Apiiro ties to two custom remote-access tools. Treat rest.ably.io as a benign service that matters only alongside other signals.

Endpoint signals

  • Signed programs loading DLLs from staging folders such as C:\ProgramData\intel, C:\Users\Public\Libraries or C:\PerfLogs\sc2, with a Base64 config.ini nearby.
  • Scheduled tasks named \SystemOptimizer, \SamsungMagician, Adobe-Agent-<SID> or \Microsoft\XblGameSave\Telemetry.
  • The WDigest UseLogonCredential value set to 1, which makes Windows keep passwords in clear text.
  • Files named proc.png or <host IP>.dmp that are really LSASS dumps, and Record.exe used to wipe event logs.

Apiiro’s appendix lists the shared indicators; case-specific ones went to national CERTs. Sophos publishes BRONZE SANDCASTLE indicators in its SophosLabs IoCs repository.

ATT&CK mapping

Sophos links its side-loading finding to T1574.001. The rest of this table is our mapping of behaviour the reports describe.

Behaviour ATT&CK technique
GitHub as command channel T1102.002 Bidirectional Communication
DLL side-loading T1574.001 (per Sophos)
Scheduled tasks and Group Policy tasks T1053.005, T1484.001
WDigest clear-text passwords, LSASS dumps T1112, T1003.001
Event-log wiping T1070.001
Signal and messaging data theft T1005 Data from Local System

How do you mitigate the risk?

  1. Restrict outbound access to GitHub, Ably and Pusher to the hosts and processes that need it. Servers and appliances rarely do.
  2. Hunt the shared indicators above across endpoint and proxy logs for at least the last two years, the span of Apiiro’s data.
  3. Enforce application control that blocks signed binaries running from user-writable folders such as ProgramData and Users\Public.
  4. Patch Windows for CVE-2026-42980 and keep Linux kernels current; the operators used public exploits soon after disclosure.
  5. Check Group Policy for unexpected scheduled tasks, and alert on new GPO-deployed tasks.
  6. Treat any confirmed infection as a full credential compromise: reset passwords, rotate Exchange and certificate keys, and review messaging apps on affected machines.

What is still unknown?

  • What was actually stolen. Results went to private repositories Apiiro did not open, so exfiltration is not proven for any single file.
  • Initial access. Neither Apiiro nor Kaspersky explains how the operators first got in.
  • Other channels. GitHub took the repositories down, but the operators were testing GitLab, Pusher, Graph and Tailscale. Whether those keep the implants alive is not public.
  • Exact attribution. The vendors agree on China-based or Chinese-speaking operators, but none names a single known group.
  • Independent review. SecurityWeek and others report Apiiro’s figures; no other researcher has yet published a check of the decoded commands.

The bottom line

GitDoor’s operators picked GitHub so their traffic would look normal, and it did, for two years. The same choice left a timestamped record of every order they gave, which turned a stealthy channel into a minute-by-minute record of what a state-aligned espionage team wanted. If your servers talk to GitHub, check which process is talking and why.

Sources

This article is written for defenders and authorised security testers. Only test systems you own or have written permission to assess.

Frequently asked questions

What is GitDoor?

GitDoor is a Windows backdoor, with a Linux variant, that takes its commands from files in GitHub repositories. Kaspersky first described it on 17 November 2026 as part of Operation ShadowCloud, a cyber espionage campaign mainly against government networks in Asia and Africa.

How did Apiiro read the GitDoor commands?

Each command was an encrypted file committed to a public repository and deleted later, but Git keeps deleted files in its commit history. Apiiro pulled those old commits, decrypted the files with the key stored inside each one, and decoded 80,409 commands spanning about two years.

Which countries were targeted by GitDoor?

Apiiro counts 23 countries. It names organisations in Taiwan, the Philippines, the United States, Italy, Argentina, Peru, Mexico, Eswatini, India, Brazil, Uganda, Zambia, Cambodia, Thailand, Vietnam and Laos, plus Caribbean and Central and South Asian ministries.

Were Trump's clubs hacked through GitDoor?

Apiiro says the operators ordered the website folders of about 20 Trump clubs and resorts zipped on the servers of a vendor that builds those sites. It also says nothing in the log shows access to the Trump Organization's own network.

Who is behind GitDoor and Operation ShadowCloud?

Apiiro assesses, without claiming proof, that the operators are an office team in mainland China. Sophos tracks part of the activity as BRONZE SANDCASTLE, a China-based group, and Kaspersky points to overlaps with the Chinese-speaking groups FamousSparrow and CopperTurtle.

Is GitDoor still active?

GitHub took down all 104 operator repositories by 25 November 2026, according to Apiiro. The operators were also testing other channels, including GitLab, Pusher, Microsoft Graph and a Tailscale-based proxy, so infected machines may still be reachable another way.

How do I detect GitDoor on my network?

Look for servers or non-developer desktops polling api.github.com repository contents day and night, commits by INSOMNIA with the message 'commit from INSOMNIA', files named like main.CODE.js that appear and are deleted in bulk, and signed programs side-loading DLLs from folders such as C:\ProgramData\intel.

Does a decoded command prove data was stolen?

No. Apiiro stresses that a command only shows what the operators asked for. Results went to private repositories Apiiro did not open, so the research reports what was ordered, not what arrived.

Keep reading

GitDoorOperation ShadowCloudBRONZE SANDCASTLEApiiroGitHub C2cyber espionagethreat intelligence