Search K
Appearance
Appearance
Try Hard Security Group
Relative Identifiers (RID) and Security Identifiers (SID) are key components in Windows operating systems for uniquely identifying and managing objects, such as users and groups, within a network domain.
For instance, a user named pepe
might have a unique identifier combining the domain's SID with his specific RID, represented in both hexadecimal (0x457
) and decimal (1111
) formats. This results in a complete and unique identifier for pepe within the domain like: S-1-5-21-1074507654-1937615267-42093643874-1111
.
The rpcclient
utility from Samba is utilized for interacting with RPC endpoints through named pipes. Below commands that can be issued to the SAMR, LSARPC, and LSARPC-DS interfaces after a SMB session is established, often necessitating credentials.
srvinfo
command is used.querydispinfo
and enumdomusers
.queryuser <0xrid>
.queryusergroups <0xrid>
.lookupnames <username>
.queryuseraliases [builtin|domain] <sid>
.# Users' RIDs-forced
for i in $(seq 500 1100); do
rpcclient -N -U "" [IP_ADDRESS] -c "queryuser 0x$(printf '%x\n' $i)" | grep "User Name\|user_rid\|group_rid" && echo "";
done
# samrdump.py can also serve this purpose
enumdomgroups
.querygroup <0xrid>
.querygroupmem <0xrid>
.enumalsgroups <builtin|domain>
.queryaliasmem builtin|domain <0xrid>
.enumdomains
.lsaquery
.querydominfo
.netshareenumall
.netsharegetinfo <share>
.lookupnames <username>
.lsaenumsid
.lookupsids <sid>
.Command | Interface | Description |
---|---|---|
queryuser | SAMR | Retrieve user information |
querygroup | Retrieve group information | |
querydominfo | Retrieve domain information | |
enumdomusers | Enumerate domain users | |
enumdomgroups | Enumerate domain groups | |
createdomuser | Create a domain user | |
deletedomuser | Delete a domain user | |
lookupnames | LSARPC | Look up usernames to SIDa values |
lookupsids | Look up SIDs to usernames (RIDb cycling) | |
lsaaddacctrights | Add rights to a user account | |
lsaremoveacctrights | Remove rights from a user account | |
dsroledominfo | LSARPC-DS | Get primary domain information |
dsenumdomtrusts | Enumerate trusted domains within an AD forest |
To understand better how the tools samrdump and rpcdump works you should read Pentesting MSRPC.
Try Hard Security Group