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.


06:50 PM
Connect Directly

Nearly Two Dozen AWS APIs Are Vulnerable to Abuse

Attackers can conduct identity reconnaissance against an organization at leisure without being detected, Palo Alto Networks says.

Nearly two dozen application programming interfaces (APIs) across 16 different Amazon Web Services offerings can be abused to allow attackers to obtain the roster and internal structure of an organization's cloud account in order to launch targeted attacks against individuals.

All that a threat actor would require in order to carry out the attack is the target organization's 12-digit AWS ID — something that is used and shared publicly — Palo Alto Networks said this week.

Related Content:

Insecure APIs a Growing Risk for Organizations

The Changing Face of Threat Intelligence

New on The Edge: An Inside Look at an Account Takeover

In a report, the security vendor said that all of the affected APIs could be abused in the same way across all three of AWS's partitions or regions (aws, aws-us-gov, and aws-cn). The Amazon services that are vulnerable include Amazon Simple Storage Service (S3), Amazon Key Management Service (KMS), and Amazon Simple Queue Service (SQS).

Jay Chen, senior cloud researcher for Unit 42 at Palo Alto Networks, says the problem has to do with an AWS design feature that is meant to help users avoid typos and mistakes when writing a policy. "The error messages inadvertently give out too much information, so that an attacker can find out if a particular user or role exists in another AWS account." 

Specifically, the cause of the issue lies with how AWS's identity and access management function handles a specific type of policy — known as resource-based policy — that is associated with AWS resources such as an S3 bucket or an Amazon EC2 instance. In total, 26 AWS services support resource-based policies.

According to Palo Alto Networks, AWS resource-based policies include a field that specifies the users or roles that are allowed to access specific resources. If a policy contains an identity that isn't included in the field, the API call associated with the policy will return an error message. While the feature is useful, attackers can easily abuse it to try and enumerate or discover all of the users and roles associated with an organization's AWS account.

"For example, if an attacker knows a company's AWS account ID, the attacker could use this information to ask in a resource-based policy 'does user X exist in this account?'," explains Chen.

By specifying different user or role names in a resource-based policy, the attacker can quickly learn from the error message if a particular role or user exists in the target account. "The attacker can keep asking this question with different names and eventually map out all the users/roles in this account," Chen says.

This would enable the attacker to launch other attacks, like searching for misconfigured roles that could be exploited or sending highly targeted spear-phishing emails to individuals in an organization. Significantly, AWS doesn't currently log such activity, so the target organization would not be aware of the identity reconnaissance being conducted against its account, Chen says.

Easy to Abuse
"Basically, the APIs need user information to be invoked," says Setu Kulkarni, vice president of strategy at WhiteHat Security. "When the user information is not valid, the API invocation results in an error message — explicitly to the hacker stating that the said user does not have access." A hacker with a list of Amazon accounts could cycle through users lists to invoke a specific API and performance reconnaissance, Kulkarni says.

With enough time, an attacker could brute-force a list of users and role policies and look for misconfigurations that would enable account takeover, says Charles Ragland, security engineer at Digital Shadows. "The major issue with the vulnerability is that the error messages are logged in the attacker's account; therefore, the victim will be unaware of this attack."

AWS did not respond immediately to a Dark Reading request for comment on Palo Alto Network's research.

The issue that Palo Alto Networks discovered with Amazon's APIs is the latest example of what many security experts say is the growing threat to enterprise security from insecure APIs. A Forrester Research report earlier this month described API-related breaches as becoming increasingly common and presenting the next big attack vector for threat actors. According the analyst firm, APIs that open enterprise data and services to the Internet present the same risk to enterprise security as vulnerable web applications. However, many organizations are not addressing them with the same rigor or focus, Forrester said.

Chen says organizations can mitigate the potential impact of the AWS threat that Palo Alto Networks discovered by practicing identity and access management best practices. Measures that can help include removing inactive usernames and roles, adding random strings to user and role names to make them harder to guess, and implementing controls for ensuring additional users aren't created in the AWS account without proper authorization. Enabling two-factor authentication and logging and monitoring of all identity authentication activities are also essential, Chen says.

Jai Vijayan is a seasoned technology reporter with over 20 years of experience in IT trade journalism. He was most recently a Senior Editor at Computerworld, where he covered information security and data privacy issues for the publication. Over the course of his 20-year ... View Full Bio

Recommended Reading:

Comment  | 
Print  | 
More Insights
Newest First  |  Oldest First  |  Threaded View
Attackers Leave Stolen Credentials Searchable on Google
Kelly Sheridan, Staff Editor, Dark Reading,  1/21/2021
How to Better Secure Your Microsoft 365 Environment
Kelly Sheridan, Staff Editor, Dark Reading,  1/25/2021
Register for Dark Reading Newsletters
White Papers
Cartoon Contest
Write a Caption, Win an Amazon Gift Card! Click Here
Latest Comment: We need more votes, check the obituaries.
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
PUBLISHED: 2021-01-26
KLog Server through 2.4.1 allows authenticated command injection. async.php calls shell_exec() on the original value of the source parameter.
PUBLISHED: 2021-01-26
The ftpd gem 0.2.1 for Ruby allows remote attackers to execute arbitrary OS commands via shell metacharacters in a LIST or NLST command argument within FTP protocol traffic.
PUBLISHED: 2021-01-26
SmartAgent 3.1.0 allows a ViewOnly attacker to create a SuperUser account via the /#/CampaignManager/users URI.
PUBLISHED: 2021-01-26
NVIDIA Jetson AGX Xavier Series, Jetson Xavier NX, TX1, TX2, Nano and Nano 2GB, L4T versions prior to 32.5, contains a vulnerability in the apply_binaries.sh script used to install NVIDIA components into the root file system image, in which improper access control is applied, which may lead to an un...
PUBLISHED: 2021-01-26
NVIDIA Tegra kernel in Jetson AGX Xavier Series, Jetson Xavier NX, TX1, TX2, Nano and Nano 2GB, all L4T versions prior to r32.5, contains a vulnerability in the INA3221 driver in which improper access control may lead to unauthorized users gaining access to system power usage data, which may lead to...