9.1 KiB
+++ title = "Getting started" chapter = false weight = 10 pre = "1. " +++
Getting Started with Cazalla
This guide will help you install, configure, and deploy your first Cazalla agent.
📋 Prerequisites
- Mythic Server (v3.x or later) installed and running
- Docker installed and running (for building the agent)
- Access to a Windows target for testing
- Basic understanding of Mythic C2 Framework
🚀 Installation
Step 1: Install Cazalla on Mythic
Option A: Install from GitHub (if available)
cd ~/Mythic
./mythic-cli install github https://github.com/<your-org>/Cazalla
Option B: Install from Local Directory
cd ~/Mythic
./mythic-cli install folder /path/to/Cazalla
After installation, Mythic will build the Cazalla container automatically.
Step 2: Verify Installation
Check that Cazalla is installed:
cd ~/Mythic
./mythic-cli list
You should see cazalla in the list of installed payload types.
Step 3: Build Your First Payload
-
Navigate to Mythic UI
- Open your browser and go to your Mythic server URL (typically
https://localhost:17443)
- Open your browser and go to your Mythic server URL (typically
-
Create a New Payload
- Click on Payloads in the left sidebar
- Click Create Payload button
- Select Cazalla as the payload type
-
Configure Build Parameters
- C2 Profile: Select your configured C2 profile (HTTP, HTTPS, etc.)
- Callback Host: Your Mythic server's IP address or domain
- Callback Port: Port for agent communication (default: 443)
- Sleep: Initial beacon interval in seconds (default: 10)
- Jitter: Random delay percentage (0-100, recommended: 10-30)
- User Agent: HTTP User-Agent string for HTTP(S) profiles
-
Optional: Enable Encryption
- In the AESPSK parameter section:
- Set
crypto_typetoaes256_hmac - Mythic will automatically generate an encryption key
- Set
- This provides end-to-end encryption beyond HTTPS
- In the AESPSK parameter section:
-
Build the Payload
- Click the Build button
- Wait for the build to complete (this may take a few minutes)
- Once complete, download the generated
.exefile
🎯 Deploying the Agent
Step 1: Transfer to Target
Transfer the compiled .exe file to your Windows target using any method:
- USB drive
- Network share
- Email attachment
- Web download
- Etc.
Step 2: Execute on Target
On the Windows target, execute the agent:
C:\path\to\cazalla.exe
The agent will start beaconing to your Mythic server immediately.
Step 3: Verify Connection
-
Check Mythic UI
- Navigate to Callbacks in the left sidebar
- You should see a new callback appear with:
- Hostname: The target machine's hostname
- User: The username running the agent
- PID: Process ID of the agent
- Status: Active (green indicator)
-
Check Agent Output (if running interactively)
- The agent will output connection status
- Look for successful connection messages
✅ First Commands
Once your agent is connected, try these basic commands:
1. Check Current Directory
pwd
This will show the current working directory of the agent.
2. List Files
ls
Or list a specific directory:
ls C:\Users
3. Get System Information
ps
This lists all running processes and updates the Process Browser.
whoami
This shows the current security context (username and domain).
4. Explore the File System
cd C:\Users
ls
cat desktop.ini
🔧 Configuration Options
Build Parameters
When building a payload, you can configure:
| Parameter | Description | Default | Notes |
|---|---|---|---|
| Callback Host | Mythic server address | Required | IP or domain |
| Callback Port | C2 port | 443 | Must match C2 profile |
| Sleep | Beacon interval (seconds) | 10 | Lower = more responsive, higher = more stealthy |
| Jitter | Random delay (%) | 0 | 0-100, recommended 10-30 |
| User Agent | HTTP User-Agent | Varies | For HTTP(S) profiles |
| AESPSK | Encryption settings | Disabled | Optional end-to-end encryption |
Dynamic Configuration
After deployment, you can change certain settings:
Adjust Sleep Interval
sleep {"seconds":30,"jitter":10}
This changes the beacon interval to 30 seconds with 10% jitter.
View Current Settings
The agent tracks and reports:
- Current working directory (via
pwdor in UI context tabs) - Active token impersonation (via
whoamior in UI context tabs) - Sleep interval (shown in callback details)
🎨 Using the Mythic UI
Process Browser
-
Access Process Browser
- Click Process Browser in the left sidebar
- Or use the process icon in the callback view
-
View Processes
- All processes from all callbacks are displayed
- Use
pscommand to refresh the process list - Click on processes to view details
-
Interact with Processes
- Kill: Right-click → Kill Process
- Steal Token: Right-click → Steal Token
- List Tokens: Right-click → List Tokens
File Browser
-
Access File Browser
- Click File Browser in the left sidebar
- Or use the file icon in the callback view
-
Navigate Files
- Browse directories visually
- Click on files to download
- Right-click to upload files
-
File Operations
- Download: Click file → Download
- Upload: Right-click directory → Upload
- Delete: Right-click file → Delete (uses
rmcommand)
Context Tracking
The Mythic UI automatically displays:
- Current Directory: Shows in callback context tabs
- Impersonation Context: Shows active token impersonation
- Process Context: Shows active process information
🔒 Security Considerations
OPSEC Checking
Cazalla includes built-in OPSEC checking for high-risk operations:
- Pre-execution blocking: Commands like
steal_token,shell,keylog_startrequire approval - Post-execution warnings: Artifacts are automatically tracked
- Bypass roles: Configured operators can bypass warnings
When executing a risky command:
- You'll see an OPSEC warning popup
- Review the warning message
- Approve or cancel the operation
- Another operator may need to approve (if configured)
See OPSEC Guide for detailed information.
Best Practices
-
Start with High Sleep Values
- Use 30-60 seconds initially
- Reduce only when needed for interactive operations
-
Use Jitter
- Add 10-30% jitter to avoid predictable patterns
- Helps evade timing-based detection
-
Monitor Artifacts
- Check the Artifacts tab regularly
- Review what the agent is creating/accessing
-
Use Built-in Commands
- Prefer Cazalla commands (
ps,ls,cat) overshellwhen possible - Built-in commands have better OPSEC
- Prefer Cazalla commands (
-
Review OPSEC Warnings
- Always read OPSEC popup messages
- Understand risks before approving
🐛 Troubleshooting
Agent Not Connecting
-
Check Network Connectivity
- Verify target can reach Mythic server
- Test:
ping <mythic_server_ip> - Test:
curl https://<mythic_server>:443
-
Check C2 Profile
- Verify C2 profile is active
- Check that port matches callback configuration
- Review C2 profile logs
-
Check Agent Execution
- Verify agent is running:
tasklist | findstr cazalla - Check for error messages in console
- Review Windows Event Logs
- Verify agent is running:
-
Check Mythic Logs
sudo docker logs mythic_server sudo docker logs cazalla_translator
Commands Not Working
-
Verify Agent is Active
- Check callback status (should be green)
- Verify last check-in time
-
Check Command Syntax
- Review command documentation in Commands Reference
- Verify parameter format (JSON vs string)
-
Review Task Output
- Check task output for error messages
- Look for specific error codes
-
Check Permissions
- Some commands require specific permissions
- Use
whoamito verify current context
Build Issues
-
Check Docker
sudo docker ps sudo docker logs cazalla_translator -
Rebuild Container
cd ~/Mythic sudo ./mythic-cli build cazalla -
Check Build Parameters
- Verify all required parameters are set
- Check parameter format (JSON vs string)
For more troubleshooting help, see Troubleshooting Guide.
📚 Next Steps
Now that you have a working agent:
- Explore Commands: See Commands Reference for all available commands
- Learn Features: Read Features Overview for advanced capabilities
- Understand OPSEC: Review OPSEC Guide for security best practices
- Try Examples: Check Usage Examples for practical scenarios
🔗 Additional Resources
Ready to use Cazalla? Start with the Commands Reference to learn all available commands!