ridenum
ridenum is a RID cycling attack tool that enumerates user accounts through null sessions and SID to RID enumeration. It can also brute force discovered accounts using an optional password file.
Description
Rid Enum performs a RID cycling attack to enumerate user accounts on remote Windows servers via null sessions and SID enumeration. This technique exploits the Security Identifier (SID) structure to guess Relative Identifiers (RIDs) for user accounts, typically starting from RID 500 upwards.
The tool first attempts to query the Local Security Authority (LSA) to obtain the base domain SID, then cycles through the specified RID range to identify valid user accounts. After enumeration, if a password file is provided, it automatically attempts to brute force the enumerated accounts.
Use cases include pre-exploitation reconnaissance on domain controllers or Windows servers with null session access enabled, helping identify valid usernames for subsequent password attacks or privilege escalation attempts.
How It Works
ridenum connects to a remote Windows server using null sessions (unauthenticated SMB connections) to query the Security Account Manager (SAM) database via LSA queries. It first enumerates the base domain SID, then performs SID-to-RID translation for each RID in the specified range (e.g., 500-50000). Valid RIDs correspond to existing user accounts. With a password file, it attempts SMB authentication against discovered usernames using dictionary attacks. Requires python3-pexpect for session handling.
Installation
sudo apt install ridenumFlags
Examples
ridenum 192.168.1.236 500 50000 /tmp/passes.txt./ridenum.py 192.168.1.50 500 50000 /root/dict.txt /root/user.txtridenum 192.168.1.236 500 1000 /tmp/passes.txtridenum 10.0.0.5 1000 20000./ridenum.py 192.168.1.1 500 50000 /tmp/passwords.txtridenum 172.16.1.100 500 50000 /root/usernames.txt /root/passwords.txt