homepage
Menu
Open menu
  • Training
    Go one level top Back

    Training

    • Courses

      Build cyber prowess with training from renowned experts

    • Hands-On Simulations

      Hands-on learning exercises keep you at the top of your cyber game

    • Certifications

      Demonstrate cybersecurity expertise with GIAC certifications

    • Ways to Train

      Multiple training options to best fit your schedule and preferred learning style

    • Training Events & Summits

      Expert-led training at locations around the world

    • Free Training Events

      Upcoming workshops, webinars and local events

    • Security Awareness

      Harden enterprise security with end-user and role-based training

    Featured: Solutions for Emerging Risks

    Discover tailored resources that translate emerging threats into actionable strategies

    Risk-Based Solutions

    Can't find what you are looking for?

    Let us help.
    Contact us
  • Learning Paths
    Go one level top Back

    Learning Paths

    • By Focus Area

      Chart your path to job-specific training courses

    • By NICE Framework

      Navigate cybersecurity training through NICE framework roles

    • DoDD 8140 Work Roles

      US DoD 8140 Directive Frameworks

    • By European Skills Framework

      Align your enterprise cyber skills with ECSF profiles

    • By Skills Roadmap

      Find the right training path based on critical skills

    • New to Cyber

      Give your cybersecurity career the right foundation for success

    • Leadership

      Training designed to help security leaders reduce organizational risk

    • Degree and Certificate Programs

      Gain the skills, certifications, and confidence to launch or advance your cybersecurity career.

    Featured

    New to Cyber resources

    Start your career
  • Community Resources
    Go one level top Back

    Community Resources

    Watch & Listen

    • Webinars
    • Live Streams
    • Podcasts

    Read

    • Blog
    • Newsletters
    • White Papers
    • Internet Storm Center

    Download

    • Open Source Tools
    • Posters & Cheat Sheets
    • Policy Templates
    • Summit Presentations
    • SANS Community Benefits

      Connect, learn, and share with other cybersecurity professionals

    • CISO Network

      Engage, challenge, and network with fellow CISOs in this exclusive community of security leaders

  • For Organizations
    Go one level top Back

    For Organizations

    Team Development

    • Why Partner with SANS
    • Group Purchasing
    • Skills & Talent Assessments
    • Private & Custom Training

    Leadership Development

    • Leadership Courses & Accreditation
    • Executive Cybersecurity Exercises
    • CISO Network

    Security Awareness

    • End-User Training
    • Phishing Simulation
    • Specialized Role-Based Training
    • Risk Assessments
    • Public Sector Partnerships

      Explore industry-specific programming and customized training solutions

    • Sponsorship Opportunities

      Sponsor a SANS event or research paper

    Interested in developing a training plan to fit your organization’s needs?

    We're here to help.
    Contact us
  • Talk with an expert
  • Log In
  • Join - it's free
  • Account
    • Account Dashboard
    • Log Out
  1. Home >
  2. Blog >
  3. Cloud Vendor Integrations Gone Wrong
Brandon Evans
Brandon Evans

Cloud Vendor Integrations Gone Wrong

An organization should distrust external services at least as much, if not more so, than its internal systems and users.

August 6, 2024

In this blog, we will review how allowing vendor access to your cloud data can lead to compromise, how this has already happened through a vulnerability discovered by SANS Faculty, and how to fix the problem.

Identity and Access Management (IAM) is the primary way to enforce the principle of least privilege in cloud environments. Unfortunately, creating IAM policies is hard and error prone. This makes it difficult to follow the principle consistently.

One rarely discussed area of IAM is integration with third-party systems, such as those provided by vendors. Organizations should distrust external services at least as much, if not more so, than their internal systems and users. These services are vulnerable to supply-chain attacks like all other software. If they have a vulnerability, are injected with malware, or are otherwise compromised, this can compromise the organization that uses them.

As such, organizations should view all vendors as potentially malicious. They should then ask, “What can the vendor do with the access that we are granting them if they wanted to hurt us?” With that threat model in-mind, organizations should grant these vendors as little access as possible while still allowing them to function properly. For these services, such as cross-cloud Cloud Security Posture Management (CSPM) platforms, to work, organizations need to trust them to some extent. Still, like any other system, we should minimize the level of trust and periodically verify that our trust is not abused. This article provides four key requirements for accomplishing this.

This advice applies to (at least) the Big 3 cloud providers (Amazon Web Services (AWS), Microsoft Azure, and Google Cloud). If a vendor wants your cloud data, they must support these requirements. If they do not, your organization’s security will suffer.

High-Level Guidelines for Cloud Vendor Integrations

1. Do not give vendor services unnecessary IAM permissions.

A vendor should only need to perform a small set of operations within a customer’s cloud account. These operations should be codified with IAM policy. For example, a CSPM platform is designed to analyze a cloud account and highlight misconfigurations that impact security. Unless this platform automatically remediates these issues, there is no reason why it should need to modify the account in any way. So, it should only be allowed to perform read-only operations.

Additionally, the CSPM platform should only need to analyze the cloud account’s configuration. It should not be technically capable of reading the organization’s actual data. Even if the vendor only has good intentions, it is possible that they will be compromised. If this happens, the less permissions they have, the better.

2. Use workload identities, not long-lived credentials.

Credentials should live for as short a time as possible. If short-lived credentials are compromised, your organization is compromised. However, this compromise might be temporary. If the attacker was unable to establish persistent access and is not able to generate another set of credentials, then no additional damage can be done.

The Big 3 cloud providers make it fairly easy to create short-lived, automatically rotating credentials for its workloads. This is usually accomplished with a service called the Instance Metadata Service (IMDS). This works great for accessing intra-account resources, but this alone will not work for inter-account access.

As such, many multicloud integrations use long-lived credentials. These can be used until a cloud administrator explicitly deactivates them. They also frequently end up in source code, public software packages, and other places they should not be. The 2023 Datadog State of Cloud Security reported that over 50% of AWS access keys live for more than one year, with a significant number living for over five years. These numbers are slightly smaller for Google and substantially smaller for Azure, but they are still quite significant. Worse yet, these credentials are rarely decommissioned. The same report indicated that nearly 50% of AWS IAM users had unused access keys as of October of 2023.

Thankfully, you can use Workload Identity instead. Eric Johnson, co-author of my course SEC510: Cloud Security Controls and Mitigations, and I have talked about this concept many times in the past, including in this webcast. In short, it allows an Identity Provider (IdP) to trade one of its temporary tokens for a set of temporary credentials used by the target cloud provider. While this is much harder than the alternative, it is also unquestionably the most secure way to perform cross-account authentication. So, your cloud vendor should support the ability to access your cloud resources using workload identity, not long-lived credentials.

3. Prevent the vendor’s other customers from reusing your trust relationship.

By granting the cloud vendor the ability to access your cloud data, you are deputizing them with extensive privileges. Unless the vendor’s service is single-tenant, it will have permission to access cloud accounts used by other customers. It should not be possible for one of the vendor’s customers to access another’s data using these privileges. This is ultimately the vendor’s responsibility, but there are actions that organizations can take to minimize the likelihood of this happening.

Failing to prevent this cross-customer access creates a confused deputy problem. AWS describes this as an issue that occurs when “an entity that doesn't have permission to perform an action can coerce a more-privileged entity to perform the action.” In this context, the “more-privileged” entity is the vendor’s platform, and the “entity that doesn’t have permission” is a malicious user of this platform. It should not be possible for this attacker to trick the platform into accessing another customer’s cloud resources.

AWS documented how a confused deputy problem can occur when organizations grant a third-party access to their resources. In this illustration, they call this third-party vendor “Example Corp.” After an IAM role and trust relationship is created with Example Corp, Example Corp must be provided with the IAM role’s Amazon Resource Name (ARN). Example Corp could then assume that role and access your resources as intended. However, if a different AWS account can trick Example Corp into accessing resources using the same ARN, they might gain unauthorized access to your AWS resources. While AWS’s example is cross-account because the customer and vendor are in two different AWS accounts, this could just as easily be cross-cloud or even on-premises to cloud.

AWS illustration of the cross-account confused deputy problem.

One way to mitigate this issue is to have the vendor supply a customer-specific value when assuming a role. By verifying the value, we can reasonably assume that the request was meant for this customer and not for someone else. AWS shows how this can be done using the ExternalId field when assuming a role. This does not work with the sts:AssumeRoleWithWebIdentity operation. In that case, the assume role policy can verify the RoleSessionId set when performing this operation. Alternative, cloud-agnostic values that can be verified include the aud or sub claims in the IdP’s identity token.

This approach is not foolproof. If the attacker is somehow able to spoof this value, such as by compromising the customer’s account in the vendor’s platform or compromising the platform altogether, this check would be meaningless. So, it is important to vet every vendor’s security posture, especially as it relates to application security.

4. Clean up the required IAM resources after terminating the connection.

Organizations must create various IAM resources for vendors to access their account. These include an identity provider, service account, and trust relationship between the two. The vendor can access the organization’s account for as long as these resources exist. So, if the organization no longer wants to use the vendor, they should decommission these resources. After doing so, even if the vendor’s platform is completely compromised, it would not be able to perform additional operations on the organization’s resources.

Case Study: AWS Security Posture Disclosure through Microsoft Defender for Cloud

On February 7th, 2024, Eric and I reported a confused deputy problem we discovered in Microsoft Defender for Cloud, Azure’s built-in CSPM. One month later, the Microsoft Security Response Center (MSRC) rated this flaw to be “Critical,” and we were awarded a bounty. The vulnerability is very similar to the one described by AWS in the graphic above, but instead of it being cross-account, it is cross-cloud. You can read our full write up on this issue here.

Demonstration and Mitigations

To demonstrate the confused deputy problem, we created a demo application. We jokingly call it the first ever Confused Deputy Insecurity Management (CDIM) platform. It appears to serve the same function as a CSPM, uses another four-letter acronym starting with C, and is 100% free. It is also on the cutting edge. It is the only service in this product category, and Gartner has not even made a Magic Quadrant for CDIM yet!

The CDIM is an AWS-based platform capable of scanning AWS, Azure, and Google Cloud accounts.

In the next section, we will walk through this application and discuss its security flaws. Feel free to follow along with your own AWS account by visiting the platform here.

CDIM Walkthrough

First, we will authenticate using the credentials, “alice” / “hunter2” for Alice, a member of our organization with permissions to deploy infrastructure in our AWS account:

Preparing to login to the CDIM with username “alice” and password “hunter2”.

Before performing the scan, Alice must prepare the target AWS account. The CDIM provides her with a Terraform template that can be used to deploy the required IAM resources:

Alice must download the Terraform template and deploy it using her elevated AWS permissions.

After deploying this template, Alice will enter her AWS account ID and click the scan button:

The underwhelming results of the scan.

The CDIM has an... interesting approach to security. Instead of letting you know whether your buckets or storage containers are secure, it simply lists the objects that you have. This seems more like an inventory tool than anything. I guess you get what you pay for!

Can a nefarious outside entity, who we will call Eve, scan Alice’s AWS account? By repeating this scan with Eve’s credentials, (“eve” / “snooping4secrets”), you will see that the answer is yes! Unsurprisingly, the CDIM platform has a confused deputy problem.

How can we fix this issue? We should definitely report the issue to the CDIM’s developers, but we can also take actions on our end to improve the integration. Examine this portion of the AWS Terraform template provided by the CDIM:

The original Terraform template provided by the CDIM that Alice used to prepare the target AWS account.

This assume role policy ensures only tokens from the CDIM's identity provider with a particular subject can be used to scan Alice’s AWS account. However, there is no condition ensuring the request came from Alice. Meanwhile, the CDIM is assuming this role with a session named after the currently logged in user's username. Observe this snippet from the CDIM's application code:

When Alice performs a scan, the CDIM assumes a role into the target account with a session named cdim_alice.

When Eve performs a scan, the assume role session will be named cdim_eve. So, we can modify the assume role policy to only allow sessions named cdim_alice. The following Terraform block accomplishes this:

Added a condition requiring the role session name supplied by the CDIM to equal cdim_alice.

There are other issues with the Terraform templates provided by the CDIM. Additionally, the Azure and Google Cloud integrations have security implications as well. We will save these discussions for a future publication. Feel free to continue exploring the platform!

We have discussed a theoretical vulnerability posited by AWS, a real vulnerability in Microsoft Defender for Cloud, and a manufactured vulnerability in our CDIM application demonstration. It is critical to understand these kinds of issues can appear in any cloud integration. Even though the CDIM was designed to be insecure, it still uses workload identity. It is likely that many integrations are even worse and use long-lived credentials. In fact, workload identity has only been generally available in all the Big 3 cloud providers for a few years. We strongly recommend organizations reassess their cloud integrations following the four guidelines above. If you are uncomfortable granting internal users access to your organization’s cloud data, you should be even less comfortable sharing it with vendors or strangers on the internet.

Learn More

This blog post is related to content from SANS Institute’s SEC510: Cloud Security Controls and Mitigations course. SEC510 provides cloud security analysts, engineers, and researchers with practical security controls that can help organizations reduce their attack surface and prevent security incidents from becoming breaches. To learn more, please visit here, review the syllabus, and click the Course Demo button for a free ~1 hour module.

Share:
TwitterLinkedInFacebook
Copy url Url was copied to clipboard
Subscribe to SANS Newsletters
Receive curated news, vulnerabilities, & security awareness tips
United States
Canada
United Kingdom
Spain
Belgium
Denmark
Norway
Netherlands
Australia
India
Japan
Singapore
Afghanistan
Aland Islands
Albania
Algeria
American Samoa
Andorra
Angola
Anguilla
Antarctica
Antigua and Barbuda
Argentina
Armenia
Aruba
Austria
Azerbaijan
Bahamas
Bahrain
Bangladesh
Barbados
Belarus
Belize
Benin
Bermuda
Bhutan
Bolivia
Bonaire, Sint Eustatius, and Saba
Bosnia And Herzegovina
Botswana
Bouvet Island
Brazil
British Indian Ocean Territory
Brunei Darussalam
Bulgaria
Burkina Faso
Burundi
Cambodia
Cameroon
Cape Verde
Cayman Islands
Central African Republic
Chad
Chile
China
Christmas Island
Cocos (Keeling) Islands
Colombia
Comoros
Cook Islands
Costa Rica
Cote D'ivoire
Croatia (Local Name: Hrvatska)
Curacao
Cyprus
Czech Republic
Democratic Republic of the Congo
Djibouti
Dominica
Dominican Republic
East Timor
Ecuador
Egypt
El Salvador
Equatorial Guinea
Eritrea
Estonia
Eswatini
Ethiopia
Falkland Islands (Malvinas)
Faroe Islands
Fiji
Finland
France
French Guiana
French Polynesia
French Southern Territories
Gabon
Gambia
Georgia
Germany
Ghana
Gibraltar
Greece
Greenland
Grenada
Guadeloupe
Guam
Guatemala
Guernsey
Guinea
Guinea-Bissau
Guyana
Haiti
Heard And McDonald Islands
Honduras
Hong Kong
Hungary
Iceland
Indonesia
Iraq
Ireland
Isle of Man
Israel
Italy
Jamaica
Jersey
Jordan
Kazakhstan
Kenya
Kiribati
Korea, Republic Of
Kosovo
Kuwait
Kyrgyzstan
Lao People's Democratic Republic
Latvia
Lebanon
Lesotho
Liberia
Liechtenstein
Lithuania
Luxembourg
Macau
Madagascar
Malawi
Malaysia
Maldives
Mali
Malta
Marshall Islands
Martinique
Mauritania
Mauritius
Mayotte
Mexico
Micronesia, Federated States Of
Moldova, Republic Of
Monaco
Mongolia
Montenegro
Montserrat
Morocco
Mozambique
Myanmar
Namibia
Nauru
Nepal
Netherlands Antilles
New Caledonia
New Zealand
Nicaragua
Niger
Nigeria
Niue
Norfolk Island
North Macedonia
Northern Mariana Islands
Oman
Pakistan
Palau
Palestine
Panama
Papua New Guinea
Paraguay
Peru
Philippines
Pitcairn
Poland
Portugal
Puerto Rico
Qatar
Reunion
Romania
Russian Federation
Rwanda
Saint Bartholemy
Saint Kitts And Nevis
Saint Lucia
Saint Martin
Saint Vincent And The Grenadines
Samoa
San Marino
Sao Tome And Principe
Saudi Arabia
Senegal
Serbia
Seychelles
Sierra Leone
Sint Maarten
Slovakia
Slovenia
Solomon Islands
South Africa
South Georgia and the South Sandwich Islands
South Sudan
Sri Lanka
St. Helena
St. Pierre And Miquelon
Suriname
Svalbard And Jan Mayen Islands
Sweden
Switzerland
Taiwan
Tajikistan
Tanzania, United Republic Of
Thailand
Togo
Tokelau
Tonga
Trinidad And Tobago
Tunisia
Turkey
Turkmenistan
Turks And Caicos Islands
Tuvalu
Uganda
Ukraine
United Arab Emirates
United States Minor Outlying Islands
Uruguay
Uzbekistan
Vanuatu
Vatican City State
Venezuela
Vietnam
Virgin Islands (British)
Virgin Islands (U.S.)
Wallis And Futuna Islands
Western Sahara
Yemen
Zambia
Zimbabwe

By providing this information, you agree to the processing of your personal data by SANS as described in our Privacy Policy.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Tags:
  • Cloud Security

Related Content

Blog
Security Awareness, Artificial Intelligence (AI), Digital Forensics, Incident Response & Threat Hunting, Cloud Security, Cyber Defense, Offensive Operations, Pen Testing, and Red Teaming, Industrial Control Systems Security, Open-Source Intelligence (OSINT)
December 10, 2024
Top SANS Summit Talks of 2024
This year, SANS hosted 13 Summits from OSINT, ICS, Ransomware, DFIR to HackFest. Here were the top-rated talks of the year.
No Headshot Available
Alison Kim
read more
Blog
InstructorSpotlight_340x340.png
Cloud Security
March 22, 2023
Jon Zeolla: Instructor Spotlight
Get to know Jon Zeolla, instructor for SEC540: Cloud Security and DevSecOps Automation
Jon_Zeolla.jpg
Jon Zeolla
read more
Blog
powershell_option_340x340.jpg
Cyber Defense, Cybersecurity and IT Essentials, Cloud Security, Penetration Testing and Red Teaming
July 17, 2022
Month of PowerShell: Merging Two Files (Understanding ForEach)
A routine task (merging two files) leads us down the path of developing a better understanding of the ForEach command in PowerShell.
Josh Wright - Headshot - 370x370 2025.jpg
Joshua Wright
read more
  • Company
  • Mission
  • Instructors
  • About
  • FAQ
  • Press
  • Contact Us
  • Careers
  • Policies
  • Training Programs
  • Work Study
  • Academies & Scholarships
  • Public Sector Partnerships
  • Law Enforcement
  • SkillsFuture Singapore
  • Degree Programs
  • Get Involved
  • Join the Community
  • Become an Instructor
  • Become a Sponsor
  • Speak at a Summit
  • Join the CISO Network
  • Award Programs
  • Partner Portal
Subscribe to SANS Newsletters
Receive curated news, vulnerabilities, & security awareness tips
United States
Canada
United Kingdom
Spain
Belgium
Denmark
Norway
Netherlands
Australia
India
Japan
Singapore
Afghanistan
Aland Islands
Albania
Algeria
American Samoa
Andorra
Angola
Anguilla
Antarctica
Antigua and Barbuda
Argentina
Armenia
Aruba
Austria
Azerbaijan
Bahamas
Bahrain
Bangladesh
Barbados
Belarus
Belize
Benin
Bermuda
Bhutan
Bolivia
Bonaire, Sint Eustatius, and Saba
Bosnia And Herzegovina
Botswana
Bouvet Island
Brazil
British Indian Ocean Territory
Brunei Darussalam
Bulgaria
Burkina Faso
Burundi
Cambodia
Cameroon
Cape Verde
Cayman Islands
Central African Republic
Chad
Chile
China
Christmas Island
Cocos (Keeling) Islands
Colombia
Comoros
Cook Islands
Costa Rica
Cote D'ivoire
Croatia (Local Name: Hrvatska)
Curacao
Cyprus
Czech Republic
Democratic Republic of the Congo
Djibouti
Dominica
Dominican Republic
East Timor
Ecuador
Egypt
El Salvador
Equatorial Guinea
Eritrea
Estonia
Eswatini
Ethiopia
Falkland Islands (Malvinas)
Faroe Islands
Fiji
Finland
France
French Guiana
French Polynesia
French Southern Territories
Gabon
Gambia
Georgia
Germany
Ghana
Gibraltar
Greece
Greenland
Grenada
Guadeloupe
Guam
Guatemala
Guernsey
Guinea
Guinea-Bissau
Guyana
Haiti
Heard And McDonald Islands
Honduras
Hong Kong
Hungary
Iceland
Indonesia
Iraq
Ireland
Isle of Man
Israel
Italy
Jamaica
Jersey
Jordan
Kazakhstan
Kenya
Kiribati
Korea, Republic Of
Kosovo
Kuwait
Kyrgyzstan
Lao People's Democratic Republic
Latvia
Lebanon
Lesotho
Liberia
Liechtenstein
Lithuania
Luxembourg
Macau
Madagascar
Malawi
Malaysia
Maldives
Mali
Malta
Marshall Islands
Martinique
Mauritania
Mauritius
Mayotte
Mexico
Micronesia, Federated States Of
Moldova, Republic Of
Monaco
Mongolia
Montenegro
Montserrat
Morocco
Mozambique
Myanmar
Namibia
Nauru
Nepal
Netherlands Antilles
New Caledonia
New Zealand
Nicaragua
Niger
Nigeria
Niue
Norfolk Island
North Macedonia
Northern Mariana Islands
Oman
Pakistan
Palau
Palestine
Panama
Papua New Guinea
Paraguay
Peru
Philippines
Pitcairn
Poland
Portugal
Puerto Rico
Qatar
Reunion
Romania
Russian Federation
Rwanda
Saint Bartholemy
Saint Kitts And Nevis
Saint Lucia
Saint Martin
Saint Vincent And The Grenadines
Samoa
San Marino
Sao Tome And Principe
Saudi Arabia
Senegal
Serbia
Seychelles
Sierra Leone
Sint Maarten
Slovakia
Slovenia
Solomon Islands
South Africa
South Georgia and the South Sandwich Islands
South Sudan
Sri Lanka
St. Helena
St. Pierre And Miquelon
Suriname
Svalbard And Jan Mayen Islands
Sweden
Switzerland
Taiwan
Tajikistan
Tanzania, United Republic Of
Thailand
Togo
Tokelau
Tonga
Trinidad And Tobago
Tunisia
Turkey
Turkmenistan
Turks And Caicos Islands
Tuvalu
Uganda
Ukraine
United Arab Emirates
United States Minor Outlying Islands
Uruguay
Uzbekistan
Vanuatu
Vatican City State
Venezuela
Vietnam
Virgin Islands (British)
Virgin Islands (U.S.)
Wallis And Futuna Islands
Western Sahara
Yemen
Zambia
Zimbabwe

By providing this information, you agree to the processing of your personal data by SANS as described in our Privacy Policy.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
  • Privacy Policy
  • Terms and Conditions
  • Do Not Sell/Share My Personal Information
  • Contact
  • Careers
© 2025 The Escal Institute of Advanced Technologies, Inc. d/b/a SANS Institute. Our Terms and Conditions detail our trademark and copyright rights. Any unauthorized use is expressly prohibited.
  • Twitter
  • Facebook
  • Youtube
  • LinkedIn