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
Oldest First  |  Newest 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
Developing and Testing an Effective Breach Response Plan
Whether or not a data breach is a disaster for the organization depends on the security team's response and that is based on how the team developed a breach response plan beforehand and if it was thoroughly tested. Inside this report, experts share how to: -understand the technical environment, -determine what types of incidents would trigger the plan, -know which stakeholders need to be notified and how to do so, -develop steps to contain the breach, collect evidence, and initiate recovery.
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: 2022-12-02
** UNSUPPORTED WHEN ASSIGNED ** Apache Tapestry 3.x allows deserialization of untrusted data, leading to remote code execution. This issue is similar to but distinct from CVE-2020-17531, which applies the the (also unsupported) 4.x version line. NOTE: This vulnerability only affects Apache Tapestry ...
PUBLISHED: 2022-12-02
Incorrect privilege assignment issue in M-Files Web in M-Files Web versions before 22.5.11436.1 could have changed permissions accidentally.
PUBLISHED: 2022-12-02
Algan Yazılım Prens Student Information System product has an unauthenticated SQL Injection vulnerability.
PUBLISHED: 2022-12-02
Algan Yaz?l?m Prens Student Information System product has an authenticated Insecure Direct Object Reference (IDOR) vulnerability.
PUBLISHED: 2022-12-02
An access control issue in D-Link DVG-G5402SP GE_1.03 allows unauthenticated attackers to escalate privileges via arbitrarily editing VoIP SIB profiles.