Network
Turn an org, ASN, or IP into owned CIDR ranges
asnmap is a ProjectDiscovery command-line tool that maps back and forth between an organization, its ASN, and the network ranges it announces, so a company name resolves to CIDRs and an IP address resolves to its owner.
installgo install github.com/projectdiscovery/asnmap/cmd/asnmap@latest
v1.0.6 on Trickest · Go · MIT license
Free plan: 1 user, 3 execution slots, no card.
overview
What asnmap does
asnmap opens infrastructure mapping: resolve a company, ASN, domain, or IP to the CIDR blocks that autonomous system owns before any host expansion.
Use it when DNS alone understates scope and you need the address space behind a name or a single observed IP.
Trickest provides asnmap as a managed Network node. Feed -org, -asn, -domain, -ip, or -file; take FILE and FOLDER ranges into mapcidr, then a port scanner.
source github.com/projectdiscovery/asnmap · v1.0.6 on Trickest
image quay.io/trickest/asnmap:v1.0.6
use cases
asnmap use cases
Scope an organization's address space
Look up a company by name or ASN to get every CIDR it owns, then treat those ranges as the in-scope boundary for the rest of the engagement.
Pivot from a domain to its network
Resolve a domain to its ASN and ranges to find broader infrastructure behind a single site, including siblings that share the same address space.
Feed a CIDR-to-host scanning pipeline
Emit -json ranges and hand them to mapcidr and a port scanner so probing runs against owned IP space, not only published hostnames.
Resolve targets in bulk
Pass -file with organizations, ASNs, or domains to map many footprints in one run and write the combined ranges for downstream nodes.
reference
asnmap inputs and flags
| Name | Type | Flag | Description |
|---|---|---|---|
| org | STRING | -org | Target organization to look up (e.g. EXAMPLE). |
| asn | STRING | -asn | Target ASN to look up (e.g. AS64500). |
| domain | STRING | -domain | Target domain to look up (e.g. example.com). |
| ip | STRING | -ip | Target IP to look up (e.g. 198.51.100.10). |
| file | FILE | -file | File of targets to look up in bulk. |
| json | BOOLEAN | -json | Display output in JSON format. |
| csv | BOOLEAN | -csv | Display output in CSV format. |
| v6 | BOOLEAN | -v6 | Include IPv6 CIDR ranges in the output. |
Showing key inputs. asnmap exposes 15 inputs in total.
Full flag reference (15 inputs)
| Name | Type | Flag | Description |
|---|---|---|---|
| org | STRING | -org | target organization to look up (e.g. EXAMPLE) |
| asn | STRING | -asn | target ASN to look up (e.g. AS64500) |
| domain | STRING | -domain | target domain to look up (e.g. example.com) |
| ip | STRING | -ip | target IP to look up (e.g. 198.51.100.10) |
| file | FILE | -file | file of targets to look up in bulk |
| json | BOOLEAN | -json | display output in JSON format |
| csv | BOOLEAN | -csv | display output in CSV format |
| v6 | BOOLEAN | -v6 | display IPv6 CIDR ranges in the output |
| silent | BOOLEAN | -silent | display silent output, ranges only with no banner |
| verbose | BOOLEAN | -verbose | display verbose output |
| proxy | STRING | -proxy | list of proxies to use (comma separated) |
| proxy-file | FILE | -proxy | file containing a list of proxies to use |
| resolvers | FILE | -resolvers | file with a list of resolvers to use |
| config | FILE | -config | asnmap configuration file |
| disable-update-check | BOOLEAN | -disable-update-check | disable the automatic asnmap update check |
example
asnmap command examples
# map every CIDR range an organization owns
asnmap -org EXAMPLE -silent192.0.2.0/25
192.0.2.128/25
198.51.100.0/25
198.51.100.128/25
203.0.113.0/25
203.0.113.128/26
203.0.113.192/26guidance
asnmap vs alternatives
Use asnmap when you need owned CIDR ranges from a company, ASN, domain, or IP before scanning. It maps address space only; follow with mapcidr and a port scanner. Prefer get-asn-prefixes when you already hold the AS number.
| Tool | Pick it when |
|---|---|
| mapcidr | Expands and slices CIDR ranges. Run after asnmap to turn ranges into host lists. |
| amass-intel | Broader org intelligence including ASNs from passive OSINT. asnmap stays a focused ASN-to-CIDR lookup. |
| get-asn-prefixes | Pulls prefixes for an ASN. Prefer this lighter sibling when you already have the AS number. |
faq
asnmap FAQ
related
More Network tools
dnsvalidator
Validate public DNS resolvers against trusted baselines.
fping
Parallel ICMP echo sweeps for CIDR ranges and host files.
httpx
A fast and multi-purpose HTTP toolkit that runs multiple probers with reliable, high-throughput results.
naabu
A fast and reliable port scanner that enumerates open ports for hosts.
netexec
Authenticated network assessment across SMB, LDAP, WinRM, and more.
onesixtyone
SNMP community-string scanner for host lists.
Run asnmap yourself
An organization name feeds asnmap, which maps its CIDR ranges and passes them to mapcidr, expanding them into a host-range output for scanning.
Facts on this page come from the live Trickest tool library.