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
Oldest First  |  Newest First  |  Threaded View
Former CISA Director Chris Krebs Discusses Risk Management & Threat Intel
Kelly Sheridan, Staff Editor, Dark Reading,  2/23/2021
Security + Fraud Protection: Your One-Two Punch Against Cyberattacks
Joshua Goldfarb, Director of Product Management at F5,  2/23/2021
Cybercrime Groups More Prolific, Focus on Healthcare in 2020
Robert Lemos, Contributing Writer,  2/22/2021
Register for Dark Reading Newsletters
White Papers
Cartoon Contest
Write a Caption, Win an Amazon Gift Card! Click Here
Latest Comment: This comment is waiting for review by our moderators.
Current Issue
2021 Top Enterprise IT Trends
We've identified the key trends that are poised to impact the IT landscape in 2021. Find out why they're important and how they will affect you today!
Flash Poll
Building the SOC of the Future
Building the SOC of the Future
Digital transformation, cloud-focused attacks, and a worldwide pandemic. The past year has changed the way business works and the way security teams operate. There is no going back.
Twitter Feed
Dark Reading - Bug Report
Bug Report
Enterprise Vulnerabilities
From DHS/US-CERT's National Vulnerability Database
PUBLISHED: 2021-02-26
Synapse is a Matrix reference homeserver written in python (pypi package matrix-synapse). Matrix is an ecosystem for open federated Instant Messaging and VoIP. In Synapse before version 1.25.0, requests to user provided domains were not restricted to external IP addresses when calculating the key va...
PUBLISHED: 2021-02-26
Synapse is a Matrix reference homeserver written in python (pypi package matrix-synapse). Matrix is an ecosystem for open federated Instant Messaging and VoIP. In Synapse before version 1.25.0, a malicious homeserver could redirect requests to their .well-known file to a large file. This can lead to...
PUBLISHED: 2021-02-26
All versions of package github.com/thecodingmachine/gotenberg are vulnerable to Server-side Request Forgery (SSRF) via the /convert/html endpoint when the src attribute of an HTML element refers to an internal system file, such as <iframe src='file:///etc/passwd'>.
PUBLISHED: 2021-02-26
Node-Red is a low-code programming for event-driven applications built using nodejs. Node-RED 1.2.7 and earlier contains a Prototype Pollution vulnerability in the admin API. A badly formed request can modify the prototype of the default JavaScript Object with the potential to affect the default beh...
PUBLISHED: 2021-02-26
Node-Red is a low-code programming for event-driven applications built using nodejs. Node-RED 1.2.7 and earlier has a vulnerability which allows arbitrary path traversal via the Projects API. If the Projects feature is enabled, a user with `projects.read` permission is able to access any file via th...