Skip to content

hardening: approve through Windows Hello on WSL2 - #77

Draft
sorah wants to merge 2 commits into
hardening/wsl2from
hardening/windows-hello
Draft

sorah wants to merge 2 commits into
hardening/wsl2from
hardening/windows-hello

Conversation

@sorah

@sorah sorah commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

Implements docs/specs/016-windows-hello.md.

  • mairu-windows-hello.exe ([[bin]] behind windows-hello-helper, windows 0.62): public-key, create and sign against the co.0w0.mairu KeyCredential, bringing the Windows Hello dialog to the front
  • the windows-hello presence method on WSL2 with interop: the agent issues the same single-use challenges as ssh-agent and verifies RSA-2048 PKCS#1 v1.5 SHA-256 signatures against windows_hello_keys; default order ssh-agent, windows-hello, platform
  • the client finds the helper next to mairu, in /usr/lib/mairu/, or via config.json, and runs it only if its SHA-256 matches the pin (MAIRU_WINDOWS_HELLO_HELPER_SHA256 at build time, or approved windows_hello_helper_sha256, also recorded in the approval anchor). It re-hashes the file right before each run
  • mairu policy enroll-windows-hello; doctor and policy check report keys and the helper
  • release: a windows-latest job builds and attests x86_64/aarch64 helpers; Linux tarballs and debs ship the matching exe with the pin set at build time. CI builds and lints the helper
  • the library is #![cfg(unix)] and protos are skipped on non-Unix targets, so Windows runners need no protoc

Not verified on real Windows: the KeyCredential calls, dialog focus, running the exe from the Linux filesystem (Q-W6), and the MSVC builds on Actions. The helper type-checks and lints for both MSVC targets and links under mingw. Verified in Docker (71 checks) with a fake helper speaking the protocol with OpenSSL RSA keys: pinning, enrolment, approval through polkit then Windows Hello, cancel, wrong-key and replayed signatures, tampered helpers, and the release deb.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Dg17LE9aWqsb1VBUCVcKLM

sorah and others added 2 commits October 31, 2026 13:37
On WSL2 with interop, keys registered as windows_hello_keys let the
agent approve a request by a signature from a Windows Hello key
credential. The client has mairu-windows-hello.exe sign the agent's
challenge through interop, and the agent verifies the RSA PKCS #1
v1.5 SHA-256 signature against the registered keys, so nothing the
helper says counts on its own.

The challenge flow is the ssh-agent one, now per method: a signature
answers only a challenge of its method, and a decline covers its
method and those before it. A cancelled dialog is answered with a
"cancelled" decline, which the agent turns into a denial instead of
asking another method.

A hardened client runs the helper only while its SHA-256 matches the
pin recorded by a release build, or the approved
windows_hello_helper_sha256, which the approval anchor also records so
that changes can be approved while the files are unapproved. The
helper is a feature-gated Windows bin of this package; release
archives and debs ship it for the matching Windows architecture.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Dg17LE9aWqsb1VBUCVcKLM
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Dg17LE9aWqsb1VBUCVcKLM
@sorah
sorah added this pull request to stack #63 October 31, 2026 04:38
@sorah sorah changed the title hardening/windows hello hardening: approve through Windows Hello on WSL2 Oct 31, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant