Cyber Research Wiki

enum4linux-ng

A next-generation rewrite of enum4linux that enumerates information from Windows and Samba systems via SMB/RPC/LDAP, adds structured JSON/YAML output, and wraps core Samba client tools for use by security professionals and CTF players.

Overview

enum4linux-ng is an open-source enumeration utility for Windows and Samba environments. It modernizes the original enum4linux by orchestrating Samba client tools, parsing their heterogeneous outputs, and normalizing results into machine-readable formats. It is designed for reconnaissance and assessment, supporting unauthenticated and authenticated modes (cleartext credentials, NT hash, Kerberos ticket), optional RID cycling, and selective checks guided by a preflight that detects service availability and suppresses inapplicable tests. It is not an exploitation framework and is typically chained with broader network discovery or Active Directory assessments.

What It Is

A Python-based rewrite of the classic enum4linux.pl that primarily acts as a wrapper/driver for Samba client utilities (nmblookup, net, rpcclient, smbclient), adding parsers and exporters. It provides SMB/NetBIOS, RPC, and limited LDAP-driven discovery against Windows hosts, Samba servers, and AD domain controllers. The project is distributed under GPL-3.0 and is packaged in common security distributions such as Kali.

How It Works

The tool begins by probing target reachability and available services (e.g., SMB versus LDAP) and whether a session can be established, enabling a service-aware preflight that disables checks likely to fail. It then invokes Samba utilities to query NetBIOS names, shares, users, groups, services, password policies, operating system and domain details, printers, and—optionally—performs RID cycling to derive accounts from SIDs. Outputs from these tools are parsed into normalized in-memory structures and emitted as categorized console results and/or JSON/YAML artifacts suitable for downstream processing. Authentication is flexible: anonymous/null sessions, username+password, NT hash (pass-the-hash), or Kerberos tickets in AD contexts with correct DNS configuration.

Core Concepts

Typical Workflow

Use Cases

Limitations

Related Tools

Evidence Gaps

Sources

Confidence

high