Skip to main content

Crate samr

Crate samr 

Source
Expand description

SAMR (MS-SAMR) — the Security Account Manager Remote protocol: enumerate domains, users, groups, and (via aliases) local administrators. Exposed only over the \PIPE\samr named pipe, so it rides an authenticated SMB transport (the next layer); the interface identity and NDR request marshaling live here.

Modules§

access
Common SAM access masks.
opnum

Structs§

SamrClient
High-level SAMR client bound over an SMB named pipe (\PIPE\samr).
SamrHandle
A 20-byte RPC context handle (attributes u32 + 16-byte GUID) returned by open calls.

Functions§

decode_enum_domains
Decode a SamrEnumerateDomainsInSamServer response: (resume handle, [(rid, name)]).
decode_lookup_domain
encode_connect2
SamrConnect2(IN [unique,string] ServerName, IN ACCESS_MASK DesiredAccess) → handle.
encode_enum_domains
SamrEnumerateDomainsInSamServer(IN handle, IN/OUT EnumerationContext, IN PreferedMaximumLength).
encode_enum_users
SamrEnumerateUsersInDomain(IN handle, IN/OUT ctx, IN UserAccountControl, IN prefMax). The response reuses the SAMPR_RID_ENUMERATION shape → decode_enum_domains.
encode_lookup_domain
SamrLookupDomainInSamServer(IN handle, IN RPC_UNICODE_STRING name) → domain SID.
encode_open_domain
SamrOpenDomain(IN handle, IN access, IN RPC_SID domain) → domain handle.
samr_syntax
The SAMR interface (v1.0).