HunterX v7 Technology Fingerprinting & Stack Intelligence — Architecture & Reference

Status: Ratified (Sprint 011) Version: 1.0.0 Owner: HunterX Architecture Council


1. Purpose / Scope

The Technology Fingerprinting & Stack Intelligence Capability turns raw HTTP/HTTPS metadata, TLS certificates, service banners and existing TIDB intelligence into validated, correlated, historical technology intelligence. HunterX determines — for every authorized asset — the operating systems, web servers, application servers, frameworks, languages, CMS platforms, CDN/WAF infrastructure, reverse proxies, load balancers, hosting providers, cloud indicators, security products and product versions it exposes.

It has two mandates:

  1. Collect. FingerprintService (the application use-case) validates scope, builds a TechStrategy, selects the registered fingerprinting tools, runs each through the guarded SDK lifecycle, folds in existing intelligence (live service fingerprints, TLS metadata, previously persisted observations) and collects canonical TechnologyObservation records — regardless of whether the tool is an external binary (httpx, whatweb) or an in-process detector (signature).
  2. Turn observations into intelligence. Observations are normalized, resolved onto a canonical taxonomy, validated, correlated across tools with a defensible confidence score, checked for version conflicts, diffed against historical state, persisted into the TIDB technology entity set, projected into the existing attack-surface topology and reported through the technology.* event stream.

Hard constraints (mirroring Sprint 007–010):

Scope: src/hunterx/domain/technology/, src/hunterx/tools/tech/, src/hunterx/application/technology.py, the technology.* event catalog, the TIDB technology entity set (domain/entities/tidb/technology.py + tidb_models/technology_models.py + Alembic migration 7ab1a304e8bb), the topology integration in domain/topology/{enums,models,deriver}.py and the platform wiring in platform/assembler.py.

Out of scope: vulnerability scanning, CMS exploitation, web crawling, JavaScript crawling, credential attacks and any destructive testing. The TIP knowledge plane is described in docs/v7-tool-intelligence-platform.md.


2. Design Goals


3. Architecture

flowchart LR
    MP[Mission Planning] --> FS[FingerprintService]
    FS -->|strategy + contexts| EE[ExecutionEngine]
    EE --> PL[Lifecycle Pipeline]
    PL --> HX[HttpxAdapter]
    HX --> BR[BinaryRunner]
    PL --> WW[WhatWebAdapter]
    WW --> BR
    PL --> SG[SignatureAdapter]
    SG --> FF[FetchFn seam]
    SG --> DET[SignatureDetector]
    PL -->|observations JSON| FS
    FS -->|normalize + resolve| NR[TechnologyNormalizer / Resolver]
    NR -->|validate| VA[TechnologyValidator]
    VA -->|correlate| CO[TechnologyCorrelator]
    CO -->|conflicts| CR[TechnologyConflictResolver]
    CO -->|scope filter| SE[TechnologyScopeEnforcer]
    SE -->|history diff| HI[TechnologyHistory]
    SE -->|persist| TI[TIDB technology stores]
    TI -->|topology edges| TP[TIDB topology stores]
    FS -->|technology.* events| EB[Event Bus]

Data flow for one run:

  1. FingerprintService.run(mission_id, target, mode, tools, ...) validates the target against the scope policy, builds a TechStrategy and selects the registered fingerprinting tools (ExecutionEngine.adapter_for).
  2. A shared correlation id is generated; per tool an ExecutionContext is built with mission, target, technology profile, ("network",) permissions and the merged parameters.
  3. ExecutionEngine.execute runs the guarded lifecycle; on success the adapter’s JSON payload (technologies) is rebuilt into typed TechnologyObservation records via observations_from_payload.
  4. Existing intelligence is folded in: live service fingerprints (product / version), TLS certificate hosting hints and previously persisted TIDB observations.
  5. Observations are normalized (TechnologyNormalizer), resolved onto the taxonomy (TechnologyResolver), validated (TechnologyValidator), then correlated across tools by TechnologyCorrelator and filtered through TechnologyScopeEnforcer.
  6. When enabled, TechnologyHistory diffs current observations against historical; version conflicts and changes are surfaced on the batch and as events.
  7. When a TidbRepositoryFactory is injected, observations, versions, evidence, conflicts, changes and a run record are persisted into the TIDB technology entity set, and asset-to-technology edges are persisted into the TIDB topology relationships (the existing topology, not a second graph).
  8. The technology.* event stream is published at every stage.

4. Domain Models

src/hunterx/domain/technology/models.py

Model Purpose
TechnologyCategory Canonical taxonomy categories (web-server, cms, framework, cdn, waf, proxy, cloud, hosting, …).
TechnologyFamily Canonical families (web-server, frontend-framework, reverse-proxy, …).
VersionConfidence confirmed / probable / range / unknown.
EvidenceStrength / EvidenceType Strong/moderate/weak indicators and their sources (header, cookie, html, meta, TLS, banner, …).
VersionSpec A version value with its evidence-backed confidence state, lower/upper bounds and evidence.
TechnologyEvidence One detection evidence fragment.
TechnologyObservation One canonical technology detection on one asset: raw/canonical name, vendor, product, version, category, family, confidence, evidence, source, tool, timestamps, ids. Immutable.
TechConflict A disagreement (mostly conflicting versions) preserved with full provenance and a resolution reason.
TechChange A historical diff entry (added/removed/changed).
TechExecutionSummary Per-tool outcome (status, observation counts, duration, error).
TechStrategy The collection plan (tools, categories, min confidence, posture, concurrency).
TechnologyBatch The run result: raw + correlated technologies, evidence, conflicts, changes, execution summaries.
TechTarget A fingerprinting target (hostname, domain, IP or URL).

Helpers make_observation(...) and observations_from_payload(...) build observations from adapter payloads.


5. Technology Taxonomy

src/hunterx/domain/technology/taxonomy.py defines the curated canonical catalogue (TECHNOLOGY_CATALOG) of 69 technologies. Each TechDefinition carries a canonical name, category, family, aliases, vendor, product, description and a base detection confidence. The catalogue covers the golden set (Apache, Nginx, IIS, LiteSpeed, Caddy, Tomcat, WordPress, Drupal, Joomla, React, Vue.js, Angular, Next.js, Nuxt, jQuery, Bootstrap, Tailwind, Webpack, Vite, PHP, Node.js, Python, Java, Ruby, Go, ASP.NET, MySQL, PostgreSQL, MongoDB, Redis, Cloudflare, Cloudflare WAF, Amazon CloudFront/ELB/ALB, Fastly, Akamai, Varnish, HAProxy, Nginx reverse proxy, AWS WAF, ModSecurity, AWS/Azure/ GCP, Heroku, GitHub Pages, Netlify, Vercel, Linux/Ubuntu/Debian/Windows Server/CentOS, reCAPTCHA, Google Analytics, JWT, OAuth, Datadog, Docker, Kubernetes) and is extensible by appending entries.


6. Tool Matrix

All adapters live in src/hunterx/tools/tech/, declare a ToolDescriptor (pinned versions, network permission, capability IDs) and are registered by register_tech_adapters(engine) in registry.py.

Tool Version Mode Execution Emits observations
httpx 1.3.9 external binary BinaryRunner, JSONL via -json -tech-detect tech[], webserver, cdn_name (ProjectDiscovery)
whatweb 0.5.5 external binary BinaryRunner, JSON via --log-json=- plugin names with certainty + versions
signature 1.0.0 in-process SignatureAdapter over injectable FetchFn + SignatureDetector curated signature matches over HTTP evidence

Shared capabilities: technology-fingerprinting; httpx adds http-metadata. The adapters accept mode, asset_type, cdn, tls_grab, aggression, scheme, fallback, timeout and threads/rate_limit parameters; each maps them to its CLI contract. The SignatureAdapter performs in-process HTTP fetches (with an optional URL-scoped fetch cache) and signature matching, and is the binary-free fallback detector.

Tool selection rationale. httpx was selected as the primary machine-readable detector (active maintenance, JSON output, CDN/TLS metadata, version detection). WhatWeb was selected for its deep, broad plugin database with explicit version and certainty fields. Nmap -sV service fingerprints are consumed as existing intelligence (they are already produced by the Sprint 009 live host capability — not re-run). Nuclei, Webanalyze and Wappalyzer were evaluated and not integrated: nuclei is primarily a vulnerability scanner (out of scope for this sprint) and its tech-detection is a subset of httpx/WhatWeb; Webanalyze has minimal maintenance and overlapping coverage; the Wappalyzer dataset is GPL and its pattern set overlaps the curated signature database. BuiltWith is a proprietary API and is not integrated.

TIP registration (src/hunterx/tools/tech/tip.py, register_tech_tools) registers the same three tools with taxonomy capability IDs so the Planner and selection engines can recommend them, and versions stay in sync with the SDK adapters. signature declares an in-process python capability dependency.


7. Detection Sources

Evidence is collected from (and correlated across):

A single weak indicator is never trusted when stronger evidence is available: confidence is a function of the evidence actually matched.


8. Fingerprint Pipeline

The pipeline stages implemented by FingerprintService:

Existing Asset Intelligence → Scope Validation → Technology Strategy →
Target Selection → HTTP/HTTPS Collection → Service Metadata → TLS Intelligence
→ Technology Detection → Version Detection → Evidence Collection → Parsing →
Normalization → Technology Resolution → Correlation → Confidence Calculation →
TIDB Persistence → Historical Comparison → Topology Update → Events → Reporting

9. Normalization

TechnologyNormalizer lowercases, trims and collapses whitespace; assets are canonicalized (trailing dots stripped, URL hostnames extracted). TechnologyResolver resolves raw names and aliases onto the catalogue: apache, Apache, Apache httpd and Apache/2.4.57 all resolve to the Apache HTTP Server definition, while the raw observation is preserved on the record. Unknown names are preserved as title-cased canonical names.


10. Version Intelligence

VersionResolver separates confirmed from probable, range and unknown versions:

A weak fingerprint is never converted into a confirmed version; every version carries its evidence fragments (VersionSpec.evidence).


11. Confidence

TechnologyConfidenceEngine computes deterministic scores as a pure function of:

Scores are clamped to [0, 1] and explainable through the contributing factors.


12. False Positive Handling


13. Correlation, Conflicts & Scope

src/hunterx/domain/technology/{correlator,conflicts,scope}.py


14. WAF / CDN / Cloud / Hosting Detection

Where safely observable, the capability identifies CDN, WAF, reverse proxy, load balancer, edge provider, cloud and hosting technologies:

No WAF bypass is ever attempted.


15. CMS & JavaScript Intelligence


16. Historical Intelligence & Events

TechnologyHistory compares current state against historical observations and detects added, removed and changed technologies (version / category / family changes). Events emitted under the technology.* namespace:

technology.fingerprinting.started, technology.phase.started, technology.detected, technology.updated, technology.version.detected, technology.version.changed, technology.conflict, technology.removed, technology.fingerprinting.completed, technology.fingerprinting.failed.

Typed event classes live in src/hunterx/domain/events/types.py; the technology.# pattern matches the whole category.


17. TIDB Persistence

FingerprintService persists only when a TidbRepositoryFactory is injected. Records map to the TIDB technology entities (domain/entities/tidb/technology.py, tables tidb_technology_*):

Technology model Entity Rows
TechnologyObservation TechnologyObservation 1
VersionSpec TechnologyVersion 1 (when a version exists)
TechnologyEvidence TechnologyEvidence 1 per fragment
TechConflict TechnologyConflict 1
TechChange TechnologyChange 1
run record TechnologyRun 1

The schema is extended through the proper Alembic migration (7ab1a304e8bb_technology_intelligence_tables.py, revising 7f1c9a2b0e4d). No technology observation exists only in memory, logs, reports or temporary files.


18. Topology Integration

Technology intelligence updates the existing topology — there is no separate technology graph:


19. Scope Control & Security


20. Observability & Caching


21. Reporting

TechnologyQueryService answers the reporting queries from persisted TIDB records: inventory, stack(asset), by_category, versions, cms, frameworks, servers, cdn_waf, cloud_hosting, conflicts and changes.


22. Testing Strategy

All run under the default pytest gate (-m 'not tools'); tests that would invoke real external binaries require the tools marker.


23. Performance


24. Extending the Capability

To add a new fingerprinting tool:

  1. Add src/hunterx/tools/tech/<tool>.py with an adapter subclassing TechToolAdapter (declare descriptor, implement build_argv and parse_output — or, for in-process tools, a run path over the injectable FetchFn seam).
  2. Register it in registry.py (TECH_TOOL_IDS, TechAdapterFactory).
  3. Add a goldens file under tests/golden/tech/ and an adapter test.
  4. Add a base-reliability entry in confidence.py and, if it exercises new taxonomy capabilities, an entry in tip.py.
  5. Run pytest, python -m ruff check src tests, python -m mypy src.

To extend the taxonomy: append a TechDefinition to TECHNOLOGY_CATALOG and add signatures to SIGNATURES in signatures.py.