332 lines
8.8 KiB
Markdown
332 lines
8.8 KiB
Markdown
# CC24-Hub
|
|
|
|
Ein kuratiertes Verzeichnis für digitale Forensik- und Incident-Response-Tools, entwickelt für die Seminargruppe CC24-w1.
|
|
|
|
*DISCLAIMER:*
|
|
Hier wurde Exzessives Vibe-Coding verwendet. Die Auswahl der Software ist aber kuratiert.
|
|
|
|
## 🎯 Projektübersicht
|
|
|
|
CC24-Hub ist eine statische Website, die eine strukturierte Übersicht über bewährte DFIR-Tools bietet. Das Projekt orientiert sich am NIST-Framework (SP 800-86) und kategorisiert Tools nach forensischen Domänen und Untersuchungsphasen.
|
|
|
|
### Hauptfunktionen
|
|
|
|
- **Tool-Katalog**: Umfassende Sammlung von Open-Source und kommerziellen Forensik-Tools
|
|
- **Matrix-Ansicht**: Visualisierung der Tools nach Domänen und Prozess-Phasen
|
|
- **Erweiterte Filterung**: Suche nach Name, Beschreibung, Tags, Domäne und Phase
|
|
- **Self-Hosted Integration**: Direkte Links zu gehosteten Tool-Instanzen
|
|
- **Status-Monitoring**: Live-Überwachung der verfügbaren Services
|
|
- **Responsive Design**: Optimiert für Desktop und Mobile
|
|
- **Dark/Light Mode**: Automatische Theme-Erkennung mit manueller Überschreibung
|
|
|
|
## 🛠️ Technischer Stack
|
|
|
|
- **Framework**: [Astro](https://astro.build/) (Static Site Generator)
|
|
- **Styling**: Vanilla CSS mit CSS Custom Properties
|
|
- **Datenformat**: YAML für Tool-Definitionen
|
|
- **Deployment**: Statische HTML-Generierung
|
|
- **Node.js**: >=18.0.0
|
|
|
|
## 🚀 Installation & Deployment
|
|
|
|
### Lokale Entwicklung
|
|
|
|
```bash
|
|
# Repository klonen
|
|
git clone https://git.cc24.dev/mstoeck3/cc24-hub.git
|
|
cd cc24-hub
|
|
|
|
# Dependencies installieren
|
|
npm install
|
|
|
|
# Development Server starten
|
|
npm run dev
|
|
```
|
|
|
|
Die Seite ist dann unter `http://localhost:4321` verfügbar.
|
|
|
|
### Produktions-Deployment
|
|
|
|
#### Voraussetzungen
|
|
|
|
- Ubuntu/Debian server
|
|
- Node.js 18+
|
|
- Nginx
|
|
- Domain
|
|
- SSL Zertifikat
|
|
|
|
#### Installationsschritte
|
|
|
|
##### 1. Vorbereitung
|
|
|
|
```bash
|
|
# Klonen des Repositorys
|
|
git clone https://git.cc24.dev/mstoeck3/cc24-hub
|
|
cd cc24-hub
|
|
|
|
# Abhängigkeiten installieren
|
|
npm install
|
|
|
|
# Production-Build anstoßen
|
|
npm run build
|
|
```
|
|
|
|
##### 2. Webroot vorbereiten
|
|
|
|
```bash
|
|
# Webroot erstellen und Berechtigungen setzen
|
|
sudo mkdir -p /var/www/cc24-hub
|
|
sudo chown $USER:$USER /var/www/cc24-hub
|
|
|
|
# Build in Webroot kopieren
|
|
sudo cp -r ./dist/* /var/www/cc24-hub/
|
|
sudo cp ./src/data/tools.yaml /var/www/cc24-hub/src/data/
|
|
sudo cp package.json /var/www/cc24-hub/
|
|
|
|
# Prod-Abhängigkeiten installieren
|
|
cd /var/www/cc24-hub
|
|
npm install --omit=dev
|
|
|
|
# Berechtigungen setzen
|
|
sudo chown -R www-data:www-data /var/www/cc24-hub
|
|
```
|
|
|
|
##### 3. Umgebungsvariablen setzen
|
|
|
|
Erstelle `/var/www/cc24-hub/.env`:
|
|
|
|
```bash
|
|
# AI Konfiguration
|
|
AI_API_ENDPOINT=https://llm.mikoshi.de # hier geeigneten Endpunkt setzen
|
|
AI_API_KEY=your_ai_api_key
|
|
AI_MODEL=mistral/mistral-small-latest # hier geeignetes KI-Modell wählen
|
|
|
|
# Authentifizierung ("false" setzen für Tests, oder wenn kostenlose KI verwendet wird)
|
|
AUTHENTICATION_NECESSARY=true
|
|
OIDC_ENDPOINT=https://cloud.cc24.dev
|
|
OIDC_CLIENT_ID=your_oidc_client_id
|
|
OIDC_CLIENT_SECRET=your_oidc_client_secret
|
|
AUTH_SECRET=your_super_secret_jwt_key_min_32_chars
|
|
|
|
# Public Configuration
|
|
PUBLIC_BASE_URL=https://your-domain.com # hier die URL setzen, mit der von außen zugegriffen wird
|
|
```
|
|
|
|
```bash
|
|
# .env sichern
|
|
sudo chmod 600 /var/www/cc24-hub/.env
|
|
sudo chown www-data:www-data /var/www/cc24-hub/.env
|
|
```
|
|
|
|
##### 4. Systemd-Service erstellen
|
|
|
|
Create `/etc/systemd/system/cc24-hub.service`:
|
|
|
|
```ini
|
|
[Unit]
|
|
Description=CC24-Hub DFIR Tool Directory
|
|
After=network.target
|
|
Wants=network.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=www-data
|
|
Group=www-data
|
|
WorkingDirectory=/var/www/cc24-hub
|
|
ExecStart=/usr/bin/node server/entry.mjs
|
|
Restart=always
|
|
RestartSec=5
|
|
StartLimitInterval=60s
|
|
StartLimitBurst=3
|
|
|
|
# Environment
|
|
Environment=NODE_ENV=production
|
|
Environment=PORT=3000
|
|
|
|
# Security
|
|
NoNewPrivileges=true
|
|
PrivateTmp=true
|
|
ProtectSystem=strict
|
|
ReadWritePaths=/var/www/cc24-hub
|
|
|
|
# Logging
|
|
StandardOutput=journal
|
|
StandardError=journal
|
|
SyslogIdentifier=cc24-hub
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|
|
```
|
|
|
|
##### 5. Nginx Reverse Proxy konfigurieren
|
|
|
|
Erstelle `/etc/nginx/sites-available/cc24-hub`:
|
|
|
|
```nginx
|
|
server {
|
|
listen 80;
|
|
server_name your-domain.com;
|
|
return 301 https://$server_name$request_uri;
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl http2;
|
|
server_name your-domain.com;
|
|
|
|
# SSL Configuration (adjust paths for your certificates)
|
|
ssl_certificate /etc/letsencrypt/live/your-domain.com/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/your-domain.com/privkey.pem;
|
|
|
|
# SSL Security
|
|
ssl_protocols TLSv1.2 TLSv1.3;
|
|
ssl_ciphers ECDHE-RSA-AES256-GCM-SHA512:DHE-RSA-AES256-GCM-SHA512:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384;
|
|
ssl_prefer_server_ciphers off;
|
|
|
|
# Security Headers
|
|
add_header X-Frame-Options DENY;
|
|
add_header X-Content-Type-Options nosniff;
|
|
add_header X-XSS-Protection "1; mode=block";
|
|
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
|
|
|
|
# Proxy to Node.js application
|
|
location / {
|
|
proxy_pass http://localhost:3000;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection 'upgrade';
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_cache_bypass $http_upgrade;
|
|
proxy_read_timeout 300s;
|
|
proxy_connect_timeout 75s;
|
|
}
|
|
|
|
# Optional: Serve static assets directly (performance optimization)
|
|
location /_astro/ {
|
|
proxy_pass http://localhost:3000;
|
|
expires 1y;
|
|
add_header Cache-Control "public, immutable";
|
|
}
|
|
}
|
|
```
|
|
|
|
##### 6. Daemon starten und Autostart setzen
|
|
|
|
```bash
|
|
# Enable Nginx site
|
|
sudo ln -s /etc/nginx/sites-available/cc24-hub /etc/nginx/sites-enabled/
|
|
sudo nginx -t
|
|
sudo systemctl reload nginx
|
|
|
|
# Enable and start CC24-Hub service
|
|
sudo systemctl daemon-reload
|
|
sudo systemctl enable cc24-hub
|
|
sudo systemctl start cc24-hub
|
|
|
|
# Check status
|
|
sudo systemctl status cc24-hub
|
|
```
|
|
|
|
##### 7. Deployment verifizieren
|
|
|
|
```bash
|
|
# Check application logs
|
|
sudo journalctl -u cc24-hub -f
|
|
|
|
# Check if app is responding
|
|
curl http://localhost:3000
|
|
|
|
# Check external access
|
|
curl https://your-domain.com
|
|
```
|
|
|
|
#### OIDC Konfigurieren
|
|
|
|
Nextcloud OIDC Einstellungen (sollte auch mit anderen OIDC-Anwendungen klappen):
|
|
- **Redirect URI**: `https://your-domain.com/auth/callback`
|
|
- **Logout URI**: `https://your-domain.com`
|
|
|
|
|
|
## 📁 Projektstruktur
|
|
|
|
```
|
|
cc24-hub/
|
|
├── src/
|
|
│ ├── components/ # Astro-Komponenten
|
|
│ │ ├── Navigation.astro
|
|
│ │ ├── ToolCard.astro
|
|
│ │ ├── ToolFilters.astro
|
|
│ │ └── ToolMatrix.astro
|
|
│ ├── data/
|
|
│ │ └── tools.yaml # Tool-Definitionen
|
|
│ ├── layouts/
|
|
│ │ └── BaseLayout.astro
|
|
│ ├── pages/ # Seiten-Routing
|
|
│ │ ├── index.astro
|
|
│ │ ├── about.astro
|
|
│ │ ├── status.astro
|
|
│ │ └── impressum.astro
|
|
│ ├── scripts/
|
|
│ │ └── theme.js # Theme-Management
|
|
│ └── styles/
|
|
│ └── global.css # Globale Styles
|
|
├── public/ # Statische Assets
|
|
└── astro.config.mjs # Astro-Konfiguration
|
|
```
|
|
|
|
## 🔧 Tool-Datenformat
|
|
|
|
Tools werden in `src/data/tools.yaml` definiert:
|
|
|
|
```yaml
|
|
tools:
|
|
- name: "Tool Name"
|
|
description: "Beschreibung des Tools"
|
|
domains: ["incident-response", "malware-analysis"]
|
|
phases: ["data-collection", "analysis"]
|
|
platforms: ["Linux", "Windows"]
|
|
skillLevel: "intermediate"
|
|
accessType: "download"
|
|
url: "https://example.com"
|
|
projectUrl: "https://hosted.example.com" # Optional für gehostete Tools
|
|
license: "Apache 2.0"
|
|
tags: ["tag1", "tag2"]
|
|
statusUrl: "https://status.example.com/badge" # Optional
|
|
```
|
|
|
|
### Verfügbare Kategorien
|
|
|
|
**Domänen:**
|
|
- `incident-response` - Incident Response & Breach-Untersuchung
|
|
- `law-enforcement` - Strafverfolgung & Kriminalermittlung
|
|
- `malware-analysis` - Malware-Analyse & Reverse Engineering
|
|
- `fraud-investigation` - Betrugs- & Finanzkriminalität
|
|
- `network-forensics` - Netzwerk-Forensik & Traffic-Analyse
|
|
- `mobile-forensics` - Mobile Geräte & App-Forensik
|
|
- `cloud-forensics` - Cloud & Virtuelle Umgebungen
|
|
- `ics-forensics` - Industrielle Kontrollsysteme (ICS/SCADA)
|
|
|
|
**Phasen:**
|
|
- `data-collection` - Datensammlung
|
|
- `examination` - Auswertung
|
|
- `analysis` - Analyse
|
|
- `reporting` - Bericht & Präsentation
|
|
- `collaboration` - Übergreifend & Kollaboration
|
|
|
|
## 🤝 Beitragen
|
|
|
|
### Tool hinzufügen
|
|
|
|
1. Fork des Repositories erstellen
|
|
2. Neuen Tool-Eintrag in `src/data/tools.yaml` hinzufügen
|
|
3. Pull Request mit Beschreibung der Änderungen erstellen
|
|
|
|
### Korrekturen & Verbesserungen
|
|
|
|
- Bug Reports und Feature Requests über Issues melden
|
|
- Code-Beiträge über Pull Requests willkommen
|
|
- Dokumentation und Übersetzungen erwünscht
|
|
|