Skip to main content
NetExec is the actively maintained successor to CrackMapExec. It speaks SMB, LDAP, WinRM, MSSQL, SSH, RDP, FTP, and more: use it for credential validation, enumeration, lateral movement, and post-exploitation across an entire subnet in one command.

SMB

SMB is the primary protocol for Windows enumeration and lateral movement. Start unauthenticated to see what’s exposed, then escalate to authenticated enumeration once you have credentials.

Host Discovery

Sweep a subnet to find live Windows hosts and identify domain membership, OS version, and SMB signing status.

Null and Guest Sessions

Test for unauthenticated access before using credentials: null sessions often expose user lists and share names.

Credential Validation

A (+) or [+] in the output means the credential is valid. Pwn3d! means you have admin rights on that host.

Share Enumeration

List all shares and their access level: look for non-default shares like backup, data, scripts, IT.

Share Spidering

Recursively enumerate file contents across all shares: outputs a JSON map of every readable file path.

File Operations

Download or upload files directly over SMB without a separate tool.

User and Group Enumeration

Pull users, groups, logged-on sessions, and local admins from the target.

RID Brute Force

Enumerate accounts by brute-forcing RIDs over SAMR: works even when --users is restricted, and finds local accounts too.

Command Execution

Run commands on the remote host: -x uses cmd.exe, -X uses PowerShell. Requires admin rights.

Credential Dumping

Dump credential stores from the target: all require admin rights. Prefer lsassy over --sam when possible as it handles protections better.

Host Information

Pull system info and generate a hosts file for internal network mapping.

Password Change

Change passwords via SMB: useful for self-service changes or when you have ForceChangePassword on another account.

Miscellaneous SMB Modules

Additional recon and abuse modules useful during post-exploitation.

LDAP

LDAP is the primary channel for querying Active Directory. Use it for targeted attribute enumeration, BloodHound collection, and Kerberos-based attacks.

Credential Validation

Validate domain credentials against the DC via LDAP: lighter than SMB and works even when SMB is firewalled. Always include -d <domain> and --dns-server <dc-ip> so nxc can resolve AD hostnames correctly; without them BloodHound collection and many enumeration modules will fail silently or return incomplete results.

User Enumeration

Pull user accounts and attributes directly from the directory.

Description Field Mining

The get-desc-users module reads every user’s Description field: admins commonly store passwords there as “notes”.

Custom LDAP Queries

Run arbitrary LDAP filters to extract any attribute from any object class.

Group Membership

Check which groups a specific user belongs to: useful for understanding what access a compromised account has.

BloodHound Collection

Collect all AD relationship data in BloodHound format: import the zip into BloodHound CE for graph analysis. The -d and --dns-server flags are required for name resolution; without them computer object resolution fails and the graph will be missing edges.

Kerberoasting

Request TGS tickets for all SPN-registered accounts: output is in hashcat format ready for offline cracking.

AS-REP Roasting

Request AS-REP for accounts with pre-authentication disabled: works without credentials if you have a username list.

LAPS Passwords

Retrieve LAPS-managed local admin passwords: the ms-Mcs-AdmPwd attribute is readable by accounts explicitly granted access.

gMSA Passwords

Retrieve Group Managed Service Account passwords: requires membership in the account’s PrincipalsAllowedToRetrieveManagedPassword group.

LDAP Security Checks

Check whether the DC enforces LDAP signing and channel binding: if not enforced, LDAP relay attacks are possible.

Machine Account Quota

Check how many machine accounts unprivileged users can create: if above 0, RBCD and other attacks requiring a computer account become trivial.

WinRM

WinRM (port 5985 HTTP, 5986 HTTPS) provides remote PowerShell access. Requires the account to be in the Remote Management Users group or a local admin.

Credential Validation

A (+) response confirms WinRM access: Pwn3d! is not shown for WinRM since access itself implies admin-equivalent rights.

Command Execution

-x runs a raw command, -X runs PowerShell: both return output inline.

MSSQL

MSSQL (default port 1433) is worth checking for weak auth and code execution via xp_cmdshell. Test Windows auth first, then SQL auth.

Authentication

Try Windows auth with -windows-auth before SQL auth: service accounts and domain users often have SQL access via their domain credentials.

Query Execution

Run arbitrary T-SQL queries: useful for enumerating linked servers, database contents, and permissions.

xp_cmdshell

Enable and abuse xp_cmdshell for OS command execution: requires sysadmin or equivalent rights.

SSH

SSH is less common in Windows AD environments but frequently found in Linux targets reachable from a Windows pivot, and in some mixed-OS environments.

Authentication and Execution

Test credentials and run commands: supports password auth and key auth.

Password Spraying

Spray one password across many accounts: always check --pass-pol first to get the lockout threshold. Default approach: one password per user per spray cycle, wait between cycles.

Global Flags Reference

These flags apply across all protocols and control auth method, threading, and output behavior.

Useful Module Reference