> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/adapters/o/octo-network-scanner.md).

# Octo Network Scanner

Octo Network Scanner is the active network discovery tool built into OctoXLabs. It identifies hosts, open ports and services on the networks you give it. The scan is run by the connector with the `octons` command, so there is no external product account or API to set up.

## Use cases

* **List hosts found by the scanner.** Review the devices discovered on the scanned ranges.

```
Adapters = octo-network-scanner
```

* **Find hosts that the scanner sees but your other tools do not.** Hosts that only the scanner reports are often unmanaged. How devices are matched depends on your device merge settings.

```
Adapters = octo-network-scanner AND Adapters NOT IN (active-directory)
```

* **Track TLS certificates on discovered services.** Turn on SSL certificate discovery to get certificates as a separate asset type. Use the Certificates inventory to review expiry dates.

## Before you begin

### Network

| Source              | Destination                                 | Port                                                          | Protocol                      |
| ------------------- | ------------------------------------------- | ------------------------------------------------------------- | ----------------------------- |
| OctoXLabs connector | Target hosts and ranges you enter in Target | Depends on the options you choose (ICMP, ARP, TCP, UDP, SCTP) | ICMP / ARP / TCP / UDP / SCTP |

ARP ping works only on the local network segment of the connector. With SSL certificate discovery enabled and no port selection, the scanner probes these TLS ports: 443, 8443, 4443, 9443, 993, 995, 465, 587, 636, 989, 990, 992, 5061.

### Required permissions

| Scope or role                                          | Permission     | Needed for |
| ------------------------------------------------------ | -------------- | ---------- |
| Network reachability from the connector to the targets | Not applicable | Scanning   |

There is no account or token. Make sure firewalls and IDS rules allow the scan traffic.

{% hint style="warning" %}
Aggressive Scan runs several scan types at high speed (for example SYN, UDP, service and version detection, and scripts). It can cause disruptions and trigger security alerts. Lower the rate and parallelism if needed.
{% endhint %}

## Create credentials in Octo Network Scanner

{% stepper %}
{% step %}

### No credentials needed

Octo Network Scanner has no credentials. Add the adapter and fill in the connection parameters below.
{% endstep %}

{% step %}

### Choose the targets

Enter the IP addresses, ranges or CIDR blocks to scan in Target. Separate several entries with commas.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter                 | Required | Type    | Default | Description                                                                                                         |
| ------------------------- | -------- | ------- | ------- | ------------------------------------------------------------------------------------------------------------------- |
| Target                    | Yes      | String  | None    | Addresses to scan. Formats: single IP, CIDR (`10.0.0.0/24`), range (`10.0.0.0-10.0.0.5`), or a comma separated mix. |
| Resolve DNS               | No       | Boolean | False   | Always run reverse DNS resolution on the targets.                                                                   |
| No Port Scan              | No       | Boolean | True    | Host discovery only, no port scan.                                                                                  |
| Top Thousand Ports        | No       | Boolean | False   | Scan the 1000 most common ports.                                                                                    |
| TCP SYN Scan              | No       | Boolean | False   | Fast scan that sends SYN packets without completing the handshake.                                                  |
| Ports to Scan             | No       | String  | None    | Ports to scan, for example `443`, `443-1000` or `443,900-1000`. Each port must be 1 to 65535.                       |
| ICMP Ping                 | No       | Boolean | True    | Host discovery with ICMP echo.                                                                                      |
| ARP Ping                  | No       | Boolean | True    | Host discovery with ARP requests on the local network.                                                              |
| No Ping Scan              | No       | Boolean | False   | Skip host discovery.                                                                                                |
| TCP SYN Ping              | No       | String  | None    | Ports for a TCP SYN ping.                                                                                           |
| TCP ACK Ping              | No       | String  | None    | Ports for a TCP ACK ping.                                                                                           |
| UDP Ping                  | No       | String  | None    | Ports for a UDP ping.                                                                                               |
| SCTP INIT Ping            | No       | String  | None    | Ports for an SCTP INIT ping.                                                                                        |
| Aggressive Scan           | No       | Boolean | False   | Enables OS detection, version scanning, script scan and traceroute.                                                 |
| Service Discovery         | No       | Boolean | False   | Enables service and version detection.                                                                              |
| SSL Certificate Discovery | No       | Boolean | False   | Collects TLS certificates with the `ssl-cert` script and reports them as Certificates.                              |
| Min Parallelism           | No       | Integer | 5       | Minimum number of outstanding probes for a host group. Allowed 1 to 32.                                             |
| Min Rate                  | No       | Integer | 10000   | Minimum packet rate.                                                                                                |
| Host Timeout              | No       | String  | None    | Time limit per host in nmap duration format, for example `30m` or `900s`.                                           |
| Scan Timeout              | No       | Integer | None    | Time limit for the whole scan, in seconds (minimum 1).                                                              |
| Force                     | No       | Boolean | False   | Allows targets that expand to more than 65536 addresses.                                                            |

These combinations are rejected:

* Only one of Top Thousand Ports, Ports to Scan and No Port Scan.
* Only one of Aggressive Scan and Service Discovery.
* Only one of TCP SYN Ping, TCP ACK Ping, UDP Ping and SCTP INIT Ping.
* No Port Scan with TCP SYN Scan.
* No Port Scan with No Ping Scan.

{% hint style="info" %}
No Port Scan is on by default. To scan ports, turn it off and choose Top Thousand Ports, Ports to Scan or TCP SYN Scan.
{% endhint %}

{% hint style="info" %}
To keep partial results when Scan Timeout fires, also set Host Timeout. Without it, one unresponsive host can stall the scan before anything is saved.
{% endhint %}

## Troubleshooting

| Error message                                                                                    | Cause                                                      | Fix                                                  |
| ------------------------------------------------------------------------------------------------ | ---------------------------------------------------------- | ---------------------------------------------------- |
| Only choose 1 of these options: top\_thousand\_ports, ports\_to\_scan, no\_port\_scan            | More than one port selection option is on.                 | Keep only one.                                       |
| Only choose 1 of these options: aggressive\_scan, service\_discovery                             | Both are on.                                               | Keep only one.                                       |
| Only choose 1 of these options: tcp\_syn\_ping, tcp\_ack\_ping, udp\_ping, sctp\_init\_ping      | More than one ping type is set.                            | Keep only one.                                       |
| Only choose 1 of these options: no\_port\_scan, tcp\_syn\_scan                                   | Both are on.                                               | Turn No Port Scan off to use TCP SYN Scan.           |
| Only choose 1 of these options: no\_port\_scan, no\_ping\_scan                                   | Both are on.                                               | Turn No Port Scan off to use No Ping Scan.           |
| Invalid port format / Invalid port range                                                         | A port value is not 1 to 65535 or is badly formatted.      | Use the formats `443`, `443-1000` or `443,900-1000`. |
| Invalid IP address format: {value}                                                               | Target contains an entry that is not an IP, range or CIDR. | Fix the entry.                                       |
| Target expands to {n} addresses, above the 65536 limit. Enable force to scan a range this large. | The target is larger than a /16.                           | Narrow the target or turn on Force.                  |
| Target field is required                                                                         | Target is empty.                                           | Enter a target.                                      |
| Connection test timed out                                                                        | `octons --version` did not finish in 10 seconds.           | Check the connector host.                            |

## Change history
