Dark Reading is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them.Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

Threat Intelligence

06:10 PM
Connect Directly

Chinese-Affiliated APT31 Cloned & Used NSA Hacking Tool

APT31 cloned and reused a Windows-based hacking tool for years before Microsoft patched the vulnerability, researchers report.

APT31, an attack group affiliated with China, copied and used a National Security Agency (NSA) hacking tool years before Microsoft patched the vulnerability, Check Point Research reports.

Related Content:

8 Ways Ransomware Operators Target Your Network

Special Report: Understanding Your Cyber Attackers

New From The Edge: Breach Etiquette: How to Mind Your Manners When It Matters

Researchers have evidence revealing APT31 was able to access and clone a Windows hacking tool linked to the Equation Group, an operation discovered by Kaspersky in 2015. This group, described as one of the world's most advanced, is believed to have been active since 2001 or earlier and is widely thought to have ties to the NSA's Tailored Access Operations (TAO).

Both the American-affiliated and Chinese-affiliated versions of the hacking tool exploit CVE-2017-0005, a Windows privilege escalation vulnerability that was unknown at the time and previously attributed to APT31. The APT group has used its own version of the tool, which researchers call "Jian," since at least 2015 and until Microsoft patched the vulnerability in 2017.

Jian was caught and reported to Microsoft by Lockheed Martin's Computer Incident Response Team, indicating APT31 possibly used it against an American target. Some reports now indicate Lockheed Martin discovered the Chinese version of the tool used on a US-based network; however, it has not been confirmed which organization was affected. 

Now, researchers report Jian was actually a reconstructed version of an Equation Group tool. This tool, dubbed "EpMe," is one of four different privilege escalation exploits included in the DanderSpritz attack framework, a post-exploitation framework used by the Equation Group that has a range of tools for persistence, reconnaissance, lateral movement, and bypassing security tools. EpMe dates back to 2013, years before APT31 was caught using it in the wild.

While they may exploit the same vulnerability, Check Point researchers point to "meaningful changes" between the original EpMe tool and the repurposed Jian tool. 

"EpMe, the exploit by Equation Group, is much more comprehensive and more professional," says Itay Cohen, a Check Point senior security researcher. The entire DanderSpritz framework, of which EpMe is a small part, "is huge, it's very professional, and it's very well written," he continues. "On a personal note, it is one of the best malware frameworks I've ever analyzed."

When comparing EpMe to Jian, Cohen points to differences in the quality of the code. It's believed APT31 did not have access to EpMe's source code and reverse-engineered the tool. APT31 also made mistakes when implementing the exploit: The group tried to support Windows 2000, for example, even though this version of the OS wasn't affected by the vulnerability.

"They did [this] because they took artifacts from the exploit that they did not really understand," Cohen says. 

Two of the privilege escalation exploits in the DanderSpritz framework were zero-days at the time the framework was developed. One of these zero-days, code-named "EpMo," was never publicly discussed and patched by Microsoft in 2017 with no apparent CVE-ID. In a writeup of their findings, researchers say this was seemingly in response to the Shadow Brokers leak. The other two exploits in DanderSpritz are code-named ElEi and ErNi. 

Evidence indicates APT31 had access to EpMe's files, both the 32-bit and 64-bit versions, at least two years before the Shadow Brokers leak. So far, it's unclear exactly how APT31 gained access to the tool, though researchers have more confidence in some theories than others.

"It is always possible that when Equation Group deployed the exploit, it was somehow caught," says Check Point vulnerability researcher Eyal Itkin. Equation Group may have used it against a Chinese target in a network that was monitored, and the tool was captured and analyzed.

Another possibility is that Equation Group may have used EpMe against a third-party target. If APT31 was present on the same network, it may have discovered the tool there, he says. 

"We know for sure that different APTs monitor the networks they infiltrate," Itkin continues. "So if they find an additional APT, they will look for exploits and tools used by the APT so they can clone them."

A third, less likely option would be APT31's infiltration into Equation Group infrastructure, such as an attack server. However, Itkin notes that in this case, APT31 would have gained access to additional tools and exploits; so far, there is no evidence indicating this has occurred.

The Story Behind the Discovery: CPR Investigation
Check Point's malware and vulnerability researchers have spent the past few months focused on recent Windows privilege escalation exploits attributed to Chinese actors. It was during this investigation that they discovered the origins of the Jian tool.

"In this project, we revisit and analyze exploits, specifically zero-days in Windows," Cohen explains. "We do this in order to map and extract fingerprints from them. These fingerprints are unique artifacts that we find inside the exploit files and we then can use them to hunt, or to attribute, past and future exploits."

This discovery started with a single exploit, says Itkin. After reading reports and discovering additional exploits, they found matching artifacts, or modules, between two exploits that are attributed to Chinese actors: one from 2019, and one from 2017.

"Once we find a common module or shared resource between two samples, we can try to make it a unique artifact of [one] actor," he says. When they analyzed the CVE from 2017, researchers noticed unique configurations and artifacts, which they assumed would be used by the same developer in additional samples they analyze — if they can find them.

"Essentially, it's a shot in the dark," Itkin adds. "Sometimes we find a good artifact and we find additional samples; sometimes we find nothing."

In this case, researchers extracted an artifact from a sample of code, made a search based on the artifact, and surprisingly discovered Equation Group exploits instead of Chinese exploits. This was what ultimately led them to today's story and technical writeup, he notes.

Kelly Sheridan is the Staff Editor at Dark Reading, where she focuses on cybersecurity news and analysis. She is a business technology journalist who previously reported for InformationWeek, where she covered Microsoft, and Insurance & Technology, where she covered financial ... View Full Bio

Recommended Reading:

Comment  | 
Print  | 
More Insights
Newest First  |  Oldest First  |  Threaded View
Cyberattacks Are Tailored to Employees ... Why Isn't Security Training?
Tim Sadler, CEO and co-founder of Tessian,  6/17/2021
7 Powerful Cybersecurity Skills the Energy Sector Needs Most
Pam Baker, Contributing Writer,  6/22/2021
Microsoft Disrupts Large-Scale BEC Campaign Across Web Services
Kelly Sheridan, Staff Editor, Dark Reading,  6/15/2021
Register for Dark Reading Newsletters
White Papers
Current Issue
The State of Cybersecurity Incident Response
In this report learn how enterprises are building their incident response teams and processes, how they research potential compromises, how they respond to new breaches, and what tools and processes they use to remediate problems and improve their cyber defenses for the future.
Flash Poll
How Enterprises are Developing Secure Applications
How Enterprises are Developing Secure Applications
Recent breaches of third-party apps are driving many organizations to think harder about the security of their off-the-shelf software as they continue to move left in secure software development practices.
Twitter Feed
Dark Reading - Bug Report
Bug Report
Enterprise Vulnerabilities
From DHS/US-CERT's National Vulnerability Database
PUBLISHED: 2021-06-23
Vulnerability in OpenGrok (component: Web App). Versions that are affected are 1.6.7 and prior. Easily exploitable vulnerability allows low privileged attacker with network access via HTTPS to compromise OpenGrok. Successful attacks of this vulnerability can result in takeover of OpenGrok. CVSS 3.1 ...
PUBLISHED: 2021-06-23
A vulnerability in SonicOS where the HTTP server response leaks partial memory by sending a crafted HTTP request, this can potentially lead to an internal sensitive data disclosure vulnerability.
PUBLISHED: 2021-06-23
A command execution vulnerability exists in the default legacy spellchecker plugin in Moodle 3.10. A specially crafted series of HTTP requests can lead to command execution. An attacker must have administrator privileges to exploit this vulnerabilities.
PUBLISHED: 2021-06-23
Heap based buffer overflow in tsMuxer 2.6.16 allows attackers to cause a Denial of Service (DoS) by running the application with a crafted file.
PUBLISHED: 2021-06-23
Heap based buffer overflow in tsMuxer 2.6.16 allows attackers to cause a Denial of Service (DoS) by running the application with a crafted file.