Note: This project is currently under active development and not yet ready for production use.
This is a real-time DDoS attack visualization project that monitors and displays cyber-attacks on a global map. The backend collects data on malicious IP activity from various sources, uses a machine learning model to classify attacks, and provides this data to a frontend globe for visualization.
- Real-time Monitoring: Collects and processes data on attack spikes and malicious IPs from third-party APIs.
- Intelligent Classification: Uses a machine learning model to assign a confidence score to potential DDoS attacks.
- Interactive Globe Visualization: Displays the geographic location of attacks on a dynamic, 3D globe.
- API-driven Backend: A high-performance FastAPI backend serves the attack data to the frontend.
Backend:
- Framework: FastAPI
- Data Sources: Cloudflare Radar, AbuseIPDB
- Machine Learning: Scikit-learn
- Dependencies: Python, Pandas, Requests, Pydantic
Frontend:
- Visualization: Three.js
- Core: HTML, CSS, JavaScript
Containerization:
- Docker
- Docker Compose
Before you begin, ensure you have the following installed:
- Git
- Docker
- Docker Compose
You will also need to obtain API keys for the following services:
- AbuseIPDB: https://www.abuseipdb.com/
- Cloudflare Radar: https://radar.cloudflare.com/
- Clone the repository:
git clone [https://github.com/your-username/your-repo-name.git](https://github.com/your-username/your-repo-name.git) cd ddos-attack-map - Configure environment variables:
Create a
.envfile in the root directory and add your API keys.ABUSEIPDB_API_KEY=your_abuseipdb_key_here CLOUDFLARE_API_TOKEN=your_cloudflare_token_here - Build and run with Docker Compose:
This command will build the Docker image for the backend and start the container.
Your FastAPI backend will be available at
docker-compose up --build
http://localhost:8000.
ddos-attack-map/
├── .dockerignore # Docker ignore file
├── .env # Environment variables
├── docker-compose.yml # Docker compose configuration
├── requirements.txt # Python dependencies
├── README.md # Project documentation
│
├── backend/ # Backend service directory
│ ├── app/ # FastAPI application
│ │ └── ... # Backend source files
│ └── Dockerfile # Backend container configuration
│
└── frontend/ # Frontend service directory
├── index.html # Main HTML file
└── ... # Frontend assets and source files
- Implement data fetching logic from AbuseIPDB and Cloudflare Radar.
- Build the machine learning model to classify attack confidence.
- Develop the frontend visualization to display the data on the globe.
I have ignored the warning of InconsistentVersionWarning for scikit-learn in the requirements.txt file for now, as it does not affect the functionality of the project. This could taken as a good first issue for someone looking to contribute(after the project is complete).