-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use encrypted sessions #132
Comments
A practical example of why encrypted sessions might be useful: https://dolosgroup.io/blog/2021/7/9/from-stolen-laptop-to-inside-the-company-network
Matthew Garrett has a short twitter thread on some lessons from this writeup: https://twitter.com/mjg59/status/1420480165113581568 I'm trying to make sense of how the key for the encrypted sessions is derived; it seems like it has to be pre-shared for the HMAC secret, which creates both a chicken-and-egg situation as well as a second problem of where to store the HMAC secret on the x86 that the attacker wouldn't be able to access. The ESAPI specification is as unclear as expected for a TCG document... |
Note that to avoid MITM attacks you really need to have the UEFI BIOS a) learn the public key for some primary for the TPM, b) use encrypted sessions and use (a) needs to be done before the OEM ships the box, preferably, or if by the customer, then in a controlled environment. |
Encryption sessions would defeat some of the attacks that a system with a discrete TPM can be susceptible to. From the Safeboot docs:
With encrypted sessions the only question is: do you know the dTPM's EKpub a priori? If so, then there is no impersonation attack, no spoofing PCRs, nothing. An encryption session allows the first TPM2B request or response parameters to be encrypted, and the full request and response hashes to be authenticated. And if one does not know the dTPM's EKpub a priori, then the next question is: can one "learn" it? If one cannot learn the EKpub then in the end there is an impersonation attack, but the interposed TPM has to stay around for every attestation or else the machine's local storage must be stolen immediately in order to gain anything.
I believe this is enabled by using the
--key-context
option oftpm2 startauthsession
, but I'm not sure how one then uses an encryption session with othertpm2-tools
commands. Issue #40 suggests using the tss tools from (I think) tpm2-tools, which apparently always use encryption sessions.The text was updated successfully, but these errors were encountered: