| Field | Detail |
|---|---|
| Summary | Automated Windows/Samba enumeration over SMB and MSRPC |
| Category | Windows/SMB enumeration |
| Phase | enumeration |
| Interface | CLI |
| Platform | Linux |
| Licence | Open source (GPL) |
| Docs | https://github.com/cddmp/enum4linux-ng |
| Related | SMB and Active Directory enumeration, rpcclient, smbclient, polenum, NetExec (CrackMapExec) |
A wrapper that automates Windows/Samba enumeration over SMB and MSRPC by driving smbclient, rpcclient, net and nmblookup for you. It pulls users, groups, shares, password policy, OS info and more in one command. The original is a Perl script (enum4linux); enum4linux-ng is the maintained Python rewrite with cleaner, machine-readable (JSON/YAML) output — prefer it.
⚠️ Warning — Scope & noise Enumeration is active and lands in the target's logs. Authorised, in-scope hosts only. Many checks work against null/guest sessions; others need credentials.
The one you'll run most
enum4linux -a 10.10.10.5 # "do everything" with a null session
enum4linux -a -u test -p test123 10.10.10.5 # everything, authenticated as test/test123
-a = run all the simple enumeration (-U -S -G -P -r -o -n -i): users, shares, groups, password policy, RID cycling, OS info, nmblookup and printer info. Add -u/-p when you have a credential — authenticated runs return far more (full user/group lists, readable shares) than an anonymous one.
Option reference (classic enum4linux)
| Flag | What it enumerates |
|---|---|
-U |
Users (via RPC + RID) |
-S |
Shares (and whether you can access them) |
-G |
Groups and members |
-P |
Password policy (lockout threshold — read before any spraying) |
-r |
RID cycling (finds users even when RestrictAnonymous blocks direct enum) |
-o |
OS information |
-n |
nmblookup / NetBIOS name table |
-i |
Printer information |
-a |
All of the above |
-u / -p |
Username / password for an authenticated session |
-d |
Detailed output (verbose) |
-M |
Enumerate machines |
-R <start>-<end> |
Custom RID range for cycling |
enum4linux-ng (the modern rewrite)
enum4linux-ng 10.10.10.5 # sensible defaults
enum4linux-ng -A 10.10.10.5 # ALL, incl. advanced (LDAP, SMB dialects)
enum4linux-ng -A -u test -p test123 10.10.10.5 # authenticated, everything
enum4linux-ng -As 10.10.10.5 # all SHARES only
enum4linux-ng -U -oJ users 10.10.10.5 # users -> users.json
enum4linux-ng -R 500-600 10.10.10.5 # RID cycling over a range
-ng adds LDAP checks, SMB dialect/signing detection, and -oJ/-oY output you can post-process — handy for feeding users into a spray list or a report.
Reading the output
- Users → build a spray/brute list (feed Hydra / Kerbrute, carefully).
- Shares → anything READ/WRITE gets explored with smbclient / smbmap.
- Password policy → the lockout threshold you must respect before spraying.
- RID cycling results → users that direct enumeration missed.
- "Domain SID" and the hostname/domain → confirms you're hitting the right target / a DC.
Kill-chain usage
Enumeration
enum4linux -a -u test -p test123 10.10.10.5 # full SMB/AD enumeration
Where it fits
The fast first sweep against #tcp/139 / #tcp/445 once a host shows SMB open (Nmap). It's an automation layer over rpcclient, smbclient and nmblookup (nbtscan) — when a specific check looks interesting, drop to those tools for control, pull the password policy precisely with polenum, and move to NetExec (CrackMapExec) to validate creds and find where you're admin. See SMB and Active Directory enumeration for the whole workflow.