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
Google+
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
Newest First  |  Oldest First  |  Threaded View
COVID-19: Latest Security News & Commentary
Dark Reading Staff 9/25/2020
Hacking Yourself: Marie Moe and Pacemaker Security
Gary McGraw Ph.D., Co-founder Berryville Institute of Machine Learning,  9/21/2020
Startup Aims to Map and Track All the IT and Security Things
Kelly Jackson Higgins, Executive Editor at Dark Reading,  9/22/2020
Register for Dark Reading Newsletters
White Papers
Video
Cartoon
Current Issue
Special Report: Computing's New Normal
This special report examines how IT security organizations have adapted to the "new normal" of computing and what the long-term effects will be. Read it and get a unique set of perspectives on issues ranging from new threats & vulnerabilities as a result of remote working to how enterprise security strategy will be affected long term.
Flash Poll
How IT Security Organizations are Attacking the Cybersecurity Problem
How IT Security Organizations are Attacking the Cybersecurity Problem
The COVID-19 pandemic turned the world -- and enterprise computing -- on end. Here's a look at how cybersecurity teams are retrenching their defense strategies, rebuilding their teams, and selecting new technologies to stop the oncoming rise of online attacks.
Twitter Feed
Dark Reading - Bug Report
Bug Report
Enterprise Vulnerabilities
From DHS/US-CERT's National Vulnerability Database
CVE-2020-15208
PUBLISHED: 2020-09-25
In tensorflow-lite before versions 1.15.4, 2.0.3, 2.1.2, 2.2.1 and 2.3.1, when determining the common dimension size of two tensors, TFLite uses a `DCHECK` which is no-op outside of debug compilation modes. Since the function always returns the dimension of the first tensor, malicious attackers can ...
CVE-2020-15209
PUBLISHED: 2020-09-25
In tensorflow-lite before versions 1.15.4, 2.0.3, 2.1.2, 2.2.1 and 2.3.1, a crafted TFLite model can force a node to have as input a tensor backed by a `nullptr` buffer. This can be achieved by changing a buffer index in the flatbuffer serialization to convert a read-only tensor to a read-write one....
CVE-2020-15210
PUBLISHED: 2020-09-25
In tensorflow-lite before versions 1.15.4, 2.0.3, 2.1.2, 2.2.1 and 2.3.1, if a TFLite saved model uses the same tensor as both input and output of an operator, then, depending on the operator, we can observe a segmentation fault or just memory corruption. We have patched the issue in d58c96946b and ...
CVE-2020-15211
PUBLISHED: 2020-09-25
In TensorFlow Lite before versions 1.15.4, 2.0.3, 2.1.2, 2.2.1 and 2.3.1, saved models in the flatbuffer format use a double indexing scheme: a model has a set of subgraphs, each subgraph has a set of operators and each operator has a set of input/output tensors. The flatbuffer format uses indices f...
CVE-2020-15212
PUBLISHED: 2020-09-25
In TensorFlow Lite before versions 2.2.1 and 2.3.1, models using segment sum can trigger writes outside of bounds of heap allocated buffers by inserting negative elements in the segment ids tensor. Users having access to `segment_ids_data` can alter `output_index` and then write to outside of `outpu...