Skip to content

alman3000/clawsploit

Repository files navigation

ClaWSploit OpenFang Hand

Dieses Repository ist als OpenFang Hand strukturiert und enthält die autonome Hand hands/clawsploit.hand zur CVE-Verarbeitung, Docker-basierten Service-Provisionierung und Exploit-gestützten Host-Scans.

OpenFang + Docker Edition - Die Hand nutzt Docker-Container als Laufzeitumgebung und kann mit einem lokal gestarteten Backend-Service gekoppelt werden.

🚀 Quick Start

Voraussetzungen

  • OpenFang CLI installiert (openfang)
  • Docker Desktop (Windows/Mac) oder Docker Engine (Linux)
  • Docker Compose 2.0+

Installation & Start

# Clone Repository
git clone <repo>
cd clawsploit

# Environment Variables
cp .env.example .env

# Backend-Service starten
docker-compose up -d

# OpenFang Hand aktivieren
openfang hand activate clawsploit

Hand ausführen

openfang hand run clawsploit --target example.com --mode active

Die Hand erzeugt Ergebnisse in /results/{target}/{timestamp}.

📡 API Endpoints

# CVE verarbeiten
curl -X POST http://localhost:8000/api/v1/cve/process \
  -H "Content-Type: application/json" \
  -d '{"cve_id":"CVE-2024-1234"}'

# Task Status
curl http://localhost:8000/api/v1/task/{task_id}

# Letzte CVEs
curl http://localhost:8000/api/v1/cve/recent?limit=20

# CVE suchen
curl http://localhost:8000/api/v1/cve/search?keyword=Apache

# Reports
curl http://localhost:8000/api/v1/reports/{cve_id}

# Agent Status
curl http://localhost:8000/api/v1/agents/status

🐳 Docker Kommandos

# Starte das Backend
docker-compose up -d

# Logs in real-time
docker-compose logs -f clawsploit

# Alle Container stoppen
docker-compose down

# Cleanup (Images, Volumes)
docker-compose down -v
docker system prune -a

⚙️ Konfiguration

Editiere .env:

# NVD CVE API Key (optional aber empfohlen)
NVD_API_KEY=your_api_key

# Docker
DOCKER_HOST=unix:///var/run/docker.sock
DOCKER_NETWORK=clawsploit-network

# Logging
LOG_LEVEL=INFO

Editiere targets.txt (eine Host pro Zeile):

192.168.1.100:80
192.168.1.101:8080
web.internal.company:443
10.0.0.0/24

🤖 Die 4 Agenten

1. CVE Monitor Agent

Liest CVE-Datenbanken und validiert neue Vulnerabilities.

  • NVD API Integration
  • CVE-ID Validierung
  • CVSS-Score Berechnung
  • Affected Software Extraction

2. Docker Setup Agent

Startet vulnerable Softwareversionen automatisch in Docker.

  • Multi-Service Support (Apache, Nginx, SSH, Tomcat, MySQL, PostgreSQL)
  • Image Management
  • Container Lifecycle
  • Network Isolation

3. Exploit Dev Agent

Entwickelt automatisch PoC-Exploits basierend auf CVE-Details.

  • Template-basierte Code-Generierung
  • RCE, SQLi, Command Injection, XSS, Path Traversal
  • Exploit Testing gegen Containers
  • Exploit-File Storage

4. Host Scanner Agent

Scannt Netzwerk und testet vulnerable Services.

  • Port Scanning
  • Service Identification
  • Vulnerability Testing
  • Host-List Management

📊 Workflow

CVE-Meldung (API/Manual)
    ↓
[CVE Monitor] → Validierung & NVD API
    ↓
[Docker Setup] → Vulnerable Service in Container
    ↓
[Exploit Dev] → PoC Generation & Testing
    ↓
[Host Scanner] → Network Scan & Vulnerability Test
    ↓
[Report Generator] → JSON/HTML Reports
    ↓
Output: Vulnerable Hosts Liste

📊 Reports

Reports werden automatisch generiert unter /reports:

JSON Format (Maschinenlesbar)

{
  "task_id": "cve-CVE-2024-1234-...",
  "cve_id": "CVE-2024-1234",
  "status": "completed",
  "vulnerable_hosts": [
    {
      "host": "192.168.1.100",
      "port": 80,
      "service": "Apache",
      "severity": "HIGH"
    }
  ]
}

HTML Format (Menschenlesbar)

Automatisch unter reports/CVE-*.html - im Browser öffnen.

🔗 Integration Examples

Command-line examples

# CVE verarbeiten
TASK_ID=$(curl -s -X POST http://localhost:8000/api/v1/cve/process \
  -H "Content-Type: application/json" \
  -d '{"cve_id":"CVE-2024-1234"}' | jq -r '.task_id')

sleep 5

# Status abrufen
curl http://localhost:8000/api/v1/task/$TASK_ID

Python

import requests

response = requests.post(
    'http://localhost:8000/api/v1/cve/process',
    json={'cve_id': 'CVE-2024-1234'}
)
task_id = response.json()['task_id']

🔍 Debugging

# Logs filtern
# (unter Windows ggf. mit findstr statt grep)
docker-compose logs clawsploit

# Docker Status
docker ps
docker inspect clawsploit
docker logs clawsploit

🔒 Sicherheit

⚠️ KRITISCH:

  • Nur auf autorisierten Systemen verwenden
  • Docker-Container starten echte vulnerable Services
  • Alle Aktivitäten werden geloggt
  • Erfordert Docker Daemon Zugriff

📚 Weitere Dokumentation

  • ARCHITECTURE.md - System-Design, Datenfluss, Komponenten
  • OPERATIONS.md - Betrieb, Monitoring, Troubleshooting
  • STATUS.md - Projekt-Status und Features

✅ Status: PRODUKTIONSREIF

Das System ist einsatzbereit für:

  • ✓ CVE-Monitoring und -Validierung
  • ✓ Automatische Exploit-Generierung
  • ✓ Vulnerability-Assessment
  • ✓ Host-Scanning
  • ✓ Report-Generierung

Version: 1.0.0 (OpenFang Hand)
Status: ✅ READY FOR PRODUCTION

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages