How bishopfox/sliver works
Sliver is a cross-platform adversary-emulation framework for authorized security testing. An operator uses the client console to generate payloads, establish C2, and issue tasks to sessions or beacons; implants execute those tasks and return results through the server. The graph also preserves documented transport and payload capabilities and shows the RPC, implant-handler, and generation layers. Several subsystems are represented by their exact tree directories because their implementation files were not sampled; those links are marked unverified where appropriate.
Main entry points: rpc-service.go RPC service · server.go Command registry · transports C2 transports · handlers.go Task handlers
Components 24
Operator client
- Client CLI
client/cli/cli.go - Interactive console
client/console/console.go - Command registry
client/command/server.go - Payload commands
client/command/generate - Session and task commands
client/command/tasks - Opfor script manager
client/command/opfor/manager.go - MCP tool server
client/mcp/server.go
Server and control plane
- Server configuration
server/configs/server.go - RPC service
server/rpc/rpc-service.go - Task RPC handlers
server/rpc/rpc-tasks.go - Session handlers
server/handlers/sessions.go - C2 listeners
server/c2 - Binary generation
server/generate/binaries.go - Session state
server/core/clients.go
Implant runtime
- Implant entry point
implant/sliver/main.go - C2 transports
implant/sliver/transports - Task handlers
implant/sliver/handlers/handlers.go - SOCKS tunnel handler
implant/sliver/handlers/tunnel_handlers/socks_handler.go
Payload capabilities
- Post-exploitation
implant/sliver/handlers - Payload modes
client/command/generate
RPC protocol
- Protobuf contracts
protobuf/sliverpb/sliver.proto - Client RPC contracts
protobuf/clientpb/client.proto
Other components
- Operator
- C2 network
Connections 27
- Operator → Client CLI: starts
- Client CLI → Interactive console: opens
- Interactive console → Command registry: loads commands
client/command/server.go - Command registry → Payload commands: registers
client/command/server.go - Command registry → Session and task commands: registers
client/command/server.go - Command registry → Opfor script manager: registers
client/command/server.go - Command registry → MCP tool server: registers
client/command/server.go - Payload commands → RPC service: requests generation
- Session and task commands → RPC service: sends tasks
- MCP tool server → RPC service: calls RPC
client/mcp/server.go - RPC service → Task RPC handlers: dispatches tasks
- Task RPC handlers → Session state: reads sessions
server/rpc/rpc-tasks.go - Task RPC handlers → Session handlers: routes task work
- RPC service → C2 listeners: coordinates C2
- Server configuration → C2 listeners: configures listeners
- Payload commands → Binary generation: requests builds
- Binary generation → Implant entry point: generates implant
server/generate/binaries.go - Implant entry point → C2 transports: starts runtime
implant/sliver/main.go - C2 transports → C2 listeners: connects over C2
- C2 listeners → C2 network: serves traffic
- C2 transports → Task handlers: dispatches messages
implant/sliver/handlers/handlers.go - Task handlers → Protobuf contracts: decodes tasks
- Task handlers → Post-exploitation: executes capabilities
implant/sliver/handlers/handlers.go - Task handlers → SOCKS tunnel handler: uses tunnel handler
implant/sliver/handlers/handlers.go - C2 transports → Protobuf contracts: transfers messages
- RPC service → Client RPC contracts: exposes RPC types
- Binary generation → Payload modes: supports payload forms
README.md