ms-lsat
MS-LSAT (Local Security Authority Translation) client for Rust — SID↔name lookup over the \PIPE\lsarpc named pipe. The RPC channel Windows uses whenever it needs to answer "what's the account name for this SID?" (icacls, Explorer permissions, whoami /all) or the reverse.
Part of the icedracon offensive-AD ecosystem.
Status
0.1.0 — first release. Encoders + decoders for LsarOpenPolicy2, LsarLookupSids2, LsarLookupNames2 (+ LsarClose). Wire byte-shape matches the spec lsat.* NDR marshaling.
What it does
| Opnum | Name | Purpose |
|---|---|---|
| 6 | LsarOpenPolicy |
Legacy handle-open |
| 44 | LsarOpenPolicy2 |
Handle-open, wide-string (v0.1 uses this) |
| 14 | LsarLookupNames |
Legacy name→SID |
| 15 | LsarLookupSids |
Legacy SID→name |
| 57 | LsarLookupSids2 |
v0.1 — batch SID→name, TranslatedNames_2 |
| 58 | LsarLookupNames2 |
v0.1 — batch name→SID, TranslatedSids_2 |
| 0 | LsarClose |
Release handle |
Why you'd use this
Offensive:
- RID-brute enumeration when
SamrEnumerateUsersInDomainis blocked. CallLsarLookupSids2with[S-1-5-21-<domain>-500, 501, 502, ..., 1200]— the DC returns which RIDs are populated with what names. - Pre-auth account enum on legacy configs where
LookupNamesaccepts anonymous binds.
Defensive:
- Resolve SIDs from an event log or SD without a WMI/AD-module dependency.
- Build a cross-domain name resolver for DFIR reports.
Usage
# async
Related icedracon crates
samr— SAM enumeration (the primary user-listing path)dcerpc— sealed DCE/RPC transportwindows-sddl— SID parse / formatsmb2-client— SMB2 named-pipe transport
License
MIT © 2026 zevs