Chinese Cyberespionage Originating From Tsinghua University Infrastructure
Scope Note: Recorded Future analyzed new malware targeting the Tibetan community, resulting in a detailed analysis of the malware and its associated infrastructure. Sources include Recorded Future’s platform, VirusTotal, ReversingLabs, and third-party metadata, as well as common OSINT and network metadata enrichments, such as DomainTools Iris and PassiveTotal. This research is part of a series highlighting the breadth of sophisticated techniques used by the Chinese state against perceived domestic threats.
Executive Summary
Following our research uncovering the Chinese RedAlpha campaigns targeting the Tibetan community, Recorded Future’s Insikt Group identified a novel Linux backdoor called “ext4,” deployed against the same Tibetan victim group. By analyzing the backdoor, we uncovered repeated attempted connections to the same compromised CentOS web server emanating from infrastructure registered to Tsinghua1 University, an elite Chinese academic institution.
We also identified network reconnaissance activities being conducted from the same Tsinghua University infrastructure targeting many geopolitical organizations, including the State of Alaska Government, Alaska’s Department of Natural Resources, the United Nations office in Nairobi, and the Kenya Ports Authority. Additionally, we identified the targeted scanning of German automotive multinational Daimler AG that began a day after it cut its profit outlook for the year, citing the growing trade tensions between the U.S. and China. In several cases, these activities occurred during periods of Chinese dialogue for economic cooperation with these countries or organizations.
We assess with medium confidence that the network reconnaissance activities we uncovered were conducted by Chinese state-sponsored actors in support of China’s economic development goals.
Key Judgments
- Tsinghua IP 166.111.8[.]246 engaged in network reconnaissance targeting organizations in Alaska, Kenya, Brazil, and Mongolia during times of economic dialogue or publicity around China’s investment in foreign infrastructure projects concerning China’s flagship Belt and Road Initiative (BRI).
- The network reconnaissance activity against Alaskan organizations increased following the governor of Alaska’s trade delegation trip to China in late May. Organizations targeted by the reconnaissance activity were in industries at the heart of the trade discussions, such as oil and gas.
- The targeting of German automotive multinational Daimler AG was observed a day after it announced a profit warning in light of the growing U.S. and China trade tensions.
- The Tsinghua IP made at least one attempt to subscribe to a U.S.-based hotel’s high-speed internet portal. We assess with low confidence that this may demonstrate an intent to breach Nomadix internet gateways within the hospitality sector running vulnerable WindWeb servers.
- The Tsinghua IP repeatedly attempted to connect with a Tibetan network that was compromised with a highly sophisticated backdoor, “ext4.”
- “ext4” only allowed incoming TCP 443 connections to the compromised network during a 180-second window every hour, with packets requring a unique combination of TCP header options to successfully connect. In over 20 observed attempts, the Tsinghua IP did not transmit the correct TCP options to activate the backdoor. This suggested:
- The threat actors connecting from the Tsinghua IP were ill-informed of the correct “ext4” backdoor connection sequence and were making mistakes.
- The targeting of the Tibetan network is not associated with the presence of the “ext4” backdoor and the network was being probed in line with wider geopolitical and economic network reconnaissance activity being conducted by the Tsinghua IP.
Background
La République populaire de Chine (RPC) revendique la souveraineté sur le Tibet et considère tous les mouvements indépendantistes tibétains comme des menaces séparatistes. Si la République populaire de Chine utilise de nombreuses formes de coercition à l'encontre de la communauté tibétaine, le cyberespionnage visant des cibles tibétaines est devenu un outil fréquemment utilisé, en particulier en période de tensions accrues. Le premier incident connu de cyberespionnage chinois contre le Tibet, baptisé GhostNet, remonte à 2008. Cela s'inscrivait dans le cadre d'une initiative plus large visant à surveiller les cibles étrangères présentant un intérêt national. Depuis lors, de nombreuses campagnes de cyberespionnage visant les Tibétains ont été documentées, notamment dans le récent rapport RedAlpha de Recorded Future.
L'université Tsinghua est située dans le district de Haidian à Pékin. Surnommée « le MIT chinois », elle est l'une des meilleures universités techniques de recherche en Chine. Les universités chinoises ont souvent été associées, directement ou indirectement, aux capacités cybernétiques soutenues par l'État chinois. En 2015, l'infrastructure APT17 a été connectée à un professeur de l'université Southeast en Chine, et en 2017, l'Armée populaire de libération (APL) s'est associée à l'université Xi'An Jiaotong pour créer un programme de milice cybernétique. L'université Tsinghua est un établissement public qui figure parmi les meilleures écoles d'ingénieurs et de recherche au monde. Les capacités offensives de ses étudiants en matière de cybersécurité sont particulièrement reconnues grâce à Blue-Lotus, une équipe de recherche en sécurité composée de personnes affiliées à l'université Tsinghua. L'équipe a terminé deuxième du concours Capture the Flag organisé par DEF CON en 2016.
Les départements de recherche de l'université Tsinghua entretiennent également des liens avec des organismes publics connus pour avoir dérobé des technologies américaines. Le Bureau de la recherche scientifique et du développement de l'Université Tsinghua a rencontré le groupe CITIC China dans le cadre des activités du Parti communiste chinois en mai 2018. Au cours de cette réunion, ils ont discuté de la coopération stratégique entre les entreprises et les instituts de recherche au service du développement du pays. Dans le rapport de 1999 de la commission spéciale sur la sécurité nationale et les questions militaires et commerciales avec la République populaire de Chine (le « rapport Cox »), CITIC a été associée à des opérations secrètes de l'Armée populaire de libération et au vol de technologies sensibles américaines. Le rapport Cox mentionne également une tentative de CITIC en 1990 d'acquérir un fabricant américain de pièces d'avion pour le compte de l'APL afin d'accéder à des technologies aérospatiales soumises à des contrôles à l'exportation par les États-Unis. De plus, l'ancien président de CITIC, Wang Zhen, a été impliqué dans l'inculpation de Poly Technologies en 1996, suite à la tentative de la société de faire passer clandestinement 2 000 fusils d'assaut AK-47 chinois aux États-Unis.
L'Institut des systèmes d'information et d'ingénierie de Tsinghua est également affilié aux programmes nationaux chinois 863 et 973. Le programme 863, également connu sous le nom de « Plan national pour le développement des technologies de pointe », vise à développer les capacités nationales dans les secteurs technologiques clés de la Chine, tandis que le programme 973, créé en 1997, se concentre sur le développement des technologies de base nécessaires pour atteindre la supériorité technologique dans les secteurs clés. Ces deux programmes ont facilité le vol de propriété intellectuelle par la Chine afin d'atteindre les objectifs du programme.
Au cours des dix dernières années, plusieurs acteurs cybermalveillants soutenus par l'État chinois ont été identifiés comme menant des activités de cyberespionnage à grande échelle, reflétant directement les directives politiques de la Chine visant à obtenir un avantage scientifique, technique et économique dans des secteurs stratégiques clés. Cette activité a récemment été observée dans les opérations menées par APT10, qui cible les fournisseurs de services informatiques gérés, et APT17, qui a lancé en 2017 des attaques massives contre la chaîne d'approvisionnement du célèbre logiciel CCleaner.
Recorded Future timeline of Tsinghua IP activity in correlation with Tibetan protests.
Threat Analysis
Recorded Future discovered the presence of the “ext4” backdoor during our ongoing research into the targeting of the Tibetan community. This backdoor was configured to run on a Linux web server running CentOS and was stealthily designed to be embedded within a system file. The backdoor was mostly inactive other than during a three-minute window every hour when it would activate and accept incoming connections on TCP port 443.
Au total, la couverture unique de Recorded Future nous a permis d'observer 23 tentatives de connexion au même serveur CentOS compromis entre mai et juin 2018. Toutes les tentatives provenaient de la même adresse IP, 166.111.8[.]246, qui correspondait au Centre chinois pour l'éducation et la recherche. Les enregistrements WHOIS indiquent que l'adresse IP se trouve dans une large plage CIDR /16 enregistrée à une adresse de l'université Tsinghua.
A unique selection of options in the TCP header, set at the maximum possible segment size of 60 bytes, were observed in every packet that attempted to connect to the Tibetan network from the Tsinghua IP, as noted in the PCAP below.
PCAP of connection attempt from Tsinghua IP to compromised Tibetan CentOS server.
The “ext4” code appears to be unique, with no prominent traces online for code or naming similarity. Aside from our submission, no uploads of a backdoor resembling the key characteristics of “ext4” were observed in leading multi-scanner repositories as of August 3, 2018. A detection ratio of 0/58 in VirusTotal confirmed that the “ext4” sample we discovered was a new and unique backdoor targeting the Tibetan community.
A detailed analysis of the “ext4” binary can be found in the Technical Analysis section of this report.
Tsinghua University IP 166.111.8[.]246
Cette adresse IP a été observée pour la première fois dans Recorded Future le 23 mars 2018 et a été attribuée au Centre chinois pour l'éducation et la recherche (CERNET), selon plusieurs sources d'enrichissement d'adresses IP. CERNET est l'un des six principaux réseaux dorsaux de Chine et est une organisation polyvalente qui dessert une grande partie de l'espace IP adressable réservé aux instituts universitaires et de recherche chinois. Comme indiqué précédemment, les enregistrements WHOIS confirment que l'adresse IP se trouve dans une plage enregistrée au nom de « Tsinghua University ».
Les données de scan des ports disponibles ont révélé que l'adresse IP est actuellement configurée avec plusieurs services actifs, notamment PPTP (port TCP 1723), MySQL (3306) et MAMP (8888), ainsi que les services plus courants OpenSSH (22), HTTP (80, 8080, 8008), SSL (443, 8443, 9443) et VPN IKE (500), entre autres. Les ports HTTP semblaient configurés comme des serveurs Web NGINX, probablement comme des proxys inversés ou des équilibreurs de charge, compte tenu de la nature de l'activité que nous avons observée à partir de cette adresse IP. Le nombre important de ports ouverts et de services associés indique que l'adresse IP de Tsinghua pourrait être une passerelle Internet ou un point d'extrémité VPN.
Recorded Future Intelligence Card™ for Tsinghua IP 166.111.8[.]246.
Les enrichissements apportés par Recorded Future à l'adresse IP indiquent qu'elle a été la source d'analyses, d'attaques par force brute et de tentatives d'exploitation actives dans le passé. Cela a déclenché plusieurs règles de risque, notamment un signalement par le Bureau de l'éducation de la ville de Taichung à Taïwan, qui suit les indicateurs de cybermenaces provenant de Chine, et figure sur la liste noire d'AlienVault. L'analyse des métadonnées de l'adresse IP indique également qu'il s'agit probablement d'une passerelle, d'un NAT ou d'un proxy, et que la véritable machine à l'origine de cette activité se trouve derrière cette adresse IP.
The same IP address was also observed conducting large-scale network reconnaissance of organizations that were engaged in key trade discussions with Chinese state-owned entities at the time. We believe these reconnaissance activities were not coincidental as they align broadly with China’s strategic and economic interests.
“Opportunity Alaska”
Between April 6 and June 24, 2018, we observed over one million IP connections between the Tsinghua IP and several networks in Alaska including:
- The Alaska Communications Systems Group
- Alaska Department of Natural Resources
- Alaska Power & Telephone Company
- State of Alaska Government
- TelAlaska
The vast number of connections between the Tsinghua IP and the above organizations relate to the bulk scanning of ports 22, 53, 80, 139, 443, 769, and 2816 on the Alaskan networks and were likely conducted to ascertain vulnerabilities and gain illegitimate access. The scanning activity was conducted in a systematic manner with entire IP ranges dedicated to the organizations probed for the above ports.
Cette initiative visant le gouvernement de l'État de l'Alaska a suivi la grande mission commerciale de l'Alaska en Chine, baptisée « Opportunity Alaska ». Cette mission commerciale s'est déroulée fin mai et était dirigée par Bill Walker, gouverneur de l'Alaska. Au cours de ces pourparlers, l'une des discussions les plus médiatisées a porté sur le projet de gazoduc entre l'Alaska et la Chine. Malgré les craintes d'une guerre commerciale entre la Chine et les États-Unis, le bureau du gouverneur Walker a déclaré que la mission commerciale « représentait ce que l'Alaska a de mieux à offrir et [...] soulignait l'étendue de nos intérêts communs avec notre plus grand partenaire commercial ». Opportunity Alaska était composé de délégués d'entreprises de l'Alaska issues des secteurs de la pêche, du tourisme, de l'architecture et de l'investissement, et a fait escale à Pékin, Shanghai et Chengdu.
Network probing events conducted by Tsinghua IP targeting Alaskan institutions coinciding with Alaskan trade delegation to China in May 2018.
Recorded Future first observed the scanning activity against Alaskan networks in late March, only a few weeks after Gov. Walker announced a trade delegation to China. The activity picked up for a few days prior to the delegation arriving on May 20, 2018, and dropped off as the delegation arrived. Probing of the Alaskan networks remained at low levels until May 28 as the delegation concluded its activities, then ramped up considerably as delegates left China. The spike in scanning activity at the conclusion of trade discussions on related topics indicates that the activity was likely an attempt to gain insight into the Alaskan perspective on the trip and strategic advantage in the post-visit negotiations.
Entre le 20 et le 24 juin, on a constaté un regain d'intérêt pour les réseaux de l'État de l'Alaska et du ministère des Ressources naturelles de l'Alaska. Cette décision a probablement été prise en réponse à l'annonce faite le 19 juin par le gouverneur Walker de son intention de se rendre à Washington, D.C., afin de rencontrer des responsables américains et chinois pour leur faire part de ses préoccupations concernant le conflit commercial croissant entre les deux pays.
The “Belt and Road Initiative” and China’s Economic Goals
During the course of our research, we also observed the Tsinghua IP scan ports and probe government departments and commercial entities networks in Mongolia, Kenya, and Brazil. Each of these countries are key investment destinations as part of China’s Belt and Road Initiative.
L'initiative chinoise « Belt and Road » (BRI) est l'un des programmes les plus ambitieux du président Xi Jinping. Conçu pour projeter l'influence géopolitique transformatrice de la Chine à travers le monde, ce projet est d'une ampleur et d'une portée sans précédent. Pékin s'est engagée à investir 4 000 milliards de dollars dans des projets d'infrastructure et de développement dans 65 pays, touchant 70 % de la population mondiale et 75 % des réserves énergétiques mondiales. Ce projet vise à relier les principaux centres économiques d'Eurasie par voie terrestre et maritime, dont beaucoup faisaient partie de l'ancienne Route de la Soie il y a deux mille ans.
Selon The Diplomat, « la BRI vise à stabiliser les périphéries occidentales de la Chine, à relancer son économie, à promouvoir les institutions économiques internationales non occidentales, à gagner en influence dans d'autres pays et à diversifier ses fournisseurs et ses routes commerciales tout en contournant le pivot américain vers l'Asie ».
L'initiative chinoise « Belt and Road ». Source : Institut Mercator pour les études chinoises, merics.org
The BRI also aims to further strengthen China’s geopolitical and economic influence in Africa, capitalizing on significant infrastructure investments made across the continent. Kenya in particular has commanded increased attention due to its strategic geographical advantage in China’s Maritime Silk Road Initiative (MSRI) — the sea-based component of China’s BRI initiative.
Plus tôt cette année, le Kenya a annoncé qu'il ferait pression en faveur de projets régionaux dans le cadre de la BRI. La Chine a déjà financé la construction d'une ligne ferroviaire de 480 kilomètres entre la ville portuaire kenyane de Mombasa et la capitale Nairobi. À terme, cette ligne devrait être prolongée jusqu'aux pays voisins, à savoir l'Ouganda, le Rwanda et le Burundi. Cependant, en mai 2018, le Kenya a annoncé qu'il ne signerait pas l'accord de libre-échange avec la Chine qui était en cours de négociation avec les États de la Communauté de l'Afrique de l'Est (CAE), ce qui a exacerbé les tensions entre Pékin et Nairobi.
In early June 2018, we observed the Tsinghua IP address aggressively scanning ports 22, 53, 80, 389, and 443 of various Kenyan internet-hosting providers and telecommunications companies, as well as ranges dedicated to the Kenya Ports Authority, a state corporation responsible for the maintenance and operation of all of Kenya’s seaports. Recorded Future also identified network reconnaissance activities directed at the United Nations Office in Nairobi, Kenya’s Strathmore University, and a broader national education network.
This chart below shows a clear spike in network reconnaissance activity against Kenyan organizations from the Tsinghua IP. This spike occurred merely two weeks after Kenya announced its intentions not to support the China-EAC free trade agreement.
Network recon events conducted by Tsinghua IP targeting Kenyan institutions overlayed with key China-Kenya economic developments, March 2018 to June 2018.
En avril dernier, le président Xi a ajouté le Brésil à la liste des pays bénéficiant des investissements chinois dans les infrastructures dans le cadre de la BRI. Le financement d'un nouveau port de 520 millions de dollars dans l'État du Maranhão, au nord-est du pays, a été annoncé, dans le prolongement des investissements chinois considérables réalisés en 2016 dans les secteurs de l'éducation et de l'énergie dans un autre État brésilien, l'Amapá.
Our research uncovered repeated attempts from the Tsinghua IP to connect to the Ministério Público do Estado Do Amapá in Brazil (Public Ministry of the State of Amapá) between April 2 and June 11, 2018, just one month after Beijing-based China Communications Construction Co. began construction on the Maranhão port.
Nous avons également observé des tentatives répétées de connexion à des réseaux organisationnels tels que le Centre national de données en Mongolie et l'Université mongole des sciences et technologies entre le 6 et le 12 avril 2018. La Mongolie joue également un rôle essentiel dans les projets chinois liés à la BRI. Le volet terrestre de la BRI, connu sous le nom de « Ceinture économique de la Route de la Soie » (SREB), propose un nouveau pont terrestre eurasien et pas moins de cinq nouveaux corridors économiques, dont un corridor Chine-Mongolie-Russie.
We assess with medium confidence that the consistent reconnaissance activity observed from the Tsinghua IP probing networks in Kenya, Brazil, and Mongolia aligns closely with the BRI economic development goals, demonstrating that the threat actor using this IP is engaged in cyberespionage on behalf of the Chinese state.
Recorded Future timeline of Tsinghua IP activity in correlation with Opportunity Alaska and key BRI announcements.
The Impact of Growing U.S. and China Trade Tensions
On June 20, 2018, German multinational automotive corporation Daimler AG was the first prominent company to cut its profit outlook due to the escalating trade tensions between the U.S. and China. The next day, on June 21, we observed network reconnaissance activity specifically targeting ports 139, 22, 443, and 53 on networks resolving to Daimler AG. The probes originated from the same Tsinghua University IP.
Tsinghua IP probing Daimler AG networks on ports 139, 22, 443, and 53 between June 20 to 24, 2018.
Interaction With U.S. Managed Hotel Network Solutions Provider
Une requête Shodan sur l'adresse IP de Tsinghua a renvoyé une réponse HTTP 302 renvoyant vers « snap.safetynetaccess.com ». Avis de redirection. Basée à Needham, dans le Massachusetts, Safety NetAccess construit des réseaux sans fil pour les hôtels, les centres de villégiature et d'autres établissements publics. Parmi ses clients figurent notamment les chaînes hôtelières Hilton, Marriott, Sonesta et Wyndham. Selon le site Web de Safety NetAccess, SNAP est son « programme logiciel back-end avancé » qui offre aux agents de Safety NetAccess « un accès direct à tous les équipements gérés, quel que soit leur emplacement ». Bien que les champs figurant dans l'avis de redirection puissent sembler obscurs, ils correspondent aux paramètres de la page du portail pour les passerelles Internet Nomadix, le principal fournisseur de passerelles et d'équipements de routage de Safety NetAccess.
Shodan query reveals Tsinghua IP 166.111.8[.]246 “subscribed” to a Safety NetAccess portal.
The HTTP header response (above) showed that the Cox Communications IP 98.180.88[.]145 was originally requested by the “subscriber” (SIP), the Tsinghua IP 166.111.8[.]246. Navigating to the Cox Communications IP redirects users to a Safety NetAccess guest internet portal at a Holiday Inn hotel based in Ocala, Florida.
Safety NetAccess portal login for a Holiday Inn in Ocala, Florida.
En décomposant l'URL dans le champ « Emplacement » de la réponse HTTP, nous obtenons l'adresse MAC du dispositif Tsinghua (00:13:5F:07:87:D9) et l'adresse IP du dispositif Nomadix (68.105.161[.]74). indiqué par UIP dans l'URL. L'UIP est connecté à Cox Communications à Ocala, en Floride, et des recherches open source indiquent que le dispositif hébergeant cet UIP est une passerelle Internet AG 3100 Nomadix montée en rack, prenant en charge la redirection DNS et HTTP à l'aide d'une adresse IP magique. Cette UIP semble également exécuter un serveur WindWeb vulnérable sur le port 443. Les résultats de Shodan indiquent des tentatives de connexion FTP infructueuses à la passerelle Internet, ainsi que des événements Telnet.
From the limited data available to us, we assess with low confidence that the Tsinghua IP was attempting to leverage the remote administrative access controls enabled by Safety NetAccess’s SNAP portal for the Holiday Inn hotel in Florida.
Is the “ext4” Backdoor Associated With the Tsinghua IP?
The discovery of the “ext4” backdoor on a Tibetan device enabled us to identify the wider targeting of the device from the Tsinghua University IP. However, none of the attempted connections to the Tibetan device from the Tsinghua IP resulted in the successful activation of the backdoor, leaving it unclear whether the threat actors behind the widespread network recon activities were also responsible for the “ext4” backdoor.
That leaves us with two possible scenarios explaining the involvement of the “ext4” backdoor on a Tibetan network with the Tsinghua IP:
- The Tsinghua IP is being used by a threat actor to access the “ext4” backdoor, but a technical fault or operator error is resulting in the misconfiguration of the TCP connection packets required to establish communication with the backdoor.
- L'IP Tsinghua est largement utilisé pour mener des opérations de reconnaissance réseau et de cyberespionnage contre des intérêts économiques et nationaux stratégiques, visant non seulement les pays avec lesquels la Chine s'engage dans le cadre de la BRI, mais aussi les organisations dites « Five Poisons 2 », telles que le réseau tibétain. La porte dérobée « ext4 » est donc susceptible d'appartenir à un autre acteur malveillant qui n'est pas impliqué dans les activités de scan réseau visant les organisations décrites précédemment dans ce rapport.
Analyse technique
The “ext4” Backdoor
“ext4” backdoor key characteristics.
“ext4” is a novel Linux backdoor that was present on the victim network during the same time that the Tsinghua IP reconnaissance activity was observed (May to June, 2018). In total, 23 attempts to connect to the victim device over TCP 443 were made from the Tsinghua IP during this period.
La porte dérobée « ext4 » a été identifiée dans un fichier« cron »légitime sur un serveur web CentOS compromis affilié à la communauté tibétaine. Une analyse des fichiers système modifiés a révélé que le fichier « 0anacron » « cron » avait été modifié pour exécuter un binaire non standard appelé « ext4 » situé dans le répertoire /usr/bin/ext4 sur le serveur compromis. Le fichier binaire a été configuré pour s'exécuter toutes les heures et, fait intéressant, en tant que processus d'arrière-plan. Cela empêcherait toute sortie d'apparaître sur la sortie standard du terminal Linux, la rendant ainsi moins détectable par l'administrateur du serveur web.
Modified etc/cron.hourly/0anacron script to include “ext4” backdoor function.
Le fichier binaire « ext4 » était relativement petit, avec seulement 9 511 octets, et était composé de fonctions simples. Il était lié dynamiquement à la bibliothèque libpcap, présente sur les systèmes Unix pour permettre la capture de paquets (fichierspcap ) généralement utilisés par les « renifleurs de réseau ».
There were three primary functions that drive the operation of the backdoor: “main,” “process,” and “my_pcap_handler.” All of these functions flow together to perform the main functionality of the backdoor.
Main Function
The main function performed three central tasks: to remove the file “tmp/0baaf161db39,” to create a child process that executes the backdoor functionality, and to set a sleep timer of 180 seconds. The process is terminated when the sleep timer limit is reached.
Additionally, the main function also checked the command line arguments to determine which network interface to monitor on the compromised network. By default, “ext4” used “eth0.”
Process Function
The main purpose of the process function was to create a handle to capture network traffic, which was done by use of the libpcap function, “pcap_open_live.”
Once the handle had been created, another libpcap function, “pcap_loop,” was executed, which processed all of the packets sent to the interface specified in “pcap_open_live” and sent them to the function “my_packet_handler” to parse and perform actions based on the type of packet sent.
“my_packet_handler” Function
All packets sent to a specified network interface were received by the “my_packet_handler” function. The handler then parsed the Ethernet, IP, and TCP headers3 to perform a series of checks to validate if it is a packet that it is meant to process. Once validated, the function decoded the payload, which would typically be a command fed to a bash shell on the compromised CentOS host.
The below steps demonstrate the parsing and validation criteria the function used to ensure that it processed the correct packets. If at any point the function receives unexpected results, the packet is dropped from the function and the next one is processed.
- Check the ethernet header to ensure the type is IP (Type 2048).
- IP header length is parsed from the IP header.
- Parse the IP header to ensure the protocol is TCP (Type 6).
- Parse the TCP header to ensure the destination port is 443.
- Find the data offset or the start of the payload.
- Check that the TCP flags equal 322, which equates to the following flags being set: NS (Nonce Sum), ECE (ECN-Echo), and SYN.
The breakdown of the flags is important, as it looks for the SYN and ECE to be set, as well as the NS flag. The NS flag is used to protect against accidental or malicious concealment of marked packets from the TCP sender.
Le drapeau ECE indique si le pair TCP est compatible avec la notification explicite de congestion (ECN). ECN est une extension optionnelle du protocole TCP qui empêche la perte de paquets en raison d'une congestion. Si l'utilisation de l'ECN peut être courante dans les grandes entreprises équipées de routeurs compatibles ECN, l'utilisation du bit NS semble être expérimentale et n'est officiellement utilisée dans aucune implémentation TCP.
If a packet passes all of the criteria, the function gets the length of the payload and checks that it is between five and 1024 bytes. After that, it allocates memory and then saves the payload into memory.
The payload is XOR-encoded, and the first byte of the payload is the XOR key. The function will use the first byte of payload to decode the next five bytes and check to see if they equal the string “anti:.”
If the decoded bytes equal “anti:,” then the rest of payload will be decoded and passed as a final argument to run a bash command using the execl call.
Outlook
China continues to use cyber operations to monitor and track threats to domestic stability, neatly summarized as the “Five Poisons.” This focus on domestic threats enables security researchers to identify new campaigns and tools being aggressively used against persecuted communities. “ext4” is a sophisticated lightweight Linux backdoor designed to enable the threat actor to access the compromised device and conduct further malicious activity. It is also an example of a tool probably being used by Chinese nation-state actors to target the Tibetan community.
Further, the widespread use of CentOS servers, many of which are unpatched and used in production systems, highlights the breadth of the potential attack surface.
L'initiative chinoise « Belt and Road » et ses investissements à long terme dans les infrastructures africaines ont permis à la Chine d'exercer une influence considérable dans les pays visés par ces politiques. Nous estimons avec un niveau de confiance moyen que les activités généralisées de reconnaissance du réseau émanant de l'infrastructure de l'université Tsinghua et visant des intérêts économiques au Kenya, en Mongolie et au Brésil sont dirigées par l'État.
La Chine a mené à plusieurs reprises des activités de cyberespionnage afin de soutenir ses intérêts économiques nationaux. En novembre 2017, le ministère américain de la Justice a inculpé trois pirates informatiques chinois reconnus coupables de cyberespionnage économique. En outre, dans son récent rapport sur l'espionnage économique étranger dans le cyberespace, le Centre national de contre-espionnage et de sécurité des États-Unis a mis en avant les acteurs malveillants chinois APT10, KeyBoy et Temp.Periscope, qui auraient mené des activités de cyberespionnage à grande échelle dans le but d'obtenir des avantages stratégiques, nationaux et économiques.
Other than the discovery of the “ext4” backdoor targeting the Tibetan community, we have not identified the presence of malware in any of the documented organizations in this report, as the bulk of our analysis was based on third-party metadata. However, we assess with medium confidence that the targeted scanning and probing of networks during the timeframe of bilateral trade and strategic dialogue between China and its Alaskan, Kenyan, Brazilian, and Mongolian counterparts indicates the activity is being conducted by a threat actor (or multiple threat actors with access to the same Tsinghua endpoint) directed by the Chinese state.
Network Defense Recommendations
Recorded Future recommends organizations conduct the following measures when defending against hostile network reconnaissance and the potential deployment of a CentOS backdoor from the Chinese threat actor detailed in this report:
- Configure your intrusion detection systems (IDS) and intrusion prevention systems (IPS) to alert and block connection attempts from Tsinghua University IP 166.111.8[.]246.
- Using the provided Yara rule for the “ext4” backdoor, conduct scans of any Linux hosts on networks for presence of the backdoor.
- If applicable, ensure the “ext4” Yara rule is deployed to the endpoint protection appliance used in your organization. Scan Linux hosts for the presence of the “/usr/bin/ext4” and “/tmp/0baaf161db39” files.
Additionally, we advise organizations to follow the following general information security best practice guidelines:
- Keep all software and applications up to date; in particular, operating systems, antivirus software, and core system utilities.
- Filter email correspondence and scrutinize attachments for malware.
- Make regular backups of your system and store the backups offline, preferably off-site so that data cannot be accessed via the network.
- Have a well-thought-out incident response and communications plan.
- Adhere to strict compartmentalization of company-sensitive data. In particular, look at which data anyone with access to an employee account or device would have access to (for example, through device or account takeover through phishing). Strongly consider instituting role-based access, limiting company-wide data access, and restricting access to sensitive data.
- Employ host-based controls — one of the best defenses and warning signals to thwart attacks is to conduct client-based host logging and intrusion detection capabilities.
- Implement basic incident response and detection deployments and controls like network IDS, netflow collection, host logging, and web proxy, alongside human monitoring of detection sources.
- Be aware of partner or supply chain security standards. Being able to monitor and enforce security standards for ecosystem partners is an important part of any organization’s security posture.
Veuillez consulter l'annexe de la version PDF de cette analyse pour obtenir la liste complète des indicateurs de compromission associés.
1Tsinghua University is also romanized as Qinghua University.
2The “Five Poisons” are threats the Chinese Communist Party sees to its stability, including Uyghurs, Tibetans, Falun Gong, the Chinese democracy movement, and Taiwan’s independence movement.
3For reference, we have provided a table in Appendix A that shows the offsets for the ethernet, IP, and TCP headers. This can be used to help follow how this function parses the headers.