A clean, interactive web application that allows users to analyze network security logs and compare responses from different AI models (Google's Gemini and OpenAI's GPT) side by side. This project helps security professionals quickly understand network security events and get expert recommendations.
- 🤖 Real-time interaction with multiple AI models
- 🔄 Easy switching between Gemini and OpenAI models
- 🛡️ Network security log analysis with detailed explanations
- 🔍 Detection of common attack patterns (SYN floods, port scans, brute force, etc.)
- 📊 Proper formatting of structured data (tables, lists)
- 💾 Save chat history functionality
- 📱 Responsive design for mobile and desktop
- 🎨 Clean, modern user interface
[Link to your deployed app will go here]
- Python 3.12.9 or higher
- Google AI API key
- OpenAI API key
- Clone the repository:
git clone https://github.com/yourusername/genai-network-analyzer.git
cd genai-network-analyzer
- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: .\venv\Scripts\activate
- Install required packages:
pip install -r requirements.txt
- Set up environment variables:
- Copy
.env.template
to.env
- Add your API keys:
GOOGLE_API_KEY=your_gemini_api_key OPENAI_API_KEY=your_openai_api_key
- Copy
- Start the application:
python app.py
- Open your browser and navigate to:
http://localhost:8000
The application is designed to analyze various types of network security logs, including:
- SYN Flood Attacks: Detects TCP SYN packet floods that can cause denial of service
- Port Scanning: Identifies reconnaissance activities scanning for open ports
- Brute Force Attacks: Detects password guessing attempts on services like SSH
- Data Exfiltration: Identifies unauthorized data transfers via DNS and other protocols
genai-network-analyzer/
├── app.py # Main FastAPI application
├── static/
│ ├── style.css # CSS styles
│ └── main.js # JavaScript functionality
├── templates/
│ └── index.html # HTML template
├── logging_config.py # Logging configuration
├── .env # Environment variables (not in repo)
├── .env.template # Template for environment variables
├── requirements.txt # Python dependencies
└── README.md # Project documentation
GET /
: Main chat interfacePOST /chat/gemini
: Endpoint for Gemini model interactionsPOST /chat/openai
: Endpoint for OpenAI model interactionsGET /models/gemini
: Get available Gemini modelsGET /models/openai
: Get available OpenAI modelsGET /examples
: Get example network security logs
This application can be deployed to various platforms:
- Render: Using the included
render.yaml
configuration - Heroku: With appropriate Procfile setup
- Any cloud platform that supports Python applications
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Google AI for Gemini Pro API
- OpenAI for GPT API
- FastAPI framework
- Community contributors
Developed by Lindsay Hiebert
- GitHub: lhiebert01
- LinkedIn: lindsayhiebert