Inspiration: The biggest problem we are solving
Protecting critical hospitals from AI cyberattacks. Without stopping the attacks.
One of the most urgent challenges in healthcare is what happens after a cyberattack gets inside. Hospitals cannot afford to stop treating patients while an IT team investigates a stolen login or a compromised service. Yet traditional containment can require disconnecting systems, revoking access, or shutting down infrastructure. Attackers can exploit the same urgency by stealing records, threatening disclosure, and disrupting operations.
The 2024 Change Healthcare attack showed the reach of compromised credentials in an interconnected healthcare ecosystem. The 2024 Synnovis ransomware incident showed how the loss of one shared pathology provider can disrupt multiple hospitals. These cases inspired our threat model, not a claim that our prototype would have prevented either incident.
We asked: What if an intruder could continue attacking what looked like the hospital, while the actual hospital never served them its protected records?
That is MayaJaal. "Maya" means illusion and "Jaal" means network. We create two realities: the legitimate hospital, operating behind independent access controls, and a convincing synthetic hospital that suspicious sessions can explore without exposing genuine clinical data.
The point is not another dashboard that says "attack blocked." The point is a working mechanism that can recognize suspicious access, change what an unauthorized session experiences, collect defensible forensic evidence, and preserve the real system's security boundaries.
What it does
MayaJaal is a research-backed cyber-deception prototype for healthcare, built around a FHIR-style hospital API and IT portal. Its protections are enforced by deterministic policy. AI reasoning supports intent estimation and investigation but never grants access to real patient records.
- First Sight detects suspicious access early. It combines weaker signals, such as unexpected client software, device status, a new source address, failed logins, and abnormal access patterns. In our recorded scripted attack, it flagged a stolen nurse login at the login itself.
- The gateway separates legitimate care from attacker-facing requests. Clinical reads are authorized, challenged, or denied. They are never silently replaced with fake diagnoses or lab results. Suspicious non-clinical operations, including administrative pages, IT documents, backups, and bulk exports, can be diverted.
- The Shadow Hospital is a coherent synthetic environment. Patient records, linked documents, departments, backup archives, service accounts, and other resources look consistent across repeated requests. Every suspicious session gets a different world. The real and shadow tiers are separate services.
- MIRAGE models intent and adapts the bait. It estimates whether a session is performing reconnaissance, exfiltration, tampering, or disruption. Its MIRAGE-S planner selects believable lures without making the decoy unnecessarily obvious.
- Trackers identify what was accessed. Session-specific honeytokens in fake records, documents, credentials, and URLs create evidence when an attacker opens or reuses an item. We record observed client and network information, not an invented claim about the human's true identity or the exact underlying frontier model.
- Vault and Scatter protect recovery data. Sensitive fields are encrypted at rest. An encrypted database snapshot can be partitioned and reconstructed through threshold key custody across six simulated hospital nodes.
- An AI investigator reconstructs the incident. Claude-generated forensic briefs are grounded in deterministic event evidence. A separate LangChain Deep Agents workflow plans investigations, delegates specialist tasks, searches related sessions, and produces a case file.
- The War Room lets anyone inspect the outcome. Recorded runs, routing decisions, intent updates, decoy interactions, and comparison results can be replayed. MayaJaal Arena provides a foundation for a future public red-team benchmark.
Live website | Guided demonstration | War Room | Research paper | Source code
Technical depth: First Sight, MIRAGE and adaptive deception
Our core mechanism is not an LLM prompt. It combines sequential detection, a Bayesian belief filter, a constrained authorization gateway, suspicion-aware planning, deterministic synthetic data generation, and cryptographic custody.
1. First Sight: Detect a stolen account before the first suspicious export
The first challenge is that an attacker may already have a valid hospital username and password. A single request may look normal, but several weak signals together can reveal an unusual session.
We adapted the cumulative sum (CUSUM) quickest-detection idea:
CUSUM detector: S₀ = 0; Sₜ = max(0, Sₜ₋₁ + xₜ). Trigger an alert when Sₜ ≥ H.
Here, x_t is the combined weight of observed indicators. The implemented threshold is H = 2.0; requests without a suspicious signal reduce the score with a 0.3 drift. The signal weights were chosen manually, not learned from real hospital traffic.
First Sight can move the session into a stricter policy lane. It cannot override an authorization denial. Suspicious clinical reads trigger additional authentication or denial, never a fake medical result.
2. MIRAGE: Infer the objective, not just the existence of an attack
MIRAGE's hidden state combines five possible goals with four progression stages:
Possible goals: G = {benign, reconnaissance, exfiltration, tampering, disruption}.
Stages: S = {recon, access, collect, act}.
Belief state: bₜ(g,s) = P(goal = g, stage = s ∣ observations through t).
Each HTTP request is categorized. For example, a broad patient export, a backup download, and a laboratory-result write contribute different evidence about the attacker's likely objective.
The filter uses a Bayesian predict-and-update process. A simplified portion of the implemented update is:
Bayesian update: bₜ(g,s) ∝ b̄ₜ(g,s) × P(cₜ ∣ g,s)^(γ/√k), where cₜ is the request category.
Here gamma = 0.7 tempers evidence and k discounts repeated request categories. The complete implementation also accounts for denied requests and whether a planted lure was engaged or ignored.
The resulting posterior informs what bait the defender might show. It does not determine whether a person is allowed to view real patient data.
3. MIRAGE-S: Why the most informative lure can be the wrong lure
A standard information-gain planner selects a lure expected to maximally reduce uncertainty:
Expected information gain: IG(ℓ) = H(G) − ∑ₒ P(o ∣ ℓ) × H(G ∣ o,ℓ).
But overly convenient fake administrator passwords or surprise backups can expose the deception. If the attacker notices the honeypot and leaves, we lose the chance to learn anything else.
Our MIRAGE-S extension adds a model of suspicion. It tracks whether a lure appears after the attacker already viewed a page, whether too many lures were exposed, and whether they appeared too quickly. It then looks two choices ahead and weighs information against the possibility that a cautious attacker abandons the environment.
A readable version of the planner objective is:
MIRAGE-S planning score: Q(ℓ) = (1 − q)[IG(ℓ) + γ × E(future information)] − q[remaining uncertainty + β].
Here q models the probability that the attacker leaves, gamma = 0.9 discounts future value, and beta = 0.5 is the penalty term. The planner can decide to plant no lure.
This was inspired by published work on active cyber deception, interactive POMDPs, and reactive honeypots. We implemented a simplified Bayesian approach with our own suspicion-aware planner, not a full interactive POMDP solver.
4. Shadow Hospital: One convincing world per attacker
A believable decoy must remain coherent. If a patient record, lab observation, and backup archive refer to the same synthetic person, those relationships must agree across requests.
We use a keyed, session-specific deterministic seed:
Session seed: seed = HMAC-SHA256(K, session_id ∥ entity_id).
Synthetic resource: decoy_entity = Generate(seed, synthetic_templates).
The same session receives stable synthetic entities, while two different sessions receive different populations. This enables per-session tracking and means exposing one fake dataset does not automatically expose every subsequent decoy.
Crucially, the shadow is produced from synthetic templates, not a disguised transformation of actual confidential records.
5. Vault, Scatter and independent enforcement
Selected sensitive database fields are encrypted using AES-256-GCM with row, table, and column binding. The data-encryption key is wrapped by another key distributed using Shamir secret sharing over GF(256), with a 3-of-6 threshold.
When First Sight triggers, Scatter snapshots the database, encrypts it under a fresh key, divides the ciphertext into three pieces, places two copies of each across six simulated nodes, and verifies reconstruction and integrity.
The live database remains where authorized clinical software can use it. In our demo, the six node directories exist on one machine. This validates the code path but is not the same as six independent physical hospitals.
Security invariant: The AI intent model may make policy stricter, but it cannot grant access denied by the deterministic gateway. Clinical information is not secretly falsified. The decoy is isolated from protected record storage.
Real-world scenarios and the hospital-network model
MayaJaal simulates an interconnected regional hospital environment with clinical accounts, services, record APIs, administrative surfaces, and recoverable data. It acts as a controlled, synthetic hospital-network digital twin for cybersecurity experiments, not a spatially accurate replica of a real hospital or a live physical building twin.
| Real-world threat | Simulated scenario | MayaJaal response |
|---|---|---|
| Stolen healthcare credentials, as illustrated by Change Healthcare | Synthetic nurse account from suspicious client and device context | First Sight, independent authorization, silent decoy diversion |
| Ransomware pressure and database exfiltration | Attacker explores fake backups and bulk exports | Coherent synthetic export, honeytokens, protected records, encrypted recovery copies |
| Cross-hospital reconnaissance | Account probes beyond normal scope | Policy enforcement, inferred objective, session-specific fake resources |
| Record tampering attempts | Unauthorized attempt to modify clinical information | Strict write authorization, traceable decisions, no fake results given to clinicians |
| Shared healthcare infrastructure compromise, as illustrated by Synnovis | Regional service modeled as interdependent hospital resource | Isolation and recovery design; physical deployment remains future work |
These cases are research motivations and modeled threat scenarios. We have not tested MayaJaal against a real hospital or established that it would have stopped either historical incident.
What the experiments showed
We deliberately distinguish recorded scripted requests against the running system from in-model simulated attackers and actual LLM-based forensic investigation.
Recorded end-to-end comparison
We ran the same fixed scripted attack against three gateway configurations.
| Metric | No deception | Static honeypot | MayaJaal |
|---|---|---|---|
| Real-tier synthetic patient rows shown | 1,202 | 20 | 0 |
| Real-tier records bulk-exported | 1,199 | 0 | 0 |
| Detection/diversion point | No decoy | Request 3 | Detected at login |
| Decoy population overlap across two sessions | N/A | 100% | 0% |
| Canary secrets leaked | 0 | 0 | 0 |
| Script reported success | Yes | Yes | Yes |
The surprising result: The script reported success in every configuration. Yet the baseline served 1,199 real-tier synthetic records in the bulk export, while MayaJaal served none in that same attack sequence.
Zero leaked canaries did not prove all three systems secure. The script did not retrieve the canary-bearing fields. We report that limitation rather than use a flattering but incomplete metric.
MIRAGE-S research simulation
We compared alternative lure-planning algorithms with 2,000 seeds per experimental cell, four attack goals, and a limit of 30 requests. The engagement and attacker-suspicion probabilities were manually specified. These are not results from independent human attackers.
| Cautious simulated attacker | Information-gain planner | MIRAGE-S |
|---|---|---|
| Sessions abandoned | 68.9% | 8.6% |
| True objective identified | 45.5% | 64.9% |
| Average requests to identification/censoring | 20.89 | 18.86 |
A less aggressive lure strategy kept more modeled cautious attackers engaged and improved identification. Against a bold simulated attacker who never abandons the session, MIRAGE-S was about 0.84 requests slower. Misspecified suspicion models also weakened some gains.
This is a conditional research result, not a universal claim about real attackers.
First Sight sensitivity experiment
We evaluated 4,000 modeled benign clinical sessions with hand-set activity profiles. 4.0% triggered an extra authentication challenge. Simulated attacks using outside devices were caught early, but an intruder already using a legitimate nurse workstation was not detected at login.
That is why First Sight supplements access controls rather than replacing them.
Cryptography and reconstruction
The approximately 2 MB encrypted demo database passed a raw-byte check showing zero plaintext appearances of the 12 seeded canaries or SSN-shaped strings in the scan. Scatter reconstructed and verified a split encrypted snapshot across six simulated node directories in approximately 0.02 seconds.
This demonstrates tested encryption and recovery behavior under the demo assumptions, not a guarantee against compromise of the running gateway.
AI-powered forensics with LangChain Deep Agents
We built an evidence-first incident pipeline for the Arlequin AI-driven forensics and LangChain Deep Agents challenges.
A deterministic event layer records policy decisions, request origins as seen by the gateway, MITRE ATT&CK-related techniques, intent history, and decoy tracker interactions. Claude produces schema-validated incident briefs and response recommendations using those facts.
The MayaJaal Investigator uses real LangChain Deep Agents functionality. In a recorded run it:
- Wrote an investigation plan.
- Delegated to a timeline analyst, an indicator hunter, and a response planner.
- Used read-only tools to inspect events and search related sessions.
- Produced specialist findings and a complete forensic case file.
The recorded lead agent made 11 tool calls. Its tools do not permit shell execution or modification of the live hospital gateway. Attacker-supplied strings are explicitly treated as untrusted evidence.
View the working Deep Agents investigation
How we built it
I built MayaJaal solo during HackPrinceton Fall 2026 using a multi-agent development workflow.
Cursor was my primary AI coding environment. I used Cursor's Projects workflow to coordinate more than 15 development agents across implementation, testing, interfaces, cryptography, simulation, and research tasks. I also used Claude directly earlier in the build and shifted much of the iteration into Cursor to manage cost and keep development moving.
Grok Bot acted as my research and coordination assistant. It helped gather publicly documented healthcare cyber incidents, research papers, relevant device and behavioral detection signals, and competing algorithmic approaches. I used it to compare research ideas against the Change Healthcare and Synnovis scenarios, organize technical design questions, and coordinate parts of the build workflow. It also assisted with HackPrinceton travel and event logistics. Those activities describe development support, not a claim that Grok Bot controls MayaJaal's runtime defense.
Claude powers the actual AI investigation layer. The prototype includes Anthropic-based structured forensic reports and a LangChain Deep Agents investigation with specialist delegation.
| System | Implementation |
|---|---|
| Security gateway | Python 3.12, FastAPI, FHIR-style API, deterministic authorization |
| Early detection | First Sight CUSUM and device/client signals |
| Adaptive deception | Bayesian MIRAGE and MIRAGE-S suspicion-aware planning |
| Synthetic environment | Session-seeded HMAC hospital graph, portal and API surfaces |
| Data protection | SQLite, AES-256-GCM, Shamir 3-of-6 custody, Scatter |
| Forensic intelligence | Structured event logs, honeytokens, Claude reports |
| Autonomous investigation | LangChain Deep Agents, three read-only specialist agents |
| Frontend | Next.js 16, React 19, TypeScript, Tailwind CSS, Vercel |
The repository documents 270 automated Python tests, recorded event traces, benchmark data, and a LaTeX research paper.
Challenges we ran into
Detecting attackers without interrupting clinicians. A false alarm cannot justify giving a doctor fake patient data. We designed the gateway so that clinical requests receive real authorized data, step-up authentication, or denial, while suspicious IT activity can enter the shadow.
Mathematical information gain versus believable deception. Our earlier planner showed that an extremely informative fake resource could make a cautious attacker suspicious. That led to MIRAGE-S, which considers the cost of losing the session.
Separating evidence from interpretation. The forensic model can infer what probably happened, but it cannot invent authoritative facts or determine the exact person or AI model behind an IP address. We preserve gateway observations and treat conclusions as uncertain.
Measuring the right security outcome. Zero leaked canary secrets was true even when the undefended gateway served more than a thousand synthetic patient rows. That forced us to measure protected-tier exposure separately from planted-secret leakage.
Keeping distributed claims honest. Cryptographic sharing and reconstruction run in the prototype, while the six hospital nodes are simulated within one machine.
Accomplishments we're proud of
- A working hospital security gateway with early behavioral detection, strict access controls, and an isolated per-session shadow hospital.
- 0 protected-tier synthetic patient rows shown in the recorded MayaJaal attack, versus 1,202 under the undefended configuration.
- A mathematically specified and evaluated MIRAGE-S deception planner with both positive findings and documented limitations.
- Deterministic synthetic resources, session-specific trackers, and an auditable replay of attacker requests and defensive decisions.
- AES-256-GCM encryption, 3-of-6 threshold custody, and verified encrypted-snapshot reconstruction.
- A real LangChain Deep Agents investigation, with three specialist agents, 11 lead-agent tool calls, and a reproducible case file.
- A solo project built with an orchestrated workflow of more than 15 development agents, accompanied by code, tests, datasets, and an original research paper.
What we learned
The objective is not merely to block an attack. It is to protect real information while keeping legitimate hospital workflows usable.
More deception is not automatically better. Our simulation suggests that an adaptive planner must consider how suspicious its own actions appear.
AI is valuable for investigation and planning, but a probabilistic model cannot be the sole security boundary. Authorization and clinical-data integrity require independently enforced rules.
Finally, reproducibility matters more than a dramatic success message. We document which results came from scripts, which came from our own simulated attacker model, and which came from an actual LLM investigation.
Sponsor-track relevance
Amazon, Best Practical AI Innovation: The system observes requests, updates a Bayesian belief, plans a lure, changes the shadow environment, and adapts to further evidence. It addresses healthcare security with working code rather than an isolated chatbot.
Arlequin AI, AI-Driven Forensics: We collect session evidence, classify likely intent, track decoy artifacts, reconstruct incident timelines, and produce investigation briefs and case files.
LangChain, Best Use of deepagents: Our implemented Deep Agents investigator plans work, delegates to three specialized sub-agents, searches cross-session evidence, and generates a structured report. A real run and its outputs are included.
Peri, Forward Deployed Engineer: MayaJaal is structured as a gateway that could be adapted to an existing healthcare API and IT portal. The prototype includes executable local services, a live dashboard, technical documentation, tests, and recorded incident evidence. Integration into a real hospital remains future work.
SpaceXSI, Cursor and Grok Bot: Cursor was the primary coding environment and coordinated a multi-agent project workflow. Grok Bot supported research gathering, technical design comparisons, and workflow coordination. These development tools were used in different complementary roles.
What's next
We want to open MayaJaal Arena to independent human and AI-agent testing inside a controlled synthetic environment, strengthen the statistical evaluation with real red-team traces, and move the six cryptographic storage nodes to genuinely independent infrastructure.
A longer-term direction is a richer hospital-network digital twin with real interoperability and operational data, alongside stricter identity integration, realistic failure testing, and safer calibration of false positives.
MayaJaal is a HackPrinceton Fall 2026 solo research prototype, not a production hospital security product. Its patients and institutions are synthetic. The recorded attack comparison uses a fixed script, and the MIRAGE-S results come from a modeled attacker population.
Research
Active Deception Using Factored Interactive POMDPs to Recognize Cyber Attacker's Intent
Cyber Deception Reactive: TCP Stealth Redirection to On-Demand Honeypots
NHS England, Synnovis cyber incident
Built with
Python, FastAPI, Pydantic, SQLite, Cryptography, AES-256-GCM, Shamir Secret Sharing, HMAC-SHA256, CUSUM, Bayesian inference, Anthropic Claude, LangChain, Deep Agents, LangGraph, Next.js, React, TypeScript, Tailwind CSS, WebSockets, FHIR-style APIs, Vercel, LaTeX, Cursor, Grok Bot.
Built With
- aes-256-gcm
- anthropic-claude
- bayesian-inference
- cryptography
- cusum
- deep-agents
- fastapi
- fhir
- hmac-sha256
- langchain
- langgraph
- latex
- next.js
- pydantic
- python
- react
- shamir-secret-sharing
- sqlite
- tailwind-css
- typescript
- vercel
- websockets
