{"id":18806395,"url":"https://github.com/ansiwen/pcr0btg","last_synced_at":"2026-01-08T15:30:14.782Z","repository":{"id":188971437,"uuid":"679770321","full_name":"ansiwen/pcr0btg","owner":"ansiwen","description":"Simple tool to reconstruct the PCR0 value for Boot Guard 1.0","archived":false,"fork":false,"pushed_at":"2023-08-17T16:24:14.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-29T21:25:05.606Z","etag":null,"topics":["bootguard","measured-boot","pcr0","tpm","trusted-computing"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ansiwen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-08-17T15:20:33.000Z","updated_at":"2023-09-02T19:18:46.000Z","dependencies_parsed_at":"2023-08-17T18:25:14.461Z","dependency_job_id":null,"html_url":"https://github.com/ansiwen/pcr0btg","commit_stats":null,"previous_names":["ansiwen/pcr0btg"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ansiwen%2Fpcr0btg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ansiwen%2Fpcr0btg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ansiwen%2Fpcr0btg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ansiwen%2Fpcr0btg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ansiwen","download_url":"https://codeload.github.com/ansiwen/pcr0btg/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239742416,"owners_count":19689309,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bootguard","measured-boot","pcr0","tpm","trusted-computing"],"created_at":"2024-11-07T22:48:25.368Z","updated_at":"2026-01-08T15:30:14.708Z","avatar_url":"https://github.com/ansiwen.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pcr0btg\nA simple tool to reconstruct the PCR0 value for Boot Guard 1.0\n\n## Build\n```\n$ go build\n```\n\n## Usage\n```\n$ ./pcr0btg -h\nUsage of ./pcr0btg:\n  -acm-info uint\n        Get this from SACM INFO MSR in coreboot CBnT log. (default 12884901997)\n  -acm-status uint\n        Get this from BIOSACM_ERRORCODE in coreboot CBnT log. (default 2157019139)\n  -image string\n        filename of firmware image (default \"image.bin\")\n  -pcr0 string\n        Expected PCR0 value.\n  -txt-enabled\n        Set this, if FW has TXT enabled.\n  -xzPath string\n        Path to system xz command used for lzma encoding. If unset, an internal lzma implementation is used. (default \"xz\")\n```\n\n### Example\n```\n$ ./pcr0btg -image image.bin -acm-info 0x30000006d -acm-status 0x80918003 -pcr0 CE601D8E8B04460EE7EFD48FBF9E0E8C7946C75A81CC6E7B3CEF273D3815AD78\n0000000000000000000000000000000000000000000000000000000000000003|\n0982569F98D8264FF6459AB5F7063A41FE24A67A91293498C0057866A4E84FE9 -\u003e\nCE601D8E8B04460EE7EFD48FBF9E0E8C7946C75A81CC6E7B3CEF273D3815AD78\nMatches PCR0 value! 🥳\n```\n\nThe values for `-acm-info` and `-acm-status` can be obtain from coreboot CBnT\nlog messages, for example:\n```\nCBnT: SACM INFO MSR (0x13A) raw: 0x000000030000006d \u003c--\u003e acm-info\nCBnT:   NEM status:              1\nCBnT:   TPM type:                TPM 2.0\nCBnT:   TPM success:             1\nCBnT:   FACB:                    0\nCBnT:   measured boot:           1\nCBnT:   verified boot:           1\nCBnT:   revoked:                 0\nCBnT:   BtG capable:             1\nCBnT:   TXT capable:             0\nCBnT: BOOTSTATUS (0xA0) raw: 0x8000000000000000\nCBnT:   Bios trusted:            0\nCBnT:   TXT disabled by policy:  0\nCBnT:   Bootguard startup error: 0\nCBnT:   TXT ucode or ACM error:  0\nCBnT:   TXT measurement type 7:  1\nCBnT: ERRORCODE (0x30) raw: 0x00000000\nCBnT: BIOSACM_ERRORCODE (0x328) raw: 0x80818003  \u003c--\u003e acm-status\nCBnT: BIOSACM_ERRORCODE: TXT ucode or ACM error\nCBnT:   AC Module Type:          Boot Guard Error\nCBnT:   class:                   0x0\nCBnT:   major:                   0x0\nCBnT:   External:                0x0\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fansiwen%2Fpcr0btg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fansiwen%2Fpcr0btg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fansiwen%2Fpcr0btg/lists"}