Canary tokens are a powerful tool for deception in cybersecurity, designed to alert defenders of potential breaches by acting as enticing bait for attackers. However, manually deploying these tokens across an organization can be tedious, error-prone, and time-intensive.
This repository provides two Python scripts that automate and streamline the deployment of Canary Tokens using CrowdStrike's Real-Time Response (RTR) API:
- Deployment Script: Automatically deploys and verifies the placement of files on target machines using CrowdStrike RTR.
- Upload Script: Uploads files to CrowdStrike’s cloud repository for use in RTR operations.
Manual Canary Token deployment poses several challenges:
- Time-Consuming: Repetitive directory creation and file transfers.
- Error-Prone: Easy to misplace or misconfigure tokens.
- Lack of Scalability: Difficult to deploy widely across large environments.
These scripts address these issues by:
- Uploading and placing tokenized files across endpoints.
- Creating directories with correct permissions (macOS and Windows).
- Renaming tokens to increase believability.
- Verifying that deployments succeeded.
Uploads tokenized files to CrowdStrike’s cloud for use in deployments.
Features:
- Verifies local file presence.
- Uploads to RTR cloud storage.
- Optional metadata tagging for easier file management.
Example Output:
Starting file upload to CrowdStrike cloud...
File 'CanaryToken.docx' successfully uploaded and verified in the cloud repository.
Upload completed!
Deploys Canary Tokens to endpoints using CrowdStrike RTR APIs.
Key Steps:
- Authenticate via 1Password: Securely fetches API credentials.
- Establish RTR Session: Initiates a session with the target endpoint.
- Directory Creation: Ensures directories exist and sets proper permissions.
- File Upload & Rename: Uploads the file, renames it for authenticity.
- Verification: Confirms file placement and accessibility.
- Cleanup: Removes the host from RTR-enabled groups post-deployment.
Example Output:
Device ID: 47692ac900b243e49ff0619e0883ad52
Host OS: Windows
Host successfully added to RTR enabled group
Session ID: 8bf1b7ac-8424-401e-9bb7-6b996e76369a
Ensured directory exists with updated permissions
File CanaryToken.docx successfully uploaded
Successfully renamed CanaryToken.docx to DecoyToken.docx
Deployment completed successfully!
- ✅ Cross-platform support (macOS and Windows)
- 🔐 Secure credential management via 1Password CLI
- 📁 Automated directory and permission setup
- 🛡️ Verification to ensure successful token deployment
- Python 3.7+
- Install dependencies:
pip install -r requirements.txt
- CrowdStrike RTR API credentials with necessary permissions.
- 1Password CLI (
op) installed and authenticated. - Prepared Canary Token files.
This project is licensed under the GPL-3.0 License. See the LICENSE file for more details.