Skip to content

NAT-01: IMDS blocked from enclave NAT egress

Property Value
Severity medium
Platform AWS Nitro Enclaves
Lifecycle stage runtime
Mode Active: runs fixed read-only commands on the host. Skipped with --read-only.

What a failure enables

  • Any bucket / key in the account

What it checks

It passes when:

  • Found … iptables rule(s) blocking IMDS from enclave traffic.

Example failures:

  • No iptables FORWARD rule found blocking …. The enclave can reach the host's IAM credentials via IMDS.
  • No iptables FORWARD rule found blocking 169.254.169.254. The enclave can reach the host's IAM credentials via IMDS.

How to fix

  • Add: iptables -I FORWARD -d … -i tun0 -j DROP This prevents the enclave from accessing the instance metadata service through the host's NAT bridge.
  • Add: iptables -I FORWARD -d 169.254.169.254 -i tun0 -j DROP

After the fix, scan again: the check should report PASS.

When it is not assessed

SKIP:

  • No instance ID specified; skipping check.

ERROR:

  • SSM command did not complete within timeout.
  • Could not send SSM command: …

Scan inputs

The untrust scan options this check reads:

Option Description
--instance-id EC2 instance ID running the Nitro Enclave.
--region AWS region.

Permissions

The cloud API calls this check makes, read from the scanner's source:

Cloud API call Permission Access
AWS ssm.get_command_invocation ssm:GetCommandInvocation read
AWS ssm.send_command ssm:SendCommand run command

Every AWS scan also calls sts:GetCallerIdentity. See Required permissions for a complete policy.

Evidence recorded

Keys in the finding's evidence: imds_filter_rules

Generated from untrust 1.3.0 (commit 7ef462d9a0c3).