Skip to content
LessIT

Defender for Cloud

Implement Cloud Security Posture Management

Enable Defender CSPM, create custom security initiatives, configure governance rules, map controls to regulatory frameworks, build a compliance dashboard, and automate remediation to manage cloud security posture at scale.

Intermediate 90 min 12 steps

Where it fits: lab 2 of 4

Monitor and improve cloud security posture. Protect servers, manage posture across Azure and AWS and secure AI workloads with Defender for Cloud.

  1. Enable Defender for Servers Plan 2 60 min
  2. Implement Cloud Security Posture Management 90 min
  3. Secure a Multi-Cloud Environment (AWS + Azure) 3 h
  4. AI Security Posture Management (DSPM for AI) 120 min

What this lab covers

Cloud Security Posture Management (CSPM) is a discipline within Defender for Cloud that continuously assesses your Azure resources against security benchmarks and regulatory frameworks. Defender CSPM extends foundational CSPM with attack path analysis, cloud security graph, governance rules, and advanced compliance mapping capabilities. In this lab you will enable the Defender CSPM plan, create custom security initiatives using Azure Policy, configure governance rules for recommendation ownership, and build compliance dashboards. You will also configure attack path analysis, build KQL queries for posture assessment, set up continuous export, and automate remediation with DeployIfNotExists policies. By the end of this lab, you will have a comprehensive CSPM strategy that covers posture assessment, governance, compliance mapping, and automated remediation.

The enterprise scenario

Scenario: Contoso Insurance operates 500 Azure resources spanning virtual machines, storage accounts, SQL databases, and App Services across three Azure regions. The company must meet multiple regulatory frameworks: PCI DSS for payment card processing, SOC 2 for service organization controls, and HIPAA for protected health information.

Each framework assigns different controls to the same underlying resources, creating a complex compliance matrix that the security team must manage and report against. The CISO requires automated governance so that each security recommendation has an assigned owner, a remediation deadline, and an escalation path. Auditors request quarterly compliance reports showing control coverage, remediation trends, and risk posture across all three frameworks.

What you will learn

  • Differentiate between foundational CSPM and Defender CSPM capabilities
  • Enable the Defender CSPM plan on an Azure subscription
  • Create custom security initiatives with Azure Policy and assign them to subscriptions
  • Configure governance rules that assign recommendation owners and set remediation deadlines
  • Map security controls to PCI DSS, SOC 2, and HIPAA regulatory frameworks
  • Write KQL queries to assess cloud security posture using the SecurityRecommendation table
  • Configure attack path analysis to identify exploitable resource chains
  • Build an Azure Monitor Workbook for cloud security posture visualization

Before you start

  • Azure Subscription: An active Azure subscription with at least one resource group containing resources to assess
  • Role: Security Admin or Contributor role on the subscription; Owner role is required for policy assignments
  • Completed Lab 01: Familiarity with Defender for Cloud basics from Lab 01: Enable Defender for Servers Plan 2
  • Azure CLI: Version 2.50 or later installed locally or use Azure Cloud Shell
  • PowerShell: Az.Security and Az.PolicyInsights modules installed
  • Log Analytics Workspace: An existing workspace or the ability to create one for continuous export
  • Portal Access: Access to the Azure portal with permissions to modify Defender for Cloud settings and assign policies

The 12 steps

  1. Understand CSPM vs CWP in Defender for Cloud
  2. Enable Defender CSPM Plan
  3. Review and Customize Security Initiatives
  4. Create a Custom Security Initiative with Azure Policy
  5. Configure Governance Rules for Recommendation Ownership
  6. Map Security Controls to Regulatory Frameworks
  7. Build Custom KQL Queries for Posture Assessment
  8. Configure Attack Path Analysis
  9. Create a Cloud Security Posture Workbook
  10. Set Up Continuous Export to Log Analytics
  11. Automate Remediation with Azure Policy DeployIfNotExists
  12. Generate a Compliance Report for Auditors

Related labs