Spaces:
Sleeping
Sleeping
metadata
title: Firewall Meta Ai
emoji: ๐ก๏ธ
colorFrom: red
colorTo: blue
sdk: docker
app_port: 7860
๐ก๏ธ AI Firewall OpenEnv
A production-grade AI-driven adaptive firewall simulation for automated threat detection in encrypted network traffic.
๐ Problem Description
Encrypted traffic poses a challenge for traditional firewalls. This project uses AI agents to make real-time decisions (ALLOW, BLOCK, etc.) based on session metadata alone, balancing security with network performance.
๐ฎ Tasks
- ๐ข Easy (Perimeter Defense): Clear attack patterns for initial testing.
- ๐ก Medium (Mixed Threat Landscape): Multi-stage attacks with ambiguous traffic signals.
- ๐ด Hard (Advanced Persistent Threat): Stealthy, low-signal APT scenarios.
๐ง Environment Specs
- Observation Space: Box(22,) - Normalized features including JA3 fingerprints, entropy, geo-distance, and session history.
- Action Space: Discrete(6)
- 0: ALLOW
- 1: BLOCK
- 2: INSPECT
- 3: SANDBOX
- 4: RATE_LIMIT
- 5: QUARANTINE
๐ Reward Logic
Rewards are multi-objective:
- Correct Block: +1.0
- False Positive: -1.2 (Strong penalty)
- Missed Attack: -2.0 (Critical failure)
- Correct Allow: +0.25 (Efficiency bonus)
- Inspect: Dynamic cost/benefit based on revealed status.
๐ Setup & Usage
Prerequisites
- Docker installed
- Python 3.11+
- API Keys for OpenAI/OpenRouter (optional for LLM agent)
Local Execution
- Configure Keys:
cp .env.example .envand add your keys. - Run Inference:
python inference.py --task easy - Validate:
bash scripts/validate-submission.sh <ping_url>
Docker Deployment
docker build -t ai-firewall .
docker run -p 7860:7860 ai-firewall
๐๏ธ Project Structure
env/: Core firewall environment (reset, step, state).grader/: Scoring and grading logic.utils/: Traffic simulation and reward engines.inference.py: LLM-based inference script.openenv.yaml: Metadata for OpenEnv.