Skip to content

algorime/AlgoSuite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

6 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

AlgoBrain ๐Ÿง 

An AI-Powered Pentesting Assistant for SQL Injection Vulnerabilities

AlgoBrain is an intelligent cybersecurity assistant designed to help penetration testers identify, understand, and analyze SQL injection vulnerabilities. Built on cutting-edge AI technology, it combines the power of Google's Gemini LLM with specialized tools for web search and vector database queries to accelerate the pentesting workflow.

๐ŸŽฏ Overview

AlgoBrain acts as an interactive partner that augments pentester workflows by:

  • Automating Research: Intelligent web search and specialized security knowledge queries
  • Providing Expert Guidance: AI-powered analysis and suggestions for SQL injection testing
  • Streamlining Workflows: Real-time conversation interface with tool integration
  • Maintains Context: Stateful conversations that remember your testing session.

๐Ÿ“š Table of Contents

๐Ÿ—๏ธ Architecture

๐Ÿค” Why Contribute?

AlgoBrain is more than just a toolโ€”it's a community-driven project with a mission to empower cybersecurity professionals through open-source AI. By contributing, you can:

  • ๐Ÿš€ Shape the Future of Pentesting: Help build an intelligent assistant that makes vulnerability analysis faster, smarter, and more accessible.
  • ๐Ÿ’ป Work with Cutting-Edge Tech: Gain hands-on experience with a modern stack, including React 19, FastAPI, LangGraph, and Google's Gemini LLM.
  • ๐Ÿค Join a Collaborative Community: Collaborate with developers and security experts to solve real-world challenges.
  • ๐Ÿง  Enhance Your Skills: Whether you're a frontend developer, backend engineer, or AI enthusiast, there's a place for you to learn and grow.

We're especially looking for frontend developers to help build a world-class user experience. If you're passionate about creating intuitive and powerful interfaces, your contributions will be highly valued!

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   React UI      โ”‚    โ”‚   FastAPI +      โ”‚    โ”‚   AI Tools      โ”‚
โ”‚   Frontend      โ”‚โ—„โ”€โ”€โ–บโ”‚   LangServe      โ”‚โ—„โ”€โ”€โ–บโ”‚   & Services    โ”‚
โ”‚                 โ”‚    โ”‚   Backend        โ”‚    โ”‚                 โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                              โ”‚
                              โ–ผ
                       โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                       โ”‚   LangGraph      โ”‚
                       โ”‚   Agent          โ”‚
                       โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                              โ”‚
                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                    โ–ผ         โ–ผ         โ–ผ
              โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
              โ”‚  Google  โ”‚ โ”‚Qdrantโ”‚ โ”‚ Future  โ”‚
              โ”‚  Search  โ”‚ โ”‚Vectorโ”‚ โ”‚ Tools   โ”‚
              โ”‚   API    โ”‚ โ”‚  DB  โ”‚ โ”‚         โ”‚
              โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โœจ Showcase

Hereโ€™s a sneak peek at AlgoBrain in action. These visuals highlight the key features and user interface of our AI-powered pentesting assistant.

Chat Interface Studio Mode
An intuitive, real-time conversation with the AI agent. Advanced analysis of HTTP requests and responses.
Vulnerability Dashboard Payload Editor
Visualize vulnerability data with interactive charts. Craft and test SQLi payloads with a powerful editor.

We are actively looking for frontend developers to help us bring these interfaces to life and create a seamless user experience. If you have a passion for UI/UX design and development, your contributions would be invaluable!

๐Ÿš€ Quick Start

Prerequisites

  • Docker & Docker Compose (recommended)
  • Python 3.11+ (for direct execution)
  • Node.js 18+ (for frontend development)

๐Ÿณ Docker Deployment (Recommended)

Get up and running in minutes with Docker.

  1. Clone the repository:

    git clone https://github.com/algorime/AlgoBrain.git
    cd AlgoBrain
  2. Configure Environment: Create a .env file in the backend/ directory with your API keys.

    cp backend/.env.example backend/.env

    See the Configuration section for more details.

  3. Launch the Application:

    docker-compose up --build
  4. Access the Application:

    • Backend API: http://localhost:8001
    • Interactive Playground: http://localhost:8001/agent/playground/

๐Ÿ”ง Manual Development Setup

For more control over the development environment, you can run the frontend and backend services separately.

Backend Setup
  1. Navigate to the backend directory:
    cd backend
  2. Install dependencies:
    pip install -r requirements.txt
  3. Configure environment: Create and configure your .env file.
    cp .env.example .env
  4. Run the development server:
    uvicorn src.main:app --host 0.0.0.0 --port 8001
Frontend Setup
  1. Navigate to the frontend directory:
    cd frontend
  2. Install dependencies:
    npm install
  3. Configure environment: Create and configure your .env file.
    cp .env.example .env
  4. Run the development server:
    npm run dev

โš™๏ธ Configuration

Required Environment Variables

Create a .env file in the backend/ directory with the following:

# Google Gemini LLM
GEMINI_API_KEY=your_gemini_api_key
GEMINI_CHAT_MODEL=models/gemini-1.5-flash-preview-0514
GEMINI_EMBEDDING_MODEL=models/embedding-001

# Google Custom Search (for web search tool)
GOOGLE_CSE_API_KEY=your_google_cse_api_key
GOOGLE_CSE_CX=your_search_engine_id

# Qdrant Vector Database (for specialized security knowledge)
QDRANT_URL=your_qdrant_instance_url
QDRANT_API_KEY=your_qdrant_api_key
COLLECTION_NAME=sql_injection

Frontend Configuration

Create a .env file in the frontend/ directory:

VITE_API_URL=http://localhost:8001
VITE_DEV_MODE=true

๐ŸŽฎ Usage

Interactive Chat Interface

  1. Start the application using Docker or manual setup
  2. Open the playground at http://localhost:8001/agent/playground/
  3. Begin a conversation about SQL injection testing
  4. The AI will use its tools to search for information and provide guidance

Example Conversations

๐Ÿ‘ค "I found a login form at example.com/login. How should I test for SQL injection?"

๐Ÿค– AlgoBrain will:
   - Search for current SQLi testing methodologies
   - Query its knowledge base for relevant payloads
   - Provide step-by-step testing guidance
   - Suggest specific payloads to try

API Integration

Access the LangServe API directly:

# Invoke the agent
curl -X POST "http://localhost:8001/agent/invoke" \
  -H "Content-Type: application/json" \
  -d '{"input": "Help me test for SQL injection in a login form"}'

๐Ÿ› ๏ธ Technology Stack

Backend

  • Framework: LangGraph + LangChain for agent orchestration
  • LLM: Google Gemini via langchain-google-genai
  • API Server: FastAPI with LangServe
  • Vector DB: Qdrant for specialized security knowledge
  • Search: Google Custom Search API

Frontend

  • React 19.1.0: Latest stable version with enhanced performance
  • TypeScript 5.8+: Type safety and modern JavaScript features
  • Vite 7.0: Ultra-fast build tool with HMR
  • Tailwind CSS 4.0: Utility-first CSS framework
  • TanStack Query 5.81.5: Server state management
  • Monaco Editor 4.7.0: VS Code-powered code editor for payloads

Infrastructure

  • Containerization: Docker with Python 3.11-slim base
  • Deployment: Docker Compose for easy orchestration

๐Ÿงช Features

Current (V1 MVP)

  • โœ… Interactive AI Agent with specialized pentesting knowledge
  • โœ… Google Search Integration for real-time vulnerability research
  • โœ… Vector Database Queries for curated SQL injection knowledge
  • โœ… Real-time Streaming Interface with conversation history
  • โœ… Parallel Tool Execution for enhanced efficiency
  • โœ… Docker Deployment for easy setup

Planned (V2+)

  • ๐Ÿš€ HTTP Request Tool: Actively interact with targets.
  • ๐ŸŽฏ Vulnerability Validation: Confirm and validate findings.
  • ๐Ÿ—บ๏ธ SQLMap Integration: Leverage automated testing capabilities.
  • ๐Ÿ“ Report Generation: Document findings for stakeholders.
  • ๐ŸŒ Multi-Vulnerability Support: Expand beyond SQLi to XSS, CSRF, and more.

๐Ÿ—บ๏ธ Visual Roadmap

Hereโ€™s a look at our development timeline and where weโ€™re headed. We welcome your help in turning these plans into reality!

gantt
    title AlgoBrain Development Roadmap
    dateFormat  YYYY-MM-DD
    section Foundation (Q3 2024)
    Core Engine       :done, 2024-07-01, 30d
    Frontend UI       :active, 2024-07-15, 30d
    section V2 Features (Q4 2024)
    HTTP Request Tool :2024-10-01, 30d
    SQLMap Integration:2024-11-01, 45d
    section V3+ (2025)
    Report Generation :2025-01-15, 45d
    Multi-Vulnerability Support :2025-03-01, 60d
Loading

โœจ Contributors

This project exists thanks to all the people who contribute. A huge thank you to everyone who has helped build and improve AlgoBrain!

Want to see your face here? Contribute today!

๐Ÿ”’ Security Considerations

โš ๏ธ Important: AlgoBrain is a defensive security tool designed for legitimate penetration testing.

  • Only use for authorized security assessments
  • Ensure you have proper permissions before testing any systems
  • Follow responsible disclosure practices for any vulnerabilities found
  • The tool is designed for ethical hacking and security research only

๐Ÿ“ Project Structure

AlgoBrain/
โ”œโ”€โ”€ backend/                 # Python FastAPI backend
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ main.py         # FastAPI application entry point
โ”‚   โ”‚   โ”œโ”€โ”€ agent.py        # LangGraph agent implementation
โ”‚   โ”‚   โ””โ”€โ”€ tools/          # AI tools (search, knowledge queries)
โ”‚   โ”œโ”€โ”€ requirements.txt    # Python dependencies
โ”‚   โ””โ”€โ”€ Dockerfile         # Backend container configuration
โ”œโ”€โ”€ frontend/               # React TypeScript frontend
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ components/     # React components
โ”‚   โ”‚   โ”œโ”€โ”€ lib/           # Utilities and API client
โ”‚   โ”‚   โ””โ”€โ”€ types/         # TypeScript definitions
โ”‚   โ”œโ”€โ”€ package.json       # Node.js dependencies
โ”‚   โ””โ”€โ”€ Dockerfile        # Frontend container configuration
โ”œโ”€โ”€ docker-compose.yml     # Multi-container orchestration
โ””โ”€โ”€ README.md             # This file

๐Ÿค How to Contribute

We welcome contributions from everyone! Whether you're a developer, a security researcher, or a designer, you can help make AlgoBrain better. Hereโ€™s how you can get involved:

  • ๐Ÿ› Find and Report Bugs: If you find a bug, please open an issue with a detailed description and steps to reproduce it.
  • ๐Ÿ’ก Suggest Enhancements: Have an idea for a new feature or improvement? Let us know in the issues or discussions.
  • ๐Ÿ“ Improve Documentation: Help us make our documentation clearer and more comprehensive.
  • ๐Ÿ’ป Write Code: Tackle an existing issue, add a new feature, or improve our test coverage.

Frontend Contributions

We are actively looking for frontend developers to help us build a world-class user experience. Here are a few ways you can contribute:

  • โœจ Improve UI/UX: Help us design and implement a more intuitive and visually appealing interface.
  • ๐Ÿงฉ Build New Components: Create new React components for our chat, editor, and dashboard interfaces.
  • ๐ŸŽจ Enhance Styling: Refine our Tailwind CSS and create a more consistent design system.
  • ๐Ÿงช Add Tests: Help us build out our testing suite with Vitest and Playwright.

Getting Started

Ready to contribute? Check out our Technical Guide for detailed information on:

  • Local development setup
  • Code architecture and patterns
  • Testing procedures
  • Submission guidelines

๐Ÿ“„ Documentation

๐Ÿ“‹ Development Commands

Full Stack Development

# Start everything with Docker
docker-compose up --build

# Backend only
cd backend && uvicorn src.main:app --host 0.0.0.0 --port 8001

# Frontend only  
cd frontend && npm run dev

Testing & Quality

# Backend
cd backend && python -m pytest  # (when tests are added)

# Frontend
cd frontend && npm run lint
cd frontend && npm run build

๐Ÿ“ž Support


Built with โค๏ธ for the cybersecurity community

AlgoBrain helps security professionals work smarter, not harder.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors