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
Thesleep command controls the Demon agent’s callback behavior by setting the delay between checkins and applying randomized jitter to avoid predictable network patterns.
When sleep is active and no jobs are running, the agent applies sleep obfuscation techniques (if enabled in the configuration) to evade memory analysis.
Syntax
Parameters
Sleep interval in seconds between agent callbacks to the teamserver
- Minimum: 0 (interactive mode - immediate callbacks)
- Recommended: 60-300 for operational security
- Higher values reduce network visibility but slow command execution
Randomization percentage applied to the sleep delay
- Range: 0-100
- Adds randomness to callback timing to avoid pattern detection
- Example: delay=60, jitter=20 results in callbacks every 48-72 seconds
Return Values
Confirmation that sleep settings have been updated
The actual sleep delay that will be applied (delay ± jitter calculation)
Sleep Obfuscation
When the agent sleeps and no job threads are running, Demon can apply sleep masking techniques to obfuscate its memory:- WaitForSingleObjectEx
- FOLIAGE
- Ekko
Technique ID: 0Uses the standard Windows API
WaitForSingleObjectEx with no memory obfuscation. This is the most stable option but provides no evasion against memory scanning.- OPSEC: Low evasion capability
- Stability: Highest
- Use Case: Development and testing environments
Examples
Set 60 Second Sleep with 20% Jitter
Interactive Mode
- Running SOCKS proxies
- Executing long-running jobs
- Debugging or troubleshooting
Stealth Configuration
Standard Operational Sleep
OPSEC Considerations
- Job Threads: Commands that spawn threads (BOFs, SOCKS proxies, port forwards) will prevent sleep obfuscation
- Pattern Analysis: Always use jitter to avoid predictable callback patterns
- Network Monitoring: Lower sleep values generate more network traffic and increase detection risk
- Return Address Spoofing: x64 Demons implement return address spoofing during sleep to hide the real return address on the stack
Configuration
Sleep obfuscation technique can be configured in the teamserver profile:config command:
Use Cases
- Reduce Detection: Longer sleep intervals with jitter reduce network visibility
- Interactive Sessions: Set to 0 for real-time command execution
- SOCKS Proxy Operations: Use
sleep 0to maintain responsive proxy performance - Long-Term Access: High sleep values (300-600s) for persistent, low-visibility access
Notes
- Sleep settings persist until changed or the agent exits
- Changes take effect after the current sleep cycle completes
- Sleep jitter is calculated randomly for each callback
- The
checkincommand can be used to verify current sleep configuration
