A powerful AI-powered chatbot that leverages Neo4j's Cyber Knowledge Graph (CKG) and Groq API to provide intelligent cybersecurity threat intelligence through natural language queries.
- Natural Language to Cypher Query: Convert plain English questions into optimized Neo4j Cypher queries
- Real-time Threat Intelligence: Query comprehensive cybersecurity database including CVEs, CWEs, CVSS scores, and more
- Interactive Web Interface: User-friendly Streamlit-based interface
- Fast Response: Powered by Groq's high-performance LLM for quick query generation
- Python 3.8
- Neo4j Desktop (version 1.6.1 or higher)
- Groq API Key
- Download and install Neo4j Desktop from https://neo4j.com/download/
- Create a new project (e.g., "Graph DBMS")
- Set up a new DBMS with version 4.4.9
- Start the database server
- In your Neo4j Desktop project, click on the database
- Navigate to the "Files" section
- Import the
neo4j.dumpfile provided in this repository - Wait for the import to complete
- Ensure the database status shows "Active"
# Create virtual environment
python -m venv venv
# Activate virtual environment
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activatepip install -r requirements.txt💡 Tip: Make sure you're in the virtual environment before installing dependencies.
- Copy the
.envfile and update it with your credentials:
GROQ_API_KEY="your_actual_groq_api_key"
GOOGLE_API_KEY="your_google_api_key"
NEO4J_URI=bolt://localhost:7687
NEO4J_USER=neo4j
NEO4J_PASSWORD=your_neo4j_passwordstreamlit run final.py- Open your browser and navigate to
http://localhost:8501 - Enter your Groq API Key in the provided field
- Type your cybersecurity query in natural language (e.g., "Give me the description of the cve with id 39")
- Click "Generate Cypher Query & Fetch Data"
- View the generated Cypher query and the results
The Cyber Knowledge Graph (CKG) contains the following node types:
- CVE: Common Vulnerabilities and Exposures
- CWE: Common Weakness Enumeration
- CVSS_2/3: Common Vulnerability Scoring System
- CPE: Common Platform Enumeration
- Reference_Data: External references and sources
- "List all threats with high severity"
- "Get the description of CVE with ID 39"
- "Find all CVEs related to buffer overflow"
- "Show vulnerabilities published in 2023"
- "Get CVSS scores for critical vulnerabilities"
- URI:
bolt://localhost:7687 - Default Username:
neo4j - Password: Set during Neo4j setup
- Get your API key from https://groq.com/
- Supports Llama 3.1 8B Instant model for fast responses
-
Neo4j Connection Failed
- Ensure Neo4j Desktop is running
- Check if the database is active
- Verify connection credentials
-
Groq API Errors
- Verify your API key is correct
- Check your Groq account credits
-
Import Issues
- Ensure the
neo4j.dumpfile is not corrupted - Check available disk space
- Ensure the
RL Based Cyber Threat Detection/
├── final.py # Main Streamlit application
├── requirements.txt # Python dependencies
├── .env # Environment variables
├── neo4j.dump # Database backup file
├── README.md # This file
└── GraphKer/ # Additional graph processing modules
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
- Neo4j for the graph database technology
- Groq for the high-performance LLM API
- Streamlit for the web application framework
Note: Replace the placeholder images in this README with the actual screenshots you have. The current image URLs are placeholders and should be updated with your actual screenshot files.