9
2
Fork
You've already forked platform
2

caution verify fetches attestation using unencrypted http #293

Closed
opened 2026年06月15日 07:40:15 +02:00 by modalala · 1 comment

during caution verify, unencrypted http is used on port 80 to connect, just after Requesting attestation... is printed.
To see this:

  1. be logged into caution

  2. checkout my http_demo branch which includes logging (and includes a cargo update)

  3. run cargo clean && ./http_demo.sh

Though the nonce should protect against replay attacks, IIUC, an attacker could intercept the HTTP response and replace an attestation report with a modified or forged report, or, minimally, eavesdrop during verification.

Besides eavesdropping and DoS (dropping packets for attestation if in-line on the network path) I think this could lead to undesirable states like: a user can verify the deployed software is running somewhere, but not necessarily on the machine they are intending to connect with. That is, a user could unknowingly accept a report from an attacker's machine.

This is the line in the code I believe is hard-coding http, via this line that sets attestation_url, and later seeing the print from this line makes me believe self.verbose must be false (no error) and the received attestation must have been decoded.

I am not certain it is entirely relevant to this issue, but this IETF informational RFC document section 5.2 deals with "Prevention of Spoofing and Person-in-the-Middle Attacks" for attestation schemes.

during `caution verify`, unencrypted `http` is used on port 80 to connect, just after `Requesting attestation...` is printed. To see this: 1. be logged into `caution` 2. checkout [my http_demo branch](https://codeberg.org/modalala/platform/src/branch/http_demo) which includes logging (and includes a `cargo update`) 3. run `cargo clean && ./http_demo.sh` Though the nonce should protect against replay attacks, IIUC, an attacker could intercept the HTTP response and replace an attestation report with a modified or forged report, or, minimally, eavesdrop during verification. Besides eavesdropping and DoS (dropping packets for attestation if in-line on the network path) I think this could lead to undesirable states like: a user can verify the deployed software is running somewhere, but not necessarily on the machine they are intending to connect with. That is, a user could unknowingly accept a report from an attacker's machine. This is [the line in the code](https://codeberg.org/caution/platform/src/commit/40ecf936d28fabf20f95eab728f1dec1a1ffc540/src/cli/src/lib.rs#L4112) I believe is hard-coding `http`, via [this line](https://codeberg.org/caution/platform/src/commit/40ecf936d28fabf20f95eab728f1dec1a1ffc540/src/cli/src/lib.rs#L4688) that sets `attestation_url`, and later seeing the print from [this line](https://codeberg.org/caution/platform/src/commit/40ecf936d28fabf20f95eab728f1dec1a1ffc540/src/cli/src/lib.rs#L4743) makes me believe `self.verbose` must be false (no error) and the received attestation must have been decoded. I am not certain it is entirely relevant to this issue, but [this IETF informational RFC document](https://datatracker.ietf.org/doc/rfc9683/) section 5.2 deals with "Prevention of Spoofing and Person-in-the-Middle Attacks" for attestation schemes.

There's a couple of trust models in play here:

  1. You want to verify that the enclave you're connecting to is running the code they claim (caution verify).
  2. You want to verify that the enclave you're connecting to is running the code you expect (caution verify --from-local).

Using HTTP could cause an issue with the first model, where someone intercepts the transmission and reroutes it to a different enclave. This means, under constraint 1, the only thing you are verifying is that you are connecting to "an enclave".

However, with model 2, you don't trust the external enclave when building your local enclave. If someone were able to reroute the nonce to a separate enclave running a different bit of code, you would get a PCR mismatch.

We do not consider HTTPS to be a significant security improvement, as if you could control traffic from the client to the enclave, you could also control traffic from the CA to the enclave, and get a TLS certificate from there. Furthermore, most TLS systems require a domain name, which is not a requirement we want to make of all enclaves.

There's a couple of trust models in play here: 1. You want to verify that the enclave you're connecting to is running the code *they claim* (`caution verify`). 2. You want to verify that the enclave you're connecting to is running the code *you expect* (`caution verify --from-local`). Using HTTP could cause an issue with the first model, where someone intercepts the transmission and reroutes it to a different enclave. This means, under constraint 1, the only thing you are verifying is that you are connecting to "an enclave". However, with model 2, you don't trust the external enclave when building your local enclave. If someone were able to reroute the nonce to a separate enclave running a different bit of code, you would get a PCR mismatch. We do not consider HTTPS to be a significant security improvement, as if you could control traffic from the client to the enclave, you could also control traffic from the CA to the enclave, and get a TLS certificate from there. Furthermore, most TLS systems require a domain name, which is not a requirement we want to make of all enclaves.
Sign in to join this conversation.
No Branch/Tag specified
main
feat/issue-377-minimal-sentry
fix/issue-191-attestation-endpoint-copy
anton/feat/multi-user
feat/legal-publish-doc
fix/issue-119-logout-confirmation
fix/paddle-customdata-credit-mint
fix/issue-116-duplicate-ssh-key
fix/issue-265-http-port-private
fix/issue-330-remove-build-binary
feat/paddle-byoc-subscriptions
fix/issue-307-remove-apps
feat/issue-164-account-id
feat/add-tofu-lockfile-cache
feat/webauthn-discoverable-login
docs/issue-339-install-instructions
fix/issue-336-split-qr-login-tokens
fix/verify-app-source-preflight
fix/many-git-push-deploy
fix/issue-334-email-verification-throttle
fix/issue-273-billing-url
fix/issue-333-final-usage-collection
fix/issue-270-low-credit-email
fix/issue-301-remove-auto-topup
fix/issue-320-byoc-auth-first
fix/issue-348-git-progress-checklist
fix/issue-321-byoc-caution-hcl
fix/issue-332-resource-id-suspension
fix/eif-app-mode-normalization
feat/cli-stagex-container
fix/eif-s3-layer-cache
fix/authz-role-checks
fix/cli-hangs-unsupported-ssh-url
feat/print-platform-commit-dashboard
fix/config-domain-validation
anton/support-ssh-destroy-get
fix/cli-config-dir
feat/publish-build-inputs
feat/locksmith-polishing
fix/procfile-run-command-no-split
anton/byoc-require-login
fix/hcl-init-template
feat/egress-default-deny
ryansquared/hcl
quotas
anton/feat/region-routing-resource-unavailable-alert
fix/attestation-502-dashboard
ryansquared/systemdize
fix/verify-git-credential-hang
anton/fix-low-credits-alert
xenushka/rename-byoc
ryansquared/add-download-eif
add-debug-flag
test/pr1-integration-harness
anton/fix/only-pass-required-env-vars
ryansquared/add-database-bucket
No results found.
Labels
Clear labels
Compat/Breaking
Breaking change that won't be backward compatible
Component/Enclave-Builder
This issue affects Enclave Builder (git-push and CLI)
Component/Infrastructure
This issue affects generic Caution hosted infra components
Deploy/BYOC
Relates to Caution Bring-your-own-compute
Deploy/Full-managed
Relates to Caution fully managed cloud
Deploy/Self-hosted
Relates to Caution deployed on self-hosted infra
Interface/API
This issue affects the API
Interface/CLI
This issue affects the command line interface
Interface/Git
This issue affects the Git `push` interface
Interface/Web
This issue affects the web dashboard
Kind/Bug
Something is not working
Kind/Documentation
Documentation changes
Kind/Enhancement
Improve existing functionality
Kind/Feature
New functionality
Kind/Security
This is security issue
Kind/Testing
Issue or pull request related to testing
Priority
Critical
The priority is critical
Priority
High
The priority is high
Priority
Low
The priority is low
Priority
Medium
The priority is medium
Reviewed
Confirmed
Issue has been confirmed
Reviewed
Duplicate
This issue or pull request already exists
Reviewed
Invalid
Invalid issue
Reviewed
Won't Fix
This issue won't be fixed
Status
Abandoned
Somebody has started to work on this but abandoned work
Status
Blocked
Something is blocking this issue or pull request
Status
Need More Info
Feedback is required to reproduce issue or to continue work
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
caution/platform#293
Reference in a new issue
caution/platform
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?