Malware News GitHub History Exposes Two Years of Chinese Espionage Orders

Brownie2019

Level 23
Verified
Well-known
Forum Veteran
The threat actor managed implants from public repositories, targeting victims in 23 countries with the GitDoor and GraphDoor backdoors.
A Chinese-speaking threat actor targeted organizations in 23 countries as part of a two-year-long espionage campaign that relied on public GitHub repositories for implant management, cybersecurity firm Apiiro reports.

As part of the campaign, exposed by Kaspersky in November as Operation ShadowCloud, the threat actor abused Microsoft SharePoint, GitHub, and Ably to hide command-and-control (C&C) traffic and infected victims with the GraphDoor and GitDoor backdoors.

The hacking group, tracked by Sophos as Bronze Sandcastle, has been conducting activities aligned with the People’s Republic of China (PRC) interests, mainly focusing on intelligence gathering from organizations in Asia and Africa.

In November, Kaspersky shed light on the threat actor’s infection chain, its use of backdoors, and the various shellcode families it has been observed deploying in attacks, pointing to operational overlaps with Chinese-speaking groups such as FamousSparrow and CopperTurtle.

Kaspersky detailed that the group’s GitDoor implant was using two GitHub repositories for C&C communication: one as a drop point for receiving commands, and another for reporting the results of those commands.

The commands sent via GitHub were deleted hours later, but they were recorded in the repositories’ public commit histories, and Apiiro managed to decode over 80,000 such commands, gaining visibility into the group’s activities over the past two years.
“Espionage operations are usually seen through their malware and servers, and rarely through their orders. This record is the operators’ own task list: what they asked for, from whom and when, across every victim, down to the minute,” Apiiro notes in a new report.

The cybersecurity firm identified 104 repositories used in the campaign, including 92 connected to victim machines.

“The 104 repositories are one operation run as regional teams. Each team has its own GitHub accounts, relay servers, implant build and region: Taiwan; the Philippines; Vietnam and Southeast Asia; Zambia and Uganda; South and Central Asia; Latin America and Italy,” Apiiro notes.

Victims across five continents
Based on the identified commands, the espionage group’s operation likely hit organizations in 23 countries, including many in the US, Taiwan, and the Philippines.

“A command is not proof that anything happened. The deletes do not show that a command ran: most come hours later, in bulk sweeps that clear several victims at once, and whatever the implants sent back went to private repositories we did not open,” Apiiro notes.

In the US, it targeted a company that builds websites (including those for 20 Trump clubs and resorts, such as Mar-a-Lago, Bedminster, and Doral), the IT headquarters of a large industrial union, and a federal contractor’s accounting database and software vendor. In the Philippines it targeted the Coast Guard to follow US forces in the country.

The operators targeted Taiwan’s three main parties, namely the ruling Democratic Progressive Party (DPP), the main opposition party (KMT), and the smaller Taiwan People’s Party (TPP). They also went after the country’s military through its suppliers, and targeted Taiwan’s infrastructure via contractors.

According to Apiiro, after Kaspersky published its Operation ShadowCloud report on November 17, the operators continued their activity against the KMT, planting loaders and drivers via Group Policy tasks, and deploying a proxy on a machine. Minutes before the report went live, they uploaded a Windows kernel exploit to a repository.

On November 20, the group targeted another Philippine government entity, and on November 23 it opened a session to a KMT machine holding the party’s website and payment-site folders.

Other victims include a foreign-policy think tank in Italy, Argentina’s foreign ministry, Eswatini’s national data center, a help-desk account at Peru’s Ministry of Defense, Caribbean foreign and energy ministries, Mexico’s economy ministry, India’s national electronic toll collection system, and the Philippine Department of Justice’s Office of Cybercrime. The hacking group targeted organizations in Brazil and other countries as well.

Apiiro uncovered 494 Windows programs used by the attackers. The group has used 170 side-loading DLLs and at least 87 distinct versions of the GitDoor implant.

“The log places the attackers in mainland China: they keep Beijing office hours and mainland China’s holiday calendar, down to the Saturdays China declares official workdays, a schedule no one outside the mainland follows,” Apiiro notes.
 
Good find, Brownie2019. This is more revealing than the usual “APT uses a legitimate cloud service” report: Git’s design accidentally turned the attackers’ command channel into an audit log. Deleting a file from the current repository does not remove it from earlier commits—something GitHub’s own documentation explicitly warns about. That allowed Apiiro to recover and decode 80,409 commands from the public history.

Two distinctions matter:

  • Those were operator-issued instructions, not 80,409 confirmed executions. Apiiro did not have access to the private repositories receiving the implants’ output. Sequences such as listing a drive and subsequently requesting a discovered file provide evidence that some implants responded, but they do not prove every command succeeded.
  • The evidence supports a China-based, Chinese-speaking operation aligned with PRC intelligence interests, not a definitive identification of a particular Chinese government agency. The mainland holiday and official make-up-workday pattern is a particularly interesting attribution clue, but scheduling and victim selection remain supporting evidence rather than a digital signature.

Kaspersky’s technical analysis says GitDoor decrypted a GitHub repository address and access token, using separate repositories for instructions and results. That has some practical defensive implications:

  • Hunt for unexpected programs making regular GitHub API requests, especially servers and government workstations with no development reason to do so.
  • Correlate that traffic with DLL side-loading, process injection, command-shell activity and unfamiliar MeshAgent installations. GitHub traffic alone is not malicious.
  • On sensitive networks, control direct access to code-hosting and cloud APIs rather than relying on their good domain reputation.
  • Use the published account, repository and file indicators for retrospective searches, but prioritize behavioural detections—the operators can replace repositories much faster than defenders can update blocklists.
  • Preserve endpoint, proxy and DNS telemetry if exposure is suspected; the reported activity continuing after publication shows that disclosure did not instantly end the operation.

For ordinary home users, this is not evidence that merely visiting GitHub infects a computer. GitHub was being used as C2 infrastructure after an implant was already present. Blocking the whole platform would be a fairly blunt cure for a much narrower disease.

Sources
 

MalwareTips community

Join the discussion. It's free.

Create an account to reply to this thread, ask your own questions and get help from people who know security.

  • Reply and ask your own questions
  • Get an alert when someone answers
  • Free malware removal help from volunteers

Free account

restwrst toto RoxasDev andytan 75,772 members since 2010
or
Have malware? Get free help

Recently browsing

Members and guests who viewed this thread in the last 5 minutes

Back
Top