Saltar a contenido

Hodei-Shield Agent: verifica una versión antes de instalarla

Cada versión publica SHA256SUMS (el SHA-256 de cada fichero) y SHA256SUMS.sig, una firma Ed25519 sobre ese fichero hecha con la clave de release de Hodeitek. Un hash descargado del mismo sitio que el fichero no prueba nada por sí solo; la firma sí. Comprueba primero la firma y luego el hash. Si algo falla, no instales: borra los ficheros y escribe a info@hodeitek.com.

La clave pública de release

Guárdala como hodei-shield-release.pub.pem. La misma clave va integrada en cada agente.

-----BEGIN PUBLIC KEY-----
MCowBQYDK2VwAyEAEUqKd+ot7BESwk+vf6EVBKudMi6F6jmY3dJeHXfCWkQ=
-----END PUBLIC KEY-----
Huella: el SHA-256 de los 32 bytes crudos de la clave debe ser 8b730d2fcbd90e2656bd9b3f265638f1e8e8ac2379d48b0636feb5efe5a88f07. Contrástala con la que te dé Hodeitek por un segundo canal antes de fiarte de una copia de esta página. Con OpenSSL 3: openssl pkey -pubin -in hodei-shield-release.pub.pem -outform DER | tail -c 32 | sha256sum

Linux (OpenSSL 3, sha256sum)

MEASURED con OpenSSL 3.5 sobre una versión publicada.

V=<versión>; B=https://hs-agent-releases.s3.gra.io.cloud.ovh.net
curl -fsSLO "$B/agent/$V/SHA256SUMS" -O "$B/agent/$V/SHA256SUMS.sig" -O "$B/agent/$V/hodei-shield-$V-linux-x86_64-musl.tar.gz"
openssl base64 -d -A -in SHA256SUMS.sig -out SHA256SUMS.sig.raw   # 64 bytes: wc -c < SHA256SUMS.sig.raw
openssl pkeyutl -verify -rawin -pubin -inkey hodei-shield-release.pub.pem -sigfile SHA256SUMS.sig.raw -in SHA256SUMS
sha256sum --ignore-missing -c SHA256SUMS
Debes ver Signature Verified Successfully y luego ...tar.gz: OK. Linux no tiene firma nativa del SO: esta comprobación es la prueba de autenticidad.

macOS (OpenSSL 3 de Homebrew, shasum)

NOT RUN en un Mac. El openssl del sistema es LibreSSL; no consta que verifique Ed25519 con -rawin, así que instala OpenSSL 3 (brew install openssl@3) y llámalo por su ruta completa (/opt/homebrew/opt/openssl@3/bin/openssl; /usr/local/opt/... en Intel).

V=<versión>; B=https://hs-agent-releases.s3.gra.io.cloud.ovh.net; SSL=/opt/homebrew/opt/openssl@3/bin/openssl
curl -fsSLO "$B/agent/$V/SHA256SUMS" -O "$B/agent/$V/SHA256SUMS.sig" -O "$B/agent/$V/hodei-shield-$V-universal.pkg"
$SSL base64 -d -A -in SHA256SUMS.sig -out SHA256SUMS.sig.raw
$SSL pkeyutl -verify -rawin -pubin -inkey hodei-shield-release.pub.pem -sigfile SHA256SUMS.sig.raw -in SHA256SUMS
grep " hodei-shield-$V-universal\.pkg\$" SHA256SUMS | shasum -a 256 -c -
Debes ver Signature Verified Successfully y luego ...pkg: OK. El .pkg lleva además firma Apple Developer ID: pkgutil --check-signature sobre él.

Windows (OpenSSL 3 de Git for Windows, PowerShell)

MEASURED en un equipo limpio (el bloque completo, con la instalación, está en la guía beta de Windows). Git for Windows incluye OpenSSL 3 en la ruta de abajo.

$V='<version>'; $B='https://hs-agent-releases.s3.gra.io.cloud.ovh.net'; $file="hodei-shield-$V-x86_64.msi"
foreach ($n in $file,'SHA256SUMS','SHA256SUMS.sig') { Invoke-WebRequest "$B/agent/$V/$n" -OutFile $n }
$ssl='C:\Program Files\Git\usr\bin\openssl.exe'
& $ssl base64 -d -A -in SHA256SUMS.sig -out SHA256SUMS.sig.raw
& $ssl pkeyutl -verify -rawin -pubin -inkey hodei-shield-release.pub.pem -sigfile SHA256SUMS.sig.raw -in SHA256SUMS
(Get-FileHash $file -Algorithm SHA256).Hash; Select-String -SimpleMatch $file SHA256SUMS
Get-AuthenticodeSignature .\$file | Format-List Status, SignerCertificate
Debes ver Signature Verified Successfully; el hash impreso debe ser igual al de la línea de tu fichero en SHA256SUMS (mayúsculas da igual); Status debe ser Valid con sujeto Hodeitek S.L.. La comprobación Authenticode no sustituye a la Ed25519: haz las dos.