Skip to main content

Crate smolder_core

Crate smolder_core 

Source
Expand description

Protocol and transport primitives for Smolder.

The published package name is smolder-smb-core, while the Rust library crate name remains smolder_core.

§Feature Flags

The supported cargo features are:

  • kerberos: stable public Kerberos API plus the current password-backed backend
  • kerberos-sspi: backend-only flag for the current password-backed Kerberos implementation
  • kerberos-gssapi: Unix ticket-cache and keytab backend using system GSS/Kerberos libraries

The default build enables none of these features and stays the most static-friendly profile. kerberos-gssapi is intentionally independent from kerberos-sspi, so enabling Unix GSS credential-store support does not also pull in the SSPI backend.

It owns SMB auth/session state, request dispatch, and transport logic. High-level SMB file facades, execution flows, and other operator workflows belong in the smolder package, not this crate.

This crate is the reusable library layer for:

  • SMB negotiate, session setup, signing, and encryption
  • NTLM/SPNEGO authentication primitives, with optional Kerberos support
  • Tree/file operations, compound dispatch, and credit-aware request flow
  • DFS referral helpers
  • Named-pipe and DCE/RPC transport on top of SMB
  • Durable/reconnect and resiliency primitives

The most common imports are re-exported in prelude.

§Usage model

Use smolder_core when you want typed SMB/RPC client primitives and are comfortable orchestrating the protocol yourself. If you want a higher-level share/file API or operator-facing workflows such as smbexec and psexec, use the smolder package instead.

§Start here

The fastest supported entry points are:

  • cargo run -p smolder-smb-core --example ntlm_tree_connect
  • cargo run -p smolder-smb-core --example named_pipe_rpc_bind
  • cargo run -p smolder-smb-core --features kerberos --example kerberos_tree_connect

Supporting project docs:

§Public API Tiers

The intended entry points for most consumers are:

Lower-level signing, preauth, and raw crypto helpers remain available for expert users, but they are not the recommended starting surface. The repo’s API audit notes are in docs/reference/smolder-core-api.md.

Copyright (c) 2025 M00NLIG7

Modules§

auth
Authentication providers and protocol helpers.
client
Typestate SMB client built on top of wire-level packet codecs.
crypto
SMB cryptographic key-derivation helpers.
dfs
DFS-aware UNC parsing and referral resolution helpers.
error
Errors returned by the core client/session layer.
pipe
Reusable IPC$ and named-pipe primitives built on top of the typestate client.
prelude
Curated imports for the intended smolder_core entry points.
rpc
Reusable DCE/RPC transport primitives built on top of named pipes.
transport
Async transports used by the SMB client.