Asn Infrastructure Mapping logo

Asn Infrastructure Mapping

CommunityPopular
uphiago
asn-infrastructure-mapping

Map organization IP infrastructure via ASN, CIDR, TLD expansion, and reverse DNS.

Overview

Publisheruphiago
Repositoryrecon-skills
Skill nameasn-infrastructure-mapping
Stars
1.3K
Forks
213
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by uphiago on GitHub. Read the source before you install it.

Installation

Install the Asn Infrastructure Mapping AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/uphiago/recon-skills.git /tmp/recon-skills
mkdir -p .claude/skills
cp -r /tmp/recon-skills/recon/asn-infrastructure-mapping .claude/skills/asn-infrastructure-mapping
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Asn Infrastructure Mapping in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Asn Infrastructure Mapping on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Asn Infrastructure Mapping is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

ASN Infrastructure Mapping

Map an organization's entire IP infrastructure by pivoting from domain to ASN (Autonomous System Number), extracting CIDR ranges, and discovering every hostname and service across all owned IP blocks. Includes TLD expansion to find sibling domains on different top-level domains with separate infrastructure.

When to Use

  • You have a target domain and want to discover EVERY IP owned by the organization.
  • Passive subdomain enumeration found only a few hosts — the rest may be on sibling TLDs or different IP ranges.
  • The target has a known ASN that can be expanded to full CIDR blocks.
  • Services on non-standard ports are invisible to web-only recon.
  • Acquired subsidiaries or international domains may sit on different ASNs with weaker security.

Prerequisites

  • terminal whois, dnsx, mapcidr, httpx, and asnmap.
  • The target domain and/or a known IP belonging to the organization.
  • Shodan API key (optional, for deeper OSINT).

Quick Detection

bash
# Start: domain → IP → ASN → CIDR ranges
IP=$(dig target.com +short | head -1)
ASN=$(whois $IP | grep -i "origin\|OriginAS" | awk '{print $NF}' | head -1)
echo "ASN: $ASN"
whois -h whois.radb.net -- "-i origin $ASN" | grep -Eo "([0-9.]+){4}/[0-9]+" | sort -u

Procedure

Phase 1 — Domain to ASN Discovery

bash
# asnmap — automated domain → ASN
asnmap -d target.com

# Manual whois approach
IP=$(dig target.com +short | head -1)
whois $IP | grep -iE "origin|OriginAS|route:|descr:" | head -10

# spk — finds all ASNs for a company by name (including subsidiaries)
spk -json -s "Company Name"

# Webtools
# https://bgp.he.net — search by company name
# https://asnlookup.com — search by org name, ASN, or CIDR
# https://bgp.tools — modern BGP explorer

Phase 2 — ASN to CIDR Ranges

bash
# asnmap — direct CIDR extraction
asnmap -a AS33905 -silent > cidr_ranges.txt

# RADB whois — full route objects
whois -h whois.radb.net -- "-i origin AS33905" \
  | grep -Eo "([0-9.]+){4}/[0-9]+" \
  | sort -u >> cidr_ranges.txt

# metabigor — multi-source IP intelligence
echo "Company Name" | metabigor net --org -o cidr_ranges.txt
echo "ASN33905" | metabigor net --asn -o cidr_ranges.txt

Phase 3 — CIDR to Individual IPs

bash
# mapcidr — split CIDR into flat IP list
cat cidr_ranges.txt | mapcidr -silent > all_ips.txt
wc -l all_ips.txt

# prips — alternative IP generator
while read cidr; do prips "$cidr"; done < cidr_ranges.txt >> all_ips.txt

# Scan discovered IPs for live web services
cat all_ips.txt | httpx \
  -ports 80,443,8080,8443,3000,5000,8000,8888,9090,9443 \
  -status-code -title -web-server -silent \
  -o live_ip_services.txt

Phase 4 — Reverse DNS on IP Ranges

bash
# dnsx PTR — resolve hostnames from IP blocks
cat cidr_ranges.txt | dnsx -silent -resp-only -ptr > ptr_domains.txt

# Filter for target-related hosts
grep -i "target" ptr_domains.txt > ptr_target.txt

# hakrevdns — reverse DNS at scale
hakrevdns -d target.com -R resolvers.txt

# resolveDomains — check which IPs serve target content
resolveDomains -d all_subs.txt > resolved.txt
awk '{print $3}' resolved.txt | sort -u > unique_ips.txt

Phase 5 — TLD Expansion

bash
# tldbrute — discover all registered TLD variants
tldbrute -d target.com

# Manual IANA TLD list approach
wget -q https://data.iana.org/TLD/tlds-alpha-by-domain.txt
ROOT=$(echo "target.com" | cut -d. -f1)
cat tlds-alpha-by-domain.txt | tr '[:upper:]' '[:lower:]' \
  | while read tld; do echo "$ROOT.$tld"; done \
  | httpx -silent -mc 200 > tlds_alive.txt

# Apply to all known subdomains
cat all_subs.txt | while read sub; do
  cat tlds-alpha-by-domain.txt | tr '[:upper:]' '[:lower:]' \
    | sed "s/^/$sub./"
done | dnsx -silent > subs_tld_expanded.txt

Phase 6 — Architecture Visualization

bash
# Map which domains belong to which IP
cat unique_ips.txt | while read ip; do
  echo -n "$ip: "
  grep -l "$ip" resolved.txt 2>/dev/null | tr '\n' ' '
  echo
done > ip_to_domain_map.txt

# Identify shared infrastructure (one IP serving multiple domains — CDN or reverse proxy)
awk '{if (NF > 2) print}' ip_to_domain_map.txt > shared_infra.txt

# Scan non-web ports on ALL discovered IPs  
naabu -l all_ips.txt -p - -rate 1000 -c 50 -exclude-ports 80,443 -o all_services.txt

Phase 7 — Sub-organization Discovery

bash
# Extract all company/organization names from whois
cat all_ips.txt | while read ip; do
  whois $ip 2>/dev/null | grep -iE "OrgName|org-name|descr:" | head -1
done | sort -u > subsidiary_names.txt

# For each subsidiary, repeat the ASN → CIDR pipeline
cat subsidiary_names.txt | while read org; do
  metabigor net --org "$org" >> expanded_cidr.txt
done

Pitfalls

  • CIDR ranges can be massive (e.g., AWS). Only scan IP ranges confirmed to belong to the target, not the entire hosting provider.
  • RADB whois data may be stale. Cross-reference with multiple sources (bgp.he.net, Censys, Shodan).
  • TLD expansion is noisy. Only .com/.org/.net/.io/.dev usually produce useful results.
  • Reverse DNS may reveal internal hostnames. Handle with care in external recon — these leaks are findings themselves.
  • Sub-organization discovery can lead to out-of-scope targets. Always verify the relationship before scanning.

Verification

  1. CIDR ranges were confirmed via at least two sources (whois + bgp.he.net or asnmap).
  2. Reverse DNS on discovered IPs returned target-related hostnames.
  3. TLD expansion found live domains on sibling TLDs.
  4. Web service scan identified unique applications on non-standard ports.
  5. Map the full infrastructure: domains → IPs → services → vulnerabilities.

Related Skills

  • subdomain-enumeration — Generate the initial subdomain list before expanding to IP infrastructure.
  • origin-ip-discovery — Once CIDR ranges are known, identify which IPs are origins behind CDN.
  • vhost-enumeration — Scan discovered IPs for hidden virtual hosts.
  • port-mass-scan — Scan all discovered IPs for exposed services.

Frequently asked questions

What does the Asn Infrastructure Mapping AI skill do?

Map organization IP infrastructure via ASN, CIDR, TLD expansion, and reverse DNS.

Why use Asn Infrastructure Mapping on TypingMind?

Because you install it once and use it with any model. Asn Infrastructure Mapping is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Asn Infrastructure Mapping in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/uphiago/recon-skills/tree/main/recon/asn-infrastructure-mapping. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Asn Infrastructure Mapping?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Asn Infrastructure Mapping?

As many as you like. As long as a model supports skills, you can use Asn Infrastructure Mapping with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Asn Infrastructure Mapping AI skill free?

Yes. It is published on GitHub by uphiago under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇