CSPM – Cloud Security Posture Management

Von Boris Sander7. November 2025
CSPM – Cloud Security Posture Management

CSPM – Cloud Security Posture Management

„Weil irgendwer die 47 S3-Buckets überwachen muss, die niemand mehr kennt."


Sinn & Zweck

CSPM ist das Sicherheitsnetz für Cloud-Umgebungen. Während IaC Security den Code prüft, bevor er deployed wird, überwacht CSPM kontinuierlich die laufende Cloud-Infrastruktur auf Fehlkonfigurationen, Compliance-Verstöße und Sicherheitsrisiken.

Das Problem in der Cloud:

  • Entwickler können Ressourcen selbst provisionieren
  • Konfigurationen driften von der Policy ab
  • Shadow IT blüht
  • Compliance-Anforderungen ändern sich

CSPM bringt Transparenz in das Chaos.


Was CSPM überwacht

Fehlkonfigurationen

KategorieBeispiele
StorageÖffentliche S3-Buckets, unverschlüsselte Datenbanken
ComputeVMs ohne Updates, öffentliche IPs, offene Ports
IdentityÜbermäßige Berechtigungen, inaktive User, keine MFA
NetworkOffene Security Groups, fehlendes VPN, kein WAF
LoggingDeaktiviertes CloudTrail, keine VPC Flow Logs
EncryptionFehlende KMS-Keys, unverschlüsselte Volumes

Compliance-Frameworks

CSPM prüft gegen:

  • CIS Benchmarks (AWS, Azure, GCP)
  • SOC 2
  • PCI-DSS
  • HIPAA
  • GDPR
  • ISO 27001
  • NIST CSF
  • BSI C5

Threat Detection

Fortgeschrittene CSPM-Tools erkennen:

  • Anomales API-Verhalten
  • Cryptocurrency Mining
  • Data Exfiltration Patterns
  • Privilege Escalation Attempts

CSPM-Tools

Cloud-Native Tools

ToolCloudPreisFeatures
AWS Security HubAWSPay-per-useAggregation, Compliance
AWS ConfigAWSPay-per-useRegelbasierte Checks
Azure Security CenterAzureFree/PaidCSPM, CWPP integriert
Google Security Command CenterGCPPremiumFindings, Assets

Third-Party Tools

ToolMulti-CloudPreisStärken
Prisma Cloud (Palo Alto)EnterpriseUmfassend, CWPP integriert
WizEnterpriseAgentless, Risk Graph
Orca SecurityEnterpriseAgentless, Side-Scanning
LaceworkEnterpriseAnomaly Detection
Aqua SecurityEnterpriseContainer-Fokus
CloudGuard (Check Point)EnterpriseNetzwerk-Fokus
ProwlerAWS/Azure/GCPOpen SourceCIS Benchmarks
ScoutSuiteMultiOpen SourceMulti-Cloud Audit

Open Source

Prowler (AWS/Azure/GCP):

# Installation
pip install prowler

# AWS Full Scan
prowler aws

# Nur CIS Benchmark
prowler aws --compliance cis_2.0

# Specific Checks
prowler aws -c s3_bucket_public_access

ScoutSuite:

# Installation
pip install scoutsuite

# AWS Scan
scout aws

# Multi-Cloud
scout aws azure gcp

Architektur & Funktionsweise

Agentless vs. Agent-Based

Agentless (z.B. Wiz, Orca):

┌──────────────────────────────────────────────────┐
│                  Cloud Account                    │
│  ┌─────────┐  ┌─────────┐  ┌─────────┐          │
│  │   VM    │  │   VM    │  │   VM    │          │
│  └─────────┘  └─────────┘  └─────────┘          │
│        ↑           ↑           ↑                 │
│        └───────────┼───────────┘                 │
│                    │ Snapshot/API                │
│                    ↓                             │
│             ┌──────────────┐                     │
│             │  CSPM Tool   │                     │
│             │  (read-only) │                     │
│             └──────────────┘                     │
└──────────────────────────────────────────────────┘

Vorteile: Keine Installation, schnell, keine Performance-Impact Nachteile: Weniger Tiefe, kein Runtime-Monitoring

Agent-Based:

┌──────────────────────────────────────────────────┐
│                  Cloud Account                    │
│  ┌─────────────┐  ┌─────────────┐               │
│  │   VM        │  │   VM        │               │
│  │ ┌─────────┐ │  │ ┌─────────┐ │               │
│  │ │  Agent  │ │  │ │  Agent  │ │               │
│  │ └────┬────┘ │  │ └────┬────┘ │               │
│  └──────┼──────┘  └──────┼──────┘               │
│         └───────┬────────┘                       │
│                 ↓                                │
│         ┌──────────────┐                         │
│         │  CSPM Tool   │                         │
│         └──────────────┘                         │
└──────────────────────────────────────────────────┘

Vorteile: Tiefere Insights, Runtime-Monitoring Nachteile: Deployment-Aufwand, Performance-Impact


Typische Findings

Kritisch

🔴 CRITICAL: S3 Bucket "prod-customer-data" is publicly accessible
   Impact: Data exposure of 2.3M customer records
   Remediation: Enable "Block Public Access" on bucket
   
🔴 CRITICAL: IAM User "deploy-user" has AdministratorAccess
   Impact: Compromised credentials = full account takeover
   Remediation: Apply least privilege, use roles instead
   
🔴 CRITICAL: RDS Instance "prod-db" is publicly accessible
   Impact: Database exposed to internet
   Remediation: Move to private subnet, use Security Groups

Hoch

🟠 HIGH: CloudTrail logging is disabled in eu-west-1
   Impact: No audit trail for API activity
   Remediation: Enable CloudTrail in all regions
   
🟠 HIGH: EC2 Instance "web-prod-01" allows SSH from 0.0.0.0/0
   Impact: Brute force attacks possible
   Remediation: Restrict to VPN/Bastion IPs
   
🟠 HIGH: Root account has no MFA enabled
   Impact: Single factor for highest privilege
   Remediation: Enable hardware MFA on root

Mittel

🟡 MEDIUM: EBS Volume "vol-123" is not encrypted
   Impact: Data at rest not protected
   Remediation: Enable default EBS encryption
   
🟡 MEDIUM: S3 Bucket "logs" has no versioning enabled
   Impact: Deleted files cannot be recovered
   Remediation: Enable versioning

Integration & Workflows

Alert → Ticket → Fix

CSPM Finding
     ↓
Severity Assessment
     ↓
┌────────────────────────────────────────┐
│ Critical/High → PagerDuty/Slack Alert  │
│ Medium/Low → JIRA Ticket               │
└────────────────────────────────────────┘
     ↓
Remediation (Manual oder Automatisch)
     ↓
Verification
     ↓
Closed

Auto-Remediation

# AWS Lambda: Auto-Block Public S3 Buckets
import boto3

def lambda_handler(event, context):
    s3 = boto3.client('s3')
    bucket_name = event['detail']['requestParameters']['bucketName']
    
    # Block public access
    s3.put_public_access_block(
        Bucket=bucket_name,
        PublicAccessBlockConfiguration={
            'BlockPublicAcls': True,
            'IgnorePublicAcls': True,
            'BlockPublicPolicy': True,
            'RestrictPublicBuckets': True
        }
    )
    
    # Notify
    sns = boto3.client('sns')
    sns.publish(
        TopicArn='arn:aws:sns:...:security-alerts',
        Message=f'Public access blocked on bucket: {bucket_name}'
    )

Dashboards

┌────────────────────────────────────────────────────────────────┐
│                    CSPM Dashboard                               │
├────────────────────────────────────────────────────────────────┤
│ Total Assets: 1,247        │  Compliance Score: 78%            │
│ Cloud Accounts: 12         │  Trend: ↑ 3% vs. last week        │
├────────────────────────────────────────────────────────────────┤
│ Findings by Severity                                            │
│ ████████████████████████████░░░░░░ Critical: 7                 │
│ ████████████████████████████████░░ High: 23                    │
│ ████████████████████████████████████████ Medium: 89            │
│ ████████████████████████████████████████████████ Low: 156      │
├────────────────────────────────────────────────────────────────┤
│ Top Misconfigurations                                           │
│ 1. Unencrypted storage (34 instances)                          │
│ 2. Overly permissive security groups (28)                      │
│ 3. Missing logging (21)                                        │
│ 4. Public exposure (12)                                        │
│ 5. Unused IAM credentials (45)                                 │
└────────────────────────────────────────────────────────────────┘

Compliance-Mapping

CIS AWS Benchmark (Auszug)

ControlBeschreibungSeverity
1.4Root account MFA enabledCritical
1.16IAM policies attached to groups/roles, not usersMedium
2.1CloudTrail enabled in all regionsHigh
2.3CloudTrail logs encrypted with KMSMedium
3.1VPC Flow Logs enabledMedium
4.1No security groups allow 0.0.0.0/0 to port 22High

Mapping zu Frameworks

CIS 2.1 (CloudTrail enabled)
├── SOC 2 CC6.1 (Logging and Monitoring)
├── PCI-DSS 10.1 (Audit Trails)
├── ISO 27001 A.12.4.1 (Event Logging)
└── NIST CSF DE.CM-1 (Continuous Monitoring)

Risiken & Grenzen

Alert Fatigue

CSPM: "You have 1,247 findings!"
Security Team: *collective sigh*

Lösung: Priorisierung nach:

  • Exposure (öffentlich vs. intern)
  • Sensitivity (Crown Jewels vs. Test-Umgebung)
  • Attack Path (wie ausnutzbar?)

False Positives

Finding: "Lambda function has overly permissive IAM role"
Reality: Es ist ein Deployment-Lambda, das alles können muss.

Lösung: Tagging, Exceptions, Kontext verstehen

Snapshot-Mentalität

CSPM scannt periodisch. Zwischen Scans können Änderungen passieren.

Komplexität in Multi-Cloud

AWS + Azure + GCP + 47 Accounts + 12 Subscriptions = 
  "Welcher Alert gehört wohin?"

Remediation Gap

Findings zu finden ist einfach. Sie zu fixen ist der harte Teil.


Vorteile

Continuous Compliance

Compliance ist kein jährlicher Audit mehr, sondern kontinuierlich überwacht.

Asset Visibility

"Was haben wir eigentlich in der Cloud?" – CSPM beantwortet diese Frage.

Risk Prioritization

Nicht alle Fehlkonfigurationen sind gleich. CSPM hilft, die schlimmsten zuerst zu fixen.

Audit-Ready

Reports für Auditoren auf Knopfdruck:

"Zeigen Sie mir Ihren CIS-Compliance-Status."
*Klick* "Hier, 87% compliant, hier sind die Gaps."

Drift Detection

Wenn jemand manuell eine Security Group öffnet, weiß CSPM davon.


Best Practices

1. Start with Baselines

Phase 1: CIS Level 1 (Basics)
Phase 2: CIS Level 2 (Hardening)
Phase 3: Custom Policies

2. Tagging-Strategie

# Mandatory Tags
tags = {
  Environment = "production"
  Owner       = "team-backend"
  DataClass   = "confidential"
  CostCenter  = "CC-12345"
}

3. Risk-Based Prioritization

Priorität = Severity × Exposure × Data Sensitivity

Öffentlicher S3 mit Kundendaten → P1
Internes EBS ohne Encryption → P3

4. Automation

  • Auto-Remediation für klare Fälle
  • Auto-Ticketing für komplexere Issues
  • Auto-Reporting für Stakeholder

5. Integration mit ITSM

CSPM Finding
     ↓
ServiceNow/JIRA Ticket (auto-created)
     ↓
Assigned to Owner (based on tags)
     ↓
SLA Tracking
     ↓
Verification after Fix

6. Executive Reporting

Monatlicher Security Report:
- Compliance Trend (↑↓)
- Top Risks
- Remediation Progress
- Cost of Non-Compliance

CSPM vs. CWPP vs. CNAPP

ToolFokusEbene
CSPMCloud-KonfigurationControl Plane
CWPPWorkload ProtectionData Plane
CNAPPCSPM + CWPPBeides

CNAPP (Cloud Native Application Protection Platform) ist die Konvergenz – ein Tool für alles.


Fazit

CSPM ist das Sicherheitsnetz für Cloud-Umgebungen, die zu schnell wachsen, um sie manuell zu überwachen. Es ersetzt keine gute Architektur und keine Security-Awareness, aber es fängt die Fehler auf, die trotzdem passieren.

Die Cloud ist ein wunderbarer Ort, an dem jeder alles provisionieren kann. CSPM stellt sicher, dass jemand es mitbekommt.


Weiterführende Ressourcen: