Information Gathering
Enum4linux is a comprehensive SMB enumeration tool for extracting user lists, share listings, group information, password policies, and system details from Windows and Samba systems using various NetBIOS and SMB techniques.
sudo apt install enum4linux
enum4linux [options] <target>
Enum4linux is a Perl-based enumeration tool designed specifically for extracting information from Windows and Samba systems using the SMB (Server Message Block) protocol. It leverages NetBIOS over TCP/IP to discover users, groups, shares, policies, and system details that are critical for network reconnaissance and security assessments.
The tool works by establishing SMB connections to the target host and querying various information classes including user accounts, shared resources, group memberships, password policies, and operating system characteristics. It supports both authenticated and anonymous (null session) enumeration, making it versatile for different security scenarios.
For modern environments, Enum4Linux-NG (the next-generation Python 3 rewrite) provides the same capabilities with cleaner output, JSON export, and improved performance. Both tools are essential for penetration testers, red teamers, and system administrators conducting Windows network security assessments.
enum4linux -a 192.168.1.10All enumeration - Comprehensive Windows/Samba enumeration including users, groups, shares, password policy, and OS detailsenum4linux -U 192.168.1.10User enumeration - Extract list of local user accounts from the target systemenum4linux -S 192.168.1.10Share enumeration - List all available SMB shares including hidden and administrative sharesenum4linux -G 192.168.1.10Group enumeration - Retrieve group memberships and local group informationenum4linux -P 192.168.1.10Password policy - Display password complexity requirements and account lockout settingsenum4linux -o 192.168.1.10Output to file - Save enumeration results to a file for later analysisenum4linux -a -u '' -p '' 192.168.1.10Anonymous full enumeration - Complete scan using null session credentialsenum4linux -l 192.168.1.10List enumeration - Show detailed listing of shares and their contentsenum4linux -n 192.168.1.10NetBIOS enumeration - Extract NetBIOS names, workgroups, and domain informationenum4linux -i 192.168.1.10OS identification - Determine the exact operating system version and service packenum4linux -r -u '' -p '' 192.168.1.10RID cycling - Enumerate users by brute-forcing Relative Identifiers when direct user listing is blockedenum4linux -w WORKGROUP -a 192.168.1.10Workgroup discovery - Specify the workgroup/domain name manually for accurate enumerationenum4linux -v -a 192.168.1.10Verbose scan - Show the underlying smbclient, rpcclient, and net commands as they run for debuggingenum4linux -a 192.168.1.10 | tee enum_192.168.1.10.txtSave output - Run full enumeration while writing results to a timestamped report filefor ip in $(cat smb_hosts.txt); do enum4linux -a "$ip" > "enum_$ip.txt"; doneBatch enumeration - Enumerate a list of confirmed SMB hosts and save each to its own fileEnumerate Windows hosts during authorized penetration tests to discover usernames for brute-force attacks, accessible shares for data exfiltration, and password policies for attack planning.
Map Windows network infrastructure during red team engagements, identifying lateral movement opportunities through accessible SMB shares and user account information.
Assess SMB security posture by identifying anonymous access, weak password policies, and exposed shares that could be exploited by attackers.
Discover and catalog Windows systems on a network, collecting OS versions, NetBIOS names, workgroup memberships, and shared resources for asset management.
Gather initial domain information from Domain Controllers including user listings, group policies, and trust relationships during AD security assessments.
Investigate compromised Windows systems by enumerating user accounts, shared folders, and network configuration to understand the scope of a security incident.
| Feature | Enum4linux | Enum4linux-ng |
|---|---|---|
| Language | Perl (legacy) | Python 3 (modern) |
| Maintenance | Largely unmaintained | Actively maintained |
| SMB Version Support | SMBv1-centric | SMBv1/2/3 |
| Output Formats | Free text only | Text, JSON, YAML |
| Error Handling | Basic | Robust, clearer messages |
| Speed | Medium | Faster |
| Best For | Legacy compatibility / labs | Modern engagements & automation |
| Feature | Enum4linux | SMBClient |
|---|---|---|
| Primary Role | Automated enumeration | Interactive share access |
| Users/Groups/Policy | Yes (automated) | No |
| Browse Share Contents | Lists shares only | Yes (ls, get, put) |
| File Download/Upload | No | Yes |
| Automation | One-command sweep | Manual / scripted |
| Pipeline Role | Discover shares & users | Validate & access shares |
| Best For | Initial enumeration | Confirming access & data |
| Feature | Enum4linux | CrackMapExec |
|---|---|---|
| Scope | Single host | Network-wide (ranges) |
| Credential Spraying | No | Yes (parallel) |
| Post-Exploitation | No | Yes (exec, dump, modules) |
| SMBv2/3 Support | Limited (ng better) | Full |
| Learning Curve | Low | Medium |
| Speed at Scale | Slow across ranges | Fast (threaded) |
| Best For | Focused single-host recon | Large-scale SMB attacks |
| Feature | Enum4linux | Nmap SMB NSE |
|---|---|---|
| Approach | Dedicated SMB enumeration | Scriptable scan add-on |
| User Enumeration | Yes (RID cycling) | Yes (smb-enum-users) |
| Share Enumeration | Yes | Yes (smb-enum-shares) |
| Vuln Detection | Indirect (reports SMB version) | Yes (smb-vuln-* scripts) |
| Depth of SMB Data | High (policy, groups, OS) | Moderate |
| Integration | Standalone | Within Nmap workflow |
| Best For | Deep SMB profiling | Quick checks during scanning |
| Feature | Enum4linux | NetExec |
|---|---|---|
| Status | Classic enumeration tool | Maintained CME successor |
| Protocols | SMB / NetBIOS | SMB, WinRM, LDAP, MSSQL, SSH, RDP |
| Multi-host | One at a time / batch loop | Native ranges & subnets |
| Credential Checks | Enumeration only | Auth, spraying, hash relay |
| Modules | Fixed flag set | Extensive module ecosystem |
| Output | Text (ng: JSON) | Console + database + logs |
| Best For | First-touch SMB recon | Full AD attack workflows |
| Feature | Manual (smbclient/rpcclient) | Automated (Enum4linux) |
|---|---|---|
| Speed | Slow, command-by-command | Fast one-command sweep |
| Coverage | Only what you query | Users, shares, groups, policy, OS |
| Learning Value | High (understand each step) | Lower (abstracts the calls) |
| Control / Stealth | Precise, quieter | Noisier, many queries |
| Repeatability | Depends on operator | Consistent every run |
| Best For | Targeted checks & learning | Comprehensive fast recon |
Yes, though enum4linux-ng (the Python 3 rewrite) is now preferred. The original Perl script still ships with Kali and works against legacy SMBv1 hosts, but enum4linux-ng handles modern SMBv2/3 targets and produces JSON output.
Not always. It can enumerate anonymously via null sessions on hosts that allow them. Modern Windows disables null sessions, so authenticated enumeration with -u and -p usually returns far more data.
RID cycling (-r) brute-forces Relative Identifiers to enumerate user accounts by their SID suffix when direct user listing is blocked. It can recover valid usernames even when RestrictAnonymous limits standard enumeration.
Use enum4linux-ng for new work: it is actively maintained, supports SMBv2/3, and exports JSON/YAML. Keep the original enum4linux for legacy SMBv1 targets or when reproducing older tutorials and labs.
Usually because null sessions are disabled, SMBv1 is turned off, or ports 139/445 are filtered. Verify SMB is reachable with Nmap, try enum4linux-ng, and supply valid credentials for authenticated enumeration.
SMB Enumeration
Next-generation Python 3 rewrite of Enum4linux with cleaner output, JSON export, and improved performance.
SMB Client
Interactive SMB client for testing share access, listing contents, and downloading files from Windows shares.
NetBIOS Scanner
Fast NetBIOS scanner for discovering Windows hosts and their NetBIOS names, workgroups, and MAC addresses.
Network Scanner
Versatile network scanner for port discovery, service detection, and OS fingerprinting across networks.
Post-Exploitation
Post-exploitation tool for enumerating and attacking SMB services across large networks efficiently.
Password Attacks
Fast network brute-force tool for testing credentials against various services including SMB.
Enum4linux output is organized into structured blocks: User Accounts (enumerated local users), Groups (local group memberships), Shares (SMB share names and permissions), Password Policy (complexity and lockout rules), Operating System (version and service pack), Domain Information (workgroup or AD domain), NetBIOS Names (host and workgroup identifiers), and Session Data (null session availability). Focus on usernames for brute-force attacks, anonymous shares for data access, and password policy for attack planning.
This tool is designed for authorized security testing, educational purposes, and legitimate network administration only. Unauthorized access to computer systems is illegal.