Read-only Raspberry Pi firmware and platform security auditor with SPI EEPROM acquisition, Secure Boot chain validation, OTP evidence, boot integrity baselines, policy gates, and portable .ggcap evidence packages.
Current release: 0.7.0-beta
Developed by GG Advanced IT Security UG — ggsec.de
GGFWPi is a Python-based security auditing tool for Raspberry Pi platforms. It combines firmware, boot-chain, operating-system, credential, network, and evidence-quality checks in one report.
The tool is designed for technical security assessments, platform hardening, firmware research, appliance validation, and repeatable evidence collection. It distinguishes between:
This distinction is also reflected in process exit codes, remediation counts, gate accounting, and summary accounting invariants.
flashrom and linux_spi.config.txt and related boot files.boot.img and boot.sig SHA-256 and RSA PKCS#1 v1.5 verification.target-soc validation.pubkey.bin parsing and consistency checks.bootconf.txt and bootconf.sig validation.bootsys counter-signature validation.rpiboot -j provisioning metadata.VALID, INVALID, and UNVERIFIED states.GGFWPi validates the customer-controlled portion of the Secure Boot chain. Raspberry Pi vendor-root signatures are enforced by BootROM but are not independently replay-verified by GGFWPi.
rpiboot -j..ggcap evidence package.The current release has been hardware-tested on:
/dev/spidev10.0.The code contains platform-aware logic for other Raspberry Pi SoCs, with the most complete Secure Boot evidence paths currently implemented for BCM2711 and BCM2712.
GGFWPi uses only the Python standard library for its core operation. RSA verification
prefers the optional cryptography backend when installed and otherwise uses the
embedded fail-closed verifier. Password verification can use one of the following
backends:
passlib — preferred;crypt, where available;libcrypt through ctypes.External tools used when available:
vcgencmd
rpi-eeprom-config
rpi-eeprom-update
rpi-eeprom-ab
flashrom
Root privileges are required for complete host inspection, /etc/shadow access, and SPI EEPROM acquisition.
Check the available CLI and dependencies:
python3 -m ggfw --help
# Compatibility entrypoint retained for existing automation:
python3 GGFWPi_v0.7.0-beta.py --help
Clone the repository:
git clone https://github.com/patapik/ggfwpi.git
cd ggfwpi
Install the package with both optional security backends:
python3 -m pip install '.[full]'
For a dependency-free checkout, python3 -m ggfw and the compatibility launcher
continue to work with the standard-library fallback implementations.
Optional password-verification backend on Debian-based systems:
sudo apt update
sudo apt install python3-passlib
Install the Raspberry Pi EEPROM tools and flashrom through the packages appropriate for the target distribution. Verify their locations with:
command -v vcgencmd
command -v rpi-eeprom-config
command -v rpi-eeprom-update
command -v rpi-eeprom-ab
command -v flashrom
This mode does not inspect the host or access SPI:
python3 GGFWPi_v0.7.0-beta.py --crypto-self-test
# Equivalent package entrypoint:
python3 -m ggfw --crypto-self-test
Expected result:
[*] Crypto self-test result: PASS
[*] Process exit code: 0
sudo python3 GGFWPi_v0.7.0-beta.py \
--policy-profile default \
--show-passed
sudo mkdir -p /var/lib/ggfw
sudo python3 GGFWPi_v0.7.0-beta.py \
--create-baseline /var/lib/ggfw/boot-baseline.json \
--policy-profile default
Review and protect the baseline after creation. A baseline is a device-specific reference measurement, not an official vendor allowlist.
sudo python3 GGFWPi_v0.7.0-beta.py \
--baseline /var/lib/ggfw/boot-baseline.json \
--policy-profile hardened \
--show-passed \
--fail-on HIGH
sudo python3 GGFWPi_v0.7.0-beta.py \
--baseline /var/lib/ggfw/boot-baseline.json \
--policy-profile secure-boot-required \
--show-otp \
--secure-boot-evidence \
--fail-on HIGH
For provisioned systems, provide external provisioning evidence and the expected customer public key:
sudo python3 GGFWPi_v0.7.0-beta.py \
--baseline /var/lib/ggfw/boot-baseline.json \
--policy-profile secure-boot-required \
--otp-metadata /path/to/rpiboot-json-or-directory \
--secure-boot-public-key /path/to/customer-public.pem \
--max-boot-signature-age-days 365 \
--show-otp \
--secure-boot-evidence \
--fail-on HIGH
Explicit external input paths are validated before acquisition begins. Missing, unreadable, ambiguous, or malformed input causes a controlled tool error.
| Profile | Intended use |
|---|---|
default | General platform assessment without requiring Secure Boot. |
hardened | Stricter runtime and platform posture; incomplete Secure Boot evidence is surfaced for review. |
secure-boot-required | Requires the customer Secure Boot controls and cryptographic evidence expected by the policy. |
resilient-appliance | Treats EEPROM A/B update capability and resilience controls as required where applicable. |
Example CI gate:
sudo python3 GGFWPi_v0.7.0-beta.py \
--policy-profile hardened \
--fail-on HIGH
Severity-based gates evaluate leaf security and policy findings. By default:
Include leaf coverage gaps in a severity gate:
--fail-on HIGH --fail-on-coverage
Run a dedicated evidence-completeness gate:
--fail-on COVERAGE_GAP
Explicitly exclude finding attributes from gate evaluation:
--gate-exclude COVERAGE_GAP
--gate-exclude AGGREGATE
Exclusions affect process gating only. Findings remain visible in reports and evidence packages.
| Code | Meaning |
|---|---|
0 | Audit completed and the selected policy gate was not triggered. |
1 | Tool, argument, acquisition, baseline, packaging, or accounting failure. |
2 | Audit completed and the selected --fail-on policy gate was triggered. |
A security finding is not a tool failure. Exit code 2 indicates that the audit completed successfully and found conditions matching the configured gate.
By default, GGFWPi creates:
ggfw-evidence/
├── ggfw-<timestamp>-<soc>/
│ ├── report.json
│ └── evidence/
└── ggfw-<timestamp>-<soc>.ggcap
The .ggcap file is a ZIP-based evidence container containing the report, manifest, collected artifacts, hashes, Secure Boot evidence, and supporting metadata.
Specify a package path:
--output /path/to/audit.ggcap
Write an additional standalone JSON report:
--json-output /path/to/report.json
Skip SPI acquisition when it is not available or not required:
--skip-spi
Run only OTP and Secure Boot evidence collection:
sudo python3 GGFWPi_v0.7.0-beta.py \
--otp-only \
--show-otp \
--secure-boot-evidence
Extend the built-in weak/default password audit with a local UTF-8 wordlist:
sudo python3 -m ggfw --weak-password-file /secure/path/weak-passwords.txt
The file is bounded and read before the scan starts. Its contents and matched passwords are never written to reports; only candidate counts and the file's SHA-256 digest are recorded.
GGFWPi does not write, erase, or modify SPI flash and does not enable or disable write protection. SPI interaction is limited to:
Remediation instructions may describe external provisioning or recovery procedures, but the auditor itself remains read-only.
Most evidence collected from a running system is classified as in-band and normally receives MEDIUM trust because the examined operating system or firmware interface mediates the observation.
Higher-trust evidence can include:
GGFWPi reports evidence limitations separately from confirmed security failures. Missing evidence is not automatically treated as a broken cryptographic signature.
Use the version-aware test runner:
python3 test_GGFWPi_latest.py
The first line identifies the selected module:
[*] GGFW regression target: GGFWPi_v0.7.0-beta.py
The suite covers:
.ggcap packaging;Run the release-pinned suite:
python3 test_GGFWPi_v0.7.0.py
rpiboot -j metadata where conclusive provisioning evidence is required.PASS for the embedded cryptographic self-test proves the known-answer implementation paths, not the provisioning state of the inspected device..
├── GGFWPi_v0.7.0-beta.py # compatibility launcher
├── pyproject.toml
├── ggfw/
│ ├── models/ # findings, evidence, reports
│ ├── parsers/ # config, cmdline, EEPROM image
│ ├── boot/ # resolution and integrity
│ ├── hardware/ # platform, interrogation, OTP
│ ├── crypto/ # RSA, signatures, validation, KAT
│ ├── engines/ # host and hardware policies
│ ├── spi/ # read-only EEPROM acquisition
│ ├── reporting/ # console and policy gates
│ └── packaging/ # .ggcap evidence package
├── test_GGFWPi_latest.py
├── test_GGFWPi_v0.7.0.py
├── README.md
├── LICENSE
├── NOTICE
├── AUTHORS.md
├── SECURITY.md
├── CHANGELOG.md
└── .gitignore
Do not publish suspected vulnerabilities in public GitHub issues. Follow the process in SECURITY.md.
GGFWPi is currently a beta security engineering and evidence-collection tool. Reports should be reviewed by a qualified analyst, particularly before destructive remediation, OTP provisioning, or irreversible Secure Boot configuration changes.
GGFWPi was developed by Maciej Gojny for GGSEC — GG Advanced IT Security UG.
Project website: https://ggsec.de
The original attribution is recorded in NOTICE and additional project information is available in AUTHORS.md.
GGFWPi is licensed under the Apache License, Version 2.0. Everyone may use, copy, modify, distribute, sublicense, and use the software commercially under the terms of that license.
Redistributions and derivative works must retain the applicable copyright, license, and attribution notices. Keep the LICENSE file and the attribution contained in NOTICE with redistributed copies, as required by Apache-2.0.
Copyright © 2026 GG Advanced IT Security UG.
Developed by Maciej Gojny for GGSEC.
5 commits
Python
100.0%
Read-only Raspberry Pi firmware and platform security auditor with SPI EEPROM acquisition, Secure Boot chain validation, OTP evidence, boot integrity baselines, policy gates, and portable .ggcap evidence packages.
Current release: 0.7.0-beta
Developed by GG Advanced IT Security UG — ggsec.de
GGFWPi is a Python-based security auditing tool for Raspberry Pi platforms. It combines firmware, boot-chain, operating-system, credential, network, and evidence-quality checks in one report.
The tool is designed for technical security assessments, platform hardening, firmware research, appliance validation, and repeatable evidence collection. It distinguishes between:
This distinction is also reflected in process exit codes, remediation counts, gate accounting, and summary accounting invariants.
flashrom and linux_spi.config.txt and related boot files.boot.img and boot.sig SHA-256 and RSA PKCS#1 v1.5 verification.target-soc validation.pubkey.bin parsing and consistency checks.bootconf.txt and bootconf.sig validation.bootsys counter-signature validation.rpiboot -j provisioning metadata.VALID, INVALID, and UNVERIFIED states.GGFWPi validates the customer-controlled portion of the Secure Boot chain. Raspberry Pi vendor-root signatures are enforced by BootROM but are not independently replay-verified by GGFWPi.
rpiboot -j..ggcap evidence package.The current release has been hardware-tested on:
/dev/spidev10.0.The code contains platform-aware logic for other Raspberry Pi SoCs, with the most complete Secure Boot evidence paths currently implemented for BCM2711 and BCM2712.
GGFWPi uses only the Python standard library for its core operation. RSA verification
prefers the optional cryptography backend when installed and otherwise uses the
embedded fail-closed verifier. Password verification can use one of the following
backends:
passlib — preferred;crypt, where available;libcrypt through ctypes.External tools used when available:
vcgencmd
rpi-eeprom-config
rpi-eeprom-update
rpi-eeprom-ab
flashrom
Root privileges are required for complete host inspection, /etc/shadow access, and SPI EEPROM acquisition.
Check the available CLI and dependencies:
python3 -m ggfw --help
# Compatibility entrypoint retained for existing automation:
python3 GGFWPi_v0.7.0-beta.py --help
Clone the repository:
git clone https://github.com/patapik/ggfwpi.git
cd ggfwpi
Install the package with both optional security backends:
python3 -m pip install '.[full]'
For a dependency-free checkout, python3 -m ggfw and the compatibility launcher
continue to work with the standard-library fallback implementations.
Optional password-verification backend on Debian-based systems:
sudo apt update
sudo apt install python3-passlib
Install the Raspberry Pi EEPROM tools and flashrom through the packages appropriate for the target distribution. Verify their locations with:
command -v vcgencmd
command -v rpi-eeprom-config
command -v rpi-eeprom-update
command -v rpi-eeprom-ab
command -v flashrom
This mode does not inspect the host or access SPI:
python3 GGFWPi_v0.7.0-beta.py --crypto-self-test
# Equivalent package entrypoint:
python3 -m ggfw --crypto-self-test
Expected result:
[*] Crypto self-test result: PASS
[*] Process exit code: 0
sudo python3 GGFWPi_v0.7.0-beta.py \
--policy-profile default \
--show-passed
sudo mkdir -p /var/lib/ggfw
sudo python3 GGFWPi_v0.7.0-beta.py \
--create-baseline /var/lib/ggfw/boot-baseline.json \
--policy-profile default
Review and protect the baseline after creation. A baseline is a device-specific reference measurement, not an official vendor allowlist.
sudo python3 GGFWPi_v0.7.0-beta.py \
--baseline /var/lib/ggfw/boot-baseline.json \
--policy-profile hardened \
--show-passed \
--fail-on HIGH
sudo python3 GGFWPi_v0.7.0-beta.py \
--baseline /var/lib/ggfw/boot-baseline.json \
--policy-profile secure-boot-required \
--show-otp \
--secure-boot-evidence \
--fail-on HIGH
For provisioned systems, provide external provisioning evidence and the expected customer public key:
sudo python3 GGFWPi_v0.7.0-beta.py \
--baseline /var/lib/ggfw/boot-baseline.json \
--policy-profile secure-boot-required \
--otp-metadata /path/to/rpiboot-json-or-directory \
--secure-boot-public-key /path/to/customer-public.pem \
--max-boot-signature-age-days 365 \
--show-otp \
--secure-boot-evidence \
--fail-on HIGH
Explicit external input paths are validated before acquisition begins. Missing, unreadable, ambiguous, or malformed input causes a controlled tool error.
| Profile | Intended use |
|---|---|
default | General platform assessment without requiring Secure Boot. |
hardened | Stricter runtime and platform posture; incomplete Secure Boot evidence is surfaced for review. |
secure-boot-required | Requires the customer Secure Boot controls and cryptographic evidence expected by the policy. |
resilient-appliance | Treats EEPROM A/B update capability and resilience controls as required where applicable. |
Example CI gate:
sudo python3 GGFWPi_v0.7.0-beta.py \
--policy-profile hardened \
--fail-on HIGH
Severity-based gates evaluate leaf security and policy findings. By default:
Include leaf coverage gaps in a severity gate:
--fail-on HIGH --fail-on-coverage
Run a dedicated evidence-completeness gate:
--fail-on COVERAGE_GAP
Explicitly exclude finding attributes from gate evaluation:
--gate-exclude COVERAGE_GAP
--gate-exclude AGGREGATE
Exclusions affect process gating only. Findings remain visible in reports and evidence packages.
| Code | Meaning |
|---|---|
0 | Audit completed and the selected policy gate was not triggered. |
1 | Tool, argument, acquisition, baseline, packaging, or accounting failure. |
2 | Audit completed and the selected --fail-on policy gate was triggered. |
A security finding is not a tool failure. Exit code 2 indicates that the audit completed successfully and found conditions matching the configured gate.
By default, GGFWPi creates:
ggfw-evidence/
├── ggfw-<timestamp>-<soc>/
│ ├── report.json
│ └── evidence/
└── ggfw-<timestamp>-<soc>.ggcap
The .ggcap file is a ZIP-based evidence container containing the report, manifest, collected artifacts, hashes, Secure Boot evidence, and supporting metadata.
Specify a package path:
--output /path/to/audit.ggcap
Write an additional standalone JSON report:
--json-output /path/to/report.json
Skip SPI acquisition when it is not available or not required:
--skip-spi
Run only OTP and Secure Boot evidence collection:
sudo python3 GGFWPi_v0.7.0-beta.py \
--otp-only \
--show-otp \
--secure-boot-evidence
Extend the built-in weak/default password audit with a local UTF-8 wordlist:
sudo python3 -m ggfw --weak-password-file /secure/path/weak-passwords.txt
The file is bounded and read before the scan starts. Its contents and matched passwords are never written to reports; only candidate counts and the file's SHA-256 digest are recorded.
GGFWPi does not write, erase, or modify SPI flash and does not enable or disable write protection. SPI interaction is limited to:
Remediation instructions may describe external provisioning or recovery procedures, but the auditor itself remains read-only.
Most evidence collected from a running system is classified as in-band and normally receives MEDIUM trust because the examined operating system or firmware interface mediates the observation.
Higher-trust evidence can include:
GGFWPi reports evidence limitations separately from confirmed security failures. Missing evidence is not automatically treated as a broken cryptographic signature.
Use the version-aware test runner:
python3 test_GGFWPi_latest.py
The first line identifies the selected module:
[*] GGFW regression target: GGFWPi_v0.7.0-beta.py
The suite covers:
.ggcap packaging;Run the release-pinned suite:
python3 test_GGFWPi_v0.7.0.py
rpiboot -j metadata where conclusive provisioning evidence is required.PASS for the embedded cryptographic self-test proves the known-answer implementation paths, not the provisioning state of the inspected device..
├── GGFWPi_v0.7.0-beta.py # compatibility launcher
├── pyproject.toml
├── ggfw/
│ ├── models/ # findings, evidence, reports
│ ├── parsers/ # config, cmdline, EEPROM image
│ ├── boot/ # resolution and integrity
│ ├── hardware/ # platform, interrogation, OTP
│ ├── crypto/ # RSA, signatures, validation, KAT
│ ├── engines/ # host and hardware policies
│ ├── spi/ # read-only EEPROM acquisition
│ ├── reporting/ # console and policy gates
│ └── packaging/ # .ggcap evidence package
├── test_GGFWPi_latest.py
├── test_GGFWPi_v0.7.0.py
├── README.md
├── LICENSE
├── NOTICE
├── AUTHORS.md
├── SECURITY.md
├── CHANGELOG.md
└── .gitignore
Do not publish suspected vulnerabilities in public GitHub issues. Follow the process in SECURITY.md.
GGFWPi is currently a beta security engineering and evidence-collection tool. Reports should be reviewed by a qualified analyst, particularly before destructive remediation, OTP provisioning, or irreversible Secure Boot configuration changes.
GGFWPi was developed by Maciej Gojny for GGSEC — GG Advanced IT Security UG.
Project website: https://ggsec.de
The original attribution is recorded in NOTICE and additional project information is available in AUTHORS.md.
GGFWPi is licensed under the Apache License, Version 2.0. Everyone may use, copy, modify, distribute, sublicense, and use the software commercially under the terms of that license.
Redistributions and derivative works must retain the applicable copyright, license, and attribution notices. Keep the LICENSE file and the attribution contained in NOTICE with redistributed copies, as required by Apache-2.0.
Copyright © 2026 GG Advanced IT Security UG.
Developed by Maciej Gojny for GGSEC.
5 commits
Python
100.0%