-
-
Haven: a sealed war room for the first hours of a ransomware attack
-
Four roles, and each one sees only the channels it should
-
Overview of incidents
-
Timeline logs for acitivies
-
Affected System interactive map
-
Secure Channels with different access levels
-
Status Board
-
People & Access + invitation links
-
Full report page
-
Live chat while you can have other tabs open
Inspiration
Winstead gave us a nightmare: the attacker can read normal company communications, ransomware has locked much of the data, company phones are down, and email is sporadic. In that moment, communication is the first thing to fail. Email, Slack, and SSO may belong to the attacker, so responders fall back to personal phones and group texts. Meanwhile, legal clocks start running (for example, Texas gives you 60 days to tell residents and 30 days to tell the attorney general once 250 or more Texans are affected) and the record of who knew what, and when, becomes evidence.
We wanted to build the room responders walk into at hour zero, and the way to get them there. Our rule from the first hour was Winstead's rule: assume the attacker has every internal system, and our own server and database too.
What it does
Haven is a sealed incident command center for the first 72 hours of a ransomware response. It shares nothing with the victim's systems. It is end-to-end encrypted, every entry is signed and hash-chained, and it rings responders on their personal phones when company phones are down.
Built to Winstead's brief: Haven covers all five required parts:
- Highly secure and isolated: no company login, SSO, email or phone system is in the path, and the database owner sees only ciphertext. The database address is one setting, so the same build can point to a self-hosted SpacetimeDB on an isolated network
- Access control with an admin who adds users: an org roster with safety codes and four enforced roles
- Standards-based documentation, live: NIST SP 800-61 phases and NIST CSF 2.0 tags, updated on every screen
- Scope definitions: every system's status, from suspected to restored, and the data types involved
- Real-time communications: encrypted channels, a side chat on every page, live cards and phone calls
Trusted Roster: Before any incident, an admin enrolls each responder with a one-time link, their name and personal phone number, compares a safety code with them, and signs a certificate over the enrollment. Every roster member locks their device keys with a passkey, and phone numbers are sealed in the browser so the database can't read them.
Safety-Code Admission: The commander adds responders from the roster, or by one-time link or QR code, as Commander, Counsel, Technical or Executive. Nobody gets in without a verified roster entry or a 12-digit safety code checked by voice or in person. Invite secrets never reach the server, and invites are single use and expire in 15 minutes by default.
Phone Paging: One tap rings personal phones through Twilio. The call carries no code, link or secret, so an eavesdropper learns nothing. Press 4 to acknowledge, and the commander's roster updates live (ringing, acknowledged, no answer) with Retry call.
Encrypted Channels: #command for everyone, #technical for forensics, #privileged for attorney-client talk, and #record for the signed incident record. Every message is encrypted and signed on the sender's device. Technical staff can't read privileged messages and executives can't read technical ones, even with full database access, because they never get those keys. No AI reads the room, on purpose: that would break encryption and privilege.
Live Blast Radius: Systems sit on rings by status, worst at the center, beside a 3D globe of the US shaded by exposed residents. Mark a system as contained, and it glides outward on every screen at once, with your own round trip through Spacetime measured on your device.
Legal Clock: Once counsel records when the breach was discovered, Haven shows the notification deadlines it tracks, each with its cited source, an owner, and a countdown. The nearest one stays in the header on every page.
Live Cards in Chat: Share the map, one system or one legal clock, into a channel. The message carries only a pointer, so every reader draws the card from their own verified record, and nobody can paste in a fake number.
Side Chat and Status Board: Chat on every incident page, plus a board of what we know, who owns what and open decisions, built only from signed entries. Only the commander's lines count as Decisions; everyone else's show as Proposed.
Safe Import: Drop a CSV, JSON or NDJSON export from Splunk, Microsoft Defender, Sentinel, CrowdStrike, Elastic, Wazuh, Datadog or AWS. It is checked and parsed only in the browser, its SHA-256 is recorded as evidence, and every row lands labeled "Imported, unverified", because the attacker may control the tool.
People and Access: Live presence, no look-alike names, revoke by typing a name (every channel that person could read gets a new key, and their old key can never come back), and Replace device for a lost laptop.
After-Action Report: A printable report with timeline, decisions and an integrity attestation for every channel. Privileged messages stay out unless counsel adds them, and then every page is watermarked.
Integrity Check: Every browser re-verifies every signature and the whole hash chain. Change one row behind the app's back and every screen turns red and points to the exact entry.
How we built it
We built Haven so the server never has to be trusted with content or history: SpacetimeDB holds every row, and only the browsers hold incident keys.
Backend: A SpacetimeDB TypeScript module on Maincloud with 17 private tables, 18 reducers that enforce every role check inside the transaction, and 16 per-user views acting as row-level security. The module verifies every ECDSA signature and computes the hash chain itself. Scheduled reducers expire invites and time out pages, and connect and disconnect hooks drive live presence. No other database, and apart from a three-route pager for phone calls, no other application server.
Pager: Three Vercel routes plus Twilio Voice. It can open phone numbers but never incident content, it dials only numbers in an admin-signed roster record for a page the commander signed, and it accepts no status update without Twilio's signature.
Frontend: Next.js 16, React 19, TypeScript and Tailwind 4, with three.js and react-three-fiber for the globe and Zod schemas on every decrypted payload. Our Content Security Policy bans unsafe-eval, lets the browser talk only to our site and our database, and blocks framing.
Cryptography: Web Crypto for non-extractable ECDSA and ECDH P-256 device keys and AES-256-GCM channel keys wrapped for each member, a passkey (WebAuthn PRF) lock on keys at rest, and one SHA-256 hash chain implementation (@noble/hashes) shared by the module and every browser.
Testing: 858 unit tests, 16 Playwright browser tests, live scripts against Maincloud, a render-safety test with hostile payloads, and CI on every push (lint, typecheck, tests, build, npm audit, gitleaks). Our 52-threat model (docs/THREAT_MODEL.md) names the test, script or check behind each of its 41 mitigations and states its 11 accepted limits openly. More than 20 pull requests got a written, adversarial security review.
Challenges we ran into
A Server We Can't Trust: A malicious server could slip in a fake member, swap a key or rewrite history. Admin-signed roster certificates and safety codes stop the first two. For history, every browser pins the last head it verified and the commander signs a checkpoint every 10 entries, so even a fully consistent rewrite is caught. Replays and ciphertext moved between channels are rejected too.
Phone Numbers the Database Can't Read: A swapped number could make the pager call a stranger or become a toll-fraud tool. Numbers are sealed in the browser to the pager's key and dialed only from an admin-signed roster record, for a page the commander signed.
A Call That Carries No Trust: Anyone can imitate a phone call, so ours carries nothing: no code, no link, no secret, and acknowledging never counts as joining.
Spacetime Under a Tight CSP: The SDK's codecs use Function(), which our no-eval policy blocks, so we run them without eval.
Hostile Import Files: Exports from tools the attacker may control can carry markup, formulas or fake facts, so files are parsed only in the browser, cleaned, capped and labeled unverified.
Accomplishments that we're proud of
Ciphertext-Only Database: Querying our own production database as its owner (SELECT * FROM event) returns nothing readable, only ciphertext.
Real Phone Calls: A page from the production app rings a real personal phone, and pressing 4 shows up live on the commander's roster.
Easy Under Stress: Winstead says ease of use is almost as important as security, so the cryptography stays invisible: nine plainly named sections, the nearest deadline always in the header, one tap per job, and honest labels like Proposed versus Decision. The human steps are few: compare a safety code, tap a passkey, type a name to revoke. It works on a phone, and every state on the globe can also be picked from a list.
Shipping Discipline: 59 merged pull requests in under 16 hours from two builders, with 858 unit tests and written security reviews along the way.
What we learned
Views Are Row-Level Security: Spacetime's views make row-level authorization feel natural.
Speed Changes Shared Screens: When a change reaches every screen at once, a map becomes a shared control surface.
Your Server Is a Mailbox: An end-to-end encrypted app has to treat its own server as an untrusted mailbox.
What's next for Haven
Text Paging: Built and tested; it reaches phones once our number completes US carrier (A2P 10DLC) registration.
Stronger Roots of Trust: Hardware-backed keys, a second commander, and a signed desktop build.
Wider Reach: More states in the legal clock, an offline evidence verifier, and a pilot with Winstead.
Built With
- d3.js
- github-actions
- gitleaks
- next.js
- noble-curves
- noble-hashes
- playwright
- react
- react-three-fiber
- spacetimedb
- tailwindcss
- three.js
- twilio
- typescript
- vercel
- vitest
- web-crypto-api
- webauthn
- zod