How pennyw0rth/netexec works
NetExec is a command-line network execution and reconnaissance tool. A user invokes the CLI with targets, credentials, protocol choices, and optional modules; the application selects protocol implementations and modules to interact with remote services, then presents findings and retains protocol-specific state. The tree documents broad protocol and module coverage, but the sampled excerpts do not show the main dispatch flow, so uncertain call wiring is omitted. Database components are shown as persistence responsibilities rather than a detailed storage pipeline.
Main entry points: netexec.py Application entry · protocols Protocol handlers · modules Plugin modules · protocolloader.py Protocol loader
Components 19
Command interface
- Application entry
nxc/netexec.py - CLI options
nxc/cli.py - Configuration
nxc/config.py
Execution runtime
- Protocol loader
nxc/loaders/protocolloader.py - Module loader
nxc/loaders/moduleloader.py - Plugin modules
nxc/modules - Execution context
nxc/context.py - Connection handling
nxc/connection.py - Shared helpers
nxc/helpers
Network protocols
- Protocol handlers
nxc/protocols - SMB handler
nxc/protocols/smb.py - LDAP handler
nxc/protocols/ldap.py - Other handlers
nxc/protocols
Results and state
- Console output
nxc/console.py - Workspace setup
nxc/database.py - Protocol databases
nxc/protocols - Database CLI
nxc/nxcdb.py
Other components
- Operator
- Remote services
Connections 17
- Operator → Application entry: invokes
- Application entry → CLI options: parses options
- Application entry → Configuration: loads settings
- Application entry → Protocol loader: selects protocol
- Protocol loader → Protocol handlers: loads handler
- Application entry → Module loader: loads plugins
- Module loader → Plugin modules: discovers modules
- Application entry → Execution context: provides context
- Application entry → Connection handling: manages connections
- Connection handling → Protocol handlers: uses handler
- Protocol handlers → Remote services: connects to
- Plugin modules → Protocol handlers: extends operations
- Protocol handlers → Protocol databases: records results
- Workspace setup → Protocol databases: initializes workspaces
- Database CLI → Protocol databases: queries state
- Application entry → Console output: reports results
- Plugin modules → Shared helpers: uses utilities