Skip to content

MXC SDK v1.2.0

Latest

Choose a tag to compare

@theelliotm theelliotm released this 05 Dec 01:29
d666552

MXC SDK v1.2.0 adds WSLC built-in proxy support for lifecycle (state-aware) containers, merged stdout/stderr pipes for ProcessContainer, experimental policy-preparation APIs, and custom Mach/IOKit/shared-memory rules for Seatbelt.

Crates.io: https://crates.io/crates/mxc-sdk/1.2.0
NPM: https://www.npmjs.com/package/@microsoft/mxc-sdk/v/1.2.0
NuGet: https://www.nuget.org/packages/Microsoft.Mxc.Sdk/1.2.0

See the Assets section for mxc-release-binaries.zip, which contains release binaries that can be useful for testing.

What's Changed

Experimental features

  • Policy Preparation APIs: When Windows ProcessContainer refuses a policy, these APIs return a corrected request JSON plus a list of the changes made. The corrected request never grants more access than the original. The caller decides whether to accept and retry. See documentation here

  • Seatbelt Custom Lists: New customMachLookups, customMachRegisters (global and local), customIoKits and customPosixShm settings in the 1.1.0-alpha development contract.

To use these new experimental behavior from the SDKs, you must use the v1::dev namespace.

Behavior changes

  • WSLC Built-in Proxy

    • In both create-and-run and lifecycle modes, the WSLC built-in proxy enables a mix of egress, ingress, and hostLoopback defaults. These modes also now fully support TCP egress rules by CIDR and port, port mappings, and a custom proxy.
    • network.ingress.hostLoopback: "allow" allows containers to reach Windows 127.0.0.1 at host.wslc.internal; this needs WSL 3.0.5 or later.
  • Merged stdout/stderr pipes: MergedPipes in Rust and SpawnStdio.MergedPipes in .NET. Can now be used in the spawn_with_extended_options API. This option makes stdout and stderr share one pipe, in the order the process wrote them. This capability is currently Process container only.

  • Seatbelt Custom Lists

    • guiAccess and extraMachLookups are now deprecated in favor of these new fields. Users of guiAccess are encouraged to use learning mode to determine what specific grants should be given. View guide.
  • Policy paths

    • ProcessContainer rejects filesystem policy paths that aren't fully qualified Windows paths, including in dry runs when using wxc-exec.exe.
    • Bubblewrap and LXC reject paths containing ..
  • WSLC bridged lifecycle sandboxes

    • Each one gets its own network, so sandboxes can't reach each other's container addresses.
    • A session holds at most 256 bridged sandboxes, and bridged sandboxes need WSL 3.0.5.
  • Linux hardening

    • Bubblewrap workloads have all capabilities removed, can't create user namespaces, don't inherit the host environment, and run as reserved subordinate IDs when root.
    • LXC containers no longer run privileged.
  • captureDenials (Learning Mode): Saved ETL trace files are deleted after 7 days.

Changelog

New Contributors

Full Changelog: v1.1.0...v1.2.0