QALS Wiki · the qalarc networkgenerated 2026-09-06 · qalcode autonomous research

How it gets hacked, and why it mostly can't · 03_qals_architecture/QALNET_SECURITY.md

Qalnet Security — Threat Model & Hardening Plan

Date: 2026-09-06 · Question: "How easy would it be for this network to be exploited and hacked — and ways around it?" Scope: qalnet-dev-1 as running today + the Phase 1-2 design. Honest, attacker-brained, with a live audit finding already fixed-by-design.


0. The honest one-paragraph answer

A private chain run by one company is smaller-surface but higher-concentration than a public chain: there's no anonymous attacker horde (RPC isn't public), but qalarc is the trust root — if our keys/machines fall, the chain falls. The design answers this in layers: Tailscale-only consensus, chain-enforced caps on every agent (the prompt-injection-drains-the-wallet class of attack dies at the Move VM), full-reserve money that can't be printed by anyone (B-QALS mint only against confirmed AUD), and anchoring to public IOTA so our private history is publicly tamper-evident. Biggest real-world risks today are operational (keys on home machines, exposed devnet ports, fork supply-chain), not cryptographic.

1. Live findings (audit of the running devnet, 2026-09-06)

# Finding Severity Status/mitigation
F1 RPC (:9000) and faucet (:9123) bind 0.0.0.0 — reachable from LAN Med (devnet, no real value) Devnet only; production binds RPC to localhost/Tailscale IP, public access via an authenticated gateway. Validator gRPC correctly localhost (127.0.0.1:19200).
F2 Validator + fullnode keys live in /tmp/qalnet-dev1 plaintext Med (devnet) Production: keys in Stronghold/OS keystore, 0700 dirs; genesis ceremony on isolated media.
F3 Client YAML contains api_mainnet.iota.cafe envs with grpc set — accidental --env mainnet would target public IOTA Low Keep active_env pinned; document; CI guard later.
F4 Single validator (committee-size 1) — the operator IS consensus By design (dev) Phase 1: 4 validators (3f+1 tolerates 1 Byzantine), consensus traffic inside Tailscale.
F5 Anchors trust producer-declared metadata (hash is real, but "what it claims to be" is producer-signed only) Accepted (v0) v1: signature field populated with Qal ID producer keys; issuer accreditation via Hierarchies.

2. Threat model by surface

2.1 Network & validators

2.2 Money layer (the juiciest target)

2.3 Agent layer (the NEW attack class everyone's getting wrong in 2026)

2.4 Contract layer (Move)

2.5 Supply chain (the underrated one)

We run a ~200-crate fork of third-party code. Real risks: upstream compromise, malicious dep injection via a future cargo add, stale CVEs. Mitigations: Cargo.lock committed; monthly upstream rebase cadence (implementation plan); cargo audit/dependabot on the fork repo; builds reproducible-ish on one machine; no code runs from repos/ (reference only) — only qalnet/ is built.

2.6 Data layer (accountability pipeline)

2.7 Physical/ops

Home machines: power/net loss (Starfish tolerates; DR drills monthly), disk death (snapshots + snapper on superlocal; chain DB rebuildable from genesis.blob), theft (disk encryption, keys in Stronghold, revocation drills). The hub's Signal alerts are the incident channel.

3. "How easy is it to hack?" — scored

Attack Difficulty today After Phase 1 (4 validators, hardened)
Steal a user's B-QALS needs their machine+keys same (no chain path exists)
Drain an agent capped by epoch allowance; revoked in 2s same, smaller caps, on-chain
Forge a receipt/anchor would need to rewrite chain history + publicly falsifiable (IOTA anchoring)
Print money no path exists (paper phase: admin of loopd) on-chain: needs reserve oracle majority + bank fraud
Halt the chain DDoS superlocal's link (devnet: trivial; cost: nothing at stake) needs 2 of 4 validators offline
Corrupt history 1-of-1 validator today (devnet!) >⅓ committee Byzantine + defeats anchoring checks

Devnet is soft on purpose — it holds no value. The table above is why Phase 1 (committee + hardening) precedes any real money.

4. Hardening backlog (ordered)

  1. Bind all devnet services to 127.0.0.1/Tailscale IP (config, not firewall surgery).
  2. Keys out of /tmp → Stronghold + 0700 (script it).
  3. 4-validator committee across Fleet + 1 cloud VM; DR drill (kill one, watch Starfish heal).
  4. cargo audit + lockfile commit on qalnet; monthly upstream rebase.
  5. Property-test expansion for qal_credit edge cases (concurrent holds, epoch boundary).
  6. Anchor authorized_keys/ACL hashes (the SSH/Tailscale integration) — dogfooding F5's fix.
  7. External Move audit before Phase-2 value (US$30-80k, budgeted).
  8. Public-IOTA checkpoint anchoring cron (external tamper-evidence).
  9. Revocation drill scheduled monthly (hub → Signal).
  10. Incident runbook (who, what, Signal channel, kill switches).

Philosophy: we're not trying to be unattackable (nobody is); we're making every attack bounded, loud, and provable — caps bound it, events/alerts announce it, receipts and anchors prove it. That's a security posture you can sell.