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.


End of Bibblio RCM includes -->
02:30 PM
Connect Directly

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
Newest First  |  Oldest First  |  Threaded View
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
Attacks on Kaseya Servers Led to Ransomware in Less Than 2 Hours
Robert Lemos, Contributing Writer,  7/7/2021
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
Current Issue
The 10 Most Impactful Types of Vulnerabilities for Enterprises Today
Managing system vulnerabilities is one of the old est - and most frustrating - security challenges that enterprise defenders face. Every software application and hardware device ships with intrinsic flaws - flaws that, if critical enough, attackers can exploit from anywhere in the world. It's crucial that defenders take stock of what areas of the tech stack have the most emerging, and critical, vulnerabilities they must manage. It's not just zero day vulnerabilities. Consider that CISA's Known Exploited Vulnerabilities (KEV) catalog lists vulnerabilitlies in widely used applications that are "actively exploited," and most of them are flaws that were discovered several years ago and have been fixed. There are also emerging vulnerabilities in 5G networks, cloud infrastructure, Edge applications, and firmwares to consider.
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: 2023-03-17
The Bookly plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the full name value in versions up to, and including, 21.5 due to insufficient input sanitization and output escaping. This makes it possible for unauthenticated attackers to inject arbitrary web scripts in pages that w...
PUBLISHED: 2023-03-17
The WP Express Checkout plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the ‘pec_coupon[code]’ parameter in versions up to, and including, 2.2.8 due to insufficient input sanitization and output escaping. This makes it possible for authenti...
PUBLISHED: 2023-03-17
A vulnerability was found in SourceCodester Student Study Center Desk Management System 1.0. It has been rated as critical. This issue affects the function view_student of the file admin/?page=students/view_student. The manipulation of the argument id with the input 3' AND (SELECT 2100 FROM (SELECT(...
PUBLISHED: 2023-03-17
A vulnerability classified as critical has been found in SourceCodester Student Study Center Desk Management System 1.0. Affected is an unknown function of the file Master.php?f=delete_img of the component POST Parameter Handler. The manipulation of the argument path with the input C%3A%2Ffoo.txt le...
PUBLISHED: 2023-03-17
A vulnerability classified as critical was found in SourceCodester Student Study Center Desk Management System 1.0. Affected by this vulnerability is an unknown functionality of the file admin/?page=reports&date_from=2023-02-17&date_to=2023-03-17 of the component Report Handler. The manipula...