Share
## https://sploitus.com/exploit?id=4A147D4B-6F2A-52CA-9C2F-F20FE406DEC5
# Safeguard
**THIS TAKES TIME TO DO HUNTING ITS AI HUNTER SO IF YOU SAID LIKE HUNT ON THIS TARGET THIS WILL TAKE TIME INSTED OF THAT FOR QUICK TEST SAY IT TO DO NMAP OR ANY OTHER SIMPLE TASK**
**System Security Auditing & Monitoring Toolkit** โ CLI scanner, web dashboard, exploit library, and AI-powered bug bounty hunting platform.
```bash
pip install safeguard
safeguard scan # Quick security audit
safeguard dashboard # Web dashboard (port 5050)
safeguard hunt # Bug bounty hunting platform (port 5050)
```
---
## Features
| Component | Description |
|-----------|-------------|
| **Scanner** | Port scanning, secrets detection, system hardening checks, filesystem auditing, CVE scanning, log analysis, Docker security audit |
| **Monitor** | Real-time file integrity monitoring, suspicious process detection |
| **Dashboard** | Flask web UI with scan results, system metrics, performance graphs, exploit library browser |
| **Hunt Platform** | Bug bounty hunting dashboard with AI chat, exploit suggestions, skill recommendations, session history |
| **Exploit Library** | 79+ CVE proof-of-concept exploits with search, filter, download, and AI-powered exploitation guidance |
| **AI Engine** | AI-driven analysis of scan results, exploit selection, and targeted hunting recommendations using 300+ offensive security skills |
| **Reporting** | Comprehensive HTML reports with port scans, secrets, CVEs, filesystem audit, Docker security, and hardening recommendations |
| **Hardening** | Auto-generated Bash hardening scripts based on scan findings (CVE, system, filesystem, Docker, logs) |
## CLI Usage
```bash
# Quick security scan
safeguard scan
# Targeted scans
safeguard scan --no-port --no-secrets # System checks only
safeguard scan --dir /path/to/code # Secrets scan in specific dir
safeguard scan --output report.html --json # HTML + JSON export
# Vulnerability scanning
safeguard cve # Check installed packages for known CVEs
safeguard logs --threshold 5 # Analyze auth logs for brute force
safeguard docker # Audit Docker security configuration
# Monitoring & integrity
safeguard monitor --paths /etc/passwd /etc/shadow # Watch files for changes
safeguard monitor --init # Initialize integrity baseline
safeguard integrity # Check files against baseline
safeguard processes # Scan for suspicious processes
# Reporting & hardening
safeguard report --output audit.html # Comprehensive HTML report
safeguard harden --output harden.sh # Generate hardening script
# Interactive mode
safeguard interactive # TUI menu
# Web UIs
safeguard dashboard # Web dashboard (port 5050)
safeguard hunt # Bug bounty hunting platform (port 5050)
```
## Hunt Platform
The bug bounty hunting platform (`safeguard hunt`) provides:
- **Exploit Library** โ Browse 79+ CVE PoCs with search, severity filter, CVSS sort, and one-click download
- **AI Chat** โ Conversational AI assistant (Claude Mythos persona) for security analysis and guidance
- **Auto Scan** โ Runs full security audit (ports, secrets, system, filesystem, CVEs, logs, Docker, integrity, processes) on launch
- **AI Analysis** โ Get AI-powered analysis of scan results with actionable recommendations
- **AI Hunting** โ Submit a target and receive AI-generated attack methodology using the exploit library and 300+ skills
- **Skill Recommendations** โ AI suggests relevant offensive security skills based on scan findings
- **Session History** โ Persisted hunting sessions with notes, timestamps, and re-analysis
### API Endpoints
| Route | Method | Description |
|-------|--------|-------------|
| `/api/ping` | GET | Health check |
| `/api/config` | GET/POST | Get/set AI config |
| `/api/scan/status` | GET | Current scan status |
| `/api/scan/start` | POST | Trigger a new scan |
| `/api/exploits` | GET | List exploits (search, severity, sort params) |
| `/api/exploits/` | GET | Exploit detail + source code |
| `/api/exploits//download` | GET | Download PoC script |
| `/api/exploits/refresh` | GET | Rebuild exploit index from headers |
| `/api/ai/chat` | POST | Send message to AI |
| `/api/ai/analyze` | POST | Analyze scan results via AI |
| `/api/ai/hunt` | POST | AI-driven target hunting |
| `/api/ai/suggest-exploit` | POST | AI suggests how to weaponize a CVE |
| `/api/ai/skills-recommend` | POST | AI recommends skills from scan data |
| `/api/ai/clear` | POST | Clear AI conversation history |
| `/api/skills` | GET | List available skills (optional category filter) |
| `/api/skills/tree` | GET | Skills categorized as tree |
| `/api/skills/search` | GET | Full-text skill search |
| `/api/dashboard/stats` | GET | Aggregate stats for dashboard |
| `/api/performance` | GET | Live CPU/memory/disk/network metrics |
| `/api/history` | GET | Hunt session history |
| `/api/findings/ai` | GET | Latest AI findings |
## Exploit Library
The exploit library lives at `safeguard/dashboard/exploits/` and contains **79 CVE PoCs** organized as:
```
exploits/
โโโ .exploit_index.json # Auto-generated metadata index
โโโ CVE-2024-45409/
โ โโโ poc/poc.py
โโโ CVE-2025-14931/
โ โโโ poc/poc.py
โโโ CVE-2025-47812/
โ โโโ poc/poc.py # Wing FTP 7.4.3 unauthenticated RCE (CVSS 10.0)
โโโ ... (76 more CVE directories)
```
Each PoC includes an EIP-style header that `parse_poc_header()` uses to extract metadata (CVE, title, CVSS, vendor, product, platform, type, author, date). The index is regenerated on demand via `GET /api/exploits/refresh`.
## Architecture
```
safeguard/
โโโ cli.py # CLI entry point (argparse + rich TUI)
โโโ scanner/
โ โโโ network.py # Port scanning (TCP connect, banner grab)
โ โโโ secrets.py # Regex-based secret/password detection
โ โโโ system_check.py # OS hardening checks (SSH, firewall, etc.)
โ โโโ filesystem.py # SUID/SGID/world-writable audit
โ โโโ cve_check.py # Package-level CVE matching
โ โโโ log_analyzer.py # Auth log brute force analysis
โ โโโ docker_audit.py # Docker security configuration audit
โ โโโ hardening.py # Hardening script generation
โโโ monitor/
โ โโโ file_integrity.py # File integrity monitoring
โ โโโ process_watcher.py # Suspicious process detection
โโโ dashboard/
โ โโโ hunt_app.py # Flask hunt platform (routes)
โ โโโ app.py # Flask dashboard (routes)
โ โโโ engine.py # Scan orchestration + caching
โ โโโ exploit_index.py # Exploit library index builder
โ โโโ ai_engine.py # AI chat/analysis/hunt engine
โ โโโ skills_bridge.py # Skill discovery bridge
โ โโโ exploits/ # 79 CVE PoC scripts
โ โโโ templates/ # Jinja2 HTML templates
โ โโโ static/ # Icons, assets
โโโ report/
โ โโโ html_report.py # HTML report generator
โโโ utils/
โโโ helpers.py # Shared utilities
```
## Dependencies
| Package | Required For |
|---------|-------------|
| `rich>=13.0.0` | CLI output formatting, tables, progress bars |
| `cryptography>=41.0.0` | Cryptographic operations |
| `flask>=2.0.0` | Web dashboard and hunt platform |
## Installation
```bash
# From source
git clone
cd safeguard
pip install -e .
# Or with dev dependencies
pip install -e ".[dev]"
```
## License
MIT