naftal.co.ke
SPECIFICATION // SYS-05Adversary Emulation / C2 Lab

Distributed Command Orchestration Framework

Zero-dependency Python TCP command-and-control research framework built to study remote agent multiplexing, network enumeration, and Linux privilege-escalation telemetry.

Controls
Adversary SimulationSocket MultiplexingWire Protocol AnalysisLab Telemetry
Stack
PythonRaw TCP SocketsMulti-threadingLinux Internals
References
github.com/nafdev01/Py-C2C ↗

1.0 // Problem & Threat Context

Understanding how post-exploitation frameworks operate on the wire—and what host/network artifacts they leave in SIEM and HIDS logs—requires building the primitives firsthand.

2.0 // Engineering Approach

Wrote a pure-stdlib multi-threaded TCP socket server with per-agent message queues, heartbeat keepalives, remote directory/file inspection, network enumeration modules, and streaming stdout capture.

3.0 // System Architecture

Lightweight (<2,000 LoC) lab orchestration daemon supporting 50+ concurrent remote sessions with sub-100ms dispatch latency for adversary-simulation and detection testing.

4.0 // Verification & Operational Outcome

Used in controlled lab environments to generate realistic Linux process, socket, and privilege-escalation telemetry for tuning HIDS and firewall rules.

5.0 // Interface & Telemetry Evidence [5]

CAPTURED LAB / PRODUCTION ARTIFACTS
Network enumeration executed from controlled lab node
Network enumeration executed from controlled lab node
Listener accepting inbound agent session
Listener accepting inbound agent session
Interactive operator command dispatch & directory inspection
Interactive operator command dispatch & directory inspection
Remote filesystem inspection during lab exercise
Remote filesystem inspection during lab exercise
Simulated Linux privilege escalation path for HIDS rule validation
Simulated Linux privilege escalation path for HIDS rule validation