The Big Picture: A Guard at the Front Door
The firmware starts first, and it starts the bootloader, which starts Windows. If an attacker slips a fake bootloader in at the very start, it runs before Windows and before any antivirus, and it can hide forever. Secure Boot is a UEFI feature that puts a guard at the door: the firmware only runs programs that carry a trusted digital signature.
6.1 Why Secure Boot Exists
What it is: Secure Boot protects against bootkits and rootkits.
| Word | Plain meaning |
|---|---|
| Malware | Harmful software |
| Rootkit | Malware that hides deep in the OS, so even antivirus cannot see it |
| Bootkit | A rootkit that starts before the OS, by infecting the boot code |
The problem: With legacy BIOS, the firmware simply ran the first sector of the disk, whatever it contained. A bootkit replaced it, so it ran first and could control Windows from below. Antivirus runs inside Windows, so it was too late to see it.
The idea: Check before running. Every boot program must prove who made it.
WITHOUT Secure Boot WITH Secure Boot
Firmware ─► runs anything Firmware ─► checks signature ─► trusted? ─► run
│ no
▼
refuse, show an error
It does not stop all attacks. It protects one important stage: the chain from firmware to the OS loader. Windows then continues the chain (loading only signed kernel pieces).
Windows tip: Check if Secure Boot is on:
msinfo32► Secure Boot State: On, Off or Unsupported- PowerShell as Administrator:
Confirm-SecureBootUEFIIt prints True (on) or False (off). On a PC that boots in legacy mode, it gives an error saying the cmdlet is not supported.
6.2 Public Key Infrastructure (PKI)
What it is: Secure Boot uses public-key cryptography. This uses a pair of keys:
| Key | Who has it | What it does |
|---|---|---|
| Private key | Only the owner (for example Microsoft). Kept secret. | Signs things |
| Public key | Everybody. Stored in a certificate. | Checks signatures |
Analogy: A wax seal. Only the king has the seal stamp (private key). Anyone can look at the seal pattern (public key) and see if it is the real king's. They cannot make a fake seal because they do not own the stamp.
Hash. A hash is a short fingerprint of a file, computed by a formula (for example SHA-256). If even one bit of the file changes, the hash changes totally.
A certificate is a small file that says "this public key belongs to this company", signed by an authority. A system of such authorities and certificates is called PKI (Public Key Infrastructure).
The keys stored in the firmware for Secure Boot:
| Name | Full name | Role |
|---|---|---|
| PK | Platform Key | The owner key. Who controls Secure Boot on this PC (usually the PC maker). Only one PK. |
| KEK | Key Exchange Key | Keys allowed to update the db and dbx |
| db | Signature Database ("allow list") | Certificates and hashes of trusted programs |
| dbx | Forbidden Signature Database ("block list") | Revoked (banned) certificates and hashes |
PK ── allows ──► KEK ── allow updates to ──► db (allowed)
└► dbx (blocked)
6.3 Signature Verification
What it is: When the firmware loads an .efi file, it checks it in a fixed way.
The steps:
- Hash the
.efifile with SHA-256. - Does the dbx (block list) contain this hash or the signing certificate? If yes, refuse.
- Read the signature attached to the file (made with the maker's private key).
- Is the signing certificate (or the file's hash) in the db (allow list)? If yes, run.
- If it is in neither, refuse (or ask the user, depending on settings).
bootmgfw.efi
│
├─ compute hash
│
▼
In dbx? ──yes──► BLOCKED
│ no
▼
Signature valid and signer in db? ──no──► BLOCKED ("Security violation")
│ yes
▼
RUN
The chain of trust. Each step verifies the next one:
UEFI firmware (trust root; holds the keys)
▼ verifies
Windows Boot Manager (bootmgfw.efi, signed by Microsoft)
▼ verifies
Windows kernel and early drivers (signed)
▼ loads
ELAM antimalware driver, then the rest of Windows
If the check fails: The PC shows a message such as "Secure Boot Violation" or "Invalid signature detected" and won't start that program. Usually this means a boot file was changed, a disk image is untrusted, or an unsigned Linux/USB tool was tried.
6.4 Microsoft's Key Role
What it is: Most PCs sold with Windows trust Microsoft's certificates by default. This is why Microsoft sits at the center.
| Certificate (approximate names) | What it signs |
|---|---|
| Microsoft Windows Production PCA | Windows boot loader and OS parts |
| Microsoft UEFI CA (third-party) | Other software that wants to boot with Secure Boot, such as the shim used by many Linux distributions, and option ROMs of add-in cards |
| Microsoft Corporation KEK CA | The key allowed to update the db and dbx lists |
The Linux situation. A Linux distribution cannot get its own key into every PC's firmware. So most distributions ship a small program called shim, signed by Microsoft's third-party CA. Shim then checks the distribution's own bootloader. That way Linux boots on Secure Boot PCs.
Updates to the lists. The dbx gets new entries over time (for example when a bootloader is found to have a flaw). Windows Update can deliver these. This is why a revoked old loader can stop working.
Certificates expire and get replaced. Microsoft's first set of Secure Boot certificates (from 2011) are due to expire starting in 2026. Microsoft has been rolling out new 2023 certificates through Windows Update and firmware updates. PCs keep booting, but a PC without the new certificates may not get future security updates to the boot chain. Check Microsoft's current guidance and your PC maker's firmware updates if you manage PCs.
Windows 11 and Secure Boot. Windows 11 requires a PC that is Secure Boot capable (the feature must exist; the firmware needs UEFI).
Look at the keys (PowerShell, Administrator):
Get-SecureBootUEFI -Name PK
Get-SecureBootUEFI -Name dbThese commands return the raw data of the stored key lists.
6.5 Disabling Secure Boot
What it is: Secure Boot can usually be turned off in the firmware setup, because owners need freedom (for example to install an unsigned OS).
Why you might turn it off:
| Reason | Example |
|---|---|
| An unsigned OS or driver | An old Linux, a hobby OS, a custom kernel |
| An old tool | A very old rescue disk |
| Troubleshooting | A "Secure Boot violation" you want to diagnose |
| Some old graphics cards | Older GPUs without a UEFI-compatible ROM |
How (general steps; menus differ by maker):
- Enter the firmware setup (Practical Lab, or Windows Settings ► Recovery ► Advanced startup).
- Go to the Boot or Security tab.
- Find Secure Boot. On some PCs you must first clear the keys or choose "Other OS" mode.
- Set it to Disabled. Save and exit (usually
F10).
Risks and consequences:
| Consequence | Explanation |
|---|---|
| Less protection | A fake loader can run again |
| Windows 11 | Secure Boot is expected. Windows may show warnings. Some games with anti-cheat require it on. |
| BitLocker | Changing Secure Boot settings can make BitLocker ask for your recovery key. Have it ready first. |
| Turn it back on | You can re-enable it later. Windows boots fine if its loader is signed. |
Good habit: Leave Secure Boot on unless you have a clear reason. If you turn it off to test something, turn it back on afterwards.
Other modes you may see:
| Mode | Meaning |
|---|---|
| Standard / Windows UEFI mode | Secure Boot on with the default keys |
| Custom mode | You can add or delete your own keys |
| Setup mode | There is no PK yet; keys can be enrolled |
| User mode | A PK exists; Secure Boot is enforced |
Summary
| Term | Plain meaning |
|---|---|
| Secure Boot | A UEFI feature that only runs signed, trusted boot programs |
| Bootkit / rootkit | Malware that starts before / hides deep inside the OS |
| Private key / public key | Secret key that signs / open key that checks |
| Hash | A short fingerprint of a file |
| Certificate | A file that ties a public key to an owner |
| PK | Platform Key: the owner key |
| KEK | Key Exchange Key: may update the lists |
| db / dbx | Allow list / block list of signatures and hashes |
| Chain of trust | Each step checks the next |
| Shim | A small Microsoft-signed loader that lets Linux boot with Secure Boot |
Confirm-SecureBootUEFI | PowerShell command that says if Secure Boot is on |