-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setup on Dell XPS 15 7590 (generalize for your use case) #5
Comments
@valinet The guide is awesome, thank you so much. |
You’re welcome, kudos to the original authors that first discovered and published info about this as well. We should really thank them, this approach is great compared to the alternatives, even official ones.
Yeah, of course, why not. I do the same thing, I have the same certs for both my laptop and my desktop. That way, I sign the drivers once, on whichever machine I happen to be developing on, and then I load them directly on both machines. I mean, I don’t see why, for personal use, you’d have separate sets.
There is a link to a deb file which is just an archive, easily openable with 7zip etc, and in there you find KeyTool.efi. I chose to link to the official package rather than reupload it, idk, that was my mindset at the moment. |
If I understood correctly, on other PC I can jump right into the part which starts with dots, right? @valinet
There are still many traps in the process like:
Efitools_1.9.2-1ubuntu3_amd64.deb contains *.tar.zst files which can not be opened by 7z. Ventoy author is a genius too. |
IMPORTANT
This laptop loses the PK EVERY time one changes any setting in the UEFI program (which is really annoying). A quick fix is this:
If everything goes well, final output from PowerShell should be something like this:
ssde_enable.exe
. Let it reboot in Setup mode.Confirm-SecureBoot
will returnTrue
. Register back and start ssde:Original write up below:
This is the way I go about setting this up on my XPS 15 7590. Maybe you can use this as general guidance and customize according to your own configuration. The way to set the PK in the UEFI of your machine varies between BIOS brands, so a generic way is hard to list, but you can adapt this guide to suit your needs.
First off, I have a ventoy pen drive where I keep KeyTool.efi (KeyTool is part of the efitools package; the link takes you there; download the deb file, unpack it and find the UEFI application under
data.tar\.\usr\lib\efitools\x86_64-linux-gnu\
). I highly recommend doing this as it is very convenient.Steps:
PK.pfx
(localhost-pk.pfx
) that you have from following this. I also assume that you have the certificates installed into your system root after following the linked tutorial. Under a Linux distro (you can use WSL), run this (on Ubuntu, installefitools
package usingsudo apt install efitools
):Credits: https://wiki.archlinux.org/title/Unified_Extensible_Firmware_Interface/Secure_Boot and https://www.ibm.com/docs/en/arl/9.7?topic=certification-extracting-certificate-keys-from-pfx-file
The commands will ask for the PFX password, which you have set when you exported it, and also for a passphrase for the CRT file, which I recommend setting the same as the password for the PFX file.
Ctrl
+Alt
+Del
to reboot the machine.Confirm-SecureBootUEFI
should returnTrue
.SiPolicy.p7b
file (open an administrative command prompt window in the folder where you have the policy file):This mounts the EFI partition at X:, installs the policy file and reboots the system.
ssde_enable.exe
. The system will reboot in Setup mode, where the program finishes its job.HKEY_LOCAL_MACHINE\system_c\ControlSet001\Control\CI\Protected
and check if theLicensed
entry is set to 1. If it is, it's all good, if not, try again withssde_enable.exe
or reboot into a WinPE environment (you can throw in a Windows ISO on the ventoy pendrive and boot that), pressShift
+F10
to get to a command prompt; in there, typeregedit
, then select the HKLM key on the left, File - Load Hive and locate theHKLM\System
datastore from you Windows install atletter:\Windows\System32\config\System
and load that. Try to change theLicensed
entry from there and reboot and see if it stuck.Licensed
set to 1 and that Secure Boot is enabled (Confirm-SecureBootUEFI
) and that the policy file is installed on the EFI partition, then you can move on with installing thessde.sys
driver which should work just fine now and load easily:ssde.sys
driver or download the pre-compiled one here.signtool.exe
. This either comes with the Windows SDK, either use these instructions to only extract it and install it alone from the SDK:signtool sign /fd sha256 /a /ac .\localhost-root-ca.der /f .\localhost-km.pfx /p password /tr http://sha256timestamp.ws.symantec.com/sha256/timestamp ssde.sys
. Replace "password" with the password you have set when you exported the PFX file.ssde.sys
intoC:\Windows\System32\drivers
.sc create ssde binpath=%windir%\system32\drivers\ssde.sys type=kernel start=boot error=normal
.sc start ssde
.If everything went fine and you did it correctly, the driver will show its status as running:
If you did something wrong, you will get the famous driver signature error when you will query the status. Make sure to check again all the steps mentioned above. Again, from what I have seen, the conditions for drivers to load successfully and not throw the signature error are:
localhost-root-ca
).localhost-pk
).localhost-km
).Confirm-SecureBootUEFI
in PowerShell to confirm).SiPolicy.p7b
) copied at the proper location (\EFI\Microsoft\Boot\SiPolicy.p7b
) on the EFI partition.HKEY_LOCAL_MACHINE\system_c\ControlSet001\Control\CI\Protected\Licensed
is 1. To maintain this state (the value is reset on every reboot), after we initially trick Windows into having it set to 1 (usingssde_enable.exe
or the WinPE trick I described above), we have to load thessde
driver in the system (and have it load on every boot); ssde is a very simple driver which monitors the kernel for changes to the licensed status of this feature and reverts it to being licensed when something in the system changes it (because, with the SKUs of Windows we have, we are not really licensed by Microsoft for this - only the Chinese Government is, so as to spy on its people). This driver is a sure way to have the system always be licensed for this functionality.To check the status of the driver:
ssde_info.exe
which reports the number of times the licensed status for this feature has been reverted, plus some other info.ssde_query.exe
to query the licensed status for this feature.Also note that the XPS 15 seems to forget this custom PK if we mess with settings in the BIOS after we set it up, so after each change, all I do is boot into
KeyTool.efi
, renroll the PK and reenable Secure Boot in the BIOS, and it seems wot work and Windows continues to load my own signed drivers.Hope this helps shade more light on how to run this.
The text was updated successfully, but these errors were encountered: