Examples

See practical examples of how to use the Validin CLI

Install the CLI and check your API key before the first lookup. The CLI reference lists configuration and command options.

pip install validin-sdk
validin setup          # or: export VALIDIN_API_KEY="your-api-key"
validin ping

Contents

Basics

# DNS history for a domain
validin dns example.com

# Only A and AAAA records from the last 30 days
validin dns example.com --types A,AAAA --lookback 30

# TXT and MX records
validin dns example.com --extra --types TXT,MX

# Reverse DNS for an IP
validin dns 8.8.8.8 --ptr

# Domains that resolved to any IP in a /24
validin dns 203.0.113.0/24 --types A --lookback 30

# Reputation for several indicators at once
validin reputation example.com 203.0.113.7 evil.example

# Subdomains using the API’s default limit
validin subdomains example.com --limit 0

# Certificates for a domain and its subdomains
validin certs example.com --wildcard --lookback 30

# What a web server served
validin crawl example.com --lookback 7

# Registration history, and a live RDAP lookup
validin registration example.com
validin registration example.com --live

# What an IP served (titles, server banners, hashes, certificates)
validin pivots 203.0.113.7 --lookback 30

# Which open-source lists and feeds include a domain
validin osint example.com

These print tables by default, with a result count on stderr. validin setup can change the default format:

$ validin dns example.com
KEY          TYPE  VALUE               FIRST_SEEN  LAST_SEEN
example.com  A     93.184.215.14       2024-10-01  2024-11-13
example.com  NS    a.iana-servers.net  2024-10-01  2024-11-13
2 results

Output formats

The same command in each format:

validin dns example.com -o table    # columns for people
validin dns example.com --json      # full envelope
validin dns example.com -o jsonl    # one JSON object per result
validin dns example.com -o csv      # for spreadsheets
validin dns example.com -o list     # just the values
$ validin dns example.com -o list
93.184.215.14
a.iana-servers.net

$ validin dns example.com -o csv
key,key_type,type,first_seen,last_seen,value,value_type
example.com,domain,A,2024-10-01T00:00:00+00:00,2024-11-13T00:00:00+00:00,93.184.215.14,ip
example.com,domain,NS,2024-10-01T00:00:00+00:00,2024-11-13T00:00:00+00:00,a.iana-servers.net,domain

Save results to files:

validin certs example.com --wildcard -o csv > example_certs.csv
validin crawl 203.0.113.0/24 --lookback 7 -o jsonl > crawl.jsonl

Find out which fields a command returns, and which one -o list prints:

validin commands --json | jq '.results[] | select(.name == "crawl") | .output'

Chaining commands

-o list prints one value per line, and a command given no indicators reads them from stdin, so commands chain:

# Resolve every known subdomain
validin subdomains example.com -o list | validin dns --types A

# Reputation for every new lookalike
validin lookalikes acme.com -o list | validin reputation

# Domains on every IP a domain used
validin dns example.com --types A --lookback 30 -o list | validin dns --lookback 30

# Check a file of IOCs ('#' comments and blank lines are skipped)
validin reputation < iocs.txt
cat iocs.txt | validin reputation -o csv > iocs_reputation.csv

Use jq when you need a field other than the list field:

# Every SAN on every certificate
validin certs example.com --json | jq -r '.results[].certificate.domains[]' | sort -u

# Hosts and IPs behind a fingerprint, as TSV
validin crawl fc742437c62fa1e248680e0035bafbc55923423b --json \
  | jq -r '.results[] | [.response.host.value, .response.ip.value] | @tsv' | sort -u

Investigate an IP address

IP=203.0.113.7

validin reputation $IP                       # reputation and hosting context
validin osint $IP                            # block lists and cloud provider ranges
validin dns $IP --lookback 90                # domains that pointed here, with dates
validin pivots $IP --lookback 90             # hosts redirecting to it, and what it served
validin dns $IP --ptr                        # PTR names: hoster, operator naming
validin crawl $IP --lookback 90              # titles, ports, banners, hashes it served
validin registration $IP --live              # who owns the netblock
validin opendirs lookup $IP                  # recorded open directories (beta)

# Reputation of every domain that pointed at it
validin dns $IP --lookback 90 -o list | validin reputation

If reputation or the domain count suggests a CDN or shared host, stop pivoting on the IP: its neighbours are probably unrelated.

Investigate a domain

D=suspicious.example

validin reputation $D
validin osint $D                              # block lists, popularity rankings
validin registration $D                       # registrar, name servers, creation date
validin dns $D                                # IPs over time
validin dns $D --extra                        # TXT, MX, SOA: verification tokens, mail setup
validin subdomains $D -o list
validin certs $D --wildcard                   # SANs and issuance dates
validin crawl $D                              # page titles and fingerprints
validin pivots $D                             # IPs and hosts that link to or reference it

# Neighbours on each IP the domain used
validin dns $D --types A -o list | validin dns --lookback 90 --json > neighbours.json

Fast-flux check: count distinct A records in 30 days.

validin dns $D --types A --lookback 30 --json | jq '[.results[].value] | unique | length'

Pivot on a phishing kit fingerprint

A kit deployed on many domains usually serves the same page body everywhere.

# 1. Distinct titles and fingerprints on a known phishing site
validin crawl phish.example --json \
  | jq -r '.results[].response | [.title, .body_hash, .header_hash] | @tsv' | sort -u

# 2. Every host that served the same page body
validin crawl fc742437c62fa1e248680e0035bafbc55923423b

# 3. Save those hosts
validin crawl fc742437c62fa1e248680e0035bafbc55923423b --json \
  | jq -r '.results[].response.host.value // empty' | sort -u > kit_hosts.txt

# 4. Cluster them by registration and reputation
validin registration < kit_hosts.txt -o csv > kit_registration.csv
validin reputation < kit_hosts.txt

# 5. Read the page itself: resources it loads and hosts it references (exfil endpoints)
validin content fc742437c62fa1e248680e0035bafbc55923423b
validin content fc742437c62fa1e248680e0035bafbc55923423b --json | jq -r '.results[].indicators[].host' | sort -u
validin content fc742437c62fa1e248680e0035bafbc55923423b -o list > kit_page.html

Header hashes are shorter than standard hashes (20 hex characters), and the CLI recognises them too:

validin crawl e4c0c878065037deb4ae

Fetch the distinct page bodies in the crawl results.

validin crawl evil.example --json | jq -r '.results[].response.body_hash // empty' | sort -u \
  | validin content --json > pages.json

Certificates and favicons:

validin content 2f461496d3ba4c6fad3ee550c123f94622ebc5b4 --kind cert -o list > cert.pem
validin content 44d88612fea8a8f36de82e1278abb02f --kind favicon -o list | base64 -d > favicon.ico

Pivot on shared host attributes

pivots shows where a value was seen on other hosts: the IPs and hosts whose crawled responses contained it, with a category saying where (a link, a certificate, a redirect, a page body, a server banner). For an IP, it also lists what the IP itself served (relation is observed_on), which you can pivot on next.

# Hosts that redirect to an IP, plus what the IP itself served (banner, titles, hashes, cert fields...)
validin pivots 203.0.113.7 --lookback 30

# The IP's header hashes, then every host that served the same headers
validin pivots 203.0.113.7 --json | jq -r '.results[] | select(.category=="HEADER_HASH") | .value' \
  | validin pivots --category HEADER_HASH

# Every IP and host that served the same page body
validin pivots fc742437c62fa1e248680e0035bafbc55923423b --category BODY_SHA1 -o list

# Hosts with the same server banner or page title (quote the text and use --as string to keep its type)
validin pivots 'nginx/1.18.0 (Ubuntu)' --as string --category SERVER --lookback 7
validin pivots 'Acme Secure Login' --as string --category TITLE

# Pages that link to a domain, and certificates that name it
validin pivots example.com --category ANCHORS_LINKS -o list

# IPs and hosts whose certificates name a domain
validin pivots example.com --category CERT_DOMAIN

--category tab-completes the documented attribute names. For an IP, --category LOCATION_IP4 keeps only the hosts that redirect to it. To see what the IP served, filter the full result with jq as above. CIDRs take no category.

OSINT feeds and bulk context

# Which lists and feeds include an indicator, and when
validin osint example.com
validin osint 203.0.113.0/24 --lookback 30 -o jsonl

# Count tags across a domain's OSINT history
validin osint example.com --json | jq -r '.results[].tags[]' | sort | uniq -c

# Annotate a long IOC list in batches of 1,000
validin context -o csv < iocs.txt > iocs_context.csv

# Only the indicators that appear on at least one feed
validin context --json < iocs.txt | jq -r '.results[] | select(.annotations | length > 0) | .key'

context is much faster than reputation for thousands of indicators, but returns annotations only: no score or verdict. Use reputation on the shortlist it produces.

Threat groups

Named actors, groups, and malware families, with the indicators and reports behind them. These need the bulk or projects role.

# Find a threat by key or alias
validin threat list --search sdbot

# The biggest malware families by reported indicators
validin threat list --category malware --json | jq -r '.results | sort_by(-.total_indicators)[:20][] | [.key, .total_indicators] | @tsv'

# Summary, then the reporting timeline
validin threat show sdbot
validin threat show sdbot --json | jq '.results[0].activity'

# Reported indicators: triage them in bulk, then keep the domains that are still on a feed
validin threat indicators sdbot -o list | validin context --json \
  | jq -r '.results[] | select(.key_type=="domain" and (.reasons | length > 0)) | .key'

# The reports behind the attribution
validin threat reports sdbot -o table

Reported indicators span years. Check date_added, and confirm current activity with dns, crawl or pivots before blocking on them.

Submit domains for scanning

submit asks Validin to start scanning domains it doesn't track yet. It can't be undone, so check first with --dry-run:

# Count and validate without sending
validin submit --dry-run < new_domains.txt

# Submit the domains and check the ACCEPTED count
validin submit < new_domains.txt -o table

# Preview a submission of newly observed lookalikes
validin lookalikes acme.com --lookback 1 -o list | validin submit --dry-run

Hunt a DNS TXT Record

Site-verification tokens (found as TXT records) are often reused across an actor's domains. A trailing * matches by prefix:

# Every domain that published the token
validin dns "google-site-verification=AbCdEf*" --extra --lookback 365

# The domains only, then their registration details
validin dns "google-site-verification=AbCdEf*" --extra -o json | jq -r '.results[].key' | sort -u > token_domains.txt
validin registration < token_domains.txt

Brand protection: lookalike triage

# New lookalikes in the last week, excluding your own domains
validin lookalikes acme.com --lookback 7 --exclude acme-corp.com,acmegroup.com

# Stricter (edit distance 1) or looser (3), and across full hostnames
validin lookalikes acme.com --similarity 1
validin lookalikes acme.com --similarity 3 --depth fqdns

# Regex: delivery and carrier smishing patterns
validin lookalikes "/^(usps|fedex|dhl|tmobile|att|verizon)[-.]/" --lookback 7

Check DNS, registration, and crawl history for the domains in the batch.

validin lookalikes acme.com --lookback 7 -o list > new.txt

validin reputation < new.txt
validin dns --types A < new.txt                # recorded IPv4 addresses
validin registration < new.txt -o csv > new_reg.csv     # cluster by registrar, NS, date
validin certs --lookback 7 < new.txt           # certificates issued before DNS goes live
validin crawl --lookback 7 --json < new.txt \
  | jq -r '.results[].response | [.host.value, .title, .body_hash] | @tsv'

Send them straight to a project for tracking:

validin lookalikes acme.com --lookback 1 -o list | validin project add 1a2b3c --tag unconfirmed --note "acme.com lookalike"

Registration pivots

# Registration history for a domain
validin registration example.com

# Live lookups: RDAP (default) or WHOIS, with the registry's raw response
validin registration example.com --live
validin registration example.com --live --mode whois --raw --json

# Who owns an IP range
validin registration 8.8.8.0/24 --live

# Reverse search: other domains with the same registrant email
validin registration '[email protected]' --as string --lookback 365

# The same, but only where it is the registrant email (not admin, tech, abuse...)
validin registration [email protected] --field REGISTRANT_EMAIL --json | jq -r '.results[].key' | sort -u

# Domains newly registered through one registrar
validin registration 'Gname.com Pte. Ltd.' --field REGISTRAR --lookback 7

# Registrars of a list of domains
validin registration -o list < domains.txt

# How many domains each registrar holds (-o list deduplicates, so count from JSON)
validin registration --json < domains.txt \
  | jq -r '.results[] | [.key, .registration.registrar.value // "-"] | @tsv' \
  | sort -u | cut -f2 | sort | uniq -c | sort -rn

Live lookups take up to 30 seconds per indicator, are cached for 24 hours, and need live-registration access.

Live scans

Fetch a URL right now from Validin's crawlers:

# Scan and wait for results
validin scan start https://suspicious.example/login --wait

# From specific countries, with a custom User-Agent
validin scan start https://suspicious.example/login --country US --country DE \
  --user-agent "Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X)" --wait

# Start now, read results later
id=$(validin scan start suspicious.example -o list)
validin scan status "$id"
validin scan results "$id" --wait --json > scan.json

# Keep the scan with a project
validin scan start https://suspicious.example -p 1a2b3c
validin scan link "$id" -p 1a2b3c
validin project scans 1a2b3c

Open directories and malware hosting

Open-directory commands are in beta and need the open-directories role.

# Open directories on a host or range
validin opendirs lookup evil.example
validin opendirs lookup 203.0.113.0/24 --lookback 30

# Search: crawls with .exe files in the last week, including the files
validin opendirs query 'open_dir.file.ext = "exe"' --lookback 7 --files --json > exe_dirs.json
validin opendirs query 'open_dir.file.name = "beacon.bin"' --files

# Find hosts that served the sample
validin opendirs files 44d88612fea8a8f36de82e1278abb02f

# Captures of one exact URL (looked up in the index, not fetched)
validin opendirs url http://203.0.113.7:8000/payload.exe

# Browse a crawl: every file beneath it, largest first
validin opendirs ls 0123456789abcd -R --type file --sort size --order desc
validin opendirs show 0123456789abcd0a1b

Download a sample into a quarantine directory. It is saved as <sha256>.bin, never printed to the terminal:

mkdir -m 700 -p quarantine
validin opendirs get 44d88612fea8a8f36de82e1278abb02f -O quarantine/

Treat every downloaded file as live malware. Only open it in an isolated analysis environment.

Projects

# Create a project and capture its id
pid=$(validin project create "Campaign X" --description "Phishing infra, Nov 2026" --tlp AMBER -o list)

# Add indicators with a tag and a note
validin project add "$pid" evil.example 203.0.113.7 --tag suspected --note "From IR-1234"

# Add from a file or another command
validin project add "$pid" --tag unconfirmed < iocs.txt
# IPs that served a known phishing page (crawl's -o list prints IPs)
validin crawl fc742437c62fa1e248680e0035bafbc55923423b -o list | validin project add "$pid" --tag confirmed

# Review
validin project list
validin project show "$pid"
validin project indicators "$pid"
validin project indicators "$pid" --tag confirmed -o list

# Re-tag and annotate after triage
validin project update "$pid" evil.example --tag confirmed --untag suspected
validin project update "$pid" 203.0.113.7 --tag rejected --untag suspected --note "Shared hosting"

# Remove indicators
validin project remove "$pid" 203.0.113.7

# Reference links
validin project resource-add "$pid" https://example.com/report --note "Vendor write-up"
validin project resources "$pid"

# Settings
validin project edit "$pid" --tlp RED --auto-alerts on

Re-check everything confirmed in a project:

validin project indicators "$pid" --tag confirmed -o list | validin dns --lookback 7

Sharing (enterprise):

validin project share "$pid" [email protected] --permission add-indicators --notify --message "Campaign X infra"
validin project members "$pid"
validin project permission "$pid" [email protected] view
validin project unshare "$pid" --user [email protected]

To delete the project and its contents, pass --yes.

validin project delete "$pid" --yes

Alerts

# Turn on daily alerts
validin project edit 1a2b3c --auto-alerts on

# Which changes raise alerts (sources left out raise none)
validin project alert-prefs 1a2b3c --set dns=A,AAAA,NS --set rdap=REGISTRAR,NAMESERVER --set subdomains=new
validin project alert-prefs 1a2b3c

# Read alerts
validin project alerts 1a2b3c                       # newest alert day
validin project alerts 1a2b3c --dates               # which days have alerts
validin project alerts 1a2b3c --date 2026-11-13 --json

# Stop alerting on noisy indicators (they stay in the project)
validin project unalert 1a2b3c cdn-host.example
validin project indicators 1a2b3c --alerting -o list    # what's still alerting

# Clear out alert records you've handled
validin project alerts 1a2b3c --json | jq -r '.results[].alert_rowid' | validin project delete-alerts 1a2b3c

YARA rules

Managing rules needs an enterprise account with YARA access.

cat > acme_kit.yar <<'EOF'
rule acme_phish_kit
{
    strings:
        $title = "<title>Acme Secure Login</title>" nocase
        $js    = "acme-verify.js"
    condition:
        all of them
}
EOF

# Create it and capture the rule id
rid=$(validin yara add acme_kit.yar -p 1a2b3c -o list)

# Retrohunt the last 72 hours, then match new content live
validin yara retrohunt "$rid" -p 1a2b3c --hours 72 --notify alert
validin yara track "$rid" -p 1a2b3c

# Read matches
validin yara matches "$rid" -p 1a2b3c --first-seen 2026-11-01
validin yara matches "$rid" -p 1a2b3c -o csv > matches.csv
validin yara matches "$rid" -p 1a2b3c -o list | validin reputation

# Edit the rule (saves a new version), then view or export it
validin yara edit "$rid" acme_kit.yar -p 1a2b3c
validin yara show "$rid" -p 1a2b3c
validin yara show "$rid" -p 1a2b3c -o list > current.yar

# Delete false-positive matches
validin yara matches "$rid" -p 1a2b3c --json \
  | jq -r '.results[] | select((.host // "") | endswith(".acme.com")) | .row_ids[]' \
  | validin yara delete-matches "$rid" -p 1a2b3c

# Stop or remove
validin yara cancel "$rid" -p 1a2b3c
validin yara untrack "$rid" -p 1a2b3c
validin yara delete "$rid" -p 1a2b3c --yes

Bulk search jobs

List running searches started in the web app. Set JOB_ID to an ID from the list to see its progress.

validin bulk list --status running
validin bulk status "$JOB_ID" --json

Scheduled monitoring

--lookback 1 returns only what was seen in the last day, which suits a daily cron job.

/usr/local/bin/validin-daily.sh:

#!/usr/bin/env bash
set -euo pipefail
# Set VALIDIN_API_KEY in the job environment or run validin setup as the cron user.
PROJECT=1a2b3c
OUT=/var/lib/validin/$(date -u +%F)
mkdir -p "$OUT"

# New lookalikes of the brand go into the project
validin lookalikes acme.com --lookback 1 -o list > "$OUT/lookalikes.txt"
if [ -s "$OUT/lookalikes.txt" ]; then
  validin project add "$PROJECT" --tag unconfirmed --note "lookalike $(date -u +%F)" < "$OUT/lookalikes.txt"
fi

# New domains publishing a tracked TXT token
validin dns "google-site-verification=AbCdEf*" --extra --lookback 1 --json \
  | jq -r '.results[].key' | sort -u > "$OUT/token_domains.txt"
if [ -s "$OUT/token_domains.txt" ]; then
  validin project add "$PROJECT" --tag suspected --note "TXT token $(date -u +%F)" < "$OUT/token_domains.txt"
fi

# Alerts from the latest available day
validin project alerts "$PROJECT" --json > "$OUT/alerts.json"

Run daily at 06:00 in cron’s configured time zone.

0 6 * * * /usr/local/bin/validin-daily.sh >> /var/log/validin-daily.log 2>&1

Scripting and error handling

Check the exit code before reading the output. Exit 5 indicates a partial result.

validin dns --json < domains.txt > out.json
case $? in
  0) echo "ok" ;;
  5) echo "partial: $(jq '.errors | length' out.json) indicators failed"
     jq -r '.errors[] | "\(.indicator): \(.code)"' out.json ;;
  3) echo "API key missing or rejected: run 'validin ping'" >&2; exit 1 ;;
  4) echo "rate limited or out of quota: see 'validin usage'" >&2; exit 1 ;;
  *) echo "failed" >&2; exit 1 ;;
esac
Exit codeMeaning
0Success (including zero results)
1API or network error
2Invalid arguments or input
3Missing or rejected API key
4Rate limited or quota exhausted
5Partial result. Inspect the errors.

Check quota before a big run:

validin usage
validin usage --json | jq '.results[0].daily_remaining'
validin usage --by-path -o csv

Use a different key or endpoint for one command:

validin dns example.com --api-key "$OTHER_KEY"
validin ping --endpoint https://your-enterprise-endpoint.example.com

Read the machine-readable catalog of every command:

validin commands --json | jq -r '.results[].name'
validin commands --json | jq '.cli.exit_codes'

Did this page help you?