securing-azure-with-microsoft-defender
它能做什么
这个工具用于配置 Microsoft Defender for Cloud,以保护你的云环境(Azure、AWS、GCP)。它可以为服务器、容器、数据库等启用安全功能,帮助你发现并修复安全问题。
适用场景
- ✓第一次设置云安全时。
- ✓当你想全面了解所有云服务的安全状况时。
- ✓当你添加需要防护的新服务器或数据库时。
技能链接
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/securing-azure-with-microsoft-defender/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“在 Azure 中设置 Microsoft Defender for Cloud,保护我的服务器和数据库。”
每周 5 个新技能,1 分钟读完。
工作原理
该工具会在 Defender for Cloud 中启用不同的安全“计划”,它们就像一个个防护套餐。它还可以连接 AWS 和 GCP 等其他云平台,让你在一个地方查看所有内容,并帮助你优先处理最重要的修复事项。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Securing Azure with Microsoft Defender
When to Use
- When deploying cloud workload protection across Azure subscriptions and resource groups
- When establishing a Secure Score baseline and prioritizing security recommendations
- When extending threat protection to multi-cloud environments including AWS and GCP
- When enabling container security for AKS clusters and Azure Container Registry
- When integrating AI workload security with the Data and AI security dashboard
Do not use for AWS-only environments (see implementing-aws-security-hub), for identity provider configuration (see managing-cloud-identity-with-okta), or for network-level firewall rule management (see implementing-cloud-waf-rules).
Prerequisites
- Azure subscription with Security Admin or Contributor role
- Azure Policy initiative for Defender for Cloud enabled at the management group level
- Log Analytics workspace provisioned for security data collection
- Microsoft Defender for Cloud plans licensed (P1 or P2 for server protection)
Workflow
Step 1: Enable Defender for Cloud Plans
Activate Defender plans for each workload type: Servers, Containers, App Service, Storage, Databases, Key Vault, Resource Manager, and DNS. Each plan provides specialized threat detection and vulnerability assessment.
# Enable Defender for Servers Plan 2
az security pricing create --name VirtualMachines --tier Standard --subplan P2
# Enable Defender for Containers
az security pricing create --name Containers --tier Standard
# Enable Defender for Storage with malware scanning
az security pricing create --name StorageAccounts --tier Standard \
--extensions '[{"name":"OnUploadMalwareScanning","isEnabled":"True",
"additionalExtensionProperties":{"CapGBPerMonthPerStorageAccount":"5000"}}]'
# Enable Defender for Databases
az security pricing create --name SqlServers --tier Standard
az security pricing create --name CosmosDbs --tier Standard
# Enable Defender for Key Vault
az security pricing create --name KeyVaults --tier Standard
# Verify all enabled plans
az security pricing list --query "[?pricingTier=='Standard'].{Plan:name, Tier:pricingTier, SubPlan:subPlan}" -o table
Step 2: Configure Environment Connectors for Multi-Cloud
Connect AWS accounts and GCP projects to Defender for Cloud for unified security posture management across cloud providers.
# Create AWS connector for CSPM
az security security-connector create \
--name aws-production-connector \
--resource-group security-rg \
--environment-name AWS \
--hierarchy-identifier "123456789012" \
--offerings '[{
"offeringType": "CspmMonitorAws",
"nativeCloudConnection": {"cloudRoleArn": "arn:aws:iam::123456789012:role/DefenderForCloudRole"}
}]'
# Create GCP connector
az security security-connector create \
--name gcp-production-connector \
--resource-group security-rg \
--environment-name GCP \
--hierarchy-identifier "my-gcp-project-id" \
--offerings '[{"offeringType": "CspmMonitorGcp"}]'
Step 3: Review and Prioritize Secure Score Recommendations
Analyze the Secure Score across all subscriptions. Each recommendation includes a risk priority based on asset exposure, internet exposure, and threat intelligence context.
# Get current Secure Score
az security secure-score list \
--query "[].{Name:displayName, Score:current, Max:max, Percentage:percentage}" -o table
# List unhealthy recommendations sorted by severity
az security assessment list \
--query "[?properties.status.code=='Unhealthy'].{Name:properties.displayName, Severity:properties.metadata.severity, Resources:properties.resourceDetails.id}" \
--output table
# Get specific recommendation details
az security assessment show \
--assessment-name "4fb67663-9ab9-475d-b026-8c544cced439" \
--query "{Name:properties.displayName, Description:properties.metadata.description, Remediation:properties.metadata.remediationDescription}"
Step 4: Configure Adaptive Application Controls and JIT Access
Enable Just-In-Time VM access to reduce the attack surface by opening management ports only when needed, and deploy adaptive application controls to whitelist approved executables.
# Enable JIT VM access policy
az security jit-policy create \
--resource-group production-rg \
--location eastus \
--name default \
--virtual-machines '[{
…
常见问题
使用这个工具需要付费吗?
Microsoft Defender for Cloud 提供免费和付费两种选项。一些高级防护和监控功能需要购买许可,例如 P1 或 P2 计划。
我可以只用它来保护 AWS 或 GCP 吗?
不可以。这个工具的重点是配置 Defender for Cloud,而它是微软的产品。如果你只需要针对 AWS 或 GCP 的安全方案,还有其他工具可供选择。
什么是“安全分数”(Secure Score)?
安全分数是 Defender for Cloud 给出的评分,用来反映你的云环境有多安全。分数越高越好。该工具会通过执行推荐的建议来帮助你提高这个分数。
详情
作者的原始描述
Deploys and configures Microsoft Defender for Cloud as a CNAPP for Azure, multi-cloud, and hybrid environments: enabling Defender plans for servers, containers, storage, and databases, configuring recommendations, and managing Secure Score via the unified Defender portal. Use when onboarding workloads to Defender for Cloud or setting up cloud workload protection and threat monitoring. '
热度
- GitHub 星标
- 35k
- 排名
- #8367
- 许可证
- Apache-2.0
- 更新时间
- 2026/8/31
评论
- …
同一仓库的更多技能
abusing-dpapi-for-credential-access
35k为你的 AI 智能体提供针对特定任务的现成指令,让它完成得更好、更快。
abusing-shadow-credentials-for-privesc
35k教你的 AI 智能体写出清晰、结构良好的文本。
achieving-cmmc-level-2-compliance
35k帮助你的智能体搭建符合 CMMC Level 2 合规要求的环境。它会落实安全要求,并管理必要的文档。
acquiring-disk-image-with-dd-and-dcfldd
35k帮助你的智能体创建硬盘的精确副本。这能确保调查过程中信息不丢失、不被篡改。