smb2-client
A minimal, async, pure-Rust SMB2 client — no FFI, no windows crate — so it connects
to Windows file servers from any platform. Built on ntlmssp
for authentication.
Features
- SMB2 NEGOTIATE — offers dialects 2.0.2 + 2.1.0; the server picks the highest, so this reaches Server 2008 through 2025. SMB 3.x is not offered yet (see Scope). NTLMv2 session setup wrapped in SPNEGO, from a password or an NT hash (pass-the-hash).
- Message signing: HMAC-SHA256 over the offered 2.x dialects (live-validated). AES-CMAC / SP800-108 KDF code exists for SMB 3.0.x but is not validated — the client never reaches that branch today because 3.x isn't offered.
- TREE_CONNECT, named-pipe open/read/write (the transport under DCE/RPC-over-SMB), and
disk-file read (for pulling command output back over
C$). - A small SMB2 server side (
server) sufficient to stand up an NTLM capture endpoint.
Example
use SmbClient;
# async
Pairs with dcerpc for SAMR / LSAT / DRSUAPI etc. over the
named-pipe transport — together they're the "spec-vector captures for Rust" that didn't previously exist.
Scope
Client-focused SMB2 for automation/tooling (auth, signing, pipes, file read). Not a general file-server or a full SMB3 encryption implementation. NTLMv2 only (no NTLMv1/LM).
License
MIT © icedracon. Extracted from ADhammer.