Join our Newsletter — 33% off our NHI Course

How should a Machine Owner Key (MOK) be stored and protected?

A Machine Owner Key is a key used to enrol trusted boot components in systems that support user-managed secure boot trust. Store it offline or in tightly controlled key management, restrict who can use it, and protect the passphrase. If it is exposed, attackers can enrol malicious boot code and undermine boot trust.

How to store a Machine Owner Key safely

A MOK should be treated as boot-trust material, not as an ordinary configuration value. The safest pattern is to keep it offline when possible, or in tightly controlled key management with very limited access, so the key and its passphrase are not casually reachable by admins, builders, or support staff.

Because a MOK can extend trust into the boot chain, the storage decision should be based on who can actually enrol or reuse it, not just who can see a file. If that trust material is copied into build hosts, shared drives, tickets, or automation logs, the system has already lost the control you were trying to gain.

For firmware and trusted boot contexts, the Firmware and Boot Security Guide is the best NHIMG reference point for where MOKs sit in the broader boot-trust model, including Secure Boot, measured boot, and trusted platform protections.

What protection actually matters for a MOK

The key itself should be restricted to a very small set of authorised operators, and the passphrase should be protected with the same discipline as the key. If the passphrase is weak, shared, or stored beside the key, the practical protection collapses even if the key material is technically offline.

Where a MOK is retained for legitimate operational use, limit exposure to a controlled workflow for enrolment or rotation rather than leaving it available for ad hoc use. The goal is to make enrolment deliberate and attributable, because the value of the key is precisely that it can change which boot components are trusted.

Broader key-handling discipline is covered well in NHIMG’s Cryptographic Key Management Guide, which is useful for understanding access restriction, key lifecycle, and rotation when the same control principles apply to a boot-trust key.

What happens if a MOK is exposed

An exposed MOK can let an attacker enrol malicious boot code or a tampered boot component as if it were trusted. That is a high-value failure because the compromise occurs before the operating system is fully in control, which can weaken detection, persistence, and recovery options.

In practice, the exposure concern is not only theft of the key file but also theft of the passphrase or misuse of the enrolled trust path. Once an attacker can sign or enrol untrusted boot content, the system may continue booting normally while executing attacker-controlled code very early in the startup sequence.

When the concern is key exposure and reuse in real attacks, NHIMG’s ASP.NET machine key attacks 2025 is a useful analogue for why exposed trust keys become execution material rather than simple secrets.

Risk and Threat Considerations

A MOK is security-critical because it can alter the trust boundary for boot-time code. If the key or passphrase leaks, the risk is not just disclosure, but persistent pre-OS trust abuse that can survive ordinary application-layer monitoring and some post-boot remediation.

Failure mechanism: An attacker who obtains the MOK material, or the ability to invoke it, can enrol malicious boot components that appear trusted to the platform firmware or boot chain. That enables stealthy persistence and undermines the assurance provided by secure boot.

Impact: The system may load attacker-controlled boot code, weakening integrity at the point where the machine establishes its trusted state. That can complicate containment, make compromise harder to detect, and force a deeper rebuild or trust reset than a normal endpoint incident.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

NIST SP 800-53 Rev 5 and NIST SP 800-57 set the technical controls, while ISO/IEC 27001:2022 defines the regulatory obligations.

Framework Control / Reference Relevance
NIST SP 800-53 Rev 5 IA-5 — Authenticator Management MOK storage and passphrase handling are authenticator lifecycle concerns.
AC-6 — Least Privilege Only a small set of operators should access or use the MOK.
SI-7 — Software, Firmware, and Information Integrity A compromised MOK can subvert boot integrity by trusting malicious code.
Recommendation — Restrict MOK custody, rotation, and revocation like other high-value authenticators. Limit MOK access to the minimum roles required for enrolment and recovery. Protect boot-trust keys as part of firmware and integrity assurance controls.
NIST SP 800-57 Key Management The question is fundamentally about secure cryptographic key custody and lifecycle.
Recommendation — Apply controlled custody, lifecycle management, and compromise response to the MOK.
ISO/IEC 27001:2022 A.8.24 — Use of cryptography MOK handling depends on protecting cryptographic material and its use conditions.
Recommendation — Define secure storage, use, and protection rules for the MOK and its passphrase.

Practitioner Guidance

What to prioritise: Treat the MOK as a high-sensitivity trust-enablement key, not as a routine administrative secret. If the key is needed only for rare enrolment events, offline custody is usually cleaner than broad online availability.

What to verify: Confirm that the key, its passphrase, and any enrolment process are separated from everyday admin access, build systems, and ticketing artifacts. Also verify that you can explain who is allowed to use it, when, and under what approval path.

Common mistake: Teams often protect the file but not the workflow. A copied key that is still usable by too many people, or a passphrase that is stored alongside it, leaves the boot trust boundary effectively unprotected.

Practitioner takeaway: The right standard is not simply “keep the MOK secret”, it is “make enrolment controlled enough that compromise of the key material would not be easy to convert into trusted boot execution.”