Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added -
Empty file.
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,21 @@ config.local.json

# Temporary files
*.tmp
<<<<<<< HEAD
*.temp

# Web development
node_modules/
.next/
out/
.env*.local
.npm/

# Build artifacts
dist/
build/
*.egg-info/

=======
*.temp
>>>>>>> main
58 changes: 58 additions & 0 deletions .idx/dev.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# To learn more about how to use Nix to configure your environment
# see: https://firebase.google.com/docs/studio/customize-workspace
{ pkgs, ... }: {
# Which nixpkgs channel to use.
channel = "stable-24.05"; # or "unstable"

# Use https://search.nixos.org/packages to find packages
packages = [
pkgs.go
pkgs.python311
pkgs.python311Packages.pip
pkgs.nmap
pkgs.dnsutils
pkgs.ollama
# pkgs.nodejs_20
# pkgs.nodePackages.nodemon
];

# Sets environment variables in the workspace
env = {};
idx = {
# Search for the extensions you want on https://open-vsx.org/ and use "publisher.id"
extensions = [
# "vscodevim.vim"
];

# Enable previews
previews = {
enable = true;
previews = {
# web = {
# # Example: run "npm run dev" with PORT set to IDX's defined port for previews,
# # and show it in IDX's web preview panel
# command = ["npm" "run" "dev"];
# manager = "web";
# env = {
# # Environment variables to set for your server
# PORT = "$PORT";
# };
# };
};
};

# Workspace lifecycle hooks
workspace = {
# Runs when a workspace is first created
onCreate = {
# Example: install JS dependencies from NPM
# npm-install = "npm install";
};
# Runs when the workspace is (re)started
onStart = {
# Example: start a background task to watch and re-build backend code
# watch-backend = "npm run watch-backend";
};
};
};
}
77 changes: 31 additions & 46 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,15 @@ graph TD

### 1. **Multi-Agent Orchestration**
* **NR Planner**: Creates strategic execution plans with task decomposition and risk assessment
* **NR Operator**: Executes commands exclusively through terminal with mandatory human approval for external actions
* **NR Operator**: Executes commands with human-in-the-loop controls. Now features a dedicated **Operator Plane** for manual tool execution.
* **NR Analyst**: Performs advanced vulnerability analysis with CVSS 3.1 scoring and false positive reduction
* **NR Scribe**: Generates professional reports in multiple formats (Markdown, JSON, HTML, PDF)

### 2. **Mode Governor**
* **OFFENSIVE Mode**: Research and discovery operations (reconnaissance, scanning, vulnerability assessment)
* **DEFENSIVE Mode**: Analysis and mitigation operations (vulnerability analysis, patch recommendations, hardening)
* **Strict Separation**: No cross-mode contamination, tool access controlled per mode
* **Violation Logging**: All mode violations are logged and reported
### 2. **Advanced Web Control Plane (V2.1)**
* **Next.js Architecture**: A premium, high-performance React dashboard replacing legacy frameworks.
* **Manual Operator Plane**: Direct tool execution (nmap, nuclei, ffuf) with real-time output streaming.
* **Session & Artifact Management**: Comprehensive system to list, load, and browse session artifacts/reports via an interactive tree viewer.
* **Dynamic State Visualization**: Real-time rendering of agent dependencies, cognitive memory decay, and risk vectors.

### 3. **Human-in-the-Loop Controls**
* **Required Approval**: Browser navigation, external API calls, file modifications
Expand Down Expand Up @@ -113,6 +113,7 @@ graph TD
### **Prerequisites**
* **Operating System**: Linux (Kali Linux or Ubuntu 22.04+ recommended)
* **Python**: Version 3.10 or higher
* **Node.js & npm**: Required for the Web Mode dashboard
* **Tor**: Required for Dark Web functionality
```bash
sudo apt update && sudo apt install tor -y
Expand All @@ -138,7 +139,7 @@ graph TD
```bash
# Launch interactive configuration wizard
source .venv/bin/activate
./neurorift_main.py --configure
python3 neurorift_main.py --configure
```

---
Expand All @@ -147,29 +148,25 @@ graph TD

### **Mode A: Web Dashboard (Recommended)**
```bash
# Standard Launch
neurorift --webmod
```
* **Access**: Open your browser to `http://localhost:8501`
* **Features**: Full graphical control over all modules, real-time logs, and interactive reports

#### 📸 Web Interface Gallery
<img width="1920" height="1080" alt="Screenshot_2026-02-02_18_36_34" src="https://github.com/user-attachments/assets/1d8f4c62-7a48-405d-a5a0-22a802fe56e1" />
# Prototype/Demo Mode (Mock Backend)
neurorift --webmod --prototype
```
* **Access**: Open your browser to `http://localhost:3000`
* **Operator Plane**: Switch to the **'Operator'** tab to execute tools manually and browse session artifacts.

#### 📸 Web Interface Gallery (V2.1)
<img width="1920" height="1080" alt="NeuroRift Dashboard" src="https://github.com/user-attachments/assets/1d8f4c62-7a48-405d-a5a0-22a802fe56e1" />

*(Dashboard Core: Intent Fabric & Agent Constellation)*

![Dashboard Overview}
<img width="1920" height="1080" alt="Screenshot_2026-02-02_18_37_43" src="https://github.com/user-attachments/assets/a0fcfbcd-b32f-4fde-b220-5f4aeefebe14" />
<img width="1920" height="1080" alt="Operator Plane" src="https://github.com/user-attachments/assets/8e81abcd-1a59-46be-ba03-1993b4046618" />

![Security Tools]
*(Security Tools Panel)*
<img width="1920" height="1080" alt="Screenshot_2026-02-02_18_36_57" src="https://github.com/user-attachments/assets/8e81abcd-1a59-46be-ba03-1993b4046618" />
*(Operator Plane: Manual Tool Execution & Session Management)*

![Robin Intelligence]
*(Robin Intelligence panel)*
<img width="1920" height="1080" alt="image" src="https://github.com/user-attachments/assets/a92a2ca9-d196-474d-bf0a-fc25bec5dd7b" />
![Agent]
*[Agent]*
<img width="1920" height="1080" alt="image" src="https://github.com/user-attachments/assets/b0ac9819-db1b-4e69-aadc-73b687f6f3a3" />
---

### **Mode B: NeuroRift Intelligence Mode (Orchestrated)**

Expand All @@ -183,21 +180,18 @@ neurorift --orchestrated --mode offensive -t example.com
neurorift --orchestrated --mode defensive --analyze results/scan.json
```

**Resume Interrupted Task:**
```bash
neurorift --resume task_20260124_092347
```
---

### **Mode C: Command Line Interface (CLI)**

**Standard Recon Scan:**
```bash
neurorift -t example.com --operation-mode recon
neurorift -t example.com --mode recon
```

**Dark Web Search:**
```bash
neurorift darkweb --query "leaked credentials example.com"
neurorift ask-ai "Find leaked credentials for example.com on hidden services"
```

---
Expand All @@ -216,21 +210,15 @@ NeuroRift utilizes a centralized configuration file at `configs/neurorift_config
"mode_governor": {
"allow_mode_switching": false,
"log_violations": true
},
"human_in_the_loop": {
"timeout_seconds": 300,
"default_on_timeout": "deny"
}
}
```

| Variable | Description | Default |
| :--- | :--- | :--- |
| `AI_ENABLED` | Master switch for AI features | `true` |
| `OLLAMA_MAIN_MODEL` | Primary LLM for complex reasoning | `llama3.2` |
| `OLLAMA_ASSISTANT_MODEL` | Faster LLM for chat interactions | `llama3.2` |
| `OLLAMA_MODEL` | Primary LLM for complex reasoning | `llama3.2` |
| `ROBIN_TOR_PROXY` | SOCKS proxy for Dark Web traffic | `socks5h://127.0.0.1:9050` |
| `LOG_LEVEL` | Application logging verbosity | `INFO` |

---

Expand All @@ -239,28 +227,25 @@ NeuroRift utilizes a centralized configuration file at `configs/neurorift_config
**NeuroRift is purpose-built for AUTHORIZED security testing, red teaming, and educational research.**

* **Authorization Required**: You must have explicit, written permission from the owner of any system you scan or test.
* **Compliance**: Users are responsible for complying with all applicable local, state, and federal laws.
* **Liability**: The developer of NeuroRift is not liable for any misuse, damage, or illegal activities resulting from the use of this software.
* **Compliance**: Users are responsible for complying with all applicable laws.
* **Liability**: The developer is not liable for any misuse or damage.

---

## 🎖️ Credits & Thanks

**NeuroRift is independently developed by demonking369.**

The following open-source projects were used as references or components, and are gratefully acknowledged:

### Referenced Projects
- **[x1xhlol/system-prompts-and-models-of-ai-tools](https://github.com/x1xhlol/system-prompts-and-models-of-ai-tools)** - System prompt patterns and AI agent design references
- **[SimStudioAI](https://simstudio.ai)** - Conceptual orchestration design inspiration

### Core Dependencies
- **[Ollama](https://ollama.com)** - Local LLM inference engine
- **[ProjectDiscovery](https://projectdiscovery.io)** - Security tools (subfinder, nuclei, httpx)
- **[Nmap](https://nmap.org)** - Network scanning and service detection
- **[Streamlit](https://streamlit.io)** - Web dashboard framework
- **[Next.js](https://nextjs.org)** - Web Mode dashboard framework
- **[Lucide](https://lucide.dev)** - Iconography system
- **[Tailwind CSS](https://tailwindcss.com)** - Design system framework
- **[Nmap](https://nmap.org)** - Network scanning
- **[Rich](https://rich.readthedocs.io)** - Terminal UI library


### Special Thanks
- The open-source security community for continuous innovation
- All contributors who have helped improve NeuroRift
Expand Down
25 changes: 12 additions & 13 deletions neurorift_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@ def list_custom_tools(self):
self.logger.error("Unexpected error in list_custom_tools: %s", e)
return []

>>>>>>> main

async def dev_mode_shell(vf, session_dir):
console = Console()
Expand Down Expand Up @@ -433,27 +434,25 @@ async def dev_mode_shell(vf, session_dir):
def get_parser():
parser = argparse.ArgumentParser(
description="""
╔══════════════════════════════════════════════════════════╗
║ NeuroRift - Designed by demonking369 🧠 ║
║ GitHub: https://github.com/demonking369/NeuroRift ║
║ Multi-Agent Intelligence for Security Research ⚡ ║
╚══════════════════════════════════════════════════════════╝
NeuroRift - Designed by demonking369
GitHub: https://github.com/demonking369/NeuroRift
Multi-Agent Intelligence for Security Research

A terminal-based multi-agent intelligence system for authorized security testing.

Key Features:
• 🆕 NeuroRift Intelligence Mode (--orchestrated)
- NeuroRift Intelligence Mode (--orchestrated)
- Multi-Agent Architecture (Planner, Operator, Analyst, Scribe)
- OFFENSIVE/DEFENSIVE Mode Separation (--mode offensive|defensive)
- Terminal-Only Execution with Human-in-the-Loop
- Advanced CVSS Scoring & Professional Reporting
AI-Autonomous Operation (--ai-only, --agentic)
Advanced Reconnaissance & Dark Web OSINT
Stealth Mode Capabilities
Multi-format Reporting (Markdown, JSON, HTML, PDF)
Custom Tool Generation
Interactive AI Assistant
Development Mode
- AI-Autonomous Operation (--ai-only, --agentic)
- Advanced Reconnaissance & Dark Web OSINT
- Stealth Mode Capabilities
- Multi-format Reporting (Markdown, JSON, HTML, PDF)
- Custom Tool Generation
- Interactive AI Assistant
- Development Mode

Documentation: docs/NEURORIFT_README.md
Migration Guide: docs/MIGRATION_GUIDE.md
Expand Down
4 changes: 4 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,12 @@ ollama>=0.1.0
pyyaml>=6.0
requests>=2.26.0
rich>=10.0.0
<<<<<<< HEAD
aiofiles>=23.1.0
=======
click>=8.0.0
yaspin>=3.0.0
>>>>>>> main

# Security dependencies
defusedxml>=0.7.1 # SECURITY: Safe XML parsing to prevent XXE attacks
Expand Down
9 changes: 9 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

let
nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/archive/refs/tags/24.05.tar.gz";
pkgs = import nixpkgs { system = "x86_64-linux"; };
dev = import ./.idx/dev.nix { inherit pkgs; };
in
pkgs.mkShell {
buildInputs = dev.packages;
}
6 changes: 6 additions & 0 deletions web-ui/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
import "./.next/types/routes.d.ts";

// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
Loading
Loading