Quick Diagnostics#
Start with these before diving into specific sections:
| |
Server Won’t Start#
Port Already in Use#
| |
Find and stop whatever is using port 8443:
| |
Data Directory Not Writable#
| |
Fix ownership:
| |
TLS Certificate Error#
| |
Verify the cert and key files exist, are readable, and are valid PEM:
| |
Config File Syntax Error#
| |
Validate the config file:
| |
Missing Dependencies#
Ensure all required wheels are installed:
| |
Agent Not Connecting#
Work through these checks in order.
1. Verify the Listener is Running#
| |
The listener should show status running. If it shows error or is absent, check:
| |
2. Verify the Listener Port is Reachable#
From a machine on the same network as the agent (or the target network):
| |
If the port is not reachable:
- Check firewall rules on the server and any redirectors
- Verify the listener is bound to
0.0.0.0(not just127.0.0.1) - Verify the redirector is forwarding correctly
3. Verify the Agent Build Config#
The agent’s embedded config includes the callback address and the engagement’s cryptographic parameters. Verify the build was created for the correct listener:
| |
The callbacks field should point to the correct address:port.
4. Correct Engagement Activated#
Ensure an engagement is activated and the agent was built for it:
| |
5. Crypto Mismatch#
If the agent connects but registration fails, look for errors in the server log:
| |
Common causes:
- Clock drift: Server and agent clocks disagree by more than
clock_drift_tolerance(default 300s). Synchronize clocks with NTP. - Wrong engagement: The agent was built for a different engagement. Rebuild the agent for the current engagement.
- Corrupted build: The agent binary was modified after stamping. Rebuild.
6. Transport Plugin Not Loaded#
If you get connection refused on a listener port but the listener shows as running, the transport plugin may have failed to load:
| |
If the transport plugin is missing:
| |
Plugin Not Loading#
Check Plugin Discovery#
| |
If a plugin is missing from the discovery output:
| |
Plugin Wheel Install Failure#
If a wheel from the plugin inbox fails to install:
| |
Common causes:
- Python version mismatch (wheel requires Python 3.11, server runs 3.10)
- Missing build dependencies for C extensions
- Wheel is corrupt or truncated
Plugin Crashes on Load#
| |
Enable debug logging and restart the server to see the full traceback:
| |
Engagement Won’t Activate#
Wrong Passphrase#
| |
The passphrase does not match the stored salt. Common causes:
- Typo in the passphrase (copy-paste from password manager is safer than manual entry)
- Wrong passphrase (check if multiple passphrases exist in the vault)
Engagement Database Missing#
| |
The database file was deleted or the data directory was moved. Restore from backup:
| |
Performance Issues#
Slow Task Processing#
Symptoms: tasks sit in sent state for longer than the beacon interval.
Causes and fixes:
- Agent not checking in: See Agent Not Connecting
- High database load: Check disk I/O:
1 2iostat -x 1 10 # Look for high %util on the data directory device - Background service overhead: Reduce sweep frequency:
1 2bg_dead_agent_interval: 120 bg_stale_task_interval: 600
Slow API Responses#
| |
If responses are consistently slow (>1s), check disk I/O and WAL file size:
| |
Database Growth#
Enable task archival to move completed tasks out of the active table:
| |
Or trigger manually:
| |
Authentication Issues#
Rate Limited#
| |
After 5 failed login attempts in 300 seconds, the username is rate-limited. Wait 300 seconds or restart the server (the rate limit state is in-memory).
An admin can reset a user’s password without waiting:
| |
Token Expired#
| |
Access tokens expire after 3600 seconds (1 hour). Use the refresh token to get a new pair:
| |
If the refresh token is also expired (>24 hours), log in again.
Tokens Lost After Restart#
Tokens are stored in memory. A server restart invalidates all tokens. All operators must log in again after a restart.
Database Issues#
SQLite Lock Error#
| |
This is unusual with WAL mode enabled. Causes:
- Another process has the database open with a write lock
- The
-walor-shmfiles are corrupted
| |
Schema Migration Failed#
If an engagement database schema migration fails during import or activation:
| |
Agent Shows as Dormant or Dead#
Agent status transitions are based on missed check-ins relative to beacon interval:
- Dormant: Missed 3x beacon interval
- Dead: Missed 10x beacon interval
Check:
- Is the agent process still running?
- Can the agent reach the listener (network path)?
- Is the listener still running?
Build Fails#
- Check
builds listto verify the agent package is loaded - Check available templates for your package
- Ensure
--kill-dateis a future date - Review teamserver logs for detailed error messages
File Transfer Hash Mismatch#
If hash_verified is false:
- The file may have been modified during transfer
- Retry the transfer
Log Redaction Hiding Debug Information#
Temporarily disable:
| |
Enabling Debug Logging#
For detailed diagnostics:
| |
Debug output includes all HTTP requests and responses, plugin discovery steps, background service execution, and pipeline message processing details.