SAMR LSA Enumeration with rpcclient
rpcclient binds to SAMR/LSA pipes for domain context. Anonymous often works on DCs; pulls users, groups, policy.
Anonymous rpcclient Connection
Null session:
enumdomusers enumdomgroups lsaquery getdompwinfo netshareenum netshareenumall srvinfo
Explain command
| -U '' | Connect with an empty/anonymous username (null session). |
| -N | Suppress password prompt, use no password (null authentication). |
| $TARGET_IP | Placeholder for the target host IP address to connect to. |
enumdomusers - returns [username] [RID].
enumdomgroups - lists groups with RIDs.
lsaquery - shows domain SID.
getdompwinfo - leaks lockout and complexity.
Authenticated rpcclient
Standard creds:
Explain command
| -U "$DOMAIN\\$USER%$PASSWORD" | Specifies credentials in DOMAIN\username%password format for authentication. |
| $TARGET_IP | Target host IP address to connect to via RPC. |
Kerberos:
Warning
WARNING: The option -k|--kerberos is deprecated!
Explain command
| -k | Use Kerberos authentication instead of NTLM. |
| $TARGET_IP | Placeholder for the target host IP address or hostname. |
Query user details:
Group members:
Resolve names:
net rpc Variants
Group members anonymous:
Explain command
| group | Specifies the RPC group management subcommand. |
| members | Lists all members of the specified group. |
| 'Domain Users' | Target group name to enumerate members from. |
| -I $TARGET_IP | Specifies the IP address of the target host. |
| -U '' | Authenticates with an empty/null username (anonymous). |
Requires workgroup match sometimes.
User and group output from SAMR is a direct input for AD Password Spraying. Before running any spray, check which accounts have pre-authentication disabled — see AS-REP Roastable Account Enumeration. For broader null-session enumeration including share and policy data, see SMB Null Session Enumeration.
Was this helpful?
Your feedback helps improve this page.