Researchers said the FoundCore malware represents a big step forward when it comes to evasion.
An advanced cyberespionage campaign targeting government and military entities in Vietnam has been discovered that delivered a remote-access tool (RAT) for carrying out espionage operations, researchers said.
Further analysis suggested that this campaign was conducted by a group related to a Chinese-speaking advanced persistent threat (APT) known as Cycldek (a.k.a. Goblin Panda, APT 27 and Conimes), according to Kaspersky researchers, who added that the group has been active since at least 2013.
The malware used in the campaign, dubbed FoundCore, allows attackers to conduct filesystem manipulation, process manipulation, screenshot captures and arbitrary command execution.
It represents a major advancement in sophistication for the group, according to an analysis released Monday by Kaspersky. For instance, the method used to protect the malicious code from analysis is unique for Chinese-speaking groups, researchers said.
“The headers (the destination and source for the code) for the final payload were completely stripped away, and the few that remained contained incoherent values,” they explained. “In doing this, the attackers make it significantly more difficult for researchers to reverse engineer the malware for analysis. What’s more, the components of the infection chain are tightly coupled, meaning single pieces are difficult—sometimes impossible—to analyze in isolation, preventing a full picture of malicious activity.”
The FoundCore infection routine (click to enlarge). Source: Kaspersky.
The campaign also uses sideloading of dynamic-link libraries (DLLs), which happens when a legitimately signed file is tricked into loading a malicious DLL, allowing the attackers to bypass security products.
“In this recently discovered campaign, the DLL side-loading infection chain executes a shellcode that decrypts the final payload: [FoundCore], that gives the attackers full control over the infected device,” according to the analysis.
FoundCore: 4 Malware Threads
The final payload in the infection chain is a remote administration tool that provides full control over the victim machine to its operators. Upon execution, this malware starts four threads, according to researchers:
- The first one establishes persistence by creating a service.
- The second one sets inconspicuous information for the service by changing its Description, ImagePath and DisplayName fields (among others).
- The third sets an empty Discretionary Access Control List (DACL) to the image associated to the current process in order to prevent access to the underlying malicious file. DACL is an internal list attached to an object in Active Directory that specifies which users and groups can access the object and what kinds of operations they can perform on the object.
- Finally, a worker thread bootstraps execution and establishes connection with the C2 server. Depending on its configuration, it may also inject a copy of itself to another process.
Communications with the server can take place either over raw TCP sockets encrypted with RC4, or via HTTPS.
In the infection chain, FoundCore was also observed downloading two additional pieces of spyware. The first, DropPhone, collects environmental information from the victim machine and sends it to DropBox. The second, CoreLoader, runs code that helps the malware evade detection by security products.
“In general, over the past year, we’ve noticed that many of these Chinese-speaking groups are investing more resources into their campaigns and honing their technical capabilities,” said Mark Lechtik, senior security researcher with Kaspersky, in the analysis. “Here, they’ve added many more layers of obfuscation and significantly complicated reverse engineering. And this signals that these groups may be looking to expand their activities.”
Vietnam in APT Sights
Kaspersky’s analysis showed that dozens of computers were targeted in the campaign with the vast majority (80 percent) located in Vietnam. The other targets were found in Central Asia and in Thailand.
The firm also uncovered that most of the victims belonged to the government or military sector. That said, there were other targeted sectors, including diplomacy, education or healthcare.
“Right now, it may seem as if this campaign is more of a local threat, but it’s highly likely the FoundCore backdoor will be found in more countries in different regions in the future,” Lechtik said.
Pierre Delcher, senior security researcher with Kaspersky, added, “What’s more, given that these Chinese-speaking groups tend to share their tactics with one another, we wouldn’t be surprised to find these same obfuscation tactics in other campaigns. We’ll be monitoring the threat landscape for similar suspicious activity closely. For companies, the best thing they can do is keep their company up-to-date with the latest threat intelligence, so they know what to be on the lookout for.”
Check out our free upcoming live webinar events – unique, dynamic discussions with cybersecurity experts and the Threatpost community:
- April 21: Underground Markets: A Tour of the Dark Economy (Learn more and register!)