Check provider logo

No Nitro Enclave debug-mode attestation observed against this KMS key

kms_key_enclave_debug_attestation_detected

Severityhigh
Servicekms
by Prowler

Detects Nitro Enclaves launched with --debug-mode via CloudTrail KMS-from-enclave events. Debug enclaves produce attestations with zeroed image/kernel/application PCRs (PCR0/1/2); the check flags every KMS key that received such a call. Configurable via enclave_debug_lookback_window_hours (default 2160h / 90d) and enclave_debug_max_events (5000).

Risk

Debug mode zeros the image, kernel and application PCRs (PCR0/1/2) in the attestation document, so PCR-bound key policies release material to enclaves whose measurement cannot be trusted. A debug enclave calling this KMS key is functionally equivalent to no enclave at all.

Run this check with Prowler CLI

prowler aws --checks kms_key_enclave_debug_attestation_detected

Recommendation

Never run production Nitro Enclaves with --debug-mode. Enforce non-debug launch flags in the enclave orchestration pipeline and pair with strict PCR bindings on KMS policies so debug enclaves are rejected at the key-policy layer.

Remediation

CLI

nitro-cli run-enclave --cpu-count <n> --memory <mib> --eif-path <path>

Other
  1. Identify the enclave that produced the zeroed-PCR attestation from the CloudTrail event's attestationDocumentModuleId (embeds the parent instance-id).
  2. On the flagged host, terminate the debug enclave and relaunch without --debug-mode.
  3. Audit the enclave orchestration pipeline for hardcoded --debug-mode that leaked into production.
  4. Tighten the KMS key policy to bind non-zero PCR values so future debug enclaves fail closed at the key-policy layer.

Source Code

Resource Type

AwsKmsKey

References

Related To

  • kms_key_enclave_attestation_not_enforced
  • kms_key_enclave_attestation_no_deployment_binding