For the complete documentation index, see llms.txt. This page is also available as Markdown.

🆕Host Exclusion

Configuring host exclusion in NetExec

Overview

NetExec provides host exclusion functionality to prevent scanning specific hosts, IP ranges, or networks. This feature is useful for:

  • Avoiding scanning of honeypots or monitoring systems

  • Preventing accidental scanning of out-of-scope targets

  • Excluding your own machine from network-wide scans

Configuration

Host exclusion is configured in the NetExec configuration file located at ~/.nxc/nxc.conf under the [nxc] section.

Configuration Options

[nxc]
exclude_hosts = []
skip_self = False

Exclude Specific Hosts

The exclude_hosts option allows you to define a list of hosts that should be permanently excluded from all NetExec scans.

Single IP Address

Multiple IP Addresses

IP Ranges

CIDR Notation

Mixed Formats

You can combine different formats in a single configuration:

Skip Self

The skip_self option automatically excludes all local IP addresses of the machine running NetExec.

Enable Skip Self

When enabled, NetExec will:

  1. Detect all network interfaces on the local machine

  2. Identify all assigned IP addresses

  3. Automatically exclude these IPs from scanning

Complete Example

Here's a complete example configuration for a penetration test scenario:

Verification

To verify your exclusion configuration is working, run a scan and observe the excluded hosts in verbose mode:

Excluded hosts will be logged in verbose output.

Last updated

Was this helpful?