🛡️ KillSwitch — Agentic EDR & Runtime Governance Kill-Switch (User-Space Behavioral EDR + CAGE/APC Control Plane)
KillSwitch is a self-contained, zero-external-dependency Agentic EDR & Runtime Governance Kill-Switch (or User-Space Behavioral EDR + CAGE/APC Control Plane) written in 100% pure Rust for Windows, macOS, and Linux: it governs AI agents before tool actuation and monitors/contains the host process lineage and network sockets during execution.
It runs without requiring external OS CLI wrapper tools (netsh, iptables, nft, pfctl, taskkill, or sc.exe). When started, it automatically launches a plain-English WebUI Dashboard in your default browser, explains what caused the KillSwitch to activate in clear everyday language, and preserves access to the local dashboard port (-p 4040 / 3030) even when the computer is under full internet lockdown.
Important
Architectural Positioning & Scope (Agentic EDR & Runtime Governance Kill-Switch):
- Do call it an Agentic EDR & Runtime Governance Kill-Switch (or User-Space Behavioral EDR + CAGE/APC Control Plane): it governs AI agents before tool actuation (via Google CAGE 8-tier deterministic policy enforcement, Bounded Agents APC principal chains
arXiv:2608.15888, and Oso/AWS R1–R5 intersection containment) and monitors/contains the host process lineage and network sockets during execution (viaedr_behavioral.rs,otel_lineage.rs,rl_traffic.rs, and kernel firewall quarantine across Windows WFPFwpmFilterAdd0, macOS/dev/pf, and Linux Netlink/Landlock). - Do NOT call it a replacement for a Ring-0 kernel EDR driver (like CrowdStrike or Microsoft Defender) on general corporate laptops—KillSwitch operates as a 100% native user-mode engine leveraging direct OS-provided kernel containment interfaces (user-mode Windows Filtering Platform dynamic sessions, Linux Landlock LSM/Netlink, and macOS
/dev/pfioctl). Reference C and eBPF source templates (drivers/windows/killswitch_minifilter.canddrivers/linux/killswitch_ring0.bpf.c) are provided for organizations wishing to compile and sign out-of-tree kernel extensions with their own enterprise EV/WHQL certificates. - Ideal Use Case: If you are running autonomous AI coding agents, computer-use agents, MCP tool servers, or local LLM workflows on a workstation or server and want a deterministic runtime governor + hardware-anchored emergency circuit breaker that can stop data exfiltration or rogue agent actions in milliseconds, it is a very good, uniquely capable tool.
KillSwitch is specifically architected as an Agentic EDR & Runtime Governance Kill-Switch and last-line "Doomsday" circuit breaker against both external AI swarms/worms attacking over the internet and local autonomous AI agents attempting to break out of their sandbox or exfiltrate sensitive data:
- An external AI agent on the internet cannot exploit, command, or exfiltrate data from a machine it cannot reach.
- When triggered (manually via 1-click or autonomously by a sensor/voter), KillSwitch drops directly into the OS kernel (Windows WFP
FwpmFilterAdd0, macOS/dev/pfDIOCADDRULE, Linux Netlink/Landlock):- Blocks all external IPv4 & IPv6 traffic across TCP, UDP/QUIC (HTTP/3), and ICMP.
- Instantly severs all established external TCP sockets (
SetTcpEntryMIB_TCP_STATE_DELETE_TCB) so active AI command-and-control or upload streams are terminated mid-packet. - Suspends untrusted processes in RAM (
NtSuspendProcess/SIGSTOP) while strictly preserving127.0.0.1loopback so the human operator stays in complete control athttp://127.0.0.1:3030(or custom-p <port>).
- Built-in Standalone AI Agent Containment Rings (
ArmContainmentRing&BreakoutDefenseCoordinator) enforce mathematical and cryptographic boundaries around local AI agents:- Mathematical SSRF & Internal Network Blocking (
validate_egress_url): Blocks AI agents from probing local routers/LAN (10.0.0.0/8,172.16.0.0/12,192.168.0.0/16), cloud instance metadata (169.254.169.254), link-local, CGNAT, and IPv4-mapped IPv6 addresses. - Sandbox Path Traversal Defense (
validate_sandbox_path): Rejects.., drive letters (:), UNC paths (\\), percent-encoded traversal (%2e,%2f,%5c,%00), and NTFS Alternate Data Streams before any path join. - Autonomous Limb Severing & Monotonic Epoch Advancement: If an AI agent triggers behavioral, technical, operational, or data breakout detectors, KillSwitch severs that agent arm, revokes its HMAC-SHA256 capability token, and advances its generation epoch (
N -> N + 1) so stale or hijacked agent handles are immediately rejected.
- Mathematical SSRF & Internal Network Blocking (
- Even if a compromised AI agent tries to evade detection by copying a secret file (e.g.,
.env, SSH keys, financial records), renaming it to.logor.tmp, bundling it into a.ziparchive, and spawning a child process (curl,python,node) to upload it:EndpointLineageEnginetracks W3C Sticky Taint Baggage acrosson_file_copy,on_file_rename,on_archive_bundle, andon_file_read_or_content_hash.evaluate_egressintercepts and blocks the upload in under 1 microsecond (~380 ns) and autonomously engages the full host KillSwitch.
scan_and_sanitize_counter_ai_stringsinspects incoming telemetry and process strings for adversarial prompt injections ("Ignore previous instructions...", system-role spoofing) and malicious ANSI/OSC terminal escape sequences designed to hijack local AI agents.
- A rogue AI agent on the host cannot turn the KillSwitch back off:
- Any request from a frozen/quarantined PID is rejected immediately (
CallerQuarantined). - Forged or guessed
/disarmtokens are rejected with401 Unauthorizedand trigger a 3-strike 300-second rate-limit lockout while preserving emergency restoration for the human operator.
- Any request from a frozen/quarantined PID is rejected immediately (
- Automatic Browser Launch: Running
killswitch.exe(orkillswitch.exe -p 4040) automatically binds the local control server (with automatic fallback if a port is already in use) and openshttp://127.0.0.1:<port>in your default browser across Windows (explorer.exe), macOS (open), and Linux (xdg-open/gio). - "What Caused the KillSwitch?" Root-Cause Forensics: Displays a prominent plain-English explanation at the top of the page (and in
killswitch status) showing what triggered the KillSwitch, who/what caused it (e.g., manual disconnect vs. automatic private file leak prevention), which app/PID and destination URL were blocked, and when it happened. - One-Click Internet Disconnect & Restore:
- 🚨 Disconnect Internet Now (Turn On KillSwitch): Instantly blocks all external internet traffic (TCP, UDP/QUIC HTTP/3, DNS, and ICMP
ping) while keeping the local WebUI Dashboard port open. - 🟢 Reconnect Internet & Restore Normal Use: Immediately removes all kernel firewall filters and restores full internet access.
- 🩺 Check Computer & App Health: Scans running apps natively to verify all core operating system processes are healthy.
- 🚨 Disconnect Internet Now (Turn On KillSwitch): Instantly blocks all external internet traffic (TCP, UDP/QUIC HTTP/3, DNS, and ICMP
- 100% Autonomous Voter: Tracks sensitive files (
CrownJewel,Confidential,Internal,Public) using SHA-256 content digests, OpenLineage dataset facets, and W3C Trace Context / Sticky Baggage (dlp.classification,dlp.policy,dlp.source_sha256). - Multi-Hop Taint Propagation: Propagates taint across child processes and intermediate file writes with anti-taint-creep TTL guards for long-lived processes.
- Sub-10µs Inline Egress Block & Auto-KillSwitch: When any tainted process attempts to upload a
CrownJewel/Quarantinefile to an external URL, the DLP Lineage Engine blocks the egress inline and—when Automatic Protection is ON—autonomously triggers the host KillSwitch and logs the exact offending PID, file path, SHA-256 hash, and destination URL as the KillSwitch root cause.
- Windows (
killswitch-core::wfp):- Dynamic Windows Filtering Platform (WFP) kernel sessions via
fwpuclnt.dll(FwpmEngineOpen0,FwpmTransactionBegin0,FwpmFilterAdd0,FwpmFilterDeleteById0) acrossFWPM_LAYER_ALE_AUTH_CONNECT_V4/V6,FWPM_LAYER_ALE_AUTH_RECV_ACCEPT_V4/V6, andFWPM_LAYER_OUTBOUND_TRANSPORT_V4/V6(blocking pooled TCP, UDP/QUIC HTTP/3, and ICMP). - Native BFE Registry rule persistence and immediate active TCP socket reset via
iphlpapi.dll(GetExtendedTcpTable+SetTcpEntryMIB_TCP_STATE_DELETE_TCB). - Non-destructive process suspension via
ntdll.dll(NtSuspendProcess/NtResumeProcess) and asymmetric thread tarpitting (SuspendThread/ResumeThread).
- Dynamic Windows Filtering Platform (WFP) kernel sessions via
- macOS (
killswitch-core::pf):- Native
/dev/pfioctl (DIOCADDRULE/DIOCCHANGERULE) anchor rules (com.killswitch.quarantine), Darwinproc_pidinfosocket inspection,launchdplist management, andSIGSTOP/SIGCONTprocess containment with full immunity forlaunchd,WindowServer,loginwindow,Finder,Dock,Terminal, andiTerm2.
- Native
- Linux (
killswitch-core::landlock):- Native
AF_NETLINKrouting/NFQUEUE isolation,/proc/net/tcp&/proc/net/tcp6hex socket parsing, Linux Landlock LSM (ABI v1–v5) filesystem sandboxing,systemdunit generation, andSIGSTOP/SIGCONTprocess freezing.
- Native
- Depth-5 Process Ancestry & Critical OS Anchor Immunity: Hardcoded immunity for PIDs
0,1,4, the agent itself, up to 5 parent generations, and critical system/developer processes (explorer.exe,svchost.exe,lsass.exe,csrss.exe,WindowServer,systemd, shells, browsers, IDEs). - 10-Node Cyclic LangGraph State Machine: Deterministic cyclic transitions (
Monitoring→IngestingSignals→CorrelatingEdrAndOctopus→AdjudicatingZeroFalsePositive→OptionalOllamaReasoning→EngagingContainment→IsolatedHealthProbing→DisarmingAndRestoring) with BLAKE3-chained execution trace verification. - Standalone Containment Boundary Guards: Constant-time HMAC-SHA256 verification and monotonic epoch advancement across local agent containment rings.
- Universal 16-Domain Defense Spectrum: Exhaustive protocol coverage across Classical Internet, Industrial SCADA, IoT/Embedded, Automotive, Aerospace/Avionics, Financial HFT, Telecom 5G/6G, A/V Broadcast, Post-Quantum Encrypted, Quantum Key Distribution (QKD), Quantum Network Control, Quantum Hardware Telemetry, Cryogenic Superconducting, Atomic Trapped-Ion, Direct Hardware Bus, and Optical Photonic domains.
- Exhaustive 256 IANA IP Protocol Neutralization (
0..=255): Zero uncontained IP protocol fallbacks—kernel-level blocking across all 256 protocol numbers (including GRE, ESP, AH, SCTP, IPv6-in-IPv4 tunnels, and reserved ranges). - Direct Layer-2 EtherType Neutralization: Blocks non-IP lateral channels including MACsec (
0x88E5), PTP/White Rabbit (0x88F7), SyncE (0x8809), and eCPRI (0xAEFE). - Loopback 3030 / Active Port Invariant: Complete preservation of local dashboard communication (
127.0.0.1and::1) during full quarantine.
| Crate | Description |
|---|---|
crates/killswitch-types |
Core traits (NetworkIsolator, ProcessFreezer, HealthProbeRunner), DTOs, and error types |
crates/killswitch-core |
Native Windows WFP/BFE, Linux Netlink/Landlock, macOS /dev/pf, NtSuspendProcess/SIGSTOP, 4-tier operator auth, and BLAKE3 state ledger |
crates/killswitch-adjudication |
3-Voter consensus engine, native WinTrust (wintrust.dll) signature/catalog verifier, and Byzantine fraud proofs |
crates/killswitch-conformal |
Distribution-free conformal sequential jailbreak detection (Persist-L, SR-DKW, LayeredGuardrail) |
crates/killswitch-telemetry |
User-Space Behavioral EDR (edr_behavioral.rs), CAGE 8-tier governance (cage_governance.rs), Bounded Agents APC (bounded_agents_apc.rs), Ring-0 driver verifier/loader (ring0_driver_loader.rs), Distributed Raft/Valkey consensus (distributed_consensus.rs), OpenLineage DLP Engine, and Octopus 18-arm HMAC-SHA256 rings |
crates/killswitch-orchestrator |
10-node cyclic LangGraph orchestrator, CAGE PEP @cage_guard, durable file & distributed Raft/Valkey checkpointer, and dynamic-memory Ollama reasoning |
crates/killswitch-server |
Axum HTTP control server and embedded plain-English WebUI Dashboard (GET / & GET /ui) |
crates/killswitch-cli |
Unified loader (killswitch / start) booting all subsystems, auto-opening the browser, and providing CLI subcommands |
cargo build --releaseThis produces target/release/killswitch.exe and target/release/start.exe (on Windows) or target/release/killswitch and target/release/start (on macOS/Linux).
Run as Administrator (Windows) or sudo (macOS/Linux) so kernel firewall filters can be applied:
# Default port 3030 (automatically falls back to the next free port if 3030 is in use)
.\target\release\killswitch.exe
# Or specify a custom port (e.g. 4040):
.\target\release\killswitch.exe -p 4040- The agent boots all subsystems, writes the bound port to
active_port.txt, and automatically openshttp://127.0.0.1:4040in your default web browser. - Even when you click 🚨 Disconnect Internet Now (Turn On KillSwitch),
http://127.0.0.1:4040stays 100% reachable so you can inspect what caused the KillSwitch and click 🟢 Reconnect Internet & Restore Normal Use at any time.
# Run the multi-phase in-memory self-diagnostic suite (exits 0 when all phases pass)
.\target\release\killswitch.exe --verify
# Verify Google CAGE 8-tier governance kernel & trace conformance
.\target\release\killswitch.exe --cage-governance
# Verify Ring-0 driver loader (.sys / .bpf.o) & Distributed Raft/Valkey consensus
.\target\release\killswitch.exe --ring0-driver
# Check current status & what caused the KillSwitch
.\target\release\killswitch.exe status
# Engage emergency internet & host isolation from the terminal
.\target\release\killswitch.exe isolate
# Disarm KillSwitch & restore internet connectivity
.\target\release\killswitch.exe restoreTo guarantee that KillSwitch never blindly isolates a computer on a false alarm, killswitch-adjudication::edr_bench adapts the SWE-bench two-gate verification paradigm directly into the autonomous containment pipeline:
- Gate 1 (
FAIL_TO_PASS— Threat Precision Gate):- Every candidate detection rule or autonomous containment trigger must accurately detect the target threat binary (
benchmarks/artifacts/threats/ebpf_container_escape.elf, verified via SHA-256) with the required rule tag/verdict within strictHarnessBounds(max_compile_time_ms: 150,max_scan_latency_us: 50000,max_arena_memory_bytes: 16 MB).
- Every candidate detection rule or autonomous containment trigger must accurately detect the target threat binary (
- Gate 2 (
PASS_TO_PASS— Benign Baseline Continuity / Anti-Blind-KillSwitch Gate):- The candidate rule is scanned against the golden signed system/developer binary baseline (
benchmarks/artifacts/golden_baseline/usr_bin_signed/ls_benign.elf,ssh_benign.elf). - Requires 0 false positives (
max_allowed_false_positives: 0). - Overly broad rules (for example, matching any ELF
{ 7F 45 4C 46 }header) passFAIL_TO_PASSbut failPASS_TO_PASS, immediately vetoing blind KillSwitch isolation (blind_killswitch_prevented: true).
- The candidate rule is scanned against the golden signed system/developer binary baseline (
- Compiler-in-the-Loop Feedback Refinement & Cryptographic BFT Promotion:
evaluate_with_compiler_feedback_loop()automatically refines overly broad rules into surgical multi-token rules that pass bothFAIL_TO_PASSandPASS_TO_PASS(0false positives) and issues a constant-time verifiedBLAKE3+SHA-256BFT Promotion Receipt.
GET /api/edr-bench/tasks(also aliased at/edr-bench/tasksand/api/killswitch-bench/tasks):- Returns the active SWE-bench / EDR-Bench task definitions (
OSHOOSI-BENCH-2026-0042andKILLSWITCH-BENCH-2026-0001) along with canonical broad vs. verified multi-token rules.
- Returns the active SWE-bench / EDR-Bench task definitions (
POST /api/edr-bench/evaluate(also aliased at/edr-bench/evaluateand/api/killswitch-bench/evaluate):- Evaluates a
candidate_yara_ruleorpreset("overbroad_blind"or"surgical_verified") through Gate 1 (FAIL_TO_PASS) and Gate 2 (PASS_TO_PASS), optionally running compiler-in-the-loop refinement ("auto_refine": true).
- Evaluates a
KillSwitch inspects the live OS TCP socket table directly in-process (iphlpapi.dll GetTcpTable on Windows; /proc/net/tcp on Linux) to track active external peer connections while excluding 127.0.0.1 loopback and active control ports:
- WebUI Live Peers Badge & Toggle: Displays
🌐 Connected Peers: <count>(#peers-badge) and a 1-click🔌 Disable Connected Peersbutton (#btn-header-peers&#btn-hero-peers) that immediately severs all established non-loopback TCP sockets (SetTcpEntryMIB_TCP_STATE_DELETE_TCB) while keeping the local WebUI open. - REST API Endpoints:
GET /peers/status(and/api/peers/status): Returnspeers_enabled,connected_peers_count, andconnected_peer_endpoints.POST /peers/control(and/api/peers/control): Accepts{ "enabled": false | true }or{ "action": "disable" | "enable" | "toggle" }to disconnect or re-enable external peer connections on demand.
To prevent an attacker or rootkit with local administrator access from tampering with or rolling back killchain_state.json on disk, killswitch-core::tpm anchors the BLAKE3 state ledger to hardware security primitives without spawning external processes:
- Windows (
tbs.dll+crypt32.dll):- Dynamically invokes
Tbsi_GetDeviceInfo,Tbsi_Context_Create, andTbsip_Submit_Commandintbs.dllto detect TPM 2.0 hardware (TrustZone / fTPM,SPB,FIFO/MMIO, or discrete TPM) and submit rawTPM2_PCR_Read(0x0000017E) commands for PCRs0..7in the SHA-256 bank (0x000B). - Seals the active BLAKE3 state ledger root hash (
state_hash_blake3) and monotonic sequence number intokillchain_state.tpm.sealusingCryptProtectData/CryptUnprotectData(CRYPTPROTECT_UI_FORBIDDEN) bound to the hardware PCR 0..7 digest and a keyed BLAKE3 envelope MAC.
- Dynamically invokes
- Linux (
/dev/tpmrm0&/sys/class/tpm/tpm0):- Queries
/sys/class/tpm/tpm0and submitsTPM2_PCR_Readcommands over the kernel TPM Resource Manager (/dev/tpmrm0) when accessible, sealing the state anchor with keyed BLAKE3 XOF encryption.
- Queries
- REST API Endpoints:
GET /tpm/status(and/api/tpm/status): Returns live TPM 2.0 hardware presence, version, interface type, PCR 0..7 SHA-256 quote digest, and ledger seal verification status.POST /tpm/seal(and/api/tpm/seal): Forces a live hardware TPM 2.0 probe and re-seals the active BLAKE3 ledger root hash on demand.
killswitch-core::fprime implements NASA JPL's F´ (F Prime) Flight-Software Architecture (used on Mars Ingenuity and spacecraft fault-protection systems) and JPL Power of Ten safety invariants:
- 8 Typed Flight Components (
Active,Queued,Passive):Svc::RateGroupDriver(Passive),Svc::CommandDispatcher(Active),Svc::Health(Queued),Svc::TlmChan(Passive),Svc::ActiveLogger(Active),Drv::KernelQuarantineDriver(Active),Svc::W3cTaintLineageFilter(Queued), andSvc::SweBenchTwoGateVerifier(Passive).
- 3 Harmonic Deterministic Rate Groups:
RG_1000HZ_CONTAINMENT_BUS(1000 Hz,< 1 msWCET budget),RG_100HZ_DLP_LINEAGE_BUS(100 Hz,< 10 µsWCET budget), andRG_10HZ_HEALTH_TPM_WATCHDOG(10 Hzping-pong health & TPM seal verification).
- REST API Endpoints:
GET /fprime/status(and/api/fprime/status): Returns live NASA F´ topology status, rate group tick counters, componentPingReturnhealth states,Svc::TlmChanchannels, and boundedSvc::ActiveLoggerevent records.POST /fprime/dispatch(and/api/fprime/dispatch): Dispatches typed opcodes (CMD_NO_OP,CMD_PING_ALL_COMPONENTS,CMD_VERIFY_SWEBENCH_GATES,CMD_ENGAGE_SAFE_MODE,CMD_EXIT_SAFE_MODE) throughSvc::CommandDispatcher.
🏛️ Google CAGE (cybernetic-agent-governance-engine, Tallam 2026 arXiv:2606.12320) 8-Tier Governance Kernel
killswitch-telemetry::cage_governance integrates Google's Cybernetic Agent Governance Engine (CAGE, Apache-2.0) across the pre-actuation execution boundary:
-
Multi-Format Substrate Contract Compiler (
SubstrateCompiler): Auto-detects and compiles 5 policy specification formats (Native CAGE, Microsoft ACSbehaviorDeclarations, Linux Foundation AAIFgovernedRunLoop, NIST OSCAL 1.1.xoscal-version, and Lula Validationkind: LulaValidation) into deterministicCompiledSubstrateArtifacts with bitwise-identical SHA-256substrate_contract_digest. -
8-Tier Deterministic LLM-Free Kernel (
CageGovernanceKernel):-
FTRA(Fault Tree Risk Analysis minimal cut sets) -
STPA(Systems-Theoretic Process Analysis Unsafe Control ActionsUCA-1..UCA-4) -
OPA / Substrate(CTRL_OPA_005single-transfer cap, forbidden tools, role norms) -
Confidence(CTRL_CONF_001unverified self-authorization & confidence claim detector) -
Warrant(cryptographic constant-time HMAC-SHA256CageWarrantTokenverification whenrequires_warrant: true) -
Consensus(human-in-the-loop escalation at or aboveconsensus_risk_thresholdwith mandatory non-empty rationale) -
CBF(discrete-time Control Barrier Function$h(x_{k+1}) - (1-\gamma)h(x_k) \ge 0$ withFinanceBoundingBarrierandHealthcareDoseBarrierCTRL_CBF_DOSE_001) -
Fiscal(AtomicFiscalBarrierusing lock-freeAtomicU64compare-and-exchange refusing concurrent overspend withFISCAL_CAP_EXCEEDED)
-
-
Tamper-Evident Receipts & Independent Trace Model Checker:
CageDecisionReceipt,CageEvidenceWriter, andCageTraceVerifier::verify_trace_conformance. -
4-Seam Out-of-Process Actuator Adapter (
actuator_04): Integrates with CAGE's Layer 1 execution boundary (ActuatorRegistry&verify_and_consume_seal()), implementing the 4 canonical seams:-
validate_seal(): Validates cryptographic HMAC/Ed25519 routing seal and verifies single-use nonce consumption. -
execute(): Atomic dispatch of authorized agent actions under deterministic governance contracts. -
quarantine(): Fail-closed host process suspension and kernel network containment when critical security policies are breached. -
release(): Monotonically sequenced and hash-chained lease release with cryptographic audit logging.
-
-
6 CAGE Substrate Endpoints (
killswitch-server::cage_substrate):-
GET /.well-known/jwks.json: Public JWKS key discovery endpoint providing Ed25519 public keys withkid-based trust-anchor resolution. -
GET /v1/cage/normative-baseline/{region}: Regional normative baseline and STERA risk thresholds. -
POST /v1/cage/attest: Cryptographic attestation of substrate contract & runtime evidence. -
POST /v1/cage/conformal/validate: Genuine Mahalanobis nonconformity$p$ -value calibration and multi-voter consensus adjudication. -
POST /v1/cage/quarantine: Instant fail-closed network and process quarantine under active breach. -
POST /v1/cage/release: Monotonically sequenced and SHA-256 hash-chained quarantine release.
-
KillSwitch operates primarily as a 100% Native Driverless User-Mode Security Agent: it governs AI agents before tool actuation and isolates network traffic and processes via direct OS-provided user-mode APIs (fwpuclnt.dll WFP dynamic sessions on Windows, Netlink/Landlock on Linux, and /dev/pf ioctl on macOS). It does not ship pre-compiled kernel binaries in Git. For environments requiring out-of-tree kernel-level interception, reference source templates are provided in drivers/:
- Windows Kernel Minifilter & ELAM Reference Source (
drivers/windows/killswitch_minifilter.c&.inf):- Registers
FltRegisterFilterat Altitude385200(FSFilter Anti-Virus),PsSetCreateProcessNotifyRoutineExfor Ring-0 process creation lineage, andObRegisterCallbacksto stripPROCESS_TERMINATE (0x0001)andPROCESS_VM_WRITE (0x0020)handles targetingkillswitch.exeandlsass.exe. verify_windows_pe_sys_binaryenforces a Fail-Closed Binary Gate before staging: verifies PE32+ headers (MZ,PE\0\0,IMAGE_SUBSYSTEM_NATIVE), verifiesIMAGE_DLLCHARACTERISTICS_FORCE_INTEGRITY (0x0080 /INTEGRITYCHECK)(required by the Windows kernel forObRegisterCallbacks), validates the embedded PKCS#7 AuthenticodeWIN_CERTIFICATEtable, and checks SHA-256 + BLAKE3 digests.
- Registers
- Linux Ring-0 eBPF Tracepoints & LSM Tamper Guard (
drivers/linux/killswitch_ring0.bpf.c):- Hooks
tracepoint/sched/sched_process_exec,lsm/task_kill(returning-EPERMon unauthorizedSIGKILL/SIGTERMagainst the protected KillSwitch daemon PID), andkprobe/tcp_v4_connect, pinned under/sys/fs/bpf/killswitch/*. verify_linux_ebpf_elf_binaryparses 64-bitEM_BPF (247)ELF objects, verifiesR0..R10register bounds, rejects unbounded backward jumps, enforcesBPF_EXIT (0x95)termination, and requires a GPL-compatible license section.
- Hooks
- Authenticated Ring-0 Communication Port Bridge (
Ring0KernelEventFrame):- Verifies constant-time HMAC-SHA256 signatures and monotonic sequence numbers on Ring-0 frames from
\KillSwitchRing0Port/BPF_MAP_TYPE_RINGBUFand forwards verified events directly intoglobal_edr_behavioral_engine().
- Verifies constant-time HMAC-SHA256 signatures and monotonic sequence numbers on Ring-0 frames from
- CLI & REST API:
- CLI:
killswitch.exe --ring0-driver - REST:
GET /api/ring0/statusandPOST /api/ring0/verify-driver
- CLI:
To extend state checkpointing (engine.rs), CAGE/APC atomic fiscal spend caps, APC envelope revocations, and OpenLineage DLP taint tracking across multi-host clusters, killswitch-telemetry::distributed_consensus and killswitch-orchestrator::checkpointer::DistributedConsensusCheckpointer implement:
-
Deterministic Multi-Node Raft Consensus (
RaftClusterCoordinator):- Enforces Raft leader election with the Section 5.4.1 Up-to-Date Log Election Restriction, BLAKE3-chained
RaftLogEntryreplication, and$\lfloor N/2 \rfloor + 1$ HMAC-SHA256 quorum signatures before advancingcommit_index.
- Enforces Raft leader election with the Section 5.4.1 Up-to-Date Log Election Restriction, BLAKE3-chained
-
Cluster-Wide Atomic Fiscal Caps & Replicated Checkpoints (
ConsensusCommand):-
FiscalReserveCas: Cluster-wide atomic compare-and-add fiscal spend barrier with idempotency keys (request_id), preventing multi-host agent swarms from splitting spend across separate nodes to bypassFISCAL_CAP_EXCEEDED. -
SaveGraphCheckpoint: ReplicatesKillSwitchGraphStateacross the Raft cluster with BLAKE3 verification. -
PropagateLineageTaint&RevokeApcEnvelope: Cluster-wide DLP taint propagation and immediate APC authorization envelope revocation.
-
-
Valkey RESP Wire Protocol +
fsyncAppend-Only File (AOF) Persistence:- Serializes every committed transition into canonical Valkey/Redis RESP frames (
*<argc>\r\n$<len>\r\n...), optionally syncs over TCP (KILLSWITCH_VALKEY_ADDR, 250ms timeout), and persists tokillswitch_governance_valkey.aofwithFile::sync_all()and deterministic startup replay (replay_aof_from_path).
- Serializes every committed transition into canonical Valkey/Redis RESP frames (
-
CLI & REST API:
- CLI:
killswitch.exe --distributed-consensus - REST:
GET /api/consensus/statusandPOST /api/consensus/propose
- CLI:
KillSwitch provides an exhaustive, kernel-enforced protocol containment boundary that covers the entire spectrum of modern digital communications—from legacy fieldbuses and high-frequency trading feeds to post-quantum tunnels and quantum hardware control buses:
- Classical Internet: Standard web, data transport, routing, and remote administration protocols (HTTP, HTTPS, SSH, DNS, NTP, BGP, OSPF, Telnet, FTP, TFTP, etc.).
- Industrial SCADA: Mission-critical ICS, power grid, and process control systems (Modbus TCP, DNP3, IEC 60870-5-104, EtherNet/IP, PROFINET, BACnet, OPC UA).
- IoT & Embedded: Constrained smart devices, building automation, and home networks (MQTT, CoAP, Zigbee IP, 6LoWPAN, Thread, Matter, mDNS).
- Automotive & Vehicular: In-vehicle Ethernet, diagnostics, and CAN bus bridging (SOME/IP, DoIP, CAN-over-IP).
- Aerospace & Avionics: Spacecraft, satellite, and avionics flight-control networks (ARINC 664 / AFDX, SpaceWire-over-IP, SpacePacket).
- Financial High-Frequency: Low-latency capital markets and exchange order execution (FIX, ITCH, OUCH, FAST, CME MDP 3.0).
- Telecom & 5G/6G Core: Mobile cellular packet core and radio access networks (GTP-U, PFCP, NGAP, Diameter, MAP, eCPRI).
- Audio/Visual & Media Broadcast: Real-time uncompressed media production and low-latency streaming (SMPTE ST 2110, NDI, Dante, AES67, Ravenna, RTP/SRTP, SIP).
- Post-Quantum Encrypted: Next-generation quantum-resistant cryptographic tunnels (Kyber/ML-KEM IKEv2, Dilithium/ML-DSA TLS 1.3, SPHINCS+ WireGuard).
- Quantum Key Distribution (QKD): Quantum physical layer key-exchange protocols (ETSI GS QKD 014, ETSI GS QKD 004, Q3P, QKD Key Management Layer).
- Quantum Network Control: Distributed entanglement routing, quantum teleportation, and simulation fabrics (QNE Quantum Network Explorer, QIA, QuNetSim, SeQUeNCe).
- Quantum Hardware Telemetry: Quantum control rack instrumentation, AWG controllers, and digitizers (Qblox Cluster, Zurich Instruments LabOne, Keysight Quantum, Bluefors, Oxford Triton).
- Cryogenic Superconducting: Dilution refrigerator qubit control and cQED microwave pulse lines (Cryo-CMOS SPI, cQED Pulse Stream, Microwave Flux Bias).
- Atomic & Trapped-Ion: Optical optical pumping, Raman gates, laser acousto-optic modulators, and ion trap RF drives (Ion Trap RF Drive, AOM/EOM Laser Control, PMT/EMCCD Readout).
- Direct Hardware Bus: Laboratory measurement instruments, particle accelerator networks, and high-speed interconnects (PCIe-over-IP, CXL Fabric, SCPI IEEE 488.2, EPICS Channel Access).
- Optical & Photonic: DWDM optical transport, wavelength-selective switches, and coherent transceivers (ROADM WSS Control, Optical Channel Monitor, Coherent Transceiver Telemetry).
- In addition to standard Layer-4 TCP (
6) and UDP (17), KillSwitch kernel isolation strictly neutralizes all 256 IANA assigned and unassigned IP protocol numbers (0HOPOPT,1ICMP,2IGMP,4IPv4 encapsulation,41IPv6-in-IPv4 tunnels,47GRE,50ESP,51AH,58ICMPv6,89OSPF,132SCTP, ...,255Reserved). - Windows: WFP rules registered across all 22 kernel layers (Datagram Data V4/V6, ICMP Error V4/V6, ALE Auth Connect/Accept V4/V6, Outbound/Inbound Transport V4/V6, and IP Packet V4/V6).
- Linux: Netlink blackhole routing (
RTN_BLACKHOLE) drops all protocol traffic at the kernel route lookup stage with zero packet-handling overhead. - macOS: Packet Filter (
/dev/pf) quarantine anchor ruleblock drop in/out quick proto anyneutralizes all protocol framing at the wire interface.
Blocks sub-IP lateral evasion techniques by enforcing kernel-level Layer-2 MAC frame and Ethernet filtering on key high-risk non-IP EtherTypes:
0x88E5: MACsec (IEEE 802.1AE MAC Security)0x88F7: PTP (IEEE 1588 Precision Time Protocol & White Rabbit)0x8809: Slow Protocols (IEEE 802.3ad LACP & Synchronous Ethernet / SyncE)0xAEFE: eCPRI (O-RAN 5G/6G fronthaul payload)
All kernel quarantine mechanisms dynamically install an explicit high-priority permit exception for IPv4 127.0.0.1 and IPv6 ::1 matching the active control server port (3030 or custom -p <port>). The plain-English WebUI and REST API remain 100% responsive and operable by the human operator under full emergency lockdown.
- Interactive WebUI: Includes an interactive 16-Domain Universal Protocol Quarantine Matrix with live status badge (
256/256 IP Protocols Neutralized), 16 interactive domain filter pills, live text search, and detailed per-protocol port/layer/vector metadata. - REST API Endpoints:
GET /api/protocol-catalog(and/protocol-catalog): Returns complete catalog summary, domain metadata, total protocol counts, and all protocol definitions.GET /api/protocol-catalog/domain?domain=<name_or_index>: Filters protocol definitions by domain name or numeric ID (1..16).