CrackMapExec was a common tool for checking a Windows network over SMB, and many older guides show its commands. It is no longer developed under that name. Its successor, NetExec, runs as nxc, and many old commands still work with small changes while a few have gone. This article maps old commands to new ones and shows what NetExec leaves in Windows logs. Test only networks and systems you own or are authorised to assess.
What happened to CrackMapExec
It began in 2015 as CrackMapExec by byt3bl33d3r. The NetExec README says mpgn maintained it from 2019 and retired as maintainer in September 2023, after which the remaining most active contributors continued it under the name NetExec.
On GitHub, byt3bl33d3r/CrackMapExec was archived by its owner on 6 December 2023, the date of its last commit. Its README opens with a “No Longer Maintained” notice that gives what it calls a hostile fork as the reason, and its last tagged release is v5.4.0. Pennyw0rth/NetExec was created in September 2023 and is not archived.
The nxc command and its protocols
This article was checked against NetExec v1.5.1, released on 23 February 2026 and still the latest tag. The package installs nxc, with netexec, NetExec and the database tool nxcdb as further entry points. It ships no cme or crackmapexec alias, so old scripts need editing.
The first argument is a protocol, and v1.5.1 ships ten: smb, ldap, winrm, mssql, wmi, rdp, ssh, ftp, vnc and nfs. Targets can be addresses, ranges, CIDRs, host names or files.
Old commands and their equivalents
CrackMapExec v3, tagged in 2016, took no protocol argument. Here are its commands against NetExec v1.5.1, with CrackMapExec v5.4.0 where a flag changed in between.
- Scan a subnet:
crackmapexec 192.0.2.0/24becomesnxc smb 192.0.2.0/24. - Run a command:
-xfor cmd and-Xfor PowerShell carry over unchanged.--exec-methodstill acceptswmiexec,smbexecandatexec, and has addedmmcexec, the DCOM method Matt Nelson described in 2017. Without the flag, nxc trieswmiexec, thenatexec,smbexecandmmcexecuntil one works. - Local authentication, SAM, shares, password policy and RID brute force:
--local-auth,--sam,--shares,--pass-poland--rid-bruteall carry over. - Logged on users: v3 used
--lusers. CrackMapExec v5.4.0 had already renamed it--loggedon-users, which NetExec keeps. - Sessions and WMI queries:
--sessionsand--wmi, unchanged through v5.4.0, are now--smb-sessionsand--wmi-query. - Mimikatz, Chrome and WDigest: v3 had
-M mimikatz,-M enum_chromeand--wdigest enable. Neither module is in CrackMapExec v5.4.0 or NetExec v1.5.1, though the wiki still shows a deprecatedmimikatzexample. For LSASS the wiki uses-M lsassy; WDigest is now-M wdigest -o ACTION=enable,disableorcheck. - Meterpreter:
-M met_injectstill exists, but the v3LHOSTandLPORToptions are nowSRVHOSTandSRVPORT, both required, with optionalRANDandSSL. It fetches a Metasploit stager through PowerShell, so a listener must already be running. - Empire:
-M empire_execalso still exists. It needsLISTENER, asks Empire’s REST API for a launcher and reads the[Empire]section ofnxc.conf.
Credentials, hashes and Kerberos
-u and -p take values or files, and -H takes NTLM hashes or files of them in smb, ldap, winrm, mssql, rdp and wmi. Several users or passwords spray every combination across the targets, so read --pass-pol first and bound the run with --ufail-limit, --fail-limit and --jitter. On each host, spraying stops at the first success unless --continue-on-success is added.
Kerberos has -k, --use-kcache with a ticket in KRB5CCNAME, --aesKey and --kdcHost, which names the KDC when DNS cannot find it. --pfx-cert and --pem-cert cover certificates. --laps reads the target’s LAPS password from the directory for local administrator access, and --gen-relay-list writes hosts that do not require SMB signing, which feeds NTLM relay.
Modules, the database and logs
nxc smb -L lists modules, -M selects one, -o KEY=value passes options and --options (--show-options in v3) prints them. The wiki says code execution is marked (Pwn3d!); over SMB that most likely means local administrator.
Every run writes to a database in ~/.nxc/workspaces, one per protocol, grouped by workspace. nxcdb opens a shell where workspace create <name> makes a workspace, proto smb selects a database and creds and hosts list what was stored; -id reuses a stored credential. --log <file> records one command and log_mode = True in nxc.conf records everything under ~/.nxc/logs. Both hold credentials, so delete them when the engagement ends.
A lab sequence
On a lab domain you own, work from lowest impact up: check signing, authenticate, read the password policy before any spray, list shares and sessions, then run one command as a lab administrator and compare the target’s logs with the next section. Dumping domain hashes covers --ntds; --sam and --lsa read a host’s local secrets and need administrator rights.
The NetExec: Network and Active Directory Assessment course works through these steps on a GOAD practice domain.
NetExec commands
Checked against NetExec v1.5.1 (parser, module source and wiki). Run nxc smb -h on your own copy.
nxc --version
nxc smb 10.10.10.0/24 --gen-relay-list relay-targets.txt
nxc smb 10.10.10.0/24 -u labuser -p 'LabPass1!' -d corp.lab.example
nxc smb 10.10.10.10 -u labuser -p 'LabPass1!' -d corp.lab.example --pass-pol
nxc smb 10.10.10.10 -u labuser -p 'LabPass1!' -d corp.lab.example --shares
nxc smb 10.10.10.20 -u labuser -p 'LabPass1!' -d corp.lab.example --loggedon-users
nxc smb 10.10.10.20 -u labadmin -p 'LabAdmin1!' -d corp.lab.example -x whoami --exec-method smbexec
nxc smb 10.10.10.20 -u labadmin -p 'LabAdmin1!' --local-auth -M wdigest -o ACTION=check
nxc smb 10.10.10.10 -u labuser -p 'LabPass1!' -d corp.lab.example -k
nxc smb -L
nxc smb -M met_inject --options
nxc smb 10.10.10.20 -u labuser -p 'LabPass1!' -d corp.lab.example --log lab-run.log
nxcdb- Inside
nxcdb, runworkspace create lab,proto smb,credsandhosts. - Accounts and the
10.10.10.0/24range are placeholders.smbexecis chosen so the service event below is easy to find.
Detection and defence
A successful network logon creates event 4624, logon type 3, on the target. Failures log 4625, and Microsoft says to watch for runs of status 0xC000006A (bad password) or 0xC000006D (bad username or authentication information) on critical and service accounts. Domain controllers log 4776, with the source workstation name, when they validate a domain account over NTLM. An administrator logon also produces 4672, special privileges assigned. MITRE’s spraying detection strategy, DET0487, looks for many failures across many accounts in a short window; a careless spray also locks accounts (event 4740).
smbexec creates, starts and deletes a randomly named service: event 4697, in the Audit Security System Extension subcategory. atexec creates and deletes a randomly named scheduled task: events 4698 and 4699, in Audit Other Object Access Events. All four methods start cmd.exe and read its output back from a file on C$, the default share, which event 5145 (Audit Detailed File Share) records. With Audit Process Creation and the Include command line in process creation events policy, event 4688 shows each cmd.exe command line, output redirect included. Enable these subcategories or the events are not written; the Windows Security Logging with Sysmon and Event Logs course covers audit policy and command line auditing.
Require SMB signing so relayed sessions fail (Control SMB signing behavior); it does not stop a tool holding valid credentials. Deploy Windows LAPS, which Microsoft describes as rotating each device’s local administrator password, so one stolen local hash no longer opens every host. Keep domain administrators off lower tier machines: Microsoft’s guidance for Domain Admins adds the group to Deny access to this computer from the network and four other deny logon rights on member servers and workstations; the enterprise access model builds on that tiering. Set an account lockout threshold: the default domain policy value is 0 (never lock), Windows security baselines suggest 10 as a starting point, and the built-in Administrator is excluded, one more reason for LAPS. Alert when these events come from a single source.
Where to go next
The NetExec: Network and Active Directory Assessment course is the next step. For relaying captured authentication see NTLM relay, and for the wider workflow from first scan to report see Penetration Testing Field Notes.
This article replaces the KSEC ARK notes first published in 2019.
More from this author
- One capture, three questions2 December, 2026
- Payload channels versus timing channels2 December, 2026
