An intelligent, RAG-powered chatbot designed to provide safe, educational cybersecurity guidance while actively blocking malicious or unethical queries.
- About The Project
- Key Features
- Technologies Used
- Installation Instructions
- Usage
- Results / Screenshots
- Configuration & Customization
- License
- Contact
CyberBot is an AI-powered cybersecurity assistant built using Retrieval-Augmented Generation (RAG). It leverages a curated knowledge base to provide accurate, context-aware answers to cybersecurity questions. A key focus of this project is safety; the bot is engineered with strict ethical boundaries to prevent misuse and ensure it serves as a purely educational and defensive tool.
- 🛡️ Safe Educational Responses: Provides defensive cybersecurity knowledge from a trusted and vetted set of documents.
- 🚫 Malicious Query Blocking: Automatically detects and blocks requests for exploits, hacking instructions, or harmful content.
- 🧠 RAG-Powered Intelligence: Uses vector embeddings (SentenceTransformers) and large language models (Hugging Face Transformers) to generate precise, contextual answers.
- ⚖️ Ethical Policy Enforcement: Includes built-in refusal mechanisms for questions related to social engineering, exploit development, and attack anonymization.
- 💻 Interactive Web Interface: A clean and simple UI built with Streamlit for easy interaction.
- Python
- LangChain
- FAISS (for vector indexing)
- SentenceTransformers
- Hugging Face Transformers
- Streamlit
Follow these steps to get a local copy up and running.
- Clone the repository:
git clone [https://github.com/your-username/CyberBot.git](https://github.com/your-username/CyberBot.git) cd CyberBot - Create and activate a virtual environment:
- On macOS/Linux:
python3 -m venv venv source venv/bin/activate - On Windows:
python -m venv venv .\venv\Scripts\activate
- On macOS/Linux:
- Install the required packages:
pip install -r requirements.txt
- Run the Streamlit application:
streamlit run app.py
Once the application is running, open your web browser and navigate to http://localhost:8501. You can then type your cybersecurity questions into the chat interface.
- "What is phishing and how can I protect against it?"
- "Explain DDoS attacks and mitigation strategies."
- "How does SIEM work for threat detection?"
- "Describe the principles of the Zero Trust security model."
Here's a look at CyberBot in action.
*Caption: A screenshot showing a malicious query being blocked.**Caption: A screenshot showing an educational response.*
You can easily customize CyberBot's knowledge and behavior:
- Expand the Knowledge Base: Add new cybersecurity documents (in markdown or text format) to the designated
dataordocsfolder. The RAG pipeline will automatically index them on the next run. - Adjust Content Filtering: Modify the
blocked_keywordslist within the application's code to fine-tune the bot's content safety policy.
Distributed under the MIT License. See LICENSE for more information.
Mail - abhishekkumarshukla.official@gmail.com
Project Link: https://github.com/Abhishek-4px/CyberBot

