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

8/21/2020
09:00 AM
Connect Directly
Twitter
LinkedIn
RSS
E-Mail
50%
50%

Cryptominer Found Embedded in AWS Community AMI

Researchers advise Amazon Web Services users running Community Amazon Machine Images to verify them for potentially malicious code.

Security researchers urge AWS customers running Elastic Cloud Compute (EC2) instances based on community Amazon Machine Images (AMIs) to check for potentially malicious embedded code, following their discovery of a cryptominer lurking inside a Community AMI.

An AMI is a template with a software configuration – an operating system, application server, and applications – needed to launch a virtual machine. From an AMI, users launch an instance, or a copy of the AMI running as a virtual server in the cloud. Users can launch multiple instances from one AMI when they need multiple instances with the same configuration, or they can use different AMIs to launch instances when different configurations are needed.

AMIs vary depending on users' needs, and there are different ways to get them through Amazon. One is the AWS Marketplace, where users can buy AMIs or pay per use for them. These AMIs are verified by Amazon and can only be published by preapproved users. Amazon EC2 integrates with Marketplace so developers can charge other EC2 users for AMI usage.

Amazon EC2 lets users create community AMIs by making them public so they're shared with other AWS accounts. Someone who creates a community AMI can allow all AWS accounts to launch the AMI, or only allow a few specific accounts. Those who launch a community AMI don't pay for the AMI itself but for the compute and storage resources used on that machine. 

"If I want a Windows Server, I can get a new, clean Amazon EC2 instance, install Windows Server on it, get everything done myself, or I can go and get an AMI that does all this for me, and all I need to do is pay and get the machine up and running," says Ofer Maor, cofounder and CTO at incident response-as-a-service firm Mitiga, where experts discovered this problem.

Users may choose a community AMI as a cost-conscious solution; however, Maor says the more likely scenario is they find the exact thing they're looking for in a community AMI. It's important they balance cost savings and convenience with risks posed by potentially malicious binaries. Unlike the Marketplace AMIs, community AMIs are not verified by Amazon.

This is the crux of an advisory from Mitiga, which works with businesses running hybrid or full cloud environments. Experts were doing an incident investigation for a financial institution when they needed to look at some Windows 2008 Server machines. 

"We came across this machine, we did some tests on it, and while we're working on it we realized something's fishy," Maor explains. "It was slow ... when we started looking, we noticed it was using way more compute resources than it was supposed to use."

Investigation revealed an active Monero cryptominer running in one of the organization's EC2 servers. It's a "pretty cool attack," he says. Someone gave the community a free resource that mines for cryptocurrency in the background. The main issue today in mining for cryptocurrency is the amount of resources used.

"This way, whoever ran this AMI ... is paying for the compute, but the mined cryptocurrency goes to the attacker," Maor explains. A larger company may never pay attention to this extra compute because its Amazon account could cost hundreds of thousands of dollars already.

Mitiga estimates this AMI has been around for five years and the cryptominer was running in it from the beginning. It seems the adversaries who published this AMI designed it to bill AWS customers for compute while extracting cryptocurrency.

While the team hasn't explored the thousands of AMIs available, they believe this problem could likely exist in others. "I've been doing security for 25 years, and experience shows whenever there's something that can be done, it's being done," Maor says. And this isn't a difficult attack to pull off – an intruder would only need an understanding of how the cloud works. 

The potential for attack is far more troubling than cryptomining, researchers note in a writeup of their findings. For example, it's possible someone could install a backdoor enabling them to connect to a Windows machine and move throughout the target environment. Alternatively, that person could plant ransomware with a delayed trigger.

"There is no real verification or control of what goes into community AMIs," Maor says. 

Given the ease of making malicious AMIs available for public use, Mitiga is publishing an advisory to warn community AMI users of this potential threat. It advises verifying instances for malicious code or terminating them altogether to seek AMIs from trusted sources instead. Maor notes Marketplace is the safer way to go, as those who can put AMIs on the Marketplace must be verified by Amazon and go through a partnership program.

 

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
When It Comes To Security Tools, More Isn't More
Lamont Orange, Chief Information Security Officer at Netskope,  1/11/2021
US Capitol Attack a Wake-up Call for the Integration of Physical & IT Security
Seth Rosenblatt, Contributing Writer,  1/11/2021
Register for Dark Reading Newsletters
White Papers
Video
Cartoon
Current Issue
2020: The Year in Security
Download this Tech Digest for a look at the biggest security stories that - so far - have shaped a very strange and stressful year.
Flash Poll
Assessing Cybersecurity Risk in Today's Enterprises
Assessing Cybersecurity Risk in Today's Enterprises
COVID-19 has created a new IT paradigm in the enterprise -- and a new level of cybersecurity risk. This report offers a look at how enterprises are assessing and managing cyber-risk under the new normal.
Twitter Feed
Dark Reading - Bug Report
Bug Report
Enterprise Vulnerabilities
From DHS/US-CERT's National Vulnerability Database
CVE-2021-22166
PUBLISHED: 2021-01-15
An attacker could cause a Prometheus denial of service in GitLab 13.7+ by sending an HTTP request with a malformed method
CVE-2021-22167
PUBLISHED: 2021-01-15
An issue has been discovered in GitLab affecting all versions starting from 12.1. Incorrect headers in specific project page allows attacker to have a temporary read access to the private repository
CVE-2021-22168
PUBLISHED: 2021-01-15
A regular expression denial of service issue has been discovered in NuGet API affecting all versions of GitLab starting from version 12.8.
CVE-2021-22171
PUBLISHED: 2021-01-15
Insufficient validation of authentication parameters in GitLab Pages for GitLab 11.5+ allows an attacker to steal a victim's API token if they click on a maliciously crafted link
CVE-2020-26414
PUBLISHED: 2021-01-15
An issue has been discovered in GitLab affecting all versions starting from 12.4. The regex used for package names is written in a way that makes execution time have quadratic growth based on the length of the malicious input string.