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에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
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이란 무엇인가요?
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
인기도
- GitHub 스타
- 35k
- 순위
- #8407
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 8. 31.
댓글
- …
이 저장소의 다른 스킬
abusing-dpapi-for-credential-access
35kAI 에이전트에게 특정 작업을 위한 준비된 지침을 제공해, 더 잘하고 더 빠르게 처리하도록 합니다.
abusing-shadow-credentials-for-privesc
35kAI 에이전트가 명확하고 잘 구성된 텍스트를 쓰도록 가르칩니다.
achieving-cmmc-level-2-compliance
35kCMMC Level 2 규정 준수를 위한 환경을 준비하도록 돕습니다. 보안 요구 사항을 구현하고 필요한 문서를 관리합니다.
acquiring-disk-image-with-dd-and-dcfldd
35k에이전트가 하드 드라이브의 정확한 복사본을 만들도록 돕습니다. 조사 중 정보가 손실되거나 변경되지 않도록 하는 데 유용합니다.
비슷한 스킬
test-driven-development
311k에이전트가 기능이나 수정을 만들기 전에 실패하는 테스트를 먼저 쓰고, 그것을 통과시키는 가장 작은 코드를 작성하도록 가르칩니다.
verification-before-completion
311k에이전트가 작업, 수정, 빌드가 완료되었거나 통과했다고 말하기 전에 실제 점검을 실행하고 결과를 읽도록 가르칩니다.
migrate-to-shoehorn
310k테스트 파일의 위험한 타입 캐스팅을 shoehorn 라이브러리로 바꿔, 테스트가 일부 데이터만 써도 타입 검사를 통과하도록 돕습니다.