## 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