How letho1608/c2c_botnet works
Project Type & Purpose
• Type: Full-stack C2 (Command-and-Control) Botnet framework, split into server and client (bot) sides.
• Purpose: Research and defensive training—implements C2 server, multi-bot management, client payload modules, GUI consoles, network exploitation and persistence features.
Top-Level Components
A. User Interfaces (UI Layer)
– Console UI (core/console.py) – CLI for issuing commands
– Desktop GUI (gui/interface.py) – Local GUI app
– Web GUI (gui/web_interface.py + templates/dashboard.html) – HTTP interface
B. Core Server Logic (Application Layer)
– server.py / core/server.py – Listens for bot connections over encrypted channels (SSH/tls)
– core/console.py – Command parser & dispatcher
– core/host_manager.py – Tracks live bots and metadata
– core/exploit_builder.py – Builds payloads/exploits on demand
– core/multiple_servers.py – Supports multi-server orchestration
– core/plugin_system.py – Dynamically loads and manages plugins (commands, payloads)
– core/reporting.py – Aggregates and formats collected data
C. Bot Manager (botnet/manager.py)
– Higher-level orchestration of connected bots: grouping, scheduling, pipelines
D. Client/Bot Side (Client Layer)
– client.py – Entry point; negotiates encrypted channel back to C2
– payload/modules/*.py – Modular payloads (keylogging, screenshot, persistence, lateral movement, etc.)
– network/*.py – Client-side network discovery, scanning, lateral movement, spreading
E. Utilities & Security (Infrastructure Layer)
– utils/*.py – Crypto, code-obfuscation, anti-VM, cert-pinning, memory/network protection, logging, integrity checks
Data Stores & External Services
– (Optional) A persistent store for logs / historical bot data (not explicitly in file tree; could be a flat-file or embedded DB)
– SSH / TLS channel (external) for secure C2 communications
Relationships & Data Flows
• Admin user → (via Console UI or GUI/Web UI) → Core Server (command dispatcher)
• Core Server → Plugin System → Appropriate Handler (exploit builder, host manager, reporting)
• Core Server → Encrypted Channel → Bots
• Bots → Payload Modules & Network Modules → Execute on Endpoint → Return data back via encrypted channel
• Core Server → Reporting → UI for visualization
• Bot Manager → Coordinates multi-bot tasks (spreading, scheduling)
Key Architectural Patterns & Design Principles
– Layered Architecture: UI / Application Logic / Bot/Network Modules / Utils
– Plugin Pattern: core/plugin_system dynamically loads modules for new commands or payloads
– Modular Payloads: each client-side capability is its own module under payload/modules
– MVC (for Web UI): gui/web_interface.py (Controller) + templates/dashboard.html (View)
– Single-Process Multi-Threading or Async I/O (likely in core/server.py and client.py)
Final Checklist
– Clearly separate Server vs. Client domains
– Show dynamic plugin extension point in core/plugin_system