A comprehensive toolkit for CrowdStrike Falcon sensor deployment in AWS environments. This project provides two complementary tools for automating CrowdStrike sensor integration with containerized workloads.
This toolkit streamlines the complete workflow for deploying CrowdStrike Falcon sensors in AWS ECS environments:
- Image Sync: Automatically synchronizes CrowdStrike sensor images from CrowdStrike's registry to your AWS ECR repositories
- ECS Patcher: Patches existing ECS task definitions to integrate CrowdStrike sensors using the official container pattern
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ CrowdStrike │ │ AWS ECR │ │ ECS Tasks │
│ Registry │───▶│ Repositories │───▶│ (Patched) │
│ │ │ │ │ │
│ • falcon-sensor │ │ • falcon-sensor │ │ • Init Pattern │
│ • falcon-container │ • falcon-container │ • Multi-Arch │
│ • falcon-kac │ │ • falcon-kac │ │ • Auto Config │
└─────────────────┘ └─────────────────┘ └─────────────────┘
image-sync │ ecs-patcher
(Step 1) │ (Step 2)
▼
┌─────────────────┐
│ Sensor Updates │
│ Available │
└─────────────────┘
🔄 Image Sync (image-sync/)
Purpose: Synchronize CrowdStrike sensor images to AWS ECR
Key Features:
- Multi-sensor support: falcon-sensor, falcon-container, falcon-kac
- Multi-region deployment: us-1, us-2, us-gov-1
- OAuth2 authentication with CrowdStrike API
- Auto-region discovery for optimal API performance
- Secure credential storage with AWS Secrets Manager
- Comprehensive logging and error handling
- ECR lifecycle management with configurable retention
Quick Start:
cd image-sync/
./setup-credentials.sh # Interactive setup
cs-image-sync sync-images --dry-run
cs-image-sync sync-images⚙️ ECS Patcher (ecs-patcher/)
Purpose: Patch ECS task definitions with CrowdStrike sensor integration
Key Features:
- Official fcs-cli integration: Uses CrowdStrike's official CLI for reliable and consistent patching
- Smart discovery: Finds and filters ECS task definitions automatically
- Multi-architecture support: X86_64 and ARM64 with automatic configuration
- Configuration-driven: YAML-based configuration with flexible filtering
- Service automation: Automatically updates ECS services after patching
- Validation: Ensures patched definitions meet CrowdStrike requirements
- Backup system: Automatic backup of original task definitions
Quick Start:
cd ecs-patcher/
# Install fcs-cli from CrowdStrike console first
ecs-patcher validate-system # Check requirements
# Edit ecs-patcher.yaml with your configuration
ecs-patcher list-candidates
ecs-patcher patch-tasks --dry-run
ecs-patcher patch-tasks# Set up image synchronization
cd image-sync/
./setup-credentials.sh
# Configure ECS patching
cd ../ecs-patcher/
cp ecs-patcher.yaml.example ecs-patcher.yaml
# Edit ecs-patcher.yaml with your settingscd image-sync/
cs-image-sync sync-imagescd ../ecs-patcher/
# Validate system requirements (including fcs-cli)
ecs-patcher validate-system
ecs-patcher patch-tasks --dry-run # Test first
ecs-patcher patch-tasks # Apply patches# Check patched task definitions
ecs-patcher show-services arn:aws:ecs:region:account:task-definition/family:revision
# Monitor running tasks
aws ecs list-tasks --cluster your-cluster --family your-familyBoth tools support multi-architecture deployments:
- Traditional x86_64 architecture
- Uses
/lib64library paths - Compatible with most existing infrastructure
- Modern ARM64 architecture (AWS Graviton, Apple Silicon)
- Uses
/liblibrary paths - Cost-effective and energy-efficient
Configuration: Specify architecture in your ECS patcher configuration:
crowdstrike:
architecture: "ARM64" # or "X86_64"- Log scrubbing: Prevents credentials from appearing in logs
- AWS Secrets Manager: Secure credential storage with rotation support
- Multi-layer protection: Security at logging, display, and storage levels
- Read-only root filesystem for init containers
- Minimal privileges with targeted capabilities
- Secure volume mounts with proper permissions
# ~/.cs-image-sync.yaml
crowdstrike:
use_secrets_manager: true
secret_name: "crowdstrike-api-credentials-us-1"
cloud: "us-1"
aws:
region: "ca-central-1"
profile: "your-profile"
sync:
sensor_types:
- falcon-sensor
- falcon-container
- falcon-kac
retention_days: 30
max_images_per_type: 2# ecs-patcher.yaml
crowdstrike:
image_uri: "123456789012.dkr.ecr.ca-central-1.amazonaws.com/crowdstrike/falcon-container:latest"
customer_id: "your-customer-id-here"
architecture: "ARM64"
sensor_tags: "Environment:Production,Team:Security"
task_filter:
family_patterns:
- "web-*"
- "api-*"
exclude_patterns:
- "*-test"
- "*-staging"
patching:
backup_definitions: true
update_services: true
validate_after_patch: true- fcs-cli: CrowdStrike's official Falcon Container Security CLI (required for ECS patcher)
- Python 3.8+: Runtime environment
- AWS CLI: For AWS service interactions
Both tools require appropriate AWS permissions:
- ECR: Repository access for image operations
- ECS: Task definition and service management
- Secrets Manager: Credential storage (image-sync)
- Logs: CloudWatch logs access
- API Client ID & Secret with appropriate permissions
- Customer ID for sensor configuration
- fcs-cli: Download from CrowdStrike console for ECS patching
-
Architecture Mismatch
TaskFailedToStart: exec format errorSolution: Ensure image architecture matches task definition architecture
-
Missing Images
CannotPullContainerError: not foundSolution: Run image-sync first to populate ECR repositories
-
Authentication Errors
UnauthorizedOperationSolution: Verify AWS credentials and CrowdStrike API access
# Image sync debugging
cs-image-sync --log-level DEBUG validate
# ECS patcher debugging
ecs-patcher --log-level DEBUG list-candidates# In your CI/CD pipeline
cs-image-sync sync-images --sensor-type falcon-container
ecs-patcher patch-tasks --family-pattern "production-*"# Sync to multiple regions
for region in us-east-1 us-west-2 eu-west-1; do
cs-image-sync -c config-${region}.yaml sync-images
done# Target specific environments
ecs-patcher patch-tasks \
--family-pattern "web-*" \
--cluster-pattern "production-*" \
--exclude-pattern "*-test"- Image Sync: Detailed documentation in
image-sync/README.md - ECS Patcher: Detailed documentation in
ecs-patcher/README.md
- Security: See
image-sync/SECURITY.mdfor security features - Credentials: See
image-sync/CREDENTIAL-SETUP.mdfor setup guide - Examples: Configuration examples in
image-sync/docs/examples/
MIT License - see individual tool directories for details.