Skip to main content

Logo

Technical summary: HACK THE MIRROR is a defensive, operator-controlled assessment platform for declarative digital-twin analysis and operator-supplied offline evidence. It provides bounded, read-only assessment workflows and explicitly authorized live reads; it does not exploit, write to, install on, or autonomously act on systems, and the LLM/MCP never grants authorization. Current implementation limits and supported platform scope are documented in SECURITY.md, with measured coverage in docs/coverage-matrix.md.

Product vision and target capabilities

HACK THE MIRROR is intended to become a technology-agnostic, defensive cyber-security assessment platform. Its central objective is to build and continuously enrich a broad understanding of technologies, identify vulnerabilities, weaknesses, exposure and anomalous conditions, and help operators assess their environments without exploiting systems or intentionally changing their state. The project is blue-team oriented: it is not an autonomous penetration-testing or exploitation framework.

This section describes the target product vision, not a claim that every capability is already implemented in the current Alpha release. Current implementation status and supported inputs are documented separately below and in the project coverage documentation.

Technology coverage and knowledge model

The long-term knowledge scope is cross-domain and includes, without being limited to:

  • Operating systems, endpoints, servers, workstations and endpoint software.
  • Network infrastructure, including routers, switches, firewalls, wireless networks, Wi-Fi, load balancers and network services.
  • Cloud platforms, virtualization, containers, orchestration platforms and hosted infrastructure.
  • Hardware, embedded systems, firmware, BIOS/UEFI, BMC, microcontrollers and storage systems.
  • IoT, industrial IoT, smart-home technologies, cameras and connected devices.
  • OT/ICS environments, including PLC, SCADA, DCS, HMI, RTU, industrial networks and their protocols.
  • Web applications, APIs, databases, middleware, enterprise platforms, software packages and their dependencies.
  • Telecommunications and other specialized technology domains, including automotive, aviation, medical and other safety- or mission-critical systems.

The objective is broad technological coverage, not a promise that every product, version or niche technology will always be known. Coverage must be measured, source-backed and explicit about gaps.

Online-first threat and technology intelligence

The knowledge architecture should be online-first, with a compact offline baseline. HACK THE MIRROR should not attempt to vendor, mirror or embed massive copies of public documentation and vulnerability datasets in the repository. Instead, it should expose maintained source catalogs and lightweight connectors to public information services, preferably free and openly accessible APIs and databases, and retrieve relevant material on demand through the MCP/LLM workflow.

Relevant source categories include:

  • Vulnerability and exposure intelligence, including CVE/NVD, CISA KEV, EPSS, CWE and CAPEC.
  • Vendor security advisories, product security incident response pages, firmware and software lifecycle notices, end-of-life announcements and supported-version matrices.
  • Official product documentation, configuration references, protocol specifications, standards and hardening guidance.
  • Software and dependency intelligence, package and component metadata, SBOM-related sources and public security advisories.
  • MITRE ATT&CK and other relevant defensive technique, detection and threat-knowledge references.
  • Reputable technical research, security publications and investigations that can add context beyond structured vulnerability feeds.

For each external source, the platform should retain its identity, purpose, access method, URL or API endpoint, applicable technology domains and any relevant usage constraints. Retrieved facts should retain source attribution, retrieval time, publication or update date when available, affected product/version scope and confidence. The system should compare sources, identify stale or conflicting information, and proactively consult alternative authoritative sources when context is incomplete or a reference is old.

External retrieval must be bounded and efficient: query only what is relevant to the assets and questions under assessment, respect API terms and rate limits, and use small, controlled caches where useful. The offline component should preserve essential schemas, matching logic, selected high-value knowledge and enough cached context to support limited assessments without connectivity; it is not intended to contain a copy of the entire internet.

Authorized asset and environment discovery

HACK THE MIRROR should be able to build an evidence-based picture of an environment instead of depending exclusively on manually supplied inventories. It should combine operator-provided information with authorized collection and discovery, as permitted by the selected assessment mode and scope.

Potential evidence sources include asset inventories and CMDB exports, configuration backups, software and hardware manifests, SBOMs, firmware metadata, logs, security events, flow records, packet captures, network-device telemetry, cloud and virtualization inventory APIs, and approved read-only interfaces. The platform should identify, where evidence permits, manufacturers, models, product families, versions, firmware, operating systems, services, protocols, dependencies, exposed interfaces, configurations and relationships between assets.

Collection must be explicit about what was directly observed, what was declared by an operator, what was matched from external knowledge, what was inferred by a documented rule and what remains unknown. Missing data must not be silently filled with guesses. The platform should identify blind spots and ask the operator for additional context or evidence when that could materially improve the assessment.

Assessment modes and non-destructive operating boundary

The target platform should support clearly separated assessment modes:

  1. Offline evidence analysis: assess files, inventories, configurations, logs, telemetry, SBOMs, firmware metadata and other operator-supplied evidence without contacting the assessed environment.
  2. Passive analysis: interpret available network traffic, event streams and telemetry without transmitting probes to the assets being assessed.
  3. Authorized read-only inspection: retrieve explicitly permitted information through read-only interfaces, APIs or protocols, without changing configuration or operational state.
  4. Controlled non-destructive active discovery and checks: perform bounded network discovery, service identification and safe protocol-specific checks where the operator has explicitly authorized the exact targets and methods.

The security boundary is assessment without exploitation or intentional state change. The platform must not attempt exploitation, deploy payloads, perform brute-force or password-spraying activity, conduct denial-of-service or stress testing, fuzz production services, alter configurations, write to controllers, upload firmware, create or modify accounts, restart services, reboot devices, or make other operational changes. MCP tools and LLM instructions must not be treated as authorization by themselves; authorization, target scope and permitted methods must be enforced by the assessment controls.

Active discovery is not the same as passive observation: even a non-destructive probe transmits traffic and can affect fragile or safety-critical equipment. Therefore active checks must be opt-in, scope-bound, rate- and concurrency-limited, timeout-bounded, auditable and cancellable, with conservative protocol-specific safety profiles. OT/ICS and other safety-critical environments should default to passive or offline assessment unless an operator explicitly approves a suitable active profile. The system must stop or decline a check when its safety cannot be established.

Defensive findings and conservative vulnerability assessment

The platform should assess more than CVE identifiers. Its target finding categories include known vulnerabilities and their applicability; unsupported or obsolete software and firmware; insecure or unnecessary exposed services; weak or unsafe protocols; insecure configuration and hardening gaps; vulnerable libraries and dependencies; authentication, authorization and access-control weaknesses; cryptographic weaknesses; suspicious or anomalous conditions; and risks arising from dependencies, trust relationships or combinations of otherwise separate weaknesses.

A product/version match must not automatically be reported as a confirmed vulnerability. Findings should be conservative and evidence-driven, with explicit states such as confirmed, potential, unverified or unknown where appropriate. Each finding should explain the evidence supporting it, the evidence still missing, the affected asset and version assumptions, source references, confidence, severity, potential impact and relevant limitations. Conflicting sources and incomplete visibility must remain visible. The platform should prefer asking for more context or performing an additional safe check over generating unsupported certainty or large volumes of false positives.

Environment relationships, analysis memory and correlation

HACK THE MIRROR should maintain an efficient, bounded representation of the environment under assessment. This model should relate assets to hardware and software components, services, interfaces, protocols, dependencies, communication paths, zones, trust relationships and business or operational functions where known.

Correlation should operate at both asset level and environment level. The platform should be able to identify potential attack paths or exposure chains, vulnerable dependencies, risky communication relationships, segmentation weaknesses and combinations of findings that increase overall risk. Relationships must retain their evidence basis and must distinguish observed communication from declared topology and inferred relationships. Unknown or unobserved links must not be represented as facts.

Assessment memory should preserve only useful, structured context: asset identities, source-backed facts, relationships, previous findings, unresolved questions and assessment provenance. It should be bounded, reusable and updateable, avoiding uncontrolled ingestion of raw datasets or unbounded growth of conversational memory.

MCP/LLM-assisted investigation and operator-led remediation

The MCP interface should expose narrowly scoped, auditable assessment and intelligence operations so a connected LLM can coordinate investigations, query relevant external sources, correlate returned evidence, identify missing context and ask the operator focused follow-up questions. The LLM should be proactive in pursuing safe avenues of verification, but tool-side authorization and safety controls must remain authoritative; an LLM must not be able to expand scope or bypass restrictions through natural-language instructions.

Reports should list findings across severity levels and provide traceable evidence, source links, confidence, affected assets, potential impact, uncertainty and recommended remediation or mitigation. When requested, the platform should retrieve additional technical references and provide a deeper explanation. It may guide an operator through remediation planning and subsequent read-only verification, but the operator retains the decision and responsibility for any change. The platform must not silently remediate or make production changes.

Core design principles

  • Defensive, blue-team purpose; no exploitation or destructive testing.
  • Technology-agnostic ambition with measurable, source-backed coverage.
  • Online-first intelligence retrieval with a deliberately small offline baseline.
  • Authorized, bounded collection with passive and read-only modes preferred.
  • Explicit separation of observed, declared, matched, inferred and unknown information.
  • Conservative findings, transparent uncertainty and low false-positive tolerance.
  • Evidence-backed asset relationships and resource-bounded assessment memory.
  • MCP/LLM assistance without delegating authorization or safety enforcement to the model.
  • Reproducible, auditable reports; operator-controlled remediation.

HACK THE MIRROR is an operator-controlled defensive assessment platform for authorized digital-twin analysis, operator-supplied offline evidence (inventories, flow exports, logs, database dumps and saved query exports), and narrowly bounded live reads or active discovery served over a local MCP. Active discovery is opt-in: the operator must install a local policy and explicitly approve the exact targets and ports in the call scope. The platform never exploits, writes to targets, injects code or malware, guesses credentials, fuzzes production services, or performs destructive testing.

CI MIT License Python 3.10–3.12

What it does

  • Validates and assesses declarative digital twins that explicitly set simulation: true.
  • Reviews supported, operator-authorized offline files: inventories and flow exports (Suricata EVE, Zeek JSONL), syslog text, operator-converted Windows EVTX JSON, SQL schema/grant dumps, and saved read-only SELECT exports (CSV/JSON).
  • Matches evidence against curated, source-attributed product, protocol, and vulnerability knowledge while keeping unknowns explicit.
  • Produces reproducible CLI/MCP reports; optional MCP tools use local stdio.
  • Exposes scope-declared read-only operator tools (read_only_query, inspect_file, audit_tail, credentials_list) with typed errors, secret redaction on every returned string, and a local append-only JSONL audit log under var/audit/. The operator's client supplies a structured scope object per call; the server validates its structure and enforces it (the server cannot verify scope provenance, which stays the client's responsibility).
  • Provides inspect_connector_export for bounded, operator-supplied JSON exports from Android, iOS, Wi-Fi/LAN, SCADA/ICS, drones and endpoints. Android additionally has one reviewed ADB read-only adapter with exactly device-identity, app-manifest, security-settings and diagnostic-logs; it requires an already paired/authorized device, fixed bounded arguments, local policy/scope and an external signed approval. It never accepts shell, scripts or arbitrary commands and never writes, installs, unlocks or extracts backups.
  • Includes a local signed-authorization foundation for future high-risk adapters. hack-the-mirror-authorize creates short-lived, single-use approvals outside the MCP conversation; it proves integrity and possession of the local authorization key, not legal identity or ownership. No write-capable remediation operation is enabled by this feature.

Coverage snapshot

Inventory Current coverage
Techniques 49 declarative technique records
Protocols 29 source-attributed protocol entries; 35 dedicated protocol YAML profiles
Product knowledge 69 curated product-family records across 44 known vendors/platform publishers
Digital-twin examples 9 simulation manifests
Detection benchmark 12 deterministic synthetic cases
Host / engineering platform intelligence 64 bounded host/embedded-OS lifecycle records across 12 product families (Windows IoT/Server/Desktop, Ubuntu, Debian, macOS, iOS, Android, QNX, FreeRTOS, VxWorks, Zephyr)
Offline evidence formats 7 implemented: asset-inventory JSON (v1/v2), Suricata EVE, Zeek JSONL, syslog text, operator-converted Windows EVTX JSON, SQL schema/grant dumps, saved SELECT exports (CSV/JSON). PCAP/PCAPNG remains not connected (offline adapter design only)

Counts are checked against repository contents. See the quality gates and local validation policy for the complete verification contract.

Live reads exist, but only inside the operator's local policy: read_only_query and inspect_file network operations fail closed unless the operator has written var/policy/operator-scope.json through its CLI; when a policy is installed, every call is narrowed to it (no target, port or path outside it), and without one, network reads fail closed and extra filesystem roots are refused. The tools perform no scanning, no credential guessing or brute-force authentication attempts (reads authenticate only with credentials the operator stored locally), no exploitation, no writes to controllers or targets, and no autonomous actions against any environment. An MCP or LLM connection does not add authority or capabilities. The project does not ship exploit payloads or malware samples. PCAP/PCAPNG ingestion remains not connected (offline adapter design only). Read SECURITY.md before use; process-level network guards are not a substitute for OS, container, VM, and network isolation.

For proactive investigations, the MCP also exposes an interactive operator workflow: plan_operator_workflow creates per-target/per-port questions without connecting, decide_operator_workflow records an explicit approval or rejection for one exact candidate, and execute_approved_operator_workflow requires a matching short-lived signed authorization and consumes both approvals once. Scope changes, missing decisions, rejected objectives, missing authorization and repeated execution fail closed. The current executable workflow action is limited to bounded TCP connect discovery. Android ADB uses the same policy/scope/authorization boundary through prepare_android_operation and execute_android_operation; preparation does not contact the device.

list_connector_capabilities publishes the current connector maturity for Android/iOS, Wi-Fi/LAN, SCADA/ICS, drones and computer/server endpoints. It is descriptive only: offline exports and simulation twins can be analyzed where listed, and Android's reviewed live surface is limited to the four fixed ADB read-only operations above. Physical router, industrial, autopilot and endpoint adapters remain planned until a reviewed read-only implementation exists. Planned adapters must ask per target and per operation before connecting; prohibited actions such as writes, firmware upload, control commands, deauthentication and unlock bypass are never part of the contract.

Quick start

Python 3.10 or newer is required.

git clone https://github.com/frangelbarrera/HACK-THE-MIRROR
cd HACK-THE-MIRROR
python -m venv .venv
source .venv/bin/activate
python -m pip install -e ".[dev]"

hack-the-mirror safety-check
hack-the-mirror assess twin/labs/water_treatment_lab.yaml --report-dir out/water

For local validation, run pytest -q and ruff check .. See the installation and first-assessment guide for Windows, macOS, and additional workflows.

MCP and CVE intelligence

The full workspace MCP server is available over local stdio after installing the optional MCP extra:

python -m pip install -e ".[mcp]"
hack-the-mirror-ot-mcp --workspace .

Both hack-the-mirror-ot-mcp and hack-the-mirror-mcp start the full read-only workspace server, which registers the simulation-twin, knowledge, offline-evidence and scope-declared operator tools together with the CVE metadata tools. The CVE-metadata-only server remains separately available as python -m intel.nvd_index.mcp. Use this local configuration (no hosted MCP URL is provided):

{
  "mcpServers": {
    "hack-the-mirror": {
      "command": "hack-the-mirror-mcp"
    }
  }
}

CVE lookups use remote mode by default: query NVD, CISA KEV, and EPSS without downloading the NVD corpus; small KEV/EPSS metadata caches live under var/intel/cache/ for 24 hours. Local mode is optional and requires an explicit python -m intel.nvd_index.sync to download public feeds and build the SQLite index. Selecting local mode does not start a sync. The npm wrapper is experimental and is not published yet; npx @hack-the-mirror/mcp is not currently a supported clean-machine installation path. Operator tools are scope-declared: the operator's client supplies a structured scope object per call, and the server — not the model — validates and enforces it. The server cannot verify who produced the scope; provenance is the client's responsibility.

Documentation

Status: Alpha. License: MIT.

Metadata

Release files for hack-the-mirror 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hack-the-mirror 0.3.0
File Size Uploaded Provenance Actions
hack_the_mirror-0.3.0.tar.gz 1.6 MB Without provenance Details for hack_the_mirror-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hack-the-mirror 0.3.0
File Interpreter ABI Platform Actions
hack_the_mirror-0.3.0-py3-none-any.whl Python 3 none any Details for hack_the_mirror-0.3.0-py3-none-any.whl

Total release size: 3.0 MB

Release files / hack_the_mirror-0.3.0.tar.gz

Download URL hack_the_mirror-0.3.0.tar.gz
Size 1.6 MB
Tags Source
SHA-256 checksum
How to use checksums
0154777f388faf931742686d6966a6609c30fe19486c55603875ed18bdef3bc4
BLAKE2b-256 checksum
How to use checksums
57b64e57dd9f6dc039f02a3df0e020ed0a314da33df701d6bb7e180c5f81dd0e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.5

Release files / hack_the_mirror-0.3.0-py3-none-any.whl

Download URL hack_the_mirror-0.3.0-py3-none-any.whl
Size 1.4 MB
Tags Python 3
SHA-256 checksum
How to use checksums
4550a22b8e19e01a2964bb61adf7bcc434ec1b29beea9fab7f0df0b1d73d7e9a
BLAKE2b-256 checksum
How to use checksums
45329677b18b713582c5804f8c30581992dd7cb07c5fc6f24458d60ad82c9aea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.5

Security for hack-the-mirror 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page