Overview
The WLKOM C2 (Command & Control) is a web-based interface that allows an attacker to authenticate to and control a machine infected with the epirootkit module. It acts as the bridge between the attacker's browser and the kernel module running on the target.
Architecture
The C2 server is a single Node.js process that runs three services simultaneously:
Attacker's Browser C2 Server (Node.js) Infected Machine
┌──────────────┐ ┌─────────────────────┐ ┌──────────────┐
│ │ WebSocket │ │ TCP │ │
│ Web UI ├───────────► HTTP + WS Server │◄──────────┤ Kernel │
│ (HTML/JS) │◄───────────┤ (port 8080) │───────────► Module │
│ │ │ │ │ │
└──────────────┘ │ TCP Server │ └──────────────┘
│ (port 4242) │
└─────────────────────┘
| Service | Port | Protocol | Purpose |
|---|---|---|---|
| TCP Server | 4242 | TCP | Listens for the rootkit's incoming connection |
| HTTP Server | 8080 | HTTP | Serves the static Web UI files |
| WebSocket Server | 8080 | WebSocket | Real-time bridge between browser and rootkit |
Communication Flow
- The rootkit (on the infected machine) connects outbound to the C2 server on port 4242.
- The attacker opens
http://<c2-server>:8080in a browser. - The browser connects via WebSocket to the same HTTP server.
- All messages between the browser and rootkit are relayed through the C2 server.
All traffic between the C2 server and the rootkit is obfuscated with ROT64 encryption. The WebSocket traffic between the browser and C2 server uses plain JSON.
For a full protocol reference (TCP message formats and WebSocket JSON schema), see the API reference: ../api/attacker-ui-protocol
Prerequisites
- Node.js >= 18.0.0
- The
wspackage (installed vianpm install)
Quick Start
From the attacker-ui directory:
npm install
npm start
The server starts and outputs:
[+] TCP listener (rootkit) → 0.0.0.0:4242
[+] Web UI → http://0.0.0.0:8080
[~] Open http://localhost:8080 in your browser
For development with auto-reload:
npm run dev