agentleFS
avizmarlonavizmarlon/agent-skills/skills/dns-and-whois-tools/SKILL.md

dns-and-whois-tools

Skill2 starsChanged 6 months agoMITView on GitHub

DNS lookup, WHOIS, passive-DNS history, IP reputation, and subdomain enumeration procedures. Auto-load when nslookup / dig / whois / host is mentioned, when investigating DNS records (A, NS, MX, CNAME, TXT), when researching historical nameservers, when checking IP reputation (AbuseIPDB, ipinfo.io), when enumerating subdomains (HackerTarget, crt.sh, SecurityTrails), or when reasoning about registrar vs hosting provider.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use these when "what nameservers did this domain use before migrating?" or "what DNS records existed historically?" matters.

    line 28
  2. Very specific:

    If ABUSEIPDB_API_KEY is not set in the current shell, retrieve it securely and export it for the session (export ABUSEIPDB_API_KEY=...

    line 67
  3. Very specific:

    Start with SecurityTrails: https://securitytrails.com/domain/DOMAIN/dns — shows NS history and A-record history with timestamps.

    line 75
  4. Very specific:

    Start with SecurityTrails: https://securitytrails.com/domain/DOMAIN/dns

    line 109
  5. Distinctive:

    If not available, try WhoisFreaks or ViewDNS.info.

    line 110

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

DNS & WHOIS Tools

Investigation toolkit for DNS, WHOIS, IP reputation, and passive-DNS work. Applies to any domain or IP across public internet domains.

DNS lookup — preferred order

  1. wsl dig — fullest output, supports +short, +noall +answer, ANY, AXFR, etc.
  2. Google DNS API — curl -s "https://dns.google/resolve?name=DOMAIN&type=A" — works from any shell, returns JSON.
  3. nslookup — works but some local resolvers may return "No response from server". Use only when 1 and 2 are unavailable.

Current DNS records

# A / NS / MX / CNAME / TXT via Google DNS-over-HTTPS
curl -s "https://dns.google/resolve?name=DOMAIN&type=A|NS|MX|CNAME|TXT"

# Indexed subdomains (HackerTarget)
curl -s "https://api.hackertarget.com/hostsearch/?q=DOMAIN"

Historical / passive DNS

Use these when "what nameservers did this domain use before migrating?" or "what DNS records existed historically?" matters. They reveal records that no longer resolve.

  • crt.sh (Certificate Transparency): curl -s "https://crt.sh/?q=%.DOMAIN&output=json" — reveals subdomains that ever had SSL issued (indirect evidence they existed).
  • SecurityTrails — https://securitytrails.com/domain/DOMAIN/dns (WebFetch; may require account).
  • WhoisFreaks — https://whoisfreaks.com/tools/dns/history/lookup/DOMAIN (WebFetch).
  • DNSHistory.org — https://dnshistory.org/dns-records/DOMAIN (WebFetch).
  • ViewDNS.info — https://viewdns.info/history/?domain=DOMAIN (WebFetch).

Priority order for historical nameservers: SecurityTrails (preferred, comprehensive history) → WhoisFreaks → ViewDNS.info → DNS provider customer support.

WHOIS — domain ownership and registrar information

  • who.is — https://who.is/whois/DOMAIN (WebFetch).
  • ICANN Lookup — https://lookup.icann.org/en/lookup?name=DOMAIN (WebFetch).
  • wsl whois DOMAIN for shells with whois available.

Note: some ccTLDs (.in, .de, .uk, etc.) do not expose public WHOIS for the registrant due to regional privacy regulations.

IP reputation

ipinfo.io (organization, ASN, hostname, geolocation)

curl -s "https://ipinfo.io/IP/json"

Returns: organization name, ASN, reverse hostname, country, city, ISP.

AbuseIPDB (abuse score for blacklist / nullroute decisions)

The API key should be stored in a secure vault (e.g., Bitwarden, environment variable, credential manager). Reference it as an environment variable ABUSEIPDB_API_KEY — never hardcode it.

curl -G https://api.abuseipdb.com/api/v2/check \
  --data-urlencode "ipAddress=IP" \
  -H "Key: $ABUSEIPDB_API_KEY" \
  -H "Accept: application/json"

If ABUSEIPDB_API_KEY is not set in the current shell, retrieve it securely and export it for the session (export ABUSEIPDB_API_KEY=... on Bash / $env:ABUSEIPDB_API_KEY=... on PowerShell) — do not print the value to stdout or logs.

Registrar ≠ hosting provider — critical rule

Never assume the registrar (WHOIS registrant) is also the hosting provider. They are independent business relationships: a domain can be registered at GoDaddy but hosted at Linode, or registered at Namecheap and hosted at AWS.

To find historical nameservers (e.g., "what was the NS before the domain was migrated?"):

  • Start with SecurityTrails: https://securitytrails.com/domain/DOMAIN/dns — shows NS history and A-record history with timestamps.
  • Fall through to WhoisFreaks → ViewDNS.info → contact the domain owner/administrator.
  • Never infer historical nameservers from the current WHOIS record. WHOIS shows who sold the domain (registrar), not the hosting history (nameservers).

Example: A domain registered at GoDaddy (registrar) may have been hosted at AWS (NS: ns-123.awsdns-45.com), then migrated to Cloudflare (NS: nora.ns.cloudflare.com). The WHOIS registrant info does not change, but the NS records do. Historical DNS records reveal the path.

Subdomain enumeration

  • HackerTarget — indexed subdomains (passive crawl): curl -s "https://api.hackertarget.com/hostsearch/?q=DOMAIN".
  • crt.sh — subdomains from SSL certificates (Certificate Transparency logs): curl -s "https://crt.sh/?q=%.DOMAIN&output=json".
  • Combine both for coverage: HackerTarget finds indexed DNS entries; crt.sh finds domains that had HTTPS active at some point in CT logs.

When to use each tool

ToolUse Case
dig / Google DNS APIReal-time DNS records, current state
crt.shHistorical subdomains, certificates, broad discovery
SecurityTrailsHistorical NS records, DNS changes over time
WHOIS (ICANN / who.is)Registrant, registrar, registration date, contact info
ipinfo.ioIP organization, ASN, geolocation, reverse hostname
AbuseIPDBAbuse history, blacklist score, reporter comments
HackerTargetIndexed subdomains from search engines and DNS scans

Common workflows

"Find who hosts this domain"

  1. Get current NS: curl -s "https://dns.google/resolve?name=DOMAIN&type=NS"
  2. Cross-reference with known hosting NS prefixes (e.g., *.awsdns*.com = AWS, *.cloudflare.com = Cloudflare, *.linode.com = Linode).
  3. Optionally verify with ipinfo.io on the A record IP.

"Find historical nameservers before a migration"

  1. Start with SecurityTrails: https://securitytrails.com/domain/DOMAIN/dns
  2. If not available, try WhoisFreaks or ViewDNS.info.
  3. Compare historical NS with current NS to identify the migration path.

"Check if an IP is reputation-flagged"

  1. curl -s "https://ipinfo.io/IP/json" — basic info.
  2. curl -G https://api.abuseipdb.com/api/v2/check --data-urlencode "ipAddress=IP" -H "Key: $ABUSEIPDB_API_KEY" -H "Accept: application/json" — abuse score.

"Enumerate all subdomains of a domain"

  1. curl -s "https://crt.sh/?q=%.DOMAIN&output=json" — CT logs.
  2. curl -s "https://api.hackertarget.com/hostsearch/?q=DOMAIN" — indexed scans.
  3. Combine results and de-duplicate.

Related skills

  • Shell selection and CLI tooling → see your project's or organization's guidance on shell environments and available tools.
  • IP-based investigations (traceroute, MTR, geolocation) → use system tools and public APIs (ipinfo.io, MaxMind, etc.).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.