SMB listeners enable peer-to-peer communication between Havoc agents using Windows named pipes. They are essential for lateral movement scenarios and establishing parent-child agent relationships within internal networks.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
Unlike HTTP/HTTPS listeners that communicate directly with the teamserver, SMB listeners facilitate communication between agents. A parent agent with teamserver connectivity can relay commands to child agents connected via SMB, allowing you to:- Pivot through compromised systems
- Communicate with agents that cannot directly reach the teamserver
- Operate in environments with strict egress filtering
- Establish covert channels within internal networks
Basic Configuration
SMB listeners are defined in theListeners block of your profile:
Configuration Options
Unique identifier for the SMB listener. This name is displayed in the Havoc client and used to reference the listener.
The name of the Windows named pipe used for communication. Choose names that blend in with legitimate Windows services.
Common Windows named pipes include
ntsvcs, msagent_*, MSSE-*, and status_*. Use similar naming conventions for operational security.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 SMB Listener
Multiple SMB Listeners
You can configure multiple SMB listeners with different pipe names for operational flexibility:SMB with Operational Security Controls
Combined HTTP and SMB Setup
Typical operational setup with both HTTP and SMB listeners:How SMB Listeners Work
Parent-Child Relationship
When you deploy an agent with SMB connectivity:- Parent Agent: An existing agent with HTTP/HTTPS teamserver connectivity
- Child Agent: A newly deployed agent configured to use the SMB listener
- Named Pipe: The parent creates a named pipe that the child connects to
- Relay: The parent relays commands from the teamserver to the child and returns results
Connection Flow
- Parent agent receives instructions to start SMB listener
- Parent creates named pipe with the configured
PipeName - Child agent (deployed via lateral movement) connects to parent’s named pipe
- Bidirectional communication established through the pipe
- Parent relays all teamserver communications to/from child
Use Cases
Lateral Movement
SMB listeners are ideal for lateral movement scenarios:Egress Filtering Bypass
When internal hosts cannot reach the internet:- Deploy initial agent on an edge system with internet access (parent)
- Use SMB listener for communication with internal systems (children)
- Children communicate through parent without direct internet access
Segmented Network Pivoting
Navigate network segmentation:Operational Workflow
1. Configure SMB Listener in Profile
Add SMB listener to your.yaotl profile:
2. Deploy Parent Agent
Deploy an initial agent with HTTP/HTTPS connectivity to the teamserver. This agent will act as the parent.3. Start SMB Server on Parent
From the Havoc client, instruct the parent agent to start an SMB server:4. Deploy Child Agent
Generate and deploy a child payload configured to connect via SMB:- Select the SMB listener when generating the payload
- Specify the parent agent’s hostname/IP
- Deploy using your preferred lateral movement technique
5. Child Connects
The child agent connects to the parent’s named pipe and registers with the teamserver through the parent relay.Security Considerations
Named Pipe Selection
Legitimate Windows pipe name patterns:ntsvcsmsagent_*MSSE-*-serverstatus_*PSHost.*Winsock2\CatalogChangeListener-*
Network Detection
SMB listener traffic:- Travels over SMB protocol (TCP 445 or 139)
- Appears as named pipe communication
- May trigger alerts if EDR monitors pipe creation
- Consider frequency and volume of traffic
Access Controls
Named pipes inherit security contexts:- Parent agent’s user context determines pipe permissions
- Child must have appropriate access to connect
- Consider domain trust relationships
- Elevated privileges may be required
Troubleshooting
Child Agent Won’t Connect
Check SMB connectivity:- SMB ports (445, 139) blocked by firewall
- Parent agent not running or SMB server not started
- Incorrect pipe name configuration
- Insufficient permissions to access named pipe
- SMB signing requirements in domain environment
Connection Drops
- Parent agent terminated or lost teamserver connection
- Network instability between parent and child
- Antivirus/EDR detected and killed process
- Session timeout due to inactivity
Performance Issues
- Multiple hops create latency (teamserver → parent → child)
- Large file transfers slow over named pipes
- Consider using HTTP listener if direct connectivity is possible
- Limit number of children per parent to avoid bottlenecks
Best Practices
- Use Descriptive Names: Choose listener names that describe their purpose (e.g., “DMZ Pivot”, “Finance Subnet”)
- Blend In: Select pipe names that mimic legitimate Windows services
- Limit Depth: Avoid deep parent-child chains (e.g., parent → child → grandchild → great-grandchild)
- Monitor Health: Regularly check parent agent connectivity to prevent orphaned children
- Document Relationships: Track which agents are parents/children for operational awareness
- Combine with HTTP: Use HTTP for initial access and SMB for lateral expansion
- Test Connectivity: Verify SMB port accessibility before deploying child agents
-
Set Time Limits: Use
KillDateandWorkingHoursto automatically manage operational windows
