NetDIFT is a zero-LLM Rust gateway implementing network-layer Dynamic Information Flow Tracking (DIFT) over HTTP, MCP JSON-RPC, A2A delegation, and UDP DNS. Prompt injection cannot re-escalate capabilities—the only release valve is a single-use, strictly scoped human declassification token.
Monotonic join (⊔) over (Trusted ⊏ SemiTrusted ⊏ Untrusted) × (Public ⊏ Internal ⊏ Confidential) detects the Lethal Trifecta automatically and blocks unauthorized control-plane writes and exfiltration.
Inspects MCP JSON-RPC 2.0 single & batch calls, rejects encoded/malformed payloads, enforces SSRF blocks on external origins, and stops CL/TE smuggling and Slowloris attacks.
Stamps bidirectional HMAC-SHA256 X-NetDIFT-Provenance headers across A2A delegation to stop taint laundering, paired with nonce-tracked single-use X-NetDIFT-Declassify approvals.
Tracks high-water session taint across active HTTP sessions and returns RCODE=5 REFUSED on high-entropy or multi-label covert DNS tunneling and non-allowlisted Lethal Trifecta egress.
git clone https://github.com/ejames-dev/NetDIFT.git
cd NetDIFT
# Run the live 8-step red-team containment demo + loopback Admin Web Console (127.0.0.1:8091)
cargo run --release -- demo --keep-alive
# Run the reproducible 5-cohort containment & wire-latency benchmark
cargo run --release -- bench --sessions 10