HTTP/HTTPS listeners are the primary method for external agent communication with the Havoc teamserver. They provide a flexible, customizable communication channel that can be tailored to blend in with legitimate network traffic.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.
Basic Configuration
HTTP listeners are defined in theListeners block of your profile:
Configuration Options
Required Parameters
Unique identifier for the listener. This name is displayed in the Havoc client and used to reference the listener.
List of callback hosts that agents will connect to. Multiple hosts can be specified for redundancy and rotation.
The network interface address where the listener binds. Use
"0.0.0.0" to bind to all interfaces, or specify a specific IP address.The port on which the teamserver listens for incoming agent connections.
Network Configuration
The port that agents use to connect. This is useful when operating behind a redirector or port forwarding setup where the external port differs from the bind port.
Strategy for rotating through multiple callback hosts. Supported values:
"round-robin": Cycle through hosts sequentially"random": Randomly select from available hosts
Security Options
Enable HTTPS/TLS encryption for the listener. When
true, the teamserver automatically generates self-signed certificates or uses provided certificates.Custom TLS certificate configuration. If not specified with
Secure = true, self-signed certificates are automatically generated.Traffic Shaping
Custom User-Agent string that agents must use for callbacks. The listener validates this header and rejects requests with mismatched User-Agent values.
List of valid URI paths for agent callbacks. Requests to other paths are rejected with a fake 404 page.
Custom HTTP headers that agents must include in requests. The listener validates these headers (case-insensitive) and rejects non-matching requests.
Headers
Connection and Accept-Encoding are automatically ignored during validation as they may vary by HTTP client implementation.HTTP method for agent callbacks. Typically
POST for C2 traffic.Response Configuration
Configure custom response headers to blend in with legitimate services.
Proxy Support
Configure agents to use a proxy for callbacks. Useful when agents are deployed in environments with restricted egress.
Operational Security
Automatically terminate agent operations after the specified date and time. Format:
YYYY-MM-DD HH:MM:SSRestrict agent callbacks to specific hours. Format:
HH:MM-HH:MM (24-hour format)Configuration Examples
Basic HTTP Listener
HTTPS Listener with Custom Certificates
Microsoft Teams Profile Mimicry
This example mimics Microsoft Teams traffic for evasion:Listener with Kill Date and Working Hours
Redirector Setup
When using a redirector (e.g., Apache mod_rewrite, Nginx reverse proxy), configure different bind and connection ports:Request Validation
The HTTP/HTTPS listener implements strict request validation to prevent unauthorized access:- User-Agent Validation: If
UserAgentis set, requests with mismatched User-Agent headers are rejected - URI Validation: If
Urisare specified, requests to unlisted paths receive a fake 404 response - Header Validation: All headers in the
Headerslist must match (case-insensitive value comparison) - Protocol Validation: The request must contain valid Havoc protocol data
Behind Redirectors
When operating behind a redirector or load balancer, configure the Demon block in your profile:X-Forwarded-For header for identifying the true client IP address.
Multiple Listeners
You can define multiple HTTP/HTTPS listeners in a single profile:Troubleshooting
Listener Won’t Start
- Verify the port is not already in use:
netstat -tuln | grep <port> - Check file permissions for custom certificates
- Ensure
HostBindIP address exists on the system - Review teamserver logs for detailed error messages
Agents Not Connecting
- Verify firewall rules allow traffic on
PortBind - Check that
Hostsresolve to the correct IP address - Ensure agent profile matches listener configuration (headers, URIs, User-Agent)
- Test connectivity:
curl -v http(s)://<host>:<port>/<uri>
Certificate Errors
- Verify certificate and key file paths are correct and readable
- Ensure certificate matches the hostname in
Hosts - Check certificate expiration date
- For auto-generated certificates, verify the listener path is writable
