Documentation Index
Fetch the complete documentation index at: https://mintlify.com/HavocFramework/Havoc/llms.txt
Use this file to discover all available pages before exploring further.
Overview
TheHavocService class provides the connection layer between your custom agent and the Havoc Teamserver. It handles authentication, websocket communication, and agent registration through the Service API endpoint.
Initialization
The websocket URL of the Teamserver service endpoint. Must match the
Endpoint configured in the Teamserver profile’s Service directive.Format: ws://<host>:<port>/<service-endpoint>Authentication password for the service endpoint. Must match the
Password configured in the Teamserver profile’s Service directive.Basic Usage
Methods
register_agent()
Registers a custom agent type with the Teamserver, making it available in the Havoc client interface.An instance of your custom agent class that extends
AgentType.Teamserver Configuration
Before connecting your Python service, configure the Teamserver profile with aService directive:
Connection Flow
- Configure Service: Add
Servicedirective to Teamserver profile - Start Teamserver: Launch with the configured profile
- Initialize HavocService: Create service instance with matching endpoint and password
- Register Agent: Call
register_agent()with your custom agent implementation - Handle Communication: Agent automatically routes commands to/from Teamserver
Security Notes
- The service endpoint requires authentication via the configured password
- Communication uses WebSocket protocol (ws:// or wss://)
- All agent communications should be encrypted using your agent’s encryption scheme
- Store credentials securely and avoid hardcoding passwords in production
Related Resources
AgentType
Learn how to create custom agent implementations
Commands
Define custom commands for your agent
