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.

Cloud

End of Bibblio RCM includes -->
11/11/2021
02:30 PM
Connect Directly
Twitter
LinkedIn
RSS
E-Mail

Cloud Attack Analysis Unearths Lessons for Security Pros

Researchers detail their investigation of a cryptomining campaign stealing AWS credentials and how attackers have evolved their techniques.

BLACK HAT EUROPE 2021 — LONDON — An attack group known for cloud-specific campaigns targeting Amazon Web Services (AWS) credentials has recently expanded its toolkit to steal more credentials from targeted cloud systems and deploy new tactics to exploit containerized Kubernetes systems.

The TeamTNT group was first spotted in August 2020, Chris Doman, co-founder and CTO of Cado Security, said in a talk at this week's Black Hat Europe. He was looking at a feed of malware that summer when the group's logo caught his eye. The attackers' script was taking a root AWS credential file and sending it to their server; in doing so, they could gain the access key that would allow them to download files in S3, start and stop EC2 instances, and other functions.

Doman published a blog post about the group's activity, and the researchers learned the group was quite social. "You don't often get a situation where hackers actually send you a message," Cado Security co-founder and CEO James Campbell said in Cado's talk, noting that the attackers responded to the post saying, "there has never been a TeamTNT worm" and "It doesn't exist!"

But the attackers' activity did have a worming function, said Campbell, who added the attack vector revolves around APIs. "Essentially, what happens is attackers scan the IP range, they see open APIs, they compromise those machines, and then they do the same thing again, so the now-compromised machine goes and scans new IP ranges and compromises those, and so on."

TeamTNT does this to Kubernetes APIs that were unauthenticated and public-facing. They'll run several shell commands, bring down some scripts, and run processes, including a mass scan of other public IP ranges. They'll also look at a target's LAN ranges, so if one Kubernetes node is compromised, changes are good others are as well, if they are similarly configured, he added.

"If you do have misconfigured Kubernetes clusters out there, or vulnerable Kubernetes clusters, and they're public-facing, chances are they're probably already compromised. … It happens that quickly," Campbell said. The group picks on Docker APIs as well, he noted, adding there are log files that Kubernetes and Docker generate, so teams can see if they've been compromised.

After the group has compromised a network, one way TeamTNT maintains access is with the IRC bot, Doman said. "It's pretty classic stuff; they use the Tsunami IRC bot, and it just works." He connected to the attacker server last week and saw 221 clients connected in, meaning 220 victims and an attacker. TeamTNT also uses Weavescope, a legitimate Kubernetes administration tool that lets users stop and start containers. Attackers install it on hosts they compromise and look for open Weavescope installations to connect and compromise them.

In terms of privilege escalation and credential theft, the group still steals AWS credentials but is more sophisticated than it was last summer, said Doman. It targets the environment variables to a system, where there are passwords, and the Docker environment variables. As of a few months ago, the group scrapes the AWS metadata URL, which grants it the access to other data around the system.

The group has also expanded beyond AWS credentials to target credential files from Google Cloud Platform as well, Doman noted. TeamTNT also plans to include Azure in its targets, the attackers shared from a group Twitter account. "They are a lot more chatty than the average hackers," he said. These changes could be at least partly in response to defensive actions.

"They're finding it really tough now, because AWS is recognizing when they steal these keys very quickly," Doman added.

New tools added to their arsenal include Docker Escape, off GitHub, and Break Out the Box, which scrapes Google Cloud credentials and other metadata. Another tool, called Infection Monkey, is designed to tell which credentials are insecure. TeamTNT was running its own Infection Monkey server, compromising other networks, and pointing it back at its own server to learn more information about the target environments.

What Organizations Can Do
TeamTNT's goal in these campaigns is cryptomining, Campbell said, but he's more concerned about what the attackers could potentially do with the information they're able to access. The most obvious, he said, is data exfiltration.

"A lot of these containers have access to databases and sensitive information, file shares," he explained. "An attacker could obviously spend a little more time on these containers and start stealing some data. That could lead to ransom."

The attackers could also compromise uses, as many containers run Web applications or Web services. They could inject code in there and arrange drive-by downloads. "The world is your oyster," he quipped. If successful, the victim company could become the third-party risk as the result of its Kubernetes environment.

In the cloud, these attacks could enable TeamTNT to spin up or destroy resources, use their credentials to access other parts of the environment, and create accounts to achieve console access.

Doman advised organizations to use firewall rules to limit access to APIs, and consider using an allow-listed approach for their firewall ruleset. Teams should identify AWS credential files and delete them if not needed, and use least privilege when assigning roles. He also recommended reviewing network traffic for connections to mining pools or using the Stratum mining protocol. Businesses should also check developer machines, which have good control over production environments.

He and Campbell credited other organizations, such as Trend Micro and Intezer, with their additional work in researching TeamTNT, which has since last year become a subject of focus for many research teams.

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

Comment  | 
Print  | 
More Insights
//Comments
Newest First  |  Oldest First  |  Threaded View
Edge-DRsplash-10-edge-articles
I Smell a RAT! New Cybersecurity Threats for the Crypto Industry
David Trepp, Partner, IT Assurance with accounting and advisory firm BPM LLP,  7/9/2021
News
Attacks on Kaseya Servers Led to Ransomware in Less Than 2 Hours
Robert Lemos, Contributing Writer,  7/7/2021
Commentary
It's in the Game (but It Shouldn't Be)
Tal Memran, Cybersecurity Expert, CYE,  7/9/2021
Register for Dark Reading Newsletters
White Papers
Video
Cartoon
Current Issue
How Machine Learning, AI & Deep Learning Improve Cybersecurity
Machine intelligence is influencing all aspects of cybersecurity. Organizations are implementing AI-based security to analyze event data using ML models that identify attack patterns and increase automation. Before security teams can take advantage of AI and ML tools, they need to know what is possible. This report covers: -How to assess the vendor's AI/ML claims -Defining success criteria for AI/ML implementations -Challenges when implementing AI
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-2022-42247
PUBLISHED: 2022-10-03
pfSense v2.5.2 was discovered to contain a cross-site scripting (XSS) vulnerability in the browser.php component. This vulnerability allows attackers to execute arbitrary web scripts or HTML via a crafted payload injected into a file name.
CVE-2022-41443
PUBLISHED: 2022-10-03
phpipam v1.5.0 was discovered to contain a header injection vulnerability via the component /admin/subnets/ripe-query.php.
CVE-2022-33882
PUBLISHED: 2022-10-03
Under certain conditions, an attacker could create an unintended sphere of control through a vulnerability present in file delete operation in Autodesk desktop app (ADA). An attacker could leverage this vulnerability to escalate privileges and execute arbitrary code.
CVE-2022-42306
PUBLISHED: 2022-10-03
An issue was discovered in Veritas NetBackup through 8.2 and related Veritas products. An attacker with local access can send a crafted packet to pbx_exchange during registration and cause a NULL pointer exception, effectively crashing the pbx_exchange process.
CVE-2022-42307
PUBLISHED: 2022-10-03
An issue was discovered in Veritas NetBackup through 10.0.0.1 and related Veritas products. The NetBackup Primary server is vulnerable to an XML External Entity (XXE) Injection attack through the DiscoveryService service.