Skip to content
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

PCR0 measurements tool #302

Open
xaionaro opened this issue Jan 29, 2020 · 5 comments
Open

PCR0 measurements tool #302

xaionaro opened this issue Jan 29, 2020 · 5 comments

Comments

@xaionaro
Copy link
Member

xaionaro commented Jan 29, 2020

Hello.

I'm thinking about to try to implement two tools:

  • A tool to calculate expected PCR0 value of a binary.
  • A tool to compare measurements between two binaries (to explain which bits causes the difference).

And it seems right to me to implement it as part of this project "fiano". I suppose these tools should be implemented as:

  • github.com/linuxboot/fiano/cmds/pcr0sum
  • and github.com/linuxboot/fiano/cmds/pcr0diff

So the question is: would you agree to merge such code into "fiano" (after codereview&fixes of course)? :)

@insomniacslk
Copy link
Collaborator

CC @zaolin , don't we have something like that already?

@zaolin
Copy link
Contributor

zaolin commented Apr 6, 2020

It's already done by go-attestation attest tooling and my 9elements/tpmtool

@xaionaro
Copy link
Member Author

xaionaro commented Apr 6, 2020

@zaolin:

9elements/tpmtool is a very interesting tool, thank you for pointing this out.
Could you please give an advice how to calculate a PCR0 value of a firmware binary? Sorry if I explained myself unclear above, but we need to predict/calculate a PCR0 value which would a firmware produce if it will boot on a real system.

@zaolin
Copy link
Contributor

zaolin commented Apr 7, 2020

@xaionaro PCR0 is tricky because of technologies like Intel Boot Guard / TXT. The easiest way would be to write a FIT, Boot Guard Manifest and Key Manifest parser for the firmware image. We didn't implement it yet. If you are interested in consulting services let us know (9esec.io). Otherwise, feel free to look into the slimmbootloader repository in order to understand the Boot Guard and FIT data structures.

Keep in mind that it might be not enough. There is some effort of Matthew Garret but it's not ready yet. https://github.com/google/go-attestation/pull/108/files
I hope that helps.

@xaionaro
Copy link
Member Author

xaionaro commented Apr 8, 2020

Otherwise, feel free to look into the slimmbootloader repository in order to understand the Boot Guard and FIT data structures.

We've managed to create a proof of concept, but still thank you -- it may be useful.

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

No branches or pull requests

3 participants