How rasta-mouse/sharpc2 works
SharpC2 is a command-and-control framework whose principal workflow runs from an operator using the MAUI client, through the Team Server’s authenticated API and tasking services, to deployed Drone implants and back with task output and events. The server also manages handlers, payloads, hosted files, profiles, pivots, webhooks, and persistent state. The graph reflects documented capabilities and sampled call ownership; several subsystem links use exact tree paths but are not wired further where implementation excerpts were unavailable.
Main entry points: SharpC2Api.cs API client · Drone.cs Command runtime · MainPage.xaml.cs MAUI client · HandlersController.cs Handler API
Components 30
Operator client
- MAUI client
Client/MainPage.xaml.cs - API client
Client/Services/SharpC2Api.cs - UI models
Client/Models/Drones/Drone.cs
Team Server
- Authentication API
TeamServer/Controllers/AuthenticationController.cs - Handler API
TeamServer/Controllers/HandlersController.cs - Task API
TeamServer/Controllers/TasksController.cs - Drone API
TeamServer/Controllers/DronesController.cs - Payload API
TeamServer/Controllers/PayloadsController.cs - Pivot API
TeamServer/Controllers/PivotsController.cs - Management APIs
TeamServer/Controllers - Server services
TeamServer/Services/ServerService.cs - Task service
TeamServer/Services/TaskService.cs - Drone service
TeamServer/Services/DroneService.cs - Handler service
TeamServer/Services/HandlerService.cs - Payload service
TeamServer/Services/PayloadService.cs - Pivot services
TeamServer/Services/ReversePortForwardService.cs - Authentication service
TeamServer/Services/AuthenticationService.cs - Persistent state
TeamServer/Services/DatabaseService.cs - HTTP transport
TeamServer/Handlers/HttpHandlerController.cs - Live notifications
TeamServer/Hubs/NotificationHub.cs - Events and webhooks
TeamServer/Services/EventService.cs
Drone runtime
- Drone entry
Drone/Program.cs - Command runtime
Drone/Drone.cs - Command set
Drone/Commands/DroneCommand.cs - Communications
Drone/CommModules/CommModule.cs - Stagers
Stagers/ExeStager/Program.cs
External links
- External C2 controller
ExternalC2/ExternalC2.Net/Server/ServerController.cs - External drone bridge
ExternalC2/ExternalC2.Net/Client/DroneController.cs
Other components
- Operator
- Network peers
Connections 29
- Operator → MAUI client: operates
- MAUI client → API client: requests
- API client → Authentication API: authenticates
- Authentication API → Authentication service: verifies credentials
- API client → Handler API: manages handlers
- API client → Task API: submits tasks
- API client → Drone API: views drones
- API client → Payload API: requests payloads
- API client → Pivot API: manages pivots
- API client → Management APIs: manages resources
- MAUI client → UI models: presents data
- Handler API → Handler service: manages handlers
- Handler API → Live notifications: announces changes
- Task API → Task service: queues tasks
- Drone API → Drone service: manages drones
- Payload API → Payload service: generates payloads
- Pivot API → Pivot services: manages pivots
- Pivot API → Task service: caches drone frames
- Server services → Persistent state: persists state
- HTTP transport → Server services: handles frames
- HTTP transport → Network peers: receives implant traffic
- Server services → Events and webhooks: publishes events
- Drone entry → Command runtime: starts
- Command runtime → Communications: uses transport
- Command runtime → Command set: executes commands
- Stagers → Drone entry: launches
- Network peers → Drone entry: deploys
- External C2 controller → Network peers: relays frames
- External drone bridge → Command runtime: loads payload