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

2/22/2021
06:10 PM
Connect Directly
Twitter
LinkedIn
RSS
E-Mail
50%
50%

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
Comments
Oldest First  |  Newest First  |  Threaded View
Commentary
How SolarWinds Busted Up Our Assumptions About Code Signing
Dr. Jethro Beekman, Technical Director,  3/3/2021
News
'ObliqueRAT' Now Hides Behind Images on Compromised Websites
Jai Vijayan, Contributing Writer,  3/2/2021
News
Attackers Turn Struggling Software Projects Into Trojan Horses
Robert Lemos, Contributing Writer,  2/26/2021
Register for Dark Reading Newsletters
White Papers
Video
Cartoon Contest
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
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
CVE-2021-27099
PUBLISHED: 2021-03-05
In SPIRE before versions 0.8.5, 0.9.4, 0.10.2, 0.11.3 and 0.12.1, the "aws_iid" Node Attestor improperly normalizes the path provided through the agent ID templating feature, which may allow the issuance of an arbitrary SPIFFE ID within the same trust domain, if the attacker controls the v...
CVE-2021-28038
PUBLISHED: 2021-03-05
An issue was discovered in the Linux kernel through 5.11.3, as used with Xen PV. A certain part of the netback driver lacks necessary treatment of errors such as failed memory allocations (as a result of changes to the handling of grant mapping errors). A host OS denial of service may occur during m...
CVE-2021-28039
PUBLISHED: 2021-03-05
An issue was discovered in the Linux kernel 5.9.x through 5.11.3, as used with Xen. In some less-common configurations, an x86 PV guest OS user can crash a Dom0 or driver domain via a large amount of I/O activity. The issue relates to misuse of guest physical addresses when a configuration has CONFI...
CVE-2021-28040
PUBLISHED: 2021-03-05
An issue was discovered in OSSEC 3.6.0. An uncontrolled recursion vulnerability in os_xml.c occurs when a large number of opening and closing XML tags is used. Because recursion is used in _ReadElem without restriction, an attacker can trigger a segmentation fault once unmapped memory is reached.
CVE-2020-28502
PUBLISHED: 2021-03-05
This affects the package xmlhttprequest before 1.7.0; all versions of package xmlhttprequest-ssl. Provided requests are sent synchronously (async=False on xhr.open), malicious user input flowing into xhr.send could result in arbitrary code being injected and run.