Container escape is an exploitative technique in which an unauthorized individual gains entry to the underlying host operating system from inside a container. This illicit access enables them to breach the container’s isolated environment and potentially manipulate or access resources on the host system. If container escape is successfully executed, it can jeopardize the security of other containers residing on the same host and potentially compromise the entire infrastructure.

Despite these challenges, containerization remains a popular and valuable technology. Many of these issues can be addressed with careful planning, proper tooling, and ongoing management practices. To address these security challenges, organizations use various tools and practices, including container security scanners, CSPM solutions, runtime protection tools, network security policies, access controls, and security best practices tailored to containers.

How does CSPM address these unique security challenges?

CSPM addresses the unique security challenges introduced by containers through its holistic approach. It provides complete visibility into containerized environments, constantly monitors for misconfigurations, compliance violations, and vulnerabilities, and automatically enforces security policies. This proactive stance ensures that dynamic, short-lived containers are always configured securely. Additionally, CSPM integrates seamlessly with DevOps, promoting security throughout the development and deployment process, thus mitigating issues early. It offers real-time alerts and automates incident response, enabling quick reactions to security threats within containers. This combination of continuous monitoring, proactive configuration management, and integration into the development life cycle allows CSPM to effectively tackle the challenges of container security.

Now that we understand the unique security challenges of a containerized environment and how CSPM addresses these concerns, let us explore the onboarding aspects of containers to a CSPM tool.

Onboarding containers to CSPM tools

Onboarding containers to a CSPM tool refers to the process of integrating containers into the CSPM tool for enhanced security monitoring and management. The onboarding process involves configuring the CSPM tool to scan, assess, and protect containers against security risks and compliance violations.

Note

To make the concept easily understandable, the Microsoft Defender for Containers feature of the Microsoft Defender for Cloud tool is taken as a reference wherever it is imperative to explain with an example. There are many other tools available on the market that offer container security posture management features as well. The example chosen here is purely based on publicly accessible information.

Offboarding cloud accounts from a CSPM solution is an essential process to ensure the secure removal of cloud resources and associated monitoring from the CSPM platform. Every tool offers different ways to achieve this. Let us look at some scenarios that show why it is important to offboard the cloud accounts.

Importance of offboarding cloud accounts from CSPM

Offboarding cloud accounts from a CSPM tool is an important process that should not be overlooked for several reasons. Here are some key reasons why offboarding is important:

  • Security and compliance: When an organization no longer requires the monitoring and management of specific cloud accounts, it is crucial to remove them from the CSPM solution to avoid potential security risks and maintain compliance with relevant regulations.
  • Resource optimization: Offboarding cloud accounts helps optimize the resources utilized by the CSPM solution, reducing unnecessary costs and overhead.
  • Access control: By removing the cloud accounts from the CSPM platform, you ensure that only authorized personnel can access and manage those accounts, improving overall security.
  • Cost optimization: Many CSPM tools are subscription-based or incur costs based on the number of cloud accounts or resources they monitor. Failing to offboard unused or decommissioned accounts can result in unnecessary subscription fees or resource consumption, leading to increased costs.
  • Auditing and accountability: Organizations may be subject to audits or compliance checks, where they are required to demonstrate that inactive or decommissioned cloud accounts are properly managed and offboarded from the CSPM tool. Non-compliance can result in penalties or regulatory issues.

To ensure the ongoing effectiveness of your CSPM tool and maintain a strong security and compliance posture, it’s crucial to prioritize the offboarding of cloud accounts when they are no longer in use or relevant to your organization’s operations.

Roadblock #4 – Policy complexity

Defining and configuring complex security policies can be time-consuming and prone to misconfigurations.

Best practices are as follows:

  • Start with foundational security policies and gradually add complexity as needed
  • Leverage industry-standard templates for common policies
  • Use automation to simplify policy creation and enforcement

Roadblock #5 – Alert fatigue

Overwhelming numbers of alerts can lead to alert fatigue, where important alerts may be overlooked.

Best practices are as follows:

  • Customize alert thresholds and priorities based on the severity and business impact
  • Implement intelligent alerting that correlates multiple events to reduce noise
  • Use automated remediation to address common, low-level issues without generating alerts

Roadblock #6 – Integration complexity

Integrating the CSPM tool with existing security and operations tools can be complex.

Best practices are as follows:

  • Use pre-built integrations where available
  • Develop clear integration strategies and roadmaps
  • Engage with the CSPM tool vendor or consult with experts to facilitate integration

Roadblock #7 – Monitoring and alerting configuration

Configuring the monitoring and alerting features of the CSPM tool correctly can be daunting.

Best practices are as follows:

  • Consult with CSPM tool documentation and vendor support for guidance
  • Start with a small set of critical alerts and expand gradually
  • Conduct regular testing and validation to ensure alerts are functioning as expected

Roadblock #8 – Data privacy and security

Handling sensitive data collected by the CSPM tool can pose privacy and security concerns.

Best practices are as follows:

  • Implement data protection measures, including encryption and access controls
  • Comply with data privacy regulations (e.g., GDPR) and data retention policies
  • Conduct regular security assessments of the CSPM tool itself

Roadblock #9 – Compliance variability

Different cloud platforms may have variations in compliance standards and terminology.

Best practices are as follows:

  • Ensure that the CSPM tool can handle these variations and offer consistent reporting
  • Collaborate with compliance experts to align your policies and practices

Roadblock #10 – Scalability

The CSPM tool should be able to scale with your growing cloud infrastructure.

Best practices are as follows:

  • Choose a CSPM tool that can handle increased volumes of cloud accounts and resources
  • Regularly assess the performance and capacity of the tool to plan for scaling

Addressing these roadblocks and implementing the recommended best practices will help ensure a smooth onboarding process and effective use of a CSPM tool in securing your cloud accounts and resources.

Every CSPM vendor is on a journey to bring new features every day. It is part of the vendor assessment process to make sure that the vendor you are choosing has the capabilities to support all other cloud environments your organization is using. For example, as of today while writing this chapter, Microsoft Defender for Cloud supports Azure DevOps and GitHub environment (in preview) but no other cloud environments, such as Oracle Cloud Infrastructure (OCI) or Alibaba Cloud. However, you can still onboard your SQL servers, Windows servers, or any other workloads by installing Microsoft Defender for Endpoint agents to the workloads. Defender for Cloud can monitor the security posture of non-Azure computers, but first, you need to connect them to Azure.

The following are some links that you can refer to when onboarding non-Azure workloads to Microsoft Defender for Cloud:

Please refer to the Further reading section of this chapter to learn more about cloud account onboarding.

Let us now look at challenges and roadblocks that may arise during onboarding.

Onboarding roadblocks and mitigation best practices

During the onboarding process of cloud accounts to a CSPM tool, organizations may encounter several roadblocks. Let us understand these roadblocks one by one, along with mitigation best practices.

Roadblock #1 – Lack of necessary permissions

Obtaining the required permissions and credentials to connect cloud accounts can be challenging, especially in larger organizations.

Best practices are as follows:

  • Work closely with your cloud service providers to grant the necessary access
  • Clearly define and communicate the required permissions to relevant stakeholders
  • Use role-based access control (RBAC) to manage access more effectively

Roadblock #2 – Complex cloud environments

Multi-cloud or hybrid environments can be complex, with different configurations and security practices across platforms.

Best practices are as follows:

  • Develop a standardized approach for security policies and practices
  • Ensure your CSPM tool can support multiple cloud platforms
  • Create a comprehensive inventory of all cloud assets

Roadblock #3 – Resistance to change

Resistance from IT or development teams when introducing a CSPM tool can be a roadblock.

Best practices are as follows:

  • Communicate the benefits of the CSPM tool, such as improved security and compliance
  • Collaborate with teams to address their concerns and involve them in the onboarding process
  • Provide training to ensure that teams can use the tool effectively

Defender for Cloud offers comprehensive security management and threat protection for your hybrid and multi-cloud workloads. The free features focus on securing your Azure resources specifically, while additional paid plans provide enhanced protection for your on-premises infrastructure and resources across different cloud platforms. With Defender for Cloud, you can achieve unified security and peace of mind across your entire IT environment, regardless of its composition and location.

Follow this link to enable Defender for Cloud for Azure workloads: https://learn.microsoft.com/en-us/azure/defender-for-cloud/get-started.

Since Microsoft offers Defender for Cloud through the Microsoft Azure portal, it becomes super-easy to enable it for Azure workloads, and for other cloud environments, the process remains like other CSPM tool processes.

Prerequisites

  • You need an active subscription to Microsoft Azure to utilize Microsoft Defender for Cloud.
  • Ensure you have appropriate permissions and access to manage Azure resources. You should have an Owner, Contributor, or Reader role assigned for the subscription or for the resource group that the resource is located in.

Enable Defender for Cloud on your Azure subscription

Once you follow the steps mentioned in the preceding link, Defender for Cloud gets enabled on your subscription and you have access to the basic features provided by Defender for Cloud, such as the Foundational CSPM plan, recommendations, access to the asset inventory, workbooks, Secure Score, and regulatory compliance with the Microsoft cloud security benchmark. The other important links are provided at the end of the chapter under the Further reading section.

Let us now understand how to onboard GCP accounts to Microsoft Defender for Cloud.

Onboarding GCP accounts

Microsoft Defender for Cloud provides robust protection for workloads hosted on Google Cloud Platform (GCP). However, it is necessary to establish a connection between your Azure subscription and GCP to leverage these security services effectively.

Follow this link to enable Defender for Cloud for GCP projects: https://learn.microsoft.com/en-us/azure/defender-for-cloud/quickstart-onboard-gcp#connect-your-gcp-project.

Prerequisites

  • You need a Microsoft Azure subscription as Microsoft offers the Defender for Cloud service through the Azure portal.
  • Microsoft Defender for Cloud on your Azure subscription must be enabled.
  • You need access to a GCP project.
  • You need to have a Contributor role on the relevant Azure subscription and an Owner role on the GCP organization or project.
  • It is possible to connect your GCP projects to Microsoft Defender for Cloud on the project level and also connect multiple projects to one Azure subscription. You can connect multiple projects to multiple Azure subscriptions as well.

Steps to onboard GCP accounts

Once you follow the steps mentioned in the preceding link, you will be able to establish a connection between your GCP project and Defender for Cloud and then a scan starts on your GCP environment. New recommendations will appear in Defender for Cloud after up to six hours. When auto-provisioning is enabled, Azure Arc and any enabled extensions are automatically installed for each newly detected resource.

Let us now look at some important points related to other environments.

The account onboarding process is also known as the account connection process for public clouds. It is the process of establishing a connection between a CSPM account and your CSP account such as Microsoft Azure, AWS, GCP, Oracle Cloud, and so on. When the connection between the CSPM tool and the cloud account is established, CSPM can access your cloud infrastructure and scan it for vulnerabilities and other security issues.

Note

To make the concept easily understandable, the Microsoft Defender for Cloud CSPM tool is taken as a reference wherever it is imperative to explain with an example. This book does not justify one tool over another. The tool is chosen based on the information available publicly. Generic and high-level steps are provided here, which is not enough for onboarding an account. You must follow vendor documentation and support for successful onboarding. It is beyond the scope of this book to dive deep into a particular tool.

Onboarding AWS accounts

Connecting your AWS accounts to Microsoft Defender for Cloud allows you to leverage the security capabilities of Microsoft Defender to protect your AWS resources and workloads. This integration provides centralized visibility, threat detection, and incident response across your AWS infrastructure. Microsoft Defender for Cloud protects workloads in AWS, but you need to set up the connection between them and your Azure subscription.

Every CSPM vendor provides comprehensive documentation and support for successful account onboarding as part of their contract with customers. To connect your AWS account to Microsoft Defender for Cloud, you should follow its documentation and guidance.

Follow this documentation link to connect your AWS accounts to Microsoft Defender for Cloud: https://learn.microsoft.com/en-us/azure/defender-for-cloud/quickstart-onboard-aws.

Prerequisites

Before we set up the connection, you’ll need to be ready with the following:

  • You need a Microsoft Azure subscription. If you do not have an Azure subscription, set one up.
  • You must set up your CSPM (Microsoft Defender for Cloud in this case) on your Azure subscription.
  • You must have access to an AWS account.
  • Ensure you have appropriate permissions and access to manage AWS resources. You need to have Contributor permission for the relevant Azure subscription and Administrator permission on the AWS account.

Let’s begin!

  1. Set up an AWS IAM role: The first step is to create an IAM role in your AWS account that grants necessary permissions to Microsoft Defender for Cloud. Assign appropriate permissions to the IAM role, such as read-only access to your AWS resources. Make sure to define a trust relationship between the IAM role and the Microsoft Defender for Cloud service principal.
  2. Configure AWS account in Microsoft Defender for Cloud: Sign in to the Microsoft Defender Security Center. Navigate to Settings and select AWS accounts or Add AWS account. Provide the necessary details such as account name, AWS account ID, and the IAM role ARN (Amazon Resource Names) you created. Click on Add account to initiate the connection process.
  3. Validate the connection: Microsoft Defender for Cloud will attempt to establish a connection with the specified AWS account using the provided IAM role. If the connection is successful, you will see the AWS account listed as connected in the Microsoft Defender Security Center.
  4. Enable data collection: Once the connection is established, you can configure data collection settings for the AWS account. Decide which types of AWS data you want to collect, such as CloudTrail logs, VPC flow logs, or CloudWatch events. Enable the necessary data connectors and configure any required permissions or settings.
  5. Monitor and respond to threats: Defender for Cloud will start collecting and analyzing the security data from your AWS resources. Monitor the alerts and security recommendations provided by Defender for Cloud and take appropriate actions to remediate any identified threats.

If you follow the documentation steps correctly, you should be able to see that your AWS account has onboarded into the Microsoft Defender for Cloud CSPM tool, as shown in the following screenshot:

Figure 6.1 – Microsoft Defender for Cloud

Now that we have seen how an AWS account can be onboarded to Microsoft Defender for Cloud, let us look at how to onboard the same for Microsoft Azure.

copyright © 2025 skygravity.org