Skip to content

Instantly share code, notes, and snippets.

View sagi's full-sized avatar
Making

Sagi Kedmi sagi

Making
View GitHub Profile
@sagi
sagi / vboxdrv.sh
Last active October 27, 2017 06:55
vboxdrv Kernel Module Signing on Ubuntu 16.04 (UEFI Secure Boot)
# Secure Boot in Ubunutu: https://wiki.ubuntu.com/SecurityTeam/SecureBoot#Shim_bootloader_signed_with_Microsoft_key
# Ubuntu Kernel notes: https://github.com/Canonical-kernel/Ubuntu-kernel/blob/master/Documentation/module-signing.txt
# We'll have to sign the vboxdrv module because of UEFI's Secure Boot
openssl req -new -x509 -newkey rsa:4096 -keyout MOK.priv -outform DER -out MOK.der -nodes -days 36500 -subj "/CN=Kernel Module Signer/"
$ sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./MOK.priv ./MOK.der $(modinfo -n vboxdrv)
# Add our Machine Owner Key to the trusted keys in Ubuntu's Shim 2nd stage bootloader
$ sudo mokutil --import MOK.der
@sagi
sagi / keybase.md
Last active September 23, 2015 06:15

Keybase proof

I hereby claim:

  • I am sagi on github.
  • I am sagi (https://keybase.io/sagi) on keybase.
  • I have a public key whose fingerprint is 7627 F97C 2B14 3C9A 2E05 C1C5 2C43 F831 18F6 0C29

To claim this, I am signing this object: