Skip to main content
NetExec (the actively maintained successor to CrackMapExec) is the go-to tool for anything involving Active Directory at scale: password spraying across a subnet, enumerating shares and users, dumping secrets, or running commands on dozens of hosts at once through a single consistent syntax. Almost every protocol it supports (SMB, LDAP, WinRM, MSSQL, RDP, SSH, FTP) shares the same core flags, so learning the pattern once covers most of what you’ll actually use.
NetExec’s output is color-coded, which makes scanning a wall of results much faster once you know what each color means.
netexec.wiki is the official reference and the best place to check for anything not covered here, modules especially get added and updated often.

Connecting to Targets

Every NetExec command follows the same shape: pick a protocol, point it at a target, and optionally add credentials. Once that pattern clicks, the rest of the tool is mostly just flags on top of it.
TARGET and the credential flags all accept more than a single value, which is what makes NetExec useful for spraying rather than just one-off logins:
--continue-on-success keeps spraying after the first valid credential is found instead of stopping, useful when you want every hit rather than just confirmation that spraying works. --no-bruteforce pairs a user list with a password list line by line instead of testing every combination.

Authentication & Password Spraying

NetExec authenticates against the domain controller by default. A few flags change exactly how that authentication happens, which matters once you’re dealing with local accounts, Kerberos, or just confirming anonymous access.
Kerberos authentication needs the target’s FQDN rather than a bare IP:

SMB Enumeration

SMB is where most of NetExec’s enumeration power lives, since it doubles as both a login point and a way to pull domain information straight from a host without needing LDAP access at all.

LDAP Enumeration

LDAP enumeration digs into attributes SMB doesn’t expose directly, which makes it the better choice once you’re hunting for specific misconfigurations rather than just getting a lay of the land.

Finding Accounts: AS-REP and Kerberoasting

Both techniques recover crackable Kerberos hashes without needing a foothold on the target host itself, just a valid (even low-privileged) domain account and LDAP access.
Crack whatever comes back with hashcat:

Command Execution

Once you’ve got valid credentials, NetExec can run commands directly rather than needing a separate tool to pop a shell. The execution method matters: some get caught by EDR far more readily than others.
--exec-method controls how the command actually gets executed (wmiexec, atexec, smbexec, mmcexec). wmiexec is the default and usually quietest, but if it’s being blocked, the others are worth trying before assuming execution is dead entirely.

Extracting Secrets

With admin rights on a target, NetExec can pull credential material directly rather than needing a separate dumping tool staged on disk.
Several modules dump LSASS memory using different underlying techniques, useful when one gets flagged by EDR and you need a fallback.

File Operations

Beyond credential dumping, NetExec can search and pull files straight out of SMB shares, which is often faster than mounting a share manually just to grep through it.
For pulling everything at once instead of searching file by file:

Domain Misconfiguration Checks

A couple of built-in modules check for classic Group Policy credential leaks, both of which are still surprisingly common findings on real engagements.

Vulnerability Scan Modules

These check for known, high-impact Active Directory vulnerabilities, worth running early against any domain controller before diving into manual enumeration.
A positive result on zerologon or ms17-010 means the target is one exploit away from full compromise. Treat these findings as critical and stop to assess impact before continuing to enumerate.

Pivoting Through a Compromised Host

NetExec can push a Chisel client or server onto a target over SMB, which turns a single set of valid credentials into a tunnel without needing separate file transfer and execution steps.
The slinky module drops a malicious shortcut file (.lnk) on writable shares; anyone browsing to it leaks an NTLM hash to a listener like Responder.
Clean it up afterward:

Useful Modules

A handful of modules that come up often enough to be worth knowing by name, beyond what’s covered above.
List any module’s own options before running it:

Exporting Results

NetExec keeps a workspace database of everything it’s touched, credentials, hosts, shares, which is handy for picking up an engagement without re-running every scan.

Quick Reference Tools

NetExec Wiki

The official documentation, covers every module and flag in depth.

NetExec on GitHub

Source, issues, and the latest module additions.
Password spraying and credential dumping can lock out accounts or trip alerting fast. Confirm scope and rate limits before running anything beyond a single test login.