Ir al contenido

🧠 PROJECT OMEGA: "SPECIALIST AI" MODULE (Tactical Intelligence Center)

The interface is strategically located between "Tools" and "Documentation". We will divide into three high-density information panels.

0views

Strategic Vision: We will implement a Hybrid Artificial Intelligence (Local/Cloud) deeply integrated into the platform. It is not a simple chatbot; it is a Synthetic Cybersecurity Analyst with real-time read access to the infrastructure (Database) and doctrinal access to the knowledge library (PDFs).

The interface is strategically positioned between “Tools” and “Documentation”. We will be divided into three high-density information panels.

🟢 LEFT PANEL: OPERATIONAL MEMORY (History & Retention)

Sección titulada «🟢 PANEL IZQUIERDO: MEMORIA OPERATIVA (History & Retention)»

In this panel, we will manage past knowledge.

  • Session List: Compact cards with Title, Date, and Model used.
  • Tactical Classification System:
    • ⭐ Favorites (Priority Intel): Star button. We will pin the conversation to the top. Useful for active investigations.
    • 🔒 Persistence (Permanent Lock): A Toggle Switch in each chat.
      • Status ON: The chat will be shielded. Automatic deletion rules will be ignored.
      • Status OFF: The chat will be ephemeral.
  • Retention Configuration (Data Lifecycle):
    • Slider or numeric Input: “Self-destruct unshielded chats after: [ 7 ] days”.
    • "Purge Now" Button: Manual cache cleaning.

The main interaction area. "Modern Terminal" style (Dark colors, monospaced fonts for code).

  • Output Area (Stream):
    • Full Markdown rendering (Tables, Lists, Code Blocks with copy button).
    • Source Citations: When the AI uses a document, a small clickable tag will appear: [Ref: MANUAL_3.2_BLIND_SQLI.pdf, pág 4].
    • Data Evidence: When querying the DB, the generated SQL query will be shown in a collapsed dropdown: [▶ Ver Query SQL].
  • Input Area (Command Line):
    • Multiline text prompt.
    • "Attach Current Context" Button (We will upload the current state of the active scan).
  • Engine Selector (Bottom-Right):
    • A discreet but vital dropdown menu in the bottom right corner.
    • Options:
      • 🔒 LOCAL: OMEGA BRAIN (Llama-3 / Mistral) -> No cost, total privacy, slow.
      • ☁️ ONLINE: GOOGLE GEMINI 1.5 FLASH -> Extreme speed, medium reasoning.
      • 🧠 ONLINE: GOOGLE GEMINI 1.5 PRO -> Complex reasoning, higher latency.

Here we will define WHO is responding to us.

  • Agent Selector (Person):
    • Default: “Red Team Generalist”.
    • Custom 1: “Dr. SQL Injection” (Prompt 100% focused on our SQLi manuals).
    • Custom 2: “Infrastructure Analyst” (Focused on Nmap and Services).
  • Connection Indicators (Status):
    • 📚 Docs Indexados: 14 PDFs (Vector Store Status).
    • 🗄️ DB Connection: ACTIVE (Text-to-SQL Status).

For the AI to be useful, we must “connect the dots” between theory (PDFs) and reality (Database).

The AI does not “read” the PDFs every time. We will use a vector database (ChromaDB).

  1. Ingestion: Upon uploading a PDF to /docs, we will divide the system into 500-character “chunks”.
  2. Embedding: We will convert text into numerical vectors.
  3. Recovery: When we ask “How do we perform an OOB attack?”, the system will search for mathematically similar vectors in the manuals and pass them to the AI as hidden context.

The AI has read permission over nmap_intel.db.

  1. Schema Awareness: The AI knows that a table hosts exists with columns ip, os, and services.
  2. Translation:
    • User: “Tell me which machines have Windows and port 445 open”
    • AI (Internal): SELECT ip FROM hosts JOIN services ON hosts.id=services.host_id WHERE os LIKE '%Windows%' AND port=445;
  3. Response: The AI receives the JSON from the database and responds to us in natural language.

A small preliminary classifier will decide which subsystem to activate:

  • Are we asking about theory? -> We will activate RAG (PDFs).
  • Are we asking about objectives/current state? -> We will activate SQL (DB).
  • Are we asking a mixed question? -> We will activate both.

We will allow the creation of "System Profiles" saved in JSON.

Example: "SQLi Inquisitor" Profile

{
"name": "SQL Injection Specialist",
"model_preference": "cloud_gemini_pro",
"temperature": 0.2,
"system_prompt": "Eres un experto en explotación de bases de datos. Tu conocimiento se basa ESTRICTAMENTE en los manuales RED_TEAM_OPS proporcionados. Ignora cualquier vulnerabilidad que no sea SQLi. Si el usuario pregunta por XSS, responde brevemente y redirige a SQLi. Prioriza técnicas de evasión de WAF.",
"access_scope": ["docs_folder_sqli", "db_table_vulnerabilities"]
}

We need to expand our SQLite database (nmap_intel.db) to support this advanced logic.

-- Tabla para gestionar las sesiones de chat
CREATE TABLE ai_conversations (
id TEXT PRIMARY KEY, -- UUID
title TEXT, -- Generado por la IA o manual
agent_profile TEXT, -- 'general', 'sqli_expert', etc.
model_used TEXT, -- 'local_llama3', 'cloud_gemini'
is_favorite BOOLEAN DEFAULT 0, -- ⭐ La Estrellita
is_permanent BOOLEAN DEFAULT 0, -- 🔒 El Candado (Toggle)
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
last_updated DATETIME
);
-- Tabla para los mensajes individuales
CREATE TABLE ai_messages (
id INTEGER PRIMARY KEY AUTOINCREMENT,
conversation_id TEXT,
role TEXT, -- 'user', 'assistant', 'system'
content TEXT, -- El texto del mensaje
context_sources TEXT, -- JSON: Qué PDFs o Tablas se usaron para esta respuesta
FOREIGN KEY(conversation_id) REFERENCES ai_conversations(id) ON DELETE CASCADE
);
-- Tabla para configuración global
CREATE TABLE ai_config (
key TEXT PRIMARY KEY,
value TEXT
-- Ej: 'retention_days' = '30'
);
  1. The Operator (Us): We will enter “Specialist AI”. We will select the “Recon Master” agent. We will activate the “Gemini Flash” model.
  2. The Question: We will write: “We are analyzing the current targets. Do we see any pattern that suggests an old development server? We will base our answer on the OPSEC Manual.”
  3. The Process (Backend):
    • The Router will detect the need for DB (to view targets) and DOCS (for the OPSEC manual).
    • We will execute SELECT * FROM services WHERE version LIKE '%dev%' OR version LIKE '%beta%'.
    • We will look for vectors in PROTOCOLO_OMEGA_OPSEC.md.
    • We will send everything to Gemini Flash.
  4. The Response:
    • “We have detected host 192.168.1.55 running ‘Apache Tomcat 7.0-beta’. According to the ‘Omega Opsec Protocol’ (Page 3), beta servers often have default credentials and verbose logging. We recommend an immediate brute-force attack.”
  5. Management: We will like the response. We will give it a Star ⭐ and activate the Lock 🔒 so that this finding is never deleted.