Giter Site home page Giter Site logo

rminnich / tpmtool Goto Github PK

View Code? Open in Web Editor NEW

This project forked from 9elements/tpmtool

1.0 1.0 0.0 847 KB

A Linux only tool for TPM interaction

Home Page: https://www.tpmtool.org

License: BSD 3-Clause "New" or "Revised" License

Go 99.38% Shell 0.62%

tpmtool's Introduction

tpmtool is a tool for TPM interaction and disk encryption. It is written in pure Go.

Basic Features

  • Supports TPM 1.2 and 2.0 with Go TSS.
  • Higher TPM abstraction layer (TSPI) is implemented.
  • Written in pure Go.
  • TPM states are derived by Linux sysfs.
  • Automatic TSS selection based on TPM version.
  • TPM1 & TPM2 event log parser
  • Currently only TSPI for TPM specification 1.2 is available.

Core Features

  • Shows the TPM status.
TPM Manufacturer:          STMicroelectronics
TPM spec:                  1.2
TPM owned:                 true
TPM activated:             true
TPM enabled:               true
TPM temporary deactivated: false
  • Dumps Endorsement Key into a file and shows the fingerprint.
  • Takes ownership of the TPM.
  • Clears ownership of the TPM.
  • Resets TPM lock in case of active bruteforce detection.
  • Sealing/Unsealing credentials with custom/current set of PCRs.
  • Resealing of credentials using a sealing configuration for PCR pre-calculation
  • List and read PCRs
  • Measures a file into given PCR index.
  • Dump TPM eventlog from OS or custom eventlog binary file input.
  • Cryptsetup:
    • Format device and seal credential.
    • Open device by sealed credential.
    • Close device.
    • Measure device luks header into a given PCR.

Package Availability

Packaging status

Dependencies

  • cryptsetup binary is required for the disk commands.

PCR pre-calculation

PCR pre-calculation is an important feature to reseal credential in case of PCR changes e.g. kernel/firmware update.

Usage:

tpmtool crypt reseal sealing.yml sealed-key.file

Example sealing configuration:

---
pcr0:
  - method: measure
    filepaths:
      - /boot/kernel
      - /boot/initramfs
  - method: extend
    hashes:
      - 8dad1c80be028384f26b929b7e7e251fbe3c1d5
pcr1:
  - method: dynamic
pcr2:
  - method: static
    hash: c3018af653e2f1a16118dd8bab2f409fbc82aa9f
pcr3:
  - method: log
    firmware: UEFI

Calculation methods

Every PCR can contain different calculation methods. The static and dynamic method are standalone and can't be used with other methods.

Static

Overwrites and sets the PCR hash you define.

method: static

hash: 8dad1c80be028384f26b929b7e7e251fbe3c1d5 (string type)

Dynamic

Gets the current PCR of the TPM. Overwrites and sets the hash.

method: dynamic

Extend

Extends a hash into the current PCR.

method: extend

hashes: [ 8dad1c80be028384f26b929b7e7e251fbe3c1d5, c3018af653e2f1a16118dd8bab2f409fbc82aa9f ] (array type)

FimwareLog

Uses the existing firmware log for PCR pre-calculation.

method: log

firmware: BIOS (enum type){UEFI, BIOS}

Measure

Measures a file into the current PCR.

method: measure

filepaths: [ /foo/bash, /test/foo ] (array type)

Luks

Measures a LUKS header of a device into the current PCR.

method: luks

devicepath: /dev/sda (string type)

tpmtool's People

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.