GO KALI FREE

Enum4linux

Information Gathering

Beginnermedium risk

Learn how to use Enum4linux to enumerate Windows and Samba systems over SMB: install it on Kali Linux, run your first scan, read the users, shares, groups and password policy it returns, and switch to enum4linux-ng for modern hosts that block null sessions.

Installation

sudo apt install enum4linux

Basic Syntax

enum4linux [options] <target>

Quick Facts

Category
SMB Enumeration
Platform
Linux
Protocol
SMB / NetBIOS
Difficulty
Beginner-Friendly
Common Usage
Windows Network Reconnaissance
Default Port
139/445
Language
Perl / Python (ng)
License
GPL

Tool Overview

To use Enum4linux, confirm SMB is open on the target, then run `enum4linux -a <target>` — one command that returns the user list, shares, groups, password policy, OS version and domain details. Start with an anonymous null session; if it returns nothing, rerun with credentials (`-u` and `-p`). For Windows hosts that block null sessions, use the enum4linux-ng rewrite instead.

The beginner loop is short: find the host with Nmap, confirm ports 139 or 445 are open, run the full `-a` scan, read the output block by block, then rerun targeted flags (`-U` for users, `-S` for shares, `-P` for policy) on the hosts that matter. Save every scan to a file so the results survive the session and can go straight into the report.

A first scan against a lab host shows what the output looks like. Against Metasploitable 2 (192.168.56.102), `enum4linux -a 192.168.56.102` returns users through RID cycling — root, daemon, msfadmin, postgres and service — plus the shares IPC$ and tmp, and a password policy with minimum password length 0 and no account lockout. Those three lines already tell the story: valid usernames to test, a readable share to check, and a policy that makes brute force viable.

Enum4linux gets so much from an unauthenticated connection because of SMB null sessions. Older Windows versions and most Samba installations let an anonymous visitor open the IPC$ share, and through it query user accounts, group memberships and domain policy that administrators assume are private. Modern Windows disables SMBv1 and null sessions by default, which is why the same command can return almost nothing on a hardened host.

Enum4linux is not a vulnerability scanner: it reports what the host discloses over SMB, and says nothing about whether the host is patched or vulnerable. An empty result is not a failed test — on a well-configured host it is a good result, and it belongs in the report as evidence that anonymous enumeration is blocked.

Install Enum4linux with `sudo apt install enum4linux` on Kali Linux, Ubuntu or Debian, and verify it with `enum4linux -h`. For the maintained rewrite, install enum4linux-ng with `sudo apt install enum4linux-ng`, or with pip (`pip install enum4linux-ng`) where the package is not available.

For defenders, the fixes are straightforward: enable Microsoft's 'Network access: Do not allow anonymous enumeration of SAM accounts' policy, limit SMB to the systems that need it, review every share and remove the unused ones, enforce a real password policy with lockout, log and alert on repeated anonymous SMB connections, and rerun the same enum4linux checks after fixing to confirm the exposure is gone.

In a full assessment, Enum4linux sits between discovery and exploitation: Nmap finds the SMB hosts, Enum4linux extracts the users, shares and policy, the user list feeds password spraying with Hydra or NetExec, discovered shares are validated with SMBClient, and Active Directory findings are mapped with BloodHound before everything is consolidated into the report.

Quick Reference Commands

Verified quick-reference commands for Enum4linux
CommandPurpose
enum4linux -U <lab-smb-host>Enumerate users.
enum4linux -S <lab-smb-host>Enumerate visible shares.
enum4linux -P <lab-smb-host>Query password-policy information.
enum4linux -G <lab-smb-host>Enumerate groups and members.
enum4linux -o -n <lab-smb-host>Query OS information and run nmblookup.
enum4linux -a <lab-smb-host>Run all simple enumeration checks.
enum4linux | Kali Linux Tools

Common Commands

enum4linux -a 192.168.1.10All enumeration - Comprehensive Windows/Samba enumeration including users, groups, shares, password policy, and OS details
enum4linux -U 192.168.1.10User enumeration - Extract list of local user accounts from the target system
enum4linux -S 192.168.1.10Share enumeration - List all available SMB shares including hidden and administrative shares
enum4linux -G 192.168.1.10Group enumeration - Retrieve group memberships and local group information
enum4linux -P 192.168.1.10Password policy - Display password complexity requirements and account lockout settings
enum4linux -o 192.168.1.10Output to file - Save enumeration results to a file for later analysis
enum4linux -a -u '' -p '' 192.168.1.10Anonymous full enumeration - Complete scan using null session credentials
enum4linux -l 192.168.1.10List enumeration - Show detailed listing of shares and their contents
enum4linux -n 192.168.1.10NetBIOS enumeration - Extract NetBIOS names, workgroups, and domain information
enum4linux -i 192.168.1.10OS identification - Determine the exact operating system version and service pack
enum4linux -r -u '' -p '' 192.168.1.10RID cycling - Enumerate users by brute-forcing Relative Identifiers when direct user listing is blocked
enum4linux -w WORKGROUP -a 192.168.1.10Workgroup discovery - Specify the workgroup/domain name manually for accurate enumeration
enum4linux -v -a 192.168.1.10Verbose scan - Show the underlying smbclient, rpcclient, and net commands as they run for debugging
enum4linux -a 192.168.1.10 | tee enum_192.168.1.10.txtSave output - Run full enumeration while writing results to a timestamped report file
for 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 file
nmap -p445 --open -oG - 192.168.1.0/24 | awk '/445\/open/{print $2}' | xargs -I{} enum4linux -a {}Nmap integration - Pipe hosts with open SMB from Nmap directly into Enum4linux enumeration
enum4linux -S 192.168.1.10 && smbclient -L //192.168.1.10 -NSMBClient integration - Enumerate shares, then list them interactively with SMBClient to test access
enum4linux-ng -A -oJ enum_report 192.168.1.10Enum4linux-ng JSON - Run full enumeration with the modern rewrite and export structured JSON for tooling

Step-by-Step Guide

  1. 1Confirm you have written authorization for the target host and network, and note the in-scope IP range before running anything.
  2. 2Confirm SMB is open: run `nmap -p139,445 <target>` and continue only if port 139 or 445 is open.
  3. 3Verify Enum4linux is installed with `enum4linux -h`; if it is missing, install it with `sudo apt install enum4linux`.
  4. 4Run the full scan and save it: `enum4linux -a <target> | tee enum_<target>.txt`.
  5. 5Read the user list first, then run RID cycling with `enum4linux -r -R 500-700 <target>` to catch accounts the standard listing hides.
  6. 6List shares with `enum4linux -S <target>`, then validate any readable share with `smbclient // <target>/<share> -N` before reporting it as accessible.
  7. 7Read the password policy with `enum4linux -P <target>` and check the lockout threshold before any brute-force attempt.
  8. 8If the null session returns almost nothing, rerun authenticated: `enum4linux -a -u <user> -p <password> <target>`.
  9. 9Extract the usernames into a file with `grep 'user:' enum_<target>.txt` for the next phase of testing.
  10. 10On modern Windows hosts, switch to the rewrite: `enum4linux-ng -A -oJ enum_report <target>` for SMBv2/3 support and JSON output.

Warnings

Use Cases

Penetration Testing

Enumerate Windows hosts during authorized penetration tests to discover usernames for brute-force attacks, accessible shares for data exfiltration, and password policies for attack planning.

Red Team Operations

Map Windows network infrastructure during red team engagements, identifying lateral movement opportunities through accessible SMB shares and user account information.

Security Auditing

Assess SMB security posture by identifying anonymous access, weak password policies, and exposed shares that could be exploited by attackers.

Network Inventory

Discover and catalog Windows systems on a network, collecting OS versions, NetBIOS names, workgroup memberships, and shared resources for asset management.

Active Directory Reconnaissance

Gather initial domain information from Domain Controllers including user listings, group policies, and trust relationships during AD security assessments.

Incident Response

Investigate compromised Windows systems by enumerating user accounts, shared folders, and network configuration to understand the scope of a security incident.

Key Features

Comparison

Enum4linux vs Enum4linux-ng

FeatureEnum4linuxEnum4linux-ng
LanguagePerl (legacy)Python 3 (modern)
MaintenanceLargely unmaintainedActively maintained
SMB Version SupportSMBv1-centricSMBv1/2/3
Output FormatsFree text onlyText, JSON, YAML
Error HandlingBasicRobust, clearer messages
SpeedMediumFaster
Best ForLegacy compatibility / labsModern engagements & automation

Enum4linux vs SMBClient

FeatureEnum4linuxSMBClient
Primary RoleAutomated enumerationInteractive share access
Users/Groups/PolicyYes (automated)No
Browse Share ContentsLists shares onlyYes (ls, get, put)
File Download/UploadNoYes
AutomationOne-command sweepManual / scripted
Pipeline RoleDiscover shares & usersValidate & access shares
Best ForInitial enumerationConfirming access & data

Enum4linux vs CrackMapExec

FeatureEnum4linuxCrackMapExec
ScopeSingle hostNetwork-wide (ranges)
Credential SprayingNoYes (parallel)
Post-ExploitationNoYes (exec, dump, modules)
SMBv2/3 SupportLimited (ng better)Full
Learning CurveLowMedium
Speed at ScaleSlow across rangesFast (threaded)
Best ForFocused single-host reconLarge-scale SMB attacks

Enum4linux vs Nmap SMB NSE

FeatureEnum4linuxNmap SMB NSE
ApproachDedicated SMB enumerationScriptable scan add-on
User EnumerationYes (RID cycling)Yes (smb-enum-users)
Share EnumerationYesYes (smb-enum-shares)
Vuln DetectionIndirect (reports SMB version)Yes (smb-vuln-* scripts)
Depth of SMB DataHigh (policy, groups, OS)Moderate
IntegrationStandaloneWithin Nmap workflow
Best ForDeep SMB profilingQuick checks during scanning

Enum4linux vs NetExec (nxc)

FeatureEnum4linuxNetExec
StatusClassic enumeration toolMaintained CME successor
ProtocolsSMB / NetBIOSSMB, WinRM, LDAP, MSSQL, SSH, RDP
Multi-hostOne at a time / batch loopNative ranges & subnets
Credential ChecksEnumeration onlyAuth, spraying, hash relay
ModulesFixed flag setExtensive module ecosystem
OutputText (ng: JSON)Console + database + logs
Best ForFirst-touch SMB reconFull AD attack workflows

Manual SMB Enumeration vs Automated (Enum4linux)

FeatureManual (smbclient/rpcclient)Automated (Enum4linux)
SpeedSlow, command-by-commandFast one-command sweep
CoverageOnly what you queryUsers, shares, groups, policy, OS
Learning ValueHigh (understand each step)Lower (abstracts the calls)
Control / StealthPrecise, quieterNoisier, many queries
RepeatabilityDepends on operatorConsistent every run
Best ForTargeted checks & learningComprehensive fast recon

Best Practices

Common Errors

enum4linux: command not found
Install with 'sudo apt install enum4linux', or use enum4linux-ng via 'pip3 install enum4linux-ng'. Verify with 'enum4linux -h'.
Connection to <host> failed / NT_STATUS_CONNECTION_REFUSED
Confirm SMB is reachable first: 'nmap -p139,445 --open <host>'. If filtered, a firewall is blocking SMB — enumeration is not possible from your position.
NT_STATUS_ACCESS_DENIED
Supply valid credentials with -u and -p, or test with a low-privilege account. Modern Windows disables null sessions by default.
NT_STATUS_LOGON_FAILURE
Verify credentials and the domain/workgroup (-w). Watch password policy lockout thresholds before retrying to avoid locking accounts.
Null session returns almost nothing
This is expected on hardened systems. Pivot to authenticated enumeration with credentials, or use RID cycling (-r) which sometimes still works.
protocol negotiation failed / SMB1 disabled
Use enum4linux-ng, which supports SMBv2/3, or switch to NetExec/CrackMapExec for SMBv3-only targets.
NT_STATUS_ACCESS_DENIED with 'SMB signing required'
Authenticate with valid credentials whose session can be signed; null-session enumeration will not succeed against signing-required hosts.
NetBIOS name lookup timeout / nmblookup hangs
This is harmless on modern networks — enum4linux falls back to port 445. Add -w to specify the workgroup manually if resolution matters.
Could not resolve hostname
Use the IP address directly, add the host to /etc/hosts, or fix DNS. Verify with 'nslookup <host>' or 'dig <host>'.
No route to host / host unreachable
Confirm you are on the correct network/VPN and can ping or ARP the host. Check 'ip route' and any pivot/proxy configuration.
Scan is extremely slow / appears to hang
Target specific enumeration flags instead of -a, lower the range for RID cycling, and set a timeout with -t. Enum4linux-ng is faster overall.

People Also Ask

Is Enum4linux still used in 2027?

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.

Does Enum4linux need credentials?

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.

What is RID cycling in Enum4linux?

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.

Enum4linux vs enum4linux-ng — which should I use?

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.

Why does Enum4linux return no results?

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.

Learning Path

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6

Related Tools

SMBClient

Information Gathering

Learn how to use SMBClient on Kali Linux: install Samba's FTP-like SMB/CIFS client, list shares, connect as a guest or with credentials, browse folders, and upload or download files on Windows, Samba, or NAS devices. For authorized assessments, check ports 139/445 with Nmap before testing share permissions.

Nmap

Information Gathering

Learn how to use Nmap, the free open-source network scanner: run your first port scan, discover live hosts, detect services and operating systems, and check for vulnerabilities with NSE scripts — a beginner tutorial for Kali Linux.

NBTScan

Information Gathering

NBTScan is a program for scanning IP networks for NetBIOS name information. It sends a NetBIOS status query to each address in the supplied range and lists received information in human-readable form.

enum4linux-ng

Information Gathering

enum4linux-ng is a next-generation version of the classic enum4linux script, rewritten from scratch in Python 3 to parse and enumerate Windows/Samba information efficiently with cleaner output formats.

CrackMapExec

Post Exploitation

CrackMapExec (CME) is a post-exploitation tool for pentesting Windows and Active Directory networks. It can enumerate users, spray passwords, execute commands, and move laterally.

Hydra

Password Attacks

Hydra is a parallelized login cracker that supports numerous protocols including FTP, HTTP, HTTPS, SMB, SSH, and many more. It performs rapid dictionary attacks against login pages and services to test password strength.

Related Cybersecurity Guides

Tools · Beginner

Enum4Linux Guide: Windows/Samba Enumeration

Learn Enum4Linux for enumerating Windows and Samba systems including user lists, shares, groups, and security policy information.

Guides · Advanced

SMB Enumeration Complete Guide: Beginner to Advanced Windows Reconnaissance

A complete beginner-to-advanced SMB enumeration guide covering discovery, NetBIOS, share access, user enumeration, automation, troubleshooting, workflow design, and SMB tool selection.

Tools · Beginner

SMB Enumeration Guide: Discovering Windows Shares and Users

Complete guide to SMB enumeration for discovering Windows shares, users, groups, and network resources using Enum4Linux, SMBClient, NBTScan, and Nmap.

Active Directory · Advanced

Domain Enumeration: Active Directory Reconnaissance Techniques

Comprehensive guide to Active Directory enumeration using native tools, PowerShell, and specialized utilities for discovering users, groups, computers, and trust relationships.

Frequently Asked Questions

What is Enum4Linux?

Enum4Linux is a Perl-based enumeration tool designed for extracting information from Windows and Samba systems using the SMB protocol. It discovers user accounts, shared resources, group memberships, password policies, and system details by querying NetBIOS over TCP/IP on ports 139 or 445.

What does Enum4Linux do?

Enum4Linux enumerates Windows/Samba systems by connecting via SMB and extracting user lists, group memberships, share names, password policies, OS versions, NetBIOS names, and domain information. It supports both anonymous (null session) and authenticated enumeration.

What is Enum4Linux used for?

Enum4Linux is used for Windows network reconnaissance during penetration testing, red team operations, security audits, and incident response. It helps identify attack vectors by discovering users for brute-force attacks, accessible shares for data exfiltration, and password policies for attack planning.

How do I use Enum4Linux?

Basic usage: enum4linux -a <target_ip> for full enumeration. For user enumeration: enum4linux -U <target>. For shares: enum4linux -S <target>. For password policy: enum4linux -P <target>. Always start with anonymous access (-u '' -p '') before trying authenticated enumeration.

How do I install Enum4Linux in Ubuntu?

Install Enum4Linux on Ubuntu/Debian: sudo apt install enum4linux. For Enum4Linux-NG: sudo apt install enum4linux-ng. Alternatively, clone from GitHub: git clone https://github.com/cddmp/enum4linux.git && cd enum4linux && sudo cp enum4linux /usr/local/bin/.

What is Enum4Linux-NG?

Enum4Linux-NG is the next-generation rewrite of Enum4Linux, rebuilt from scratch in Python 3. It offers cleaner output, JSON/CSV export, better error handling, and improved performance while maintaining the same enumeration capabilities as the original Perl-based tool.

What is the difference between Enum4Linux and Enum4Linux-NG?

Enum4Linux is the original Perl script, while Enum4Linux-NG is the modern Python 3 rewrite. Enum4Linux-NG adds JSON/CSV output, better error handling, faster execution, and active development. The original Enum4Linux is simpler and widely available in Kali Linux repositories.

Can Enum4Linux enumerate users?

Yes, Enum4Linux enumerates users via the -U flag. It uses SAM database queries, RID cycling, and policy enumeration to extract local user accounts. For authenticated enumeration, provide credentials with -u and -p flags for more complete results.

Can Enum4Linux discover SMB shares?

Yes, Enum4Linux discovers SMB shares via the -S flag. It lists all available shares including hidden, administrative, and default shares. Use SMBClient to test discovered shares for access permissions and content availability.

What port does Enum4Linux use?

Enum4Linux uses SMB ports 139 (NetBIOS Session Service) and 445 (Direct SMB). Port 445 is used by modern Windows systems, while port 139 is used by older systems and Samba. Enum4Linux automatically detects which port is available.

Is Enum4Linux safe to use?

Enum4Linux is safe when used with proper authorization. It generates SMB traffic that appears in security logs and may trigger IDS alerts. Only use it against systems you have explicit permission to test. Always verify target IP addresses to avoid scanning production systems.

What are common Enum4Linux errors and how do I fix them?

Common errors include 'Connection refused' (SMB not running or firewall blocking), 'Access denied' (null sessions disabled, try authenticated enumeration), 'Timeout' (increase -t value or check network connectivity), and 'Host unreachable' (verify IP and network route).

What are common Enum4Linux mistakes beginners make?

Common beginner mistakes include not testing anonymous access first, skipping NetBIOS name resolution, ignoring password policy data, not checking share permissions, overlooking domain information, and using default credentials without verification.

What are the best Enum4Linux alternatives?

The best alternatives are Enum4Linux-NG (modern Python 3 rewrite), SMBClient (interactive share testing), NBTScan (fast host discovery), CrackMapExec (large-scale SMB attacks), and Nmap (port scanning and service detection).

Is Enum4Linux legal to use?

Enum4Linux is legal when used with explicit authorization on systems you own or have written permission to test. Unauthorized SMB enumeration is illegal under computer fraud laws (CFAA, Computer Misuse Act). Always obtain written authorization before running Enum4Linux against any network. Use it only in lab environments, CTF competitions, or authorized penetration testing engagements.

Can Enum4Linux enumerate Active Directory domains?

Yes, Enum4Linux can enumerate Active Directory when targeting Domain Controllers with valid domain credentials. It extracts user listings, group memberships (including Domain Admins), password policies, domain SID, and trust relationships. For deeper AD analysis, combine with BloodHound, ldapsearch, or CrackMapExec for comprehensive domain reconnaissance.

Does Enum4Linux work on Windows?

Enum4Linux is a Linux-based tool designed for Kali Linux and other Linux distributions. It does not run natively on Windows. However, Enum4Linux targets Windows systems remotely via SMB. To use Enum4Linux from Windows, install it in WSL (Windows Subsystem for Linux) or run it from a Linux virtual machine. Enum4Linux-NG (Python 3) can also run on Windows with Python installed.

Can enum4linux enumerate password policies?

Yes, use enum4linux -P <target> to extract password policy information including minimum password length, maximum password age, password history length, lockout threshold, and lockout duration. This data is critical for planning brute-force attacks with tools like Hydra, as it reveals account lockout thresholds and password complexity requirements.

How do I use enum4linux with a specific workgroup?

Use the -w flag to specify a workgroup or domain: enum4linux -w WORKGROUP -u admin -p password <target>. This is useful when targeting systems in a different workgroup than your own. Use -r to attempt to enumerate domain controllers and -I for NetBIOS information to identify the correct workgroup name first.

Can enum4linux enumerate Windows services?

No, enum4linux focuses on SMB/NetBIOS enumeration (users, shares, groups, policies). For Windows service enumeration, use nmap -sV -p 445, crackmapexec with the smbExec module, or Impacket's services.py. Enum4linux complements these tools by providing user and share data that feeds into service exploitation.

How do I use enum4linux to find shares for data exfiltration?

Run enum4linux -S <target> to list all shares, then use enum4linux -s <sharename> <target> to list contents of specific shares. Look for shares with READ or FULL access permissions. Common targets include IPC$, ADMIN$, NETLOGON, and SYSVOL. Combine with smbclient to download files from accessible shares.

Can enum4linux enumerate trust relationships?

Yes, enum4linux can discover domain trust relationships when targeting Domain Controllers with valid credentials. Look for trust account names and domain SID information in the output. Trust relationships reveal how domains are connected, which is valuable for lateral movement in multi-domain Active Directory environments.

How do I parse enum4linux output for reports?

Redirect output to a file: enum4linux -a <target> > enum_results.txt. Key sections to extract include user lists (for Hydra targeting), share permissions (for access validation), password policies (for lockout planning), and OS version (for exploit selection). Use grep to filter specific sections: grep -A 20 'User Information' enum_results.txt.

How do I use enum4linux to enumerate local groups?

Run enum4linux -G <target> to enumerate local groups and their members. This reveals which users have administrative privileges on the target. For domain-joined systems, combine with -r to enumerate domain groups. Local group enumeration is critical for identifying privileged accounts that can be used for lateral movement.

Can enum4linux detect SMBv1 vulnerabilities?

Yes, enum4linux reports the SMB dialect negotiated during connection. Look for 'SMBv1' in the protocol negotiation output. SMBv1 is vulnerable to EternalBlue (MS17-010) and other critical exploits. Use nmap --script smb-vuln-ms17-010 -p 445 <target> for formal vulnerability validation after identifying SMBv1 via enum4linux.

How does enum4linux compare to enum4linux-ng?

Enum4linux-ng is a modern Python3 rewrite with enhanced output formats (JSON, YAML, grepable), better error handling, and additional enumeration features like LAPS detection. It supports the same core functionality but is actively maintained. Use enum4linux-ng for new engagements and enum4linux for legacy compatibility.

What is RID cycling in Enum4linux?

RID cycling enumerates users by iterating through Relative Identifiers (RIDs) appended to the domain SID, resolving each to a username via SMB. Enum4linux performs it with the -r flag, which is useful when direct user listing (-U) is blocked but the null session still resolves SIDs. Well-known RIDs like 500 (Administrator) and 501 (Guest) are reliable starting points.

How is Enum4linux different from NetExec (nxc)?

Enum4linux is a focused single-host SMB enumeration tool, while NetExec (the maintained successor to CrackMapExec) is a multi-protocol swiss army knife supporting SMB, WinRM, LDAP, MSSQL, and more across entire ranges with credential spraying and modules. Use Enum4linux for first-touch recon of one host, then NetExec to scale enumeration and credential testing across the network.

Why does Enum4linux fail on modern Windows 11 or Server 2022?

Modern Windows disables SMBv1 and null sessions by default, and often requires SMB signing — all of which the original Perl enum4linux depends on. As a result, anonymous enumeration returns little or nothing. Use enum4linux-ng for SMBv2/3 support and supply valid credentials for authenticated enumeration on hardened hosts.

Does Enum4linux enumerate SMB shares anonymously?

It can, but only if the target permits null sessions. Run 'enum4linux -S -u "" -p "" <target>' to list shares anonymously. On modern systems where anonymous access is disabled, you will need credentials. Always validate discovered shares with SMBClient before reporting them as accessible.

Where does Enum4linux fit in an SMB assessment workflow?

After host discovery (Netdiscover), port scanning (Nmap), and confirming SMB is open, Enum4linux performs the deep SMB enumeration step. Its output feeds SMBClient for share access, NetExec/CrackMapExec for network-wide credential testing, and BloodHound for Active Directory path mapping — before findings are consolidated into the report.

Is Enum4linux output reliable enough for a report?

Enum4linux output is a strong starting point, but you should validate key findings manually before reporting. Confirm share access with SMBClient, cross-check RID-cycled users against direct enumeration, and verify the SMB version independently. Use enum4linux-ng JSON output to preserve structured evidence for your report.

How do I use Enum4linux in Kali Linux?

Enum4linux is pre-installed on Kali Linux. Open a terminal, confirm the target has SMB open with `nmap -p139,445 <target>`, then run `enum4linux -a <target>` for the full enumeration. Save the output with `| tee enum_<target>.txt` so you can grep the user list and share table afterwards. If the scan returns almost nothing, the target probably blocks null sessions — rerun with credentials or switch to enum4linux-ng.

How do I install enum4linux-ng in Kali Linux?

Install it with `sudo apt install enum4linux-ng`; if the package is unavailable, use pip with `pip install enum4linux-ng`. Verify it with `enum4linux-ng -h`, then run your first scan with `enum4linux-ng -A <target>`. Add `-oJ results` to write structured JSON output, and `-u <user> -w <domain>` when the target needs authenticated enumeration.

What does enum4linux -a do?

The `-a` flag runs the full simple enumeration set in one command: user listing (`-U`), share listing (`-S`), group listing (`-G`), password policy (`-P`), RID cycling (`-r`), OS information (`-o`), nmblookup (`-n`) and OS identification (`-i`). Use it for the first pass on a host, then switch to targeted flags — `-U` for users, `-S` for shares, `-P` for policy — when you only need one piece of data or the full scan is too slow.

How do I stop anonymous SMB enumeration?

Enable Microsoft's 'Network access: Do not allow anonymous enumeration of SAM accounts' policy (Enabled is the recommended value), which stops anonymous visitors listing account names. Then limit SMB to the systems that need it, review every share and remove unused ones, enforce a password policy with lockout, and monitor for repeated anonymous SMB connections. Rerun the same enum4linux checks afterwards to confirm the exposure is gone.

Tags

#reconnaissance#smb-enumeration#samba#windows-enumeration#netbios#user-enumeration#share-enumeration#active-directory

Output Explanation

Enum4linux prints its results in labelled blocks, in this order: session and target details, users, groups, shares, password policy, OS information, domain information and NetBIOS names. Read them like a lab report. A user line such as `user:[msfadmin] rid:[0x3f2]` is one valid account with its Relative Identifier; the RID-cycled section lists accounts the standard query hid. The share table lists each share name, type and comment — IPC$ is the anonymous channel, a Disk share such as tmp is one to validate with SMBClient. The password policy block shows minimum length, history and lockout threshold: a minimum length of 0 with no lockout means brute force is viable, while a strict policy means it is not. Turn each block into a finding: users become the Hydra or NetExec target list, shares become access checks, policy becomes the brute-force plan. If every block is empty, record it as a positive result — anonymous enumeration is blocked on that host.

Ethical Usage Notice

This tool is designed for authorized security testing, educational purposes, and legitimate network administration only. Unauthorized access to computer systems is illegal.