How lontivero/vinchuca works
Project type and purpose
• Vinchuca is a .NET-based, peer-to-peer botnet “agent” (no GUI/C&C interface) built for educational purposes.
• Its core responsibilities: join a P2P overlay, establish encrypted/signed channels, execute payloads (DDoS, backdoor, proxy, USB spread, etc.), evade analysis, and maintain persistence.
File structure
• Top-level:
• Agent/… : the main bot agent
• REPL/… : a command-line front end (for testing/debugging)
• Agent/ submodules:
• Actions/… : payload implementations (Backdoor, DDoS, Socks5, WebInject)
• Crypto/… : cipher implementations + key-exchange + signing
• Network/… : communication layer (listeners, sockets, comm manager), protocol (message types, handlers, peer management), connectivity tests
• System/… : OS-level helpers (anti-debug, sandbox detect, firewall, command exec)
• Upnp/… : NAT traversal
• Spread/… : USB, privilege escalation
• Utils/… : common queues, pools, PoW, logging
• Workers/… : scheduling and background tasks
• REPL/ submodules: CLI parser, command classes, virtual console for local control of an Agent instance.
README for additional insights
• Emphasizes: P2P protocol, Diffie-Hellman handshake, message signing, single instance, anti-debug/sandbox, integrated proxies, web injection hooks, DDoS flavors, USB spreading, UPnP port mapping.
• No database or external control panel – it’s a pure peer agent.
a. Main components
• Agent Process
• P2P Overlay Network (Peers)
• Crypto Layer (DH handshake, AES/RC4, RSA signature)
• Protocol Layer (Message Manager, Handlers)
• Communication Layer
– Listeners (TCP/UDP)
– CommunicationManager (IMessageSender, ReplyWaitManager)
• Actions Modules
– DDoS, Backdoor, Socks5, WebInject, USB Spread, Firewall
• System/Evasion
– Anti-Debug, SandboxDetection, SingleInstance, CommandExecutor
• Workers Scheduler
• UPnP Module
• Utilities & Logging
• REPL CLI (local control interface)
b. Relationships and interactions
1. On startup, System/Evasion performs checks → if passed, instantiate Crypto Layer.
2. Crypto Layer performs DH handshake over Communication Layer.
3. Communication Layer uses Protocol Layer to wrap/unwrap messages, dispatch to Handlers.
4. Handlers invoke Actions Modules or System tasks.
5. Actions may spawn Workers to run asynchronously.
6. UPnP Module (optional) requests port mappings before listening.
7. REPL connects locally (loopback) to Communication Manager to inject commands.
8. Utilities (logging, queues) support all layers.
c. Architectural patterns/design principles
• Layered Architecture: separation of concerns (Crypto → Protocol → Comm → Actions → System)
• Event-driven: listeners raise events for incoming messages
• Plugin-style Actions: new features live in Actions/ and are invoked via handlers
• Single Responsibility: each module focuses on one aspect (e.g., Spread, Upnp, Utils)
d. Technologies, frameworks, libraries
• .NET Framework / Mono
• C# (<file>.cs)
• Diffie-Hellman, RSA, AES, RC4
• TCP/UDP sockets, UPnP SOAP
• App.config for settings
• MSBuild / csproj files
Details to capture
• All major subdirectories in Agent/ as distinct components.
• Flow of data: from network to handlers to execution and back.
• Integration points: UPnP for NAT, REPL for control, Utils for cross-cutting concerns.