Skip to content

A Few Notes on AWS Nitro Enclaves–KMS Integration - #336

Open
carlospolop wants to merge 1 commit into
masterfrom
update_A_Few_Notes_on_AWS_Nitro_Enclaves_KMS_Integratio_64ec532a6e5848ab
Open

A Few Notes on AWS Nitro Enclaves–KMS Integration#336
carlospolop wants to merge 1 commit into
masterfrom
update_A_Few_Notes_on_AWS_Nitro_Enclaves_KMS_Integratio_64ec532a6e5848ab

Conversation

@carlospolop

Copy link
Copy Markdown
Collaborator

🤖 Automated Content Update

This PR was automatically generated by the HackTricks News Bot based on a technical blog post.

📝 Source Information

🎯 Content Summary

Overview

The post analyzes the security boundary between AWS Nitro Enclaves and AWS Key Management Service (KMS). KMS can validate Nitro attestation documents, restrict customer-managed key usage according to enclave Platform Configuration Register (PCR) measurements, and encrypt sensitive responses to a public key generated by the requesting enclave. However, these mechanisms do not automatically protect the application protocol around KMS. Because encrypted keys, ciphertexts, identi...

🔧 Technical Details

Wrapped-key substitution: When multiple data keys or shared secrets are wrapped by the same CMK and stored outside a trusted execution environment, an attacker can replace the expected wrapped value with another valid KMS ciphertext. Successful KMS decryption establishes cryptographic validity under the CMK but not application-level identity. Bind wrapped material to trusted object, tenant, purpose, protocol, and version fields using KMS encryption context.


Ciphertext-and-context pair swapping: Encryption context does not prevent substitution if the attacker controls both the wrapped ciphertext and every context field. The attacker can replace them as a matching pair. At least one security-critical context component must be generated or validated from trusted enclave state, and permissions for Encrypt and GenerateDataKey must prevent attackers from manufacturing arbitrary valid ciphertext/context pairs.


<...

🤖 Agent Actions

Done.

Updated:

  • src/pentesting-cloud/aws-security/aws-post-exploitation/aws-kms-post-exploitation/README.md

Added:

  • A new “Nitro Enclaves–KMS integration attacks” subsection
  • Technical coverage for:
    • missing Recipient / weak PCR enforcement
    • wrapped-key and shared-secret substitution
    • ciphertext+context pair swapping
    • local ciphertext relocation with AEAD AAD
    • CMK/alias/account/Region confusion
    • replay/rollback and metadata confusion
  • Inline citations and a numbered ## References section
  • An internal cross-reference to aws-nitro-enum.md

Verified:

  • Internal Nitro link path exists
  • Single references section present

Note:

  • mdbook build could not be run because mdbook is not installed in this environment.

This PR was automatically created by the HackTricks Feed Bot. Please review the changes carefully before merging.

📚 Repository Maintenance

  • MD files processed: 590
  • MD files fixed: 1

All .md files have been checked for proper formatting (headers, includes, etc.).

@carlospolop

Copy link
Copy Markdown
Collaborator Author

🔗 Additional Context

Original Blog Post: https://blog.trailofbits.com/2026/08/05/a-few-notes-on-aws-nitro-enclaves-kms-integration

Content Categories: Based on the analysis, this content was categorized under "Pentesting Cloud > AWS Pentesting > AWS - Post Exploitation > AWS - KMS Post Exploitation, as a Nitro Enclaves–KMS Integration Attacks subsection; cross-reference AWS - Services > AWS - EC2, EBS, ELB, SSM, VPC & VPN Enum > AWS - Nitro Enum".

Repository Maintenance:

  • MD Files Formatting: 590 files processed (1 files fixed)

Review Notes:

  • This content was automatically processed and may require human review for accuracy
  • Check that the placement within the repository structure is appropriate
  • Verify that all technical details are correct and up-to-date
  • All .md files have been checked for proper formatting (headers, includes, etc.)

Bot Version: HackTricks News Bot v1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant