Skip to content

sty-nathan/samr-rid-enum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

SAMR RID Enumerator

Fast multi-threaded SAMR RID enumeration tool written in Python using Impacket.

This tool performs user enumeration over the SAMR RPC interface without relying on the rpcclient binary.


Features

  • Null session support
  • Multi-threaded RID enumeration
  • No dependency on Samba tools
  • Pure Python implementation
  • Compatible with Linux and Windows
  • Hexadecimal or decimal RID display
  • Output file support

Installation

Clone the repository

git clone https://github.com/sty-nathan/samr-rid-enum.git
cd samr-rid-enum

Install dependencies

pip install -r requirements.txt

Or manually:

pip install impacket

Usage

Basic null-session enumeration

python3 samr_rid_enum.py 192.168.1.10

Custom RID range

python3 samr_rid_enum.py 192.168.1.10 --start 500 --end 3000

Authenticated enumeration

python3 samr_rid_enum.py 192.168.1.10 -u administrator -p password123

Increase thread count

python3 samr_rid_enum.py 192.168.1.10 -t 50

Save results

python3 samr_rid_enum.py 192.168.1.10 --output users.txt

Example Output

[*] Target   : 192.168.1.10:445
[*] RID range: 500 – 1100
[*] Threads  : 10

  User Name   :    Administrator
  user_rid    :    0x1f4
  group_rid   :    0x220

  User Name   :    Guest
  user_rid    :    0x1f5
  group_rid   :    0x220

Arguments

Argument Description
host Target IP or hostname
--start Starting RID
--end Ending RID
-u SMB username
-p SMB password
-d Domain/workgroup
-t Number of threads
--decimal Show RIDs in decimal
--output Save results to file

Why use this tool?

Traditional RID enumeration commonly relies on:

rpcclient -N -U "" target

This project removes the dependency on Samba utilities and directly interacts with the SAMR RPC interface using Impacket.

Useful for:

  • Internal pentests
  • Active Directory enumeration
  • Red team operations
  • Lab environments
  • Windows RPC research

Requirements

  • Python 3.9+
  • Impacket

Legal Disclaimer

This tool is intended for authorized security testing and educational purposes only.

The author is not responsible for misuse or damage caused by this project.


License

MIT License

About

The project was designed as a lightweight alternative to traditional rpcclient-based RID enumeration, removing the dependency on Samba utilities while keeping compatibility with null sessions and authenticated SMB sessions.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages