Use when: Persistent nxc data management needed — store and query hosts, credentials, and shares across sessions.
Think Dumber First:nxc smb [SUBNET]/24 automatically stores results in nxc database. Then nxc smb [SUBNET]/24 -q queries stored results. nxc smb [SUBNET]/24 --creds lists all captured credentials. The database persists between sessions.
Skip when: One-off scan — database is most useful for multi-session engagements.
# Open databasenxcdb# Create workspace per engagementnxcdb (default) > workspace create CLIENT_2026nxcdb (CLIENT_2026) ># Switch workspacenxcdb (default) > workspace CLIENT_2026# View discovered hostsnxcdb (CLIENT_2026)(smb) > hosts# View all captured credentialsnxcdb (CLIENT_2026)(smb) > creds# Export for reportingnxcdb (CLIENT_2026)(smb) > export creds detailed /tmp/creds_export.csv# Use credential by ID (avoids typing long passwords)nxc smb [TARGET_IP] -id 3 -x "whoami /priv"
Audit Mode (Redact Passwords from Logs)
# Edit config to hide passwords in output (OPSEC/compliance)nano ~/.nxc/nxc.conf# Set: audit_mode = ## → Replaces passwords with # in terminal output and logs# → Credentials still stored in database
Module System
# List all modules for a protocolnxc smb -L # all SMB modulesnxc ldap -L # all LDAP modulesnxc mssql -L # all MSSQL modules# Module info (options, description)nxc smb -M [MODULE] --options# Module execution with optionsnxc smb [TARGET_IP] -u [USER] -p [PASS] -M [MODULE] -o KEY=VALUE
Protocol Support Overview
Protocol
Port
Common Use
smb
445
Enum, exec, dump, spray
winrm
5985/5986
PowerShell remoting
rdp
3389
Screenshot, enable RDP, NLA check
ldap
389/636
AD queries, Kerberoast, ASREPRoast
mssql
1433
DB auth, xp_cmdshell, privesc
ssh
22
Credential validation, exec
ftp
21
Credential validation
vnc
5900
Credential validation
Key Modules Reference
Module
Protocol
Purpose
ms17-010
smb
EternalBlue vulnerability check
zerologon
smb
ZeroLogon (CVE-2020-1472) check
petitpotam
smb
PetitPotam NTLM relay check
nopac
smb
noPAC vulnerability check
lsassy
smb
LSASS dump
procdump
smb
LSASS dump via ProcDump
spider_plus
smb
Recursive share indexer
slinky
smb
LNK file for NTLM coercion
drop-sc
smb
Search connector for NTLM coercion
rdp
smb
Enable/disable RDP
gpp_password
smb
GPP credential extraction
gpp_autologin
smb
GPO autologin credential extraction
keepass_discover
smb
Find KeePass databases
keepass_trigger
smb
Export KeePass DB via trigger
laps
ldap
Extract LAPS passwords
user-desc
ldap
Search user descriptions for creds
get-network
ldap
AD-integrated DNS enumeration
mssql_priv
mssql
MSSQL privilege escalation
empire_exec
smb
Deploy Empire agent
web_delivery
smb
Deploy MSF Meterpreter via PS web delivery
Troubleshooting
# If NXC acts buggy (wrong results, errors):rm ~/.nxc/workspaces/default/smb.db # reset SMB database# → Rebuild from scratch on next run# FQDN requirement for LDAP/Kerberos:echo "[DC_IP] [DC_FQDN]" >> /etc/hosts# → Must use FQDN, not IP, for ldap/kerberos protocols# If --users fails:nxc smb [TARGET_IP] -u '' -p '' --rid-brute 2000 # fallback# If lsassy fails (AV):nxc smb [TARGET_IP] -u [USER] -p [PASS] -M procdump # try procdump# or manual: procdump.exe from SysInternals
🛠️ Troubleshooting & Edge Cases
Problem
Cause
Fix
nxc database empty after scan
Default workspace not initialized
Check: nxcdb command; nxcdb workspace create [NAME]; verify current workspace
Cannot query stored creds
Database schema issue
Run: nxcdb creds; if error, database may need recreation: backup and nxcdb clear
Stored hosts not showing
Wrong workspace
List workspaces: nxcdb workspace list; switch: nxcdb workspace [NAME]
nxcdb command not found
Old netexec version
Update netexec; older versions use different database interface
Database corrupted after VPN drop
Incomplete write
Backup: cp ~/.nxc/workspaces/default/smb.db ~/smb.db.bak; re-run scan to repopulate
📝 Reporting Trigger
Finding Title: NetExec Database Tracks All Compromised Credentials and Systems
Impact: Persistent nxc database maintains complete inventory of all discovered systems, captured credentials, and successful authentications across the engagement, providing actionable credential reuse mapping.
Root Cause: N/A — operational tool documentation.
Recommendation: Operators must use workspace isolation per engagement. Database contents represent sensitive client data — encrypt the nxc workspace directory. Securely delete all engagement data post-engagement per data handling procedures.