Skip to main content
CommunityCloudEnterprise

Network Discovery

The network discovery backend leverages NMAP to scan networks and discover IP information.

Diode Entities

The network discovery backend uses Diode Go SDK to ingest discover IP Address entities with Global VRF and allows defining Description, Comments and Tags for them.

Configuration

The network_discovery backend does not require any special configuration, though overriding host and port values can be specified. The backend will use the diode settings specified in the common subsection to forward discovery results.

orb:
backends:
common:
diode:
target: grpc://192.168.0.100:8080/diode
client_id: ${DIODE_CLIENT_ID}
client_secret: ${DIODE_CLIENT_SECRET}
agent_name: agent01
network_discovery:
host: 192.168.5.11 # default 0.0.0.0
port: 8863 # default 8073
log_level: ERROR # default INFO
log_format: JSON # default TEXT

Policy

Network discovery policies are broken down into two subsections: config and scope.

Config

Config defines data for the whole scope and is optional overall.

ParameterTypeRequiredDescription
schedulecron formatnoIf defined, it will execute scope following cron schedule time. If not defined, it will execute scope only once
defaultsmapnokey value pair that defines default values
timeoutintnoTimeout in minutes for the nmap scan operation. The default value is 2 minutes.

Defaults

Current supported defaults:

KeyTypeDescription
commentsstrNetBox Comments information to be added to discovered IP
descriptionstrNetBox Description data to be added to discovered IP
tagslistNetBox Tags to be added to discovered IP
network_maskintDefault network mask to be applied to IPv4 (default: 32)

Scope

The scope defines a list of targets to be scanned.

ParameterTypeRequiredDescription
targetslistyesThe targets that NMAP will scan. These can be specified as IP addresses (192.168.1.1), IP ranges (192.168.1.10-20), IP subnets with mask (192.168.1.0/24) or resolvable domain names.
fast_modeboolnoFast mode - Scan fewer ports than the default scan (-F).
timingintnoSet timing template, higher is faster (-T<0-5>).
portslistnoOnly scan specified ports (-p). Sample: [22,161,162,443,500-600,8080].
exclude_portslistnoExclude the specified ports from scanning. Sample: [23, 9000-12000].
ping_scanboolnoPing Scan (-sn) - disable port scan. If scan_types is defined, ping_scan will be ignored.
top_portsintnoScan <number> most common ports (--top-ports).
max_retriesintnoCaps number of port scan probe retransmissions (--max-retries).
scan_typeslistnoScan technique to be used by NMAP. Supports [udp,connect,syn,ack,window,null,fin,xmas,maimon,sctp_init,sctp_cookie_echo,ip_protocol]. If more than one TCP scan type (connect,syn,ack,window,null,fin,xmas,maimon) is defined, only the fist one will be applied.
dns_serverslistnoSpecify alternate DNS servers for DNS resolution (--dns-servers).
os_detectionboolnoEnables NMAP OS detection (-O).
use_target_masksboolnoWhen enabled (default: True), applies the most specific subnet mask from the defined targets to discovered IPs. Only affects targets defined as subnets (e.g., 192.168.1.0/24), not ranges or individual IPs.

Sample

A sample policy including all parameters supported by the network discovery backend.

orb:
...
policies:
network_discovery:
discovery_1:
config:
schedule: "* * * * *"
timeout: 5
defaults:
description: IP discovered by network discovery
tags: [net-discovery, orb-agent]
scope:
targets:
- 192.168.7.32
- 192.168.7.30-40 # IP range
- 192.168.7.0/24 # IP subnet
- google.com # dns lookup
fast_mode: True
max_retries: 0

⚠️ Warning

Be AWARE that executing a policy with only targets defined is equivalent to running nmap <targets>, which in turn is the same as executing nmap -sS -p1-1000 --open -T3 <target>:

  • -sS → SYN scan (stealth scan, requires root privileges)
  • -p1-1000 → Scans the top 1000 most common ports
  • --open → Only shows open ports
  • -T3 → Uses the default timing template (T3 is the standard speed)