Information Gatheringsambawindowsenumerationrid cyclingsharesusersgroups

enum4linux

Enum4linux enumerates information from Windows and Samba systems using Samba tools. It provides functionality similar to the former enum.exe with added features like RID cycling.

Description

Enum4linux is a Perl wrapper around Samba tools such as smbclient, rpcclient, net, and nmblookup for enumerating info from Windows and Samba systems. It replicates enum.exe functionality from www.bindview.com and includes extras like RID cycling for hosts with RestrictAnonymous set to 1 on Windows NT/2000 or equivalent settings on XP/2003. Key features include user listing when RestrictAnonymous is 0 on Windows 2000, group membership info, share enumeration, workgroup/domain detection, OS identification, and password policy retrieval via polenum.

Use cases involve reconnaissance against target Windows/Samba hosts to gather user lists, shares, groups, machines, printers, OS details, and password policies. It's particularly useful for RID cycling to extract users from restrictive anonymous access configurations, common in domain controllers or Samba servers. Known usernames like administrator, guest, krbtgt aid SID lookups.

The tool requires the samba package and polenum dependency. Samba servers may have RIDs in 3000-3050 range.

How It Works

Enum4linux operates as a Perl script wrapping Samba client tools: smbclient for shares, rpcclient for RPC queries, net for network info, nmblookup for NetBIOS. It performs RID cycling by enumerating SID RIDs in ranges like 500-550,1000-1050 until consecutive failures. LDAP queries on 389/TCP provide limited DC info. Password policies use polenum. It detects workgroups/domains via NetBIOS, lists users/groups via RPC when anonymous access allows, and brute-forces shares if specified.

Installation

bash
sudo apt install enum4linux

Flags

-Uget userlist
-oGet OS information
-Mget machine list
-Sget sharelist
-Pget password policy information
-Gget group and member list
-aDo all simple enumeration (-U -S -G -P -r -o -n -i)
-renumerate users via RID cycling
-R rangeRID ranges to enumerate (default: 500-550,1000-1050, implies -r)
-lGet some (limited) info via LDAP 389/TCP (for DCs only)
-iGet printer information

Examples

Attempt to get the userlist (-U) and OS information (-o) from the target (192.168.1.200)
enum4linux -U -o 192.168.1.200
Display this help message and exit
enum4linux -h
Do all simple enumeration (-U -S -G -P -r -o -n -i) on target
enum4linux -a 192.168.1.200
Enumerate users via RID cycling on target
enum4linux -r 192.168.1.200
Get detailed userlist (-U -d) from target
enum4linux -U -d 192.168.1.200
Get sharelist from target
enum4linux -S 192.168.1.200
Get group and member list from target
enum4linux -G 192.168.1.200
Updated 2026-04-16kali.org ↗