Skip to main content

Full web stack, infrastructure, DNS, port, subdomain and CVE analyzer.

Project description

stackscan

Full web stack, infrastructure, DNS, port, subdomain and CVE analyzer โ€” one command, one colorized report.

License Python Platform black ruff pyright Stars Last Commit


stackscan takes one or more targets, fetches them over HTTP(S), and prints a single colorized panel report covering the technology stack, the edge and network infrastructure, full DNS, IP ownership, open ports, subdomains, and known CVEs. A signature database and a compressed CVE database ship inside the package, so it works out of the box.

Every default pass only reads what a server voluntarily returns. The active passes โ€” --ports and --default-creds โ€” open connections the target did not solicit and are opt-in. Only scan systems you are authorized to test.


๐Ÿ“ฆ Installation

pip install "stackscan @ git+https://github.com/reekeer/stackscan.git"

# optional extra
pip install "stackscan[geo]"   # offline IP geolocation via geoip2 + a MaxMind .mmdb

nmap is used for port scans when present; without it a pure-Python scanner is used automatically.


โœจ Features

๐Ÿงฉ Stack & infrastructure

  • Technologies โ€” 7.5k-technology bundled sigdb, classified by category.
  • Edge โ€” CDN, WAF, reverse proxy and server software from response metadata.
  • TLS โ€” certificate issuer, SANs, validity window, protocol and cipher.

๐ŸŒ Network & DNS

  • Full DNS โ€” A/AAAA, reverse DNS, CNAME, MX, NS, TXT, SOA, CAA.
  • IP intelligence โ€” hosting org / ISP / ASN / location for non-CDN origins via ipwho.is.
  • Subdomains โ€” AXFR + the popularity-ranked SecLists DNS list over a fast async resolver pool, with wildcard filtering + TLS SANs.

๐Ÿ”Ž Ports & vulnerabilities

  • Ports โ€” nmap -sV via python-nmap, or a built-in async connect scan with banner/HTTP/RTSP fingerprinting.
  • CVEs โ€” offline NVD-sourced database with per-match confidence % and CVSS severity; --cve-online adds a live lookup.
  • Default creds / open devices โ€” a bounded, authorized-only check for cameras / routers / panels reachable without a password or with factory-default logins (SecLists default-credentials).

๐ŸŽ› Output

  • Colorized per-target panels, a --compact table, or --json.
  • Every run prints the banner and the total scan time.

๐Ÿš€ Usage

# Scan one or more targets
stackscan example.com https://another.example

# Everything at once: ports, subdomains, online CVEs, IP info, default-cred check
stackscan --full example.com

# Individual deep passes
stackscan --ports --subdomains example.com
stackscan --cve-online example.com

# Speed / coverage knobs
stackscan --full --workers 500 --subdomain-limit 10000 example.com
stackscan --full --site-limit 10 --workers 200 example.com

# JSON (full detail, includes timing) or a compact table
stackscan --json example.com
stackscan --compact a.example b.example

Bare hostnames are normalized to https://.

โšก Benchmark

Below are performance benchmarks conducted on two production targets using different scanning options (tested on Python 3.12 / macOS).

1. github.com Scan Performance

Scan Mode Command / Arguments Execution Time (s) Execution Time (ms) Speed vs. Default (Baseline)
Minimal Scan --no-dns --no-tls --no-geo --no-ip-info --no-cve --no-probe 0.69s 690 ms +86.09% faster (7.2x)
Default Scan None (baseline) 4.96s 4960 ms Baseline
Port Scan --ports 6.10s 6100 ms -22.98% slower
Full Active Scan --full 64.99s 64990 ms -1210.28% slower

2. kmtn.ru Deep Scan Performance

Scan Mode Command / Arguments Execution Time Findings
Full Active Scan --full --subdomain-limit 50 --site-limit 20 1m 8.4s (68s) 269 CVE(s), 64 critical, 29 port(s), 41 subdomain(s), 11 site(s)
Fast Full Scan --full --subdomain-limit 50 --workers 400 --site-limit 20 ~32s 247 CVE(s), 63 critical, 15 port(s), 41 subdomain(s), 9 site(s)

3. microsoft.com Scan Performance

Scan Mode Command / Arguments Execution Time (s) Execution Time (ms) Speed vs. Default (Baseline)
Minimal Scan --no-dns --no-tls --no-geo --no-ip-info --no-cve --no-probe 0.98s 980 ms +83.39% faster (6.0x)
Default Scan None (baseline) 5.90s 5900 ms Baseline
Port Scan --ports 6.95s 6950 ms -17.80% slower

[!NOTE]

  • Minimal Scan only fetches the HTTP response and runs the offline technology matcher.
  • Default Scan resolves DNS (including CNAME/MX/NS/SOA), performs TLS handshake analysis, resolves GeoIP info, and queries IPWHOIS.
  • Full Scan triggers active subdomain enumeration (AXFR + wordlist), parallel smart port scanning of all resolved endpoints, vulnerability matching, and default credential brute-forcing.

๐Ÿงญ Options

Option Default Description
--full off Enable ports, subdomains, online CVEs, IP info, default-cred check.
--ports / --no-nmap off Active port scan (nmap, else Python) / force the Python scanner.
--subdomains off Enumerate subdomains (AXFR + wordlist + TLS SANs).
--subdomain-limit 5000 Max ranked labels to resolve (0 = full list).
--site-limit 20 Max derived sites to analyze from discovered open ports (0 = unlimited).
--default-creds off Bounded default-credential / open-device check.
--cred-limit 50 Max default-credential pairs per device (0 = full SecLists list).
--cve-online off Also query NVD live for detected products.
--workers 350 Parallel workers for ports/subdomains/creds.
--concurrency 10 Concurrent targets.
--sigdb / --no-builtin / --no-sources โ€“ Signature database selection.
--geoip-db โ€“ MaxMind .mmdb for offline IP geolocation.
--no-dns / --no-tls / --no-geo / --no-probe / --no-cve / --no-ip-info off Skip a pass.
--json / --compact / --no-banner / --show-empty off Output control.
-f, --file / --timeout / --port-timeout / --version โ€“ Misc.

โš™๏ธ Configuration

  • Signature sources: stackscan sigdb add|list|update|remove โ€ฆ (recorded under $XDG_CONFIG_HOME/stackscan/).
  • Downloaded wordlists (SecLists DNS list, default-credential list): cached under ~/.local/stackscan/db/.
  • Refresh the CVE database: python scripts/build_cve_db.py.

๐Ÿš€ Smart Scan Pipeline

The Smart Scan engine performs multiple analysis stages to collect infrastructure, technology, and security information about the target before generating the final report.

flowchart TD

    A["๐ŸŽฏ Target<br/>Domain / URL"]

    subgraph S1["1. Target Resolution"]
        B["Normalize Target"]
        C["DNS Resolution"]
        C1["IPv4 / IPv6"]
        C2["DNS Records<br/>MX โ€ข NS โ€ข TXT โ€ข CNAME โ€ข SOA โ€ข CAA"]
        C3["Reverse PTR"]
        B --> C
        C --> C1
        C --> C2
        C --> C3
    end

    subgraph S2["2. HTTP Discovery"]
        D["HTTPS Request"]
        D1{"TLS Error?"}
        D2["HTTP Fallback"]
        D3["Headers โ€ข Body โ€ข Cookies"]
        D --> D1
        D1 -->|Yes| D2
        D1 -->|No| D3
        D2 --> D3
    end

    subgraph S3["3. Infrastructure Detection"]
        E["Header & Cookie Analysis"]
        F["IP Intelligence"]
        G{"CDN / WAF / Proxy"}
        E --> G
        F --> G
    end

    subgraph S4["4. Port Discovery"]
        H{"Smart Scan"}
        I["Target Scan"]
        J["Enumerate Subdomains<br/>Collect All IPs"]
        K["Nmap / Async Connect"]
        L["Banner & HTTP Fingerprinting"]
        H -->|Disabled| I
        H -->|Enabled| J
        I --> K
        J --> K
        K --> L
    end

    subgraph S5["5. Technology Detection"]
        M["Headers"]
        N["Cookies"]
        O["HTML & Meta"]
        P["JavaScript"]
        Q["URL Patterns"]
        R["SigDB (7500+ Signatures)"]
    end

    subgraph S6["6. Advanced Analysis"]
        S["Subdomain Enumeration"]
        T["CVE Matching"]
        U["Default Credentials"]
    end

    subgraph S7["7. Report"]
        V["Security Report"]
    end

    A --> B
    C --> D
    D3 --> E
    C1 --> F
    G --> H

    L --> M
    L --> N
    L --> O
    L --> P
    L --> Q
    L --> R

    M --> S
    N --> S
    O --> T
    P --> T
    Q --> U
    R --> U

    S --> V
    T --> V
    U --> V

    classDef start fill:#2563eb,color:#fff,stroke:#1d4ed8,stroke-width:2px;
    classDef phase fill:#7c3aed,color:#fff,stroke:#6d28d9,stroke-width:2px;
    classDef decision fill:#f59e0b,color:#fff,stroke:#b45309,stroke-width:2px;
    classDef finish fill:#16a34a,color:#fff,stroke:#166534,stroke-width:2px;

    class A start;
    class B,C,C1,C2,C3,D,D2,D3,E,F,I,J,K,L,M,N,O,P,Q,R,S,T,U phase;
    class D1,G,H decision;
    class V finish;

Pipeline Stages

Stage Description
1. Target Resolution Normalize the input target, resolve IPv4/IPv6 addresses, collect DNS records, and perform reverse PTR lookups.
2. HTTP Discovery Send an initial HTTPS request with automatic HTTP fallback and collect response headers, cookies, redirects, and HTML.
3. Infrastructure Detection Detect CDN, WAF, reverse proxies, and hosting providers using HTTP fingerprints and IP intelligence.
4. Port Discovery Scan services using Nmap or the built-in asynchronous scanner. Smart Scan expands the scan across all discovered IP addresses.
5. Technology Detection Fingerprint web technologies using headers, cookies, HTML, JavaScript, URL patterns, and the 7500+ signature database.
6. Advanced Analysis Enumerate subdomains, correlate detected software with CVEs, and test common default credentials.
7. Report Generation Merge all collected information into a comprehensive security report.

๐Ÿ—‚ Structure

stackscan/
โ”œโ”€โ”€ src/stackscan/
โ”‚   โ”œโ”€โ”€ analyzers/     โ† tech, infra, security, exposure, cve, creds
โ”‚   โ”œโ”€โ”€ net/           โ† dns, tls, geo, ipinfo, ports, fingerprint, subdomains
โ”‚   โ”œโ”€โ”€ config/        โ† bundled + sourced sigdb loading
โ”‚   โ”œโ”€โ”€ data/          โ† builtin.sigdb, cve.json.gz, subdomains.txt
โ”‚   โ”œโ”€โ”€ render.py      โ† the colorized panel report
โ”‚   โ”œโ”€โ”€ scan.py        โ† per-target orchestration
โ”‚   โ””โ”€โ”€ cli.py         โ† argument parsing and entry point
โ”œโ”€โ”€ scripts/           โ† build_cve_db.py (NVD โ†’ offline dataset)
โ””โ”€โ”€ tests/

๐Ÿ›  Development

ruff check . && black --check . && pyright && pytest

MIT ยฉ reekeer

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stackscan-2.2.0.tar.gz (1.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stackscan-2.2.0-py3-none-any.whl (1.3 MB view details)

Uploaded Python 3

File details

Details for the file stackscan-2.2.0.tar.gz.

File metadata

  • Download URL: stackscan-2.2.0.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for stackscan-2.2.0.tar.gz
Algorithm Hash digest
SHA256 1ffbcee3dedf5a19e021e8e0ecd7cb9167de8b4370fc7128e3c7bca7d89a2b5e
MD5 f8de07b006f6c37e2922cf518d4bcb9c
BLAKE2b-256 ddfd5d857f4d11e0f5d770fa1b0d7bab78305b8b0b1cc464d529b7d33ce6b6df

See more details on using hashes here.

File details

Details for the file stackscan-2.2.0-py3-none-any.whl.

File metadata

  • Download URL: stackscan-2.2.0-py3-none-any.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for stackscan-2.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9b77b130ecd29fc2371f5c0e6427809ed1e1f9f25344e3b4bd56ac9300c70e40
MD5 03f0b797540c9f2f6a2e14540cd3c210
BLAKE2b-256 ab82ed8d08167a13f3e1bf0120a921ab1a3c904afcad71b07387f3a23756f038

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page