跳到正文
Skillpedia
测试35k · #8407

validating-tpm-measured-boot-attestation

它能做什么

这个工具用来检查你的计算机是否通过一种名为 TPM 的专用芯片安全地启动。它能确保操作系统和其他关键程序在计算机启动之前就没有被黑客篡改。

适用场景

  • ✓当把一台新计算机接入安全网络时。
  • ✓当需要确认计算机在启动过程中是否被篡改时。
  • ✓当需要保护密码等重要机密,确保只有系统正常启动后才能访问它们时。

技能链接

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/validating-tpm-measured-boot-attestation/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/validating-tpm-measured-boot-attestation/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请验证我的计算机是否安全启动,并确认操作系统没有被修改。”

每周 5 个新技能,1 分钟读完。

工作原理

TPM 会记录计算机启动过程中的每一个步骤。这个工具会将这些记录与正常情况下应有的结果进行比对,从而发现任何可疑的变化。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Validating TPM Measured Boot and Attestation

Legal Notice: Perform TPM operations only on systems you own or are authorized to assess. Some operations (clearing the TPM, taking ownership, defining NV indices) are destructive or can lock the device. This skill is for defensive integrity verification and authorized assessment.

Overview

A Trusted Platform Module (TPM 2.0) is a hardware root of trust that supports measured boot: each stage of the boot chain hashes ("measures") the next stage and extends that measurement into a Platform Configuration Register (PCR) before handing off control. PCRs cannot be set arbitrarily — they can only be extended (new = hash(old || measurement)), so the final PCR value is a tamper-evident summary of everything that executed. The TCG firmware profile assigns specific meanings: UEFI firmware code/config measure into PCR 0–7 (PCR 7 specifically captures Secure Boot policy), bootloaders measure the kernel into PCR 8–9, and Linux IMA measures executables into PCR 10.

Two complementary verifications matter. Local validation reads current PCRs (tpm2_pcrread) and replays the TPM event log (tpm2_eventlog on /sys/kernel/security/tpm0/binary_bios_measurements) to confirm the recorded measurements reproduce the live PCR values — proving the log is authentic and revealing exactly what changed if a value drifts from baseline. Remote attestation has the TPM produce a signed quote (tpm2_quote) over selected PCRs using an Attestation Key (AK), with a fresh nonce to prevent replay; a verifier then independently checks the signature and PCR digest (tpm2_checkquote) and compares against a golden/expected value. This lets a server cryptographically establish that a remote machine booted approved firmware and kernel before granting access, sealing secrets, or admitting it to a Zero Trust network.

This skill provides the full tpm2-tools workflow for enrolling an AK, capturing and verifying quotes, replaying event logs, sealing/unsealing data to a PCR policy, and building a golden-value baseline for fleet attestation.

When to Use

  • Establishing that endpoints/servers booted a known-good firmware and kernel before granting access (Zero Trust device posture).
  • Detecting boot-chain tampering (bootkits, unauthorized firmware/kernel changes) via PCR drift from a baseline.
  • Verifying measured-boot integrity after a Secure Boot or firmware incident.
  • Sealing secrets (disk keys, credentials) to a measured-boot state so they only release on a trusted boot.
  • Building or auditing a remote-attestation service (e.g., Keylime, custom verifier).

Prerequisites

  • A system with a TPM 2.0 device and the resource manager:
    sudo apt install tpm2-tools tpm2-abrmd        # Debian/Ubuntu
    sudo dnf install tpm2-tools tpm2-abrmd        # Fedora/RHEL
    
  • Access to the TPM (/dev/tpm0 / /dev/tpmrm0) and the kernel measurement log at /sys/kernel/security/tpm0/binary_bios_measurements.
  • Root for reading some sysfs entries and for NV/AK operations.
  • For remote attestation: a verifier host and a transport for the quote/nonce exchange.

Objectives

  • Read and interpret PCR banks and their TCG-assigned meanings.
  • Verify the TPM event log reproduces live PCR values (event-log replay).
  • Create an Attestation Key and produce a nonce-bound signed quote.
  • Independently verify the quote signature and PCR digest on a verifier.
  • Establish golden PCR baselines and detect drift across a fleet.
  • Optionally seal/unseal a secret to a measured-boot PCR policy.

MITRE ATT&CK Mapping

Technique ID Technique Name Relevance
T1542 Pre-OS Boot Measured boot detects pre-OS tampering this technique relies on.
T1542.001 Pre-OS Boot: System Firmware PCR 0–7 drift reveals unauthorized firmware modification.
T1542.003 Pre-OS Boot: Bootkit Bootloader/kernel measurements (PCR 8–10) expose bootkit changes.
T1014 Rootkit IMA measurements (PCR 10) and quote verification surface concealed tampering.
T1601.001 Modify System Image: Patch System Image Attestation against golden values flags unauthorized image patches.

Workflow

1. Confirm the TPM is present and read its properties

tpm2_getcap properties-fixed | grep -i manufacturer
tpm2_getcap pcrs                 # list supported PCR banks (sha1, sha256, ...)

2. Read current PCR values

…

常见问题

什么是 TPM?

TPM 全称为 Trusted Platform Module(可信平台模块),是计算机中的一种安全芯片,用来保护敏感信息并确保系统完整性。

什么是“度量启动”(measured boot)?

这是指 TPM 记录计算机启动各个阶段信息的过程。由此形成的记录可以用来检查,确认没有任何内容被改动。

什么是 PCR?

PCR(平台配置寄存器)可以理解为 TPM 内部的小型存储单元,用来保存各启动阶段的记录。它们只能以特定方式更新,以确保记录可信。

详情

作者的原始描述

Verifies TPM 2.0 measured-boot integrity and remote attestation with tpm2-tools -- reading PCRs (tpm2_pcrread), replaying the boot event log, generating and checking signed quotes (tpm2_quote/tpm2_checkquote), and sealing secrets to a PCR policy. Use to confirm a system booted trusted firmware/kernel for Zero Trust device posture, detect boot-chain tampering via PCR drift, or build a golden-value

repo: mukul975/Anthropic-Cybersecurity-Skills

热度

GitHub 星标
35k
排名
#8407
许可证
Apache-2.0
更新时间
2026/8/31

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能