Comprehensive guide to all reconnaissance capabilities, from basic network discovery to advanced vulnerability detection and enterprise integration.
Comprehensive ASN reconnaissance and asset discovery
ASNSPY automatically maps entire ASN networks by querying multiple authoritative sources and performing comprehensive DNS intelligence gathering. This is the foundation for all subsequent security analysis.
Fetches all announced IP prefixes (both IPv4 and IPv6) for any given ASN using the RIPE Stat API. Supports filtering by first octet range for targeted reconnaissance.
./asnspy.sh AS15169 # Fetch all prefixes for Google
./asnspy.sh AS13335 --prefix-range 104-108 # Only 104-108.x.x.x ranges
Scan multiple consecutive ASNs simultaneously with WHOIS intelligence parsing from 5 Regional Internet Registries (ARIN, RIPE, APNIC, LACNIC, AfriNIC) plus 5 National Internet Registries (JPNIC, KRNIC, TWNIC, CNNIC, NIC.br).
./asnspy.sh --asn-range AS13335-AS13340 --fetch-prefixes
# Scans 6 ASNs, gets WHOIS for each, fetches all prefixes
Performs reverse DNS lookups across all IP addresses in discovered prefixes. Supports parallel processing for speeds up to 15,000+ IPs per minute. Automatically handles both drill and dig DNS tools.
./asnspy.sh AS15169 --parallel 50
# Scan with 50 concurrent DNS lookups
Filtering Modes:
--skip-dead: Skip .0, .127, .255 octets--internet-only: Skip .0, .1, .127, .254, .255--strict-valid: Only scan .2 through .254--gateway-only: Only .1 and .254 (routers/gateways)--host-range N-M: Custom octet rangeAutomatically extracts and deduplicates unique domains from PTR records. Filters out reverse DNS arpa entries and provides clean domain list for further analysis.
Queries crt.sh for all certificates issued to discovered domains, revealing subdomains that may not be in DNS. Includes timeout protection and size limits to handle large/popular domains.
./asnspy.sh AS15169 --ct --ct-timeout 30
# Query CT logs with 30s timeout per domain
prefixes.txt: All IP prefixes (CIDR notation)ptr_results.txt: CSV format: IP,hostnamedomains.txt: Unique domains extractedct_results.txt: Subdomains from CT logsasn_whois.txt: Full WHOIS data for the ASNAutomated version detection with vulnerability correlation
ASNSPY automatically detects server software versions via HTTP headers, then correlates them with known CVEs from the National Vulnerability Database (NVD) and Vulners. This two-phase approach identifies vulnerable software across your entire attack surface.
Sends HTTP requests to discover web server software and versions. Checks multiple ports simultaneously and extracts:
Server header (e.g., "nginx/1.18.0")X-Powered-By header (e.g., "PHP/7.4.3")X-AspNet-Version header./asnspy.sh AS15169 --version-detect --version-ports "80,443,8080,8443"
# Check common web ports for versions
--version-mode ptr: Only IPs with PTR records (default)--version-mode gateway: Only .1 and .254 addresses--version-mode all: Every IP in prefix rangesQueries the National Vulnerability Database API v2.0 with automatic rate limiting (6 seconds between requests to comply with NVD's 5 requests/30s limit).
Alternative/supplementary CVE source via Vulners.com API. Can be used alone or in combination with NVD.
./asnspy.sh AS15169 --version-detect --cve --cve-api all
# Use both NVD and Vulners for maximum coverage
Filter results by CVSS severity to focus on critical issues:
./asnspy.sh AS15169 --cve --cve-min-severity HIGH
# Only show HIGH and CRITICAL vulnerabilities
Severity Levels: LOW, MEDIUM, HIGH, CRITICAL
CRITICAL findings trigger immediate notifications via configured webhooks (Slack, Discord, Teams, PagerDuty) and SIEM integrations.
server_versions.csv: IP, port, product, version, headersvulnerabilities.csv: IP, port, product, version, CVE-ID, severity, descriptioncve_summary.txt: Human-readable summary with statistics192.0.2.1,443,nginx,1.18.0,CVE-2021-23017,HIGH,"nginx resolver off-by-one heap write"
192.0.2.5,8080,Apache,2.4.29,CVE-2021-44790,CRITICAL,"mod_lua request smuggling"
--cve-timeout for per-API-request timeout, --cve-total-timeout for entire phase--database is enabled, tracks vulnerabilities over time for trend analysisDeep certificate inspection with 24+ security checks
ASNSPY performs comprehensive TLS certificate analysis, connecting to HTTPS services to extract and analyze certificate details. Includes expiry tracking, security posture assessment, and certificate authority chain analysis.
Automatically calculates days remaining until expiration. Status classifications:
Identifies self-signed certificates by comparing Common Name with Issuer. Critical for finding dev/staging environments and potential security issues.
Flags certificates with insufficient key lengths:
Identifies use of outdated/insecure protocols:
Checks for SCT (Signed Certificate Timestamp) logs, required by major browsers since 2018.
Identifies wildcard certs (*.example.com) which can indicate shared hosting or over-permissive configurations.
./asnspy.sh AS15169 --tls --tls-mode ptr --tls-port 443
# Only scan IPs with PTR records on port 443
./asnspy.sh AS15169 --tls --tls-mode all --tls-parallel 20
# Scan all IPs with 20 concurrent connections
tls_certificates.csv: Complete cert details (24 columns)tls_results.txt: Raw OpenSSL outputtls_issues.txt: Security problems foundtls_chains.txt: Certificate authority analysistls_statistics.txt: Key types, sizes, TLS versionsTCP connect scanning with ethical safeguards
ASNSPY includes a built-in TCP port scanner with nmap-style "top ports" functionality. Designed for speed and ethical use with authorization prompts and clear consent requirements.
Uses standard TCP three-way handshake. Does not require root privileges. More detectable than SYN scans but completely legal and ethical.
Based on nmap's port frequency analysis. Scan the most commonly open ports first:
./asnspy.sh AS15169 --port-scan --port-scan-top 100
# Scan the top 100 most common ports
./asnspy.sh AS15169 --port-scan --port-scan-top 1000
# Comprehensive scan of top 1000 ports
Default Port List (Top 200):
21,22,23,25,53,80,110,143,443,445,3306,3389,5432,5900,6379,8080,8443,9200,27017
Specify exact ports for your environment:
./asnspy.sh AS15169 --port-scan --port-scan-ports "80,443,8080,8443"
# Only check web ports
Configure concurrency for speed vs. stealth balance:
./asnspy.sh AS15169 --port-scan --port-scan-parallel 100
# Very fast, less stealthy
./asnspy.sh AS15169 --port-scan --port-scan-parallel 1
# Slow, more stealthy
./asnspy.sh AS15169 --port-scan --port-scan-timeout 5
# 5 second timeout per port (default: 1)
--port-scan-mode ptr: Only IPs with PTR records (default, most efficient)--port-scan-mode gateway: Only .1 and .254 (routers/firewalls)--port-scan-mode all: Every IP in discovered prefixesASNSPY requires explicit authorization before port scanning:
###############################################################################
PORT SCANNING AUTHORIZATION REQUIRED
###############################################################################
You are about to perform PORT SCANNING on network infrastructure.
LEGAL REQUIREMENTS:
* You must have EXPLICIT WRITTEN AUTHORIZATION to scan this network
* Unauthorized port scanning may violate:
- Computer Fraud and Abuse Act (CFAA) - USA
- Computer Misuse Act - UK
- Similar laws in other jurisdictions
Do you have authorization to port scan this network? (yes/no):
For Automation: Use --yes or --auto-confirm to skip prompts (you must still have authorization!)
When port scanning completes before version detection, ASNSPY automatically uses discovered open ports instead of the default port list.
Similarly, leak detection can leverage port scan results to target only ports that are actually open.
port_scan_results.csv: IP, port, state, protocolport_scan_summary.txt: Statistics and top findings192.0.2.1,22,open,tcp
192.0.2.1,80,open,tcp
192.0.2.1,443,open,tcp
192.0.2.5,3306,open,tcp
Discover exposed configurations and credentials
ASNSPY scans for 40+ types of commonly exposed configuration files and credentials. This includes environment files, version control artifacts, database backups, and more. Pattern matching detects passwords, API keys, and other secrets in responses.
Like port scanning, leak detection requires explicit authorization. ASNSPY will prompt before scanning and explain legal requirements.
ASNSPY does NOT redact discovered credentials in reports. This follows industry standard practices (Burp Suite, Metasploit, OWASP ZAP) and provides complete evidence for incident response. You are responsible for:
.env, .env.local, .env.production, .env.development, .env.test, .env.backup, .env.example
.git/config, .git/HEAD, .gitignore, .svn/entries
wp-config.php, config.json, config.yaml, config.yml, settings.py, settings.json, docker-compose.yml
backup.sql, db_backup.sql, dump.sql, database.sql, backup.zip
credentials.json, secrets.json, api-keys.json, token.json
.idea/workspace.xml, .vscode/settings.json, .project, .classpath
phpinfo.php, info.php, server-status, .htaccess, .htpasswd
debug.log, error.log, laravel.log, storage/logs/laravel.log
Scans HTTP response bodies for sensitive patterns:
password, passwd, pwd, api_key, apikey, secret, token, access_key, private_keydatabase, db_pass, connection_string, auth, credentialsmtp, mail_password, session, cookieConnects to common service ports and collects banners that may contain:
Default Ports: 21,22,23,25,80,110,143,443,3306,5432,6379,8080,9200,27017,3389,5900
./asnspy.sh AS15169 --leak-scan --leak-ports "21,22,25,3306"
# Only check FTP, SSH, SMTP, MySQL
./asnspy.sh AS15169 --leak-scan --leak-no-banners
# Skip banner grabbing, only check HTTP paths
When run after port scanning, leak detection automatically uses discovered open ports instead of the default list, making scans more efficient and targeted.
leak_exposures.csv: IP, URL, status_code, severity, content_type, size, timestampleak_summary.txt: Statistics and critical findings192.0.2.1,http://192.0.2.1/.env,200,CRITICAL,CREDENTIALS_DETECTED,4523,2024-01-15 14:23:11
192.0.2.5,http://192.0.2.5/.git/config,200,HIGH,CONFIG_DATA,892,2024-01-15 14:23:15
192.0.2.10,http://192.0.2.10/backup.sql,200,CRITICAL,SENSITIVE_DATA,152340,2024-01-15 14:23:22
SIEM, webhooks, databases, and continuous monitoring
ASNSPY is built for enterprise environments with comprehensive integration capabilities. Stream events to SIEMs in real-time, trigger webhook notifications, store scan history in databases, and run automated scans with change detection.
./asnspy.sh AS15169 --profile security \
--siem splunk \
--siem-host splunk.company.com:8088 \
--siem-token YOUR_HEC_TOKEN \
--siem-index security
./asnspy.sh AS15169 --profile security \
--siem elasticsearch \
--siem-host elastic.company.com:9200 \
--siem-token YOUR_API_KEY \
--siem-index asnspy
./asnspy.sh AS15169 --profile security \
--webhook https://hooks.slack.com/YOUR/WEBHOOK/URL \
--webhook-type slack \
--webhook-events scan_complete,critical_finding \
--webhook-severity HIGH
Available Events: scan_start, scan_complete, critical_finding, error
Severity Threshold: LOW, MEDIUM, HIGH, CRITICAL
./asnspy.sh AS15169 --profile security \
--webhook YOUR_PAGERDUTY_KEY \
--webhook-type pagerduty \
--webhook-events critical_finding \
--webhook-severity CRITICAL
Automatically creates tables for:
./asnspy.sh AS15169 --profile security --database
# Creates asnspy.db in scan output directory
./asnspy.sh AS15169 --profile security \
--database --db-type postgresql \
--db-host db.company.com \
--db-user scanner --db-pass secret \
--db-name asnspy
# View all scans
sqlite3 asnspy.db "SELECT * FROM scans ORDER BY start_time DESC;"
# Find persistent vulnerabilities
sqlite3 asnspy.db "SELECT cve_id, COUNT(*) as appearances
FROM findings
WHERE finding_type='vulnerability'
GROUP BY cve_id
ORDER BY appearances DESC;"
# Track certificate expiry
sqlite3 asnspy.db "SELECT ip, cn, days_remaining
FROM certificates
WHERE is_expired=0 AND days_remaining < 30
ORDER BY days_remaining;"
Detect changes between scans to identify new vulnerabilities, changed assets, expired certificates, and new exposures.
# Compare with most recent scan (requires --database)
./asnspy.sh AS15169 --profile security --database --diff LATEST
# Compare with specific previous scan directory
./asnspy.sh AS15169 --profile security --diff-dir /path/to/previous/scan
# Alert on new CRITICAL findings
./asnspy.sh AS15169 --profile security --database --diff LATEST \
--webhook https://hooks.slack.com/YOUR/WEBHOOK \
--diff-alert-new-critical
./asnspy.sh AS15169 --profile deep --quiet --json
Store default configuration in ~/.asnspyrc or .asnspyrc
# Generate example config
./asnspy.sh --generate-config
# Example .asnspyrc:
PARALLEL=50
DO_TRACE=1
DO_TLS=1
DO_CVE=1
CVE_MIN_SEVERITY=MEDIUM
DO_DATABASE=1
DO_JSON=1
#!/bin/bash
# Daily automated scan with full enterprise integration
./asnspy.sh AS15169 --profile security --yes \
--database --db-type postgresql \
--db-host db.company.com --db-user scanner --db-pass "$DB_PASS" \
--diff LATEST \
--siem splunk --siem-host splunk.company.com:8088 \
--siem-token "$SPLUNK_TOKEN" --siem-index security \
--webhook "$SLACK_WEBHOOK" --webhook-type slack \
--webhook-events scan_complete,critical_finding \
--webhook-severity CRITICAL \
--quiet --json
# Add to cron for daily execution:
# 0 2 * * * /opt/asnspy/daily-scan.sh >> /var/log/asnspy.log 2>&1
Request early access to ASNSPY and start comprehensive network reconnaissance today.
Request Early Access