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
COVID-19: Latest Security News & Commentary
Dark Reading Staff 10/23/2020
Modern Day Insider Threat: Network Bugs That Are Stealing Your Data
David Pearson, Principal Threat Researcher,  10/21/2020
Are You One COVID-19 Test Away From a Cybersecurity Disaster?
Alan Brill, Senior Managing Director, Cyber Risk Practice, Kroll,  10/21/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-2018-21269
PUBLISHED: 2020-10-27
checkpath in OpenRC through 0.42.1 might allow local users to take ownership of arbitrary files because a non-terminal path component can be a symlink.
CVE-2020-27743
PUBLISHED: 2020-10-26
libtac in pam_tacplus through 1.5.1 lacks a check for a failure of RAND_bytes()/RAND_pseudo_bytes(). This could lead to use of a non-random/predictable session_id.
CVE-2020-1915
PUBLISHED: 2020-10-26
An out-of-bounds read in the JavaScript Interpreter in Facebook Hermes prior to commit 8cb935cd3b2321c46aa6b7ed8454d95c75a7fca0 allows attackers to cause a denial of service attack or possible further memory corruption via crafted JavaScript. Note that this is only exploitable if the application usi...
CVE-2020-26878
PUBLISHED: 2020-10-26
Ruckus through 1.5.1.0.21 is affected by remote command injection. An authenticated user can submit a query to the API (/service/v1/createUser endpoint), injecting arbitrary commands that will be executed as root user via web.py.
CVE-2020-26879
PUBLISHED: 2020-10-26
Ruckus vRioT through 1.5.1.0.21 has an API backdoor that is hardcoded into validate_token.py. An unauthenticated attacker can interact with the service API by using a backdoor value as the Authorization header.