
A Red Team vs. Blue Team Adversarial AI Simulation.
Red Team vs Blue Team: Adversarial ML Combat Simulation
A comprehensive adversarial machine learning security simulation where Red Team attackers battle against Blue Team defenders in a 30-minute AI/ML security warfare scenario.
This system simulates real-world AI/ML security scenarios where:
The battle runs for 30 minutes with 10 rounds, and the final results determine whether AI/ML security systems are robust enough for modern applications.
ai-security-battle/
โโโ database/ # Database layer
โ โโโ schema.sql # Database schema
โ โโโ db_config.py # Database manager & repositories
โ โโโ models.py # Data models
โ โโโ seed_data.py # Initialize with sample data
โ
โโโ blue_team/ # Blue Team (Defenders)
โ โโโ ml_models/ # ML models for defense
โ โโโ defenses/ # Defense mechanisms
โ โโโ monitoring/ # Monitoring systems
โ โโโ api/ # API endpoints
โ โโโ blue_agent.py # Blue Team orchestrator
โ
โโโ red_team/ # Red Team (Attackers)
โ โโโ attacks/ # Attack implementations
โ โโโ reconnaissance/ # Probing and scanning
โ โโโ adaptation/ # Strategy adaptation
โ โโโ red_agent.py # Red Team orchestrator
โ
โโโ battle_engine/ # Battle coordination
โ โโโ orchestrator.py # Main battle controller
โ โโโ round_manager.py # Round timing
โ โโโ scoring_system.py # Score tracking
โ โโโ logger.py # Event logging
โ
โโโ shared/ # Shared utilities
โ โโโ config.py # Configuration
โ โโโ constants.py # Constants & enums
โ โโโ utils.py # Utility functions
โ
โโโ results/ # Battle results & logs
โโโ tests/ # Unit tests
โโโ docker/ # Docker configuration
โโโ requirements.txt # Python dependencies
โโโ setup.py # Package setup
โโโ run_battle.py # Main entry point
โโโ README.md # This file
cd ai-security-battle
# Create virtual environment (recommended)
python -m venv venv
venv\Scripts\activate # On Windows
# Install dependencies
pip install -r requirements.txt
python database/seed_data.py
# Standard battle (30 minutes, 10 rounds)
python run_battle.py
# Quick battle (10 minutes, 5 rounds)
python run_battle.py --quick
# Custom configuration
python run_battle.py --rounds 8 --duration 20
# Initialize database and run
python run_battle.py --init
Edit shared/config.py to customize battle settings, defense parameters, and attack configurations.
pytest tests/ -v
MIT License - Educational and research purposes
Built for AI/ML Security Research & Education ๐