Security Platform for Enterprise Cyber Threat Response and Elimination
A real-time network security monitoring and threat response system with AI-powered threat intelligence.
SPECTRE is a comprehensive network security solution that monitors your network in real-time, detects threats, and can automatically block malicious IPs. It features:
- Real-time Connection Monitoring - Track all TCP/UDP connections
- Threat Detection - Identify port scans, brute force attempts, connection floods
- AI-Powered Analysis - Leverage LLM models for intelligent threat assessment (Project M)
- AbuseIPDB & Shodan Integration - Enrich threat data with external intelligence
- Cyberpunk Dashboard - Beautiful web interface for monitoring and control
- Automatic Blocking - Zero-tolerance mode for known bad actors
| Component | Description |
|---|---|
| SPECTRE Daemon | Core monitoring service (macOS/Linux) |
| Web Dashboard | Astro/React frontend with Flask API |
| Project M | AI Intelligence MCP Server (Claude/GPT-4/Grok/Ollama) |
| Project Q | Pentesting Toolkit MCP Server |
- Python 3.10+
- Node.js 18+ (for web dashboard)
- Root/Administrator access (for packet capture and firewall)
# Clone the repository
git clone https://github.com/timastras9/spectre.git
cd spectre
# Basic install
./install_macos.sh
# Install with web dashboard
./install_macos.sh --web
# Update to latest version
./install_macos.sh --updateAfter installation:
# Start the daemon
spectre_macos.py start
# Stop the daemon
spectre_macos.py stop
# View attackers
spectre_macos.py attackers
# Launch CLI dashboard
spectre_dashboard.py
# Launch web dashboard (if installed with --web)
spectre-webBackground service:
# Enable auto-start on login
launchctl load ~/Library/LaunchAgents/com.spectre.agent.plist
# Disable auto-start
launchctl unload ~/Library/LaunchAgents/com.spectre.agent.plist# Clone the repository
git clone https://github.com/timastras9/spectre.git
cd spectre
# Run installer (auto-detects distro)
sudo ./install.shOr one-liner install:
curl -sSL https://raw.githubusercontent.com/timastras9/spectre/Main/install.sh | sudo bashAfter installation:
# Start the service
sudo systemctl enable --now spectre
# Check status
sudo systemctl status spectre
# View logs
journalctl -u spectre -f
# Run manual scan
/opt/spectre/daemon.pyPaths:
- Install:
/opt/spectre/ - Logs:
/var/log/spectre/ - Data:
/opt/spectre/data/
Windows support requires WSL2 (Windows Subsystem for Linux) which provides a real Linux kernel for proper network monitoring.
Step 1: Install WSL2
# Run PowerShell as Administrator
wsl --install
# Restart your computer, then set up Ubuntu when promptedStep 2: Install Spectre in WSL2
# Open WSL terminal (search "Ubuntu" in Start menu)
git clone https://github.com/timastras9/spectre.git
cd spectre
# Run the Linux installer
sudo ./install.shStep 3: Start Spectre
# Start the daemon
sudo systemctl start spectre
# Or run directly
sudo /opt/spectre/daemon.pyStarting the Web Dashboard:
# Terminal 1 - Start API server
cd spectre/web-dashboard/api
python3 server.py
# Terminal 2 - Start web frontend
cd spectre/web-dashboard
npm install
npm run devAccess the dashboard at http://localhost:4321 from your Windows browser.
Troubleshooting WSL2:
"Running scripts is disabled on this system" (PowerShell):
Set-ExecutionPolicy Bypass -Scope Process -ForceWSL not installed:
# Run as Administrator
wsl --install -d Ubuntu| Platform | Install Command | Start Command | Service Manager |
|---|---|---|---|
| macOS | ./install_macos.sh --web |
spectre_macos.py start |
launchctl |
| Linux | sudo ./install.sh |
systemctl start spectre |
systemd |
| Windows (WSL2) | sudo ./install.sh |
systemctl start spectre |
systemd |
| Docker | docker-compose up -d |
(automatic) | Docker |
Two Docker options available:
Best for viewing/analyzing threats. Works on Windows, macOS, Linux.
git clone https://github.com/timastras9/spectre.git
cd spectre
# Build and run
docker-compose -f docker-compose.spectre.yml up -d
# Access: http://localhost:5000Complete network monitoring with real-time blocking. Requires Linux host.
git clone https://github.com/timastras9/spectre.git
cd spectre
# Build and run with full monitoring
docker-compose -f docker-compose.full.yml up -d
# Access: http://localhost:5000
# View logs: docker logs -f spectre-fullWith AI Features (both options):
export ANTHROPIC_API_KEY="your-key"
export GROK_API_KEY="your-key"
docker-compose -f docker-compose.full.yml up -dFeature Comparison:
| Feature | Dashboard Only | Full Edition |
|---|---|---|
| Web Dashboard | ✅ | ✅ |
| AI Analysis | ✅ | ✅ |
| Threat Database | ✅ | ✅ |
| Network Monitoring | ❌ | ✅ |
| Auto-Blocking | ❌ | ✅ |
| Auth Log Detection | ❌ | ✅ |
| Works on macOS | ✅ | ❌ |
| Works on Windows | ✅ | ❌ |
| Works on Linux | ✅ | ✅ |
Docker Commands:
# Stop
docker-compose -f docker-compose.full.yml down
# Rebuild after updates
docker-compose -f docker-compose.full.yml build --no-cache
docker-compose -f docker-compose.full.yml up -d
# View blocked IPs (full edition)
docker exec spectre-full iptables -L SPECTRE_BLOCK -nCreate a .env file in the project root:
# Threat Intelligence APIs (optional but recommended)
ABUSEIPDB_API_KEY=your-api-key-here
SHODAN_API_KEY=your-api-key-here
# AI Provider Configuration (Project M)
LLM_PROVIDER=anthropic # anthropic, gemini, openai, grok, or ollama
ANTHROPIC_API_KEY=sk-ant-... # Required for Claude
GOOGLE_API_KEY=AIza... # Required for Gemini
OPENAI_API_KEY=sk-... # Required for GPT-4
GROK_API_KEY=xai-... # Required for Grok
# Ollama Configuration (for local LLM)
OLLAMA_URL=http://localhost:11434
OLLAMA_MODEL=gemma2:9b
OLLAMA_TIMEOUT=120Access the dashboard at http://localhost:4321 and click the settings gear to configure:
- Theme - Cyberpunk or Matrix color scheme
- AI Provider - Select Claude, Gemini, GPT-4, Grok, or Ollama
- Auto-Block Threshold - Automatically block IPs above this risk score
- Sound Alerts - Audio notifications for critical threats
macOS:
# Start via LaunchAgent (auto-starts on login)
launchctl load ~/Library/LaunchAgents/com.spectre.agent.plist
# Or run directly
spectre_macos.py startLinux:
# Start via systemd
sudo systemctl start spectre
# Or run directly
sudo /opt/spectre/daemon.pyWindows (PowerShell as Admin):
# Start service
Start-Spectre
# Or via sc.exe
sc start Spectre
# Or run directly
spectre.bat- Start the API server:
cd web-dashboard/api && python3 server.py - Start the web server:
cd web-dashboard && npm run dev - Open
http://localhost:4321in your browser
| Endpoint | Method | Description |
|---|---|---|
/api/threats |
GET | Recent threat events |
/api/connections |
GET | Active connections |
/api/blocked |
GET | Blocked IP list |
/api/block |
POST | Block an IP |
/api/unblock |
POST | Unblock an IP |
/api/whitelist |
GET | Whitelisted IPs |
/api/ip/<ip> |
GET | Detailed IP lookup |
/api/analyze_ip/<ip> |
GET | AI threat analysis |
/api/llm/status |
GET | LLM provider status |
Project M is the unified LLM intelligence server that powers SPECTRE's AI analysis:
# Install Project M
cd m-server
pip3 install -e .
# Configure in .mcp.json
{
"mcpServers": {
"m": {
"command": "python",
"args": ["-m", "m_server"],
"cwd": "/path/to/spectre/m-server"
}
}
}analyze_threat- Full threat analysis with contextpredict_risk- Risk scoring (0-100) with confidenceexplain_attack- MITRE ATT&CK mappinggenerate_report- Security reportstrain_model- Pattern learning from blocked IPs
┌─────────────────────────┐
│ Web Dashboard │
│ (Astro + React) │
└───────────┬─────────────┘
│
┌───────────▼─────────────┐
│ Flask API Server │
│ (server.py:5000) │
└───────────┬─────────────┘
│
┌─────────────────────┼─────────────────────┐
│ │ │
┌─────────▼─────────┐ ┌─────────▼─────────┐ ┌─────────▼─────────┐
│ SPECTRE Daemon │ │ Project M │ │ External APIs │
│ (packet capture) │ │ (LLM Analysis) │ │ (AbuseIPDB/Shodan)│
└───────────────────┘ └───────────────────┘ └───────────────────┘
# Grant Terminal full disk access in System Preferences
# System Preferences > Security & Privacy > Privacy > Full Disk Access# macOS - Check pf status
sudo pfctl -s rules
# Linux - Check iptables
sudo iptables -L -n# Check API server is running
curl http://localhost:5000/api/health
# Rebuild the dashboard
cd web-dashboard && npm run buildMIT License - See LICENSE file for details.
Built with:
- Astro - Web Framework
- React - UI Components
- Tailwind CSS - Styling
- Flask - API Server
- Claude - AI Analysis (via Project M)
"In the world of network security, vigilance is not paranoia - it's survival."