Verify Virtual Machine Images on Linux

From Kicksecure
Jump to navigation Jump to search

Instructions for OpenPGP and Signify Verification of Kicksecure VirtualBox and KVM on the Command Line

Introduction[edit]

  • Digital signatures: A tool enhancing download security. Commonly used across the internet.
  • Learn more: Curious? Learn more about digital software signatures.
  • Optional: Digital signatures are optional. If you've never used them before, there might be no need to start now.
  • No worries: New to digital software signatures? It's okay, no need to worry.
  • Not a requirement: Not mandatory for using Kicksecure, but an extra security measure for advanced users.

OpenPGP

In order to verify the Kicksecure image, GnuPG must be installed. GnuPG is the common OpenPGP implementation for Linux: it is installed by default in Debian, Ubuntu, Kicksecure and many other distributions.

1. Import the signing key.

Kicksecure VirtualBox

Refer to the more secure, detailed Kicksecure Signing Key instructions.

Download Kicksecure VirtualBox Developer OpenPGP Key

2. Download the cryptographic (OpenPGP) signature corresponding to the virtual machine image you want to verify.

3. Save the signature in the same folder as the virtual machine image.

KVM

Refer to the more secure, detailed Kicksecure Signing Key instructions.

Download Kicksecure KVM Developer OpenPGP Key

2. Download the cryptographic (OpenPGP) signature corresponding to the virtual machine image you want to verify.

3. Save the signature in the same folder as the virtual machine image.

KVM Xfce image

KVM Xfce signature

4. Start the cryptographic verification.

This process can take several minutes.

cd [the directory in which you downloaded the .ova and the .asc]

VirtualBox

gpg --verify-options show-notations --verify Kicksecure-*.ova.asc Kicksecure-*.ova

KVM

gpg --verify-options show-notations --verify Kicksecure-*.libvirt.xz.asc Kicksecure-*.libvirt.xz

5. Check the output of the verification step.

If the file is verified successfully, the output will include Good signature, which is the most important thing to check.

VirtualBox

gpg: Good signature from "Patrick Schleizer"

KVM

gpg: Good signature from "HulaHoop"

This output might be followed by a warning as follows.

gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.

This message does not alter the validity of the signature related to the downloaded key. Rather, this warning refers to the level of trust placed in the Kicksecure signing key and the web of trust. To remove this warning, the Kicksecure signing key must be personally signed with your own key.

warning Remember to check the GPG signature timestamp. For instance, if you previously saw a signature from 2023 and now see one from 2022, this could indicate a potential rollback (downgrade) or indefinite freeze attack.[1]

Example of signature creation timestamp; see below.

gpg: Signature made Mon 19 Jan 2023 11:45:41 PM CET using RSA key ID ...

warning Remember: OpenPGP signatures sign the contents of files, not the file names themselves. [2]

The file@name OpenPGP notation in Kicksecure release signatures describes the file name. This helps to confirm that the file name has not been tampered with; see the example below.

VirtualBox

gpg: Signature notation: file@name=Kicksecure-17.1.1.5.ova

KVM

gpg: Signature notation: file@name=Kicksecure-17.0.3.0.libvirt.xz

If the Virtual Machine image is not correct, the output will inform that the signature is bad:

gpg: BAD signature

Do not continue if verification fails! This risks using infected or erroneous files! The whole point of verification is to confirm file integrity. This page is strongly related to the pages Placing Trust in Kicksecure and Verifying Software Signatures.

6. Done.

Digital software signature verification using OpenPGP has been completed.

Troubleshooting[edit]

When a GPG error is encountered, first try a web search for the relevant error. The security stackexchange websitearchive.org can also help to resolve GPG problems. Describe the problem thoroughly, but be sure it is GPG-related and not specific to Kicksecure.

More help resources are available on the Support page.

Signify

Info Advanced users only!

1. Download the signify Key and save it as derivative.pub.

2. Install signify-openbsd.

Install signify-openbsd. To accomplish that, the following steps A. to D. need to be done.

A. Update the package lists.

sudo apt update

B. Upgrade the system.

sudo apt full-upgrade

C. Install the signify-openbsd package.

Using apt command line parameter --no-install-recommends is in most cases optional.

sudo apt install --no-install-recommends signify-openbsd

D. Done.

The procedure of installing signify-openbsd is complete.

3. Note.

It is impossible to signify sign images (.ova / libvirt.tar.xz) directly.archive.org You can only verify the .sha512sums hash sum file using signify-openbsd and then verify the image against the sha512 sum.

4. Download the .sha512sums and .sha512sums.sig files.

5. Verify the .sha512sums file with signify-openbsd.

signify-openbsd -Vp derivative.pub -m Kicksecure-*.sha512sums

If the signature is valid, it will output:

Signature Verified

If the signature is invalid, it will output an error.

6. Compare the hash of the image file with the hash in the .sha512sums file.

sha512sum --strict --check Kicksecure-*.sha512sums

If the hash is correct, it will output:

Kicksecure-Xfce-17.1.1.5.ova: OK

Do not continue if verification fails! This risks using infected or erroneous files! The whole point of verification is to confirm file integrity. This page is strongly related to the pages Placing Trust in Kicksecure and Verifying Software Signatures.

7. Done.

Digital signature verification using signify has been completed.

If you are using signify for software signature verification, please consider making a report in the signify-openbsd forum threadarchive.org. This will help developers decide whether to continue supporting this method or deprecate it.

Forum discussion: signify-openbsdarchive.org.

Footnotes[edit]

License[edit]

Kicksecure Verify the virtual machine images using Linux wiki page Copyright (C) Amnesia <amnesia at boum dot org>
Kicksecure Verify the virtual machine images using Linux wiki page Copyright (C) 2012 - 2023 ENCRYPTED SUPPORT LP <

This program comes with ABSOLUTELY NO WARRANTY; for details see the wiki source code.
This is free software, and you are welcome to redistribute it under certain conditions; see the wiki source code for details.


Unfinished: This wiki is a work in progress. Please do not report broken links until this notice is removed, use Search Engines First and contribute improving this wiki.

We believe security software like Kicksecure needs to remain Open Source and independent. Would you help sustain and grow the project? Learn more about our 11 year success story and maybe DONATE!