mirror of
https://github.com/CyberSecurityUP/NeuroSploit.git
synced 2026-03-02 07:43:24 +00:00
116 modules | 100 vuln types | 18 API routes | 18 frontend pages Major features: - VulnEngine: 100 vuln types, 526+ payloads, 12 testers, anti-hallucination prompts - Autonomous Agent: 3-stream auto pentest, multi-session (5 concurrent), pause/resume/stop - CLI Agent: Claude Code / Gemini CLI / Codex CLI inside Kali containers - Validation Pipeline: negative controls, proof of execution, confidence scoring, judge - AI Reasoning: ReACT engine, token budget, endpoint classifier, CVE hunter, deep recon - Multi-Agent: 5 specialists + orchestrator + researcher AI + vuln type agents - RAG System: BM25/TF-IDF/ChromaDB vectorstore, few-shot, reasoning templates - Smart Router: 20 providers (8 CLI OAuth + 12 API), tier failover, token refresh - Kali Sandbox: container-per-scan, 56 tools, VPN support, on-demand install - Full IA Testing: methodology-driven comprehensive pentest sessions - Notifications: Discord, Telegram, WhatsApp/Twilio multi-channel alerts - Frontend: React/TypeScript with 18 pages, real-time WebSocket updates
84 lines
2.3 KiB
Python
Executable File
84 lines
2.3 KiB
Python
Executable File
#!/usr/bin/env python3
|
|
"""
|
|
Example Custom Agent for NeuroSploitv2
|
|
This demonstrates how to create custom agents for specific tasks
|
|
"""
|
|
|
|
import logging
|
|
from typing import Dict
|
|
from core.llm_manager import LLMManager
|
|
|
|
logger = logging.getLogger(__name__)
|
|
|
|
|
|
class CustomAgent:
|
|
"""Example custom agent - Web API Security Scanner"""
|
|
|
|
def __init__(self, config: Dict):
|
|
"""Initialize custom agent"""
|
|
self.config = config
|
|
self.llm = LLMManager(config)
|
|
self.name = "WebAPIScanner"
|
|
logger.info(f"{self.name} initialized")
|
|
|
|
def execute(self, target: str, context: Dict) -> Dict:
|
|
"""Execute custom agent logic"""
|
|
logger.info(f"Running {self.name} on {target}")
|
|
|
|
results = {
|
|
"agent": self.name,
|
|
"target": target,
|
|
"status": "running",
|
|
"findings": []
|
|
}
|
|
|
|
try:
|
|
# Your custom logic here
|
|
# Example: API endpoint testing
|
|
results["findings"] = self._scan_api_endpoints(target)
|
|
|
|
# Use AI for analysis
|
|
ai_analysis = self._ai_analyze(results["findings"])
|
|
results["ai_analysis"] = ai_analysis
|
|
|
|
results["status"] = "completed"
|
|
|
|
except Exception as e:
|
|
logger.error(f"Error in {self.name}: {e}")
|
|
results["status"] = "error"
|
|
results["error"] = str(e)
|
|
|
|
return results
|
|
|
|
def _scan_api_endpoints(self, target: str) -> list:
|
|
"""Custom scanning logic"""
|
|
# Implement your custom scanning logic
|
|
return [
|
|
{"endpoint": "/api/users", "method": "GET", "auth": "required"},
|
|
{"endpoint": "/api/admin", "method": "POST", "auth": "weak"}
|
|
]
|
|
|
|
def _ai_analyze(self, findings: list) -> Dict:
|
|
"""Use AI to analyze findings"""
|
|
prompt = f"""
|
|
Analyze the following API security findings:
|
|
|
|
{findings}
|
|
|
|
Provide:
|
|
1. Security assessment
|
|
2. Risk prioritization
|
|
3. Exploitation recommendations
|
|
4. Remediation advice
|
|
|
|
Response in JSON format.
|
|
"""
|
|
|
|
system_prompt = "You are an API security expert."
|
|
|
|
try:
|
|
response = self.llm.generate(prompt, system_prompt)
|
|
return {"analysis": response}
|
|
except Exception as e:
|
|
return {"error": str(e)}
|