prod preps

This commit is contained in:
overcuriousity 2025-07-26 10:41:50 +02:00
parent 10331b9ece
commit a9c15eb9c6
3 changed files with 392 additions and 487 deletions

View File

@ -1,43 +1,36 @@
# AI Configuration # ===========================================
AI_API_ENDPOINT=https://aiendpoint.org # CC24-Hub Environment Configuration
AI_API_KEY=your_apikey_here # ===========================================
AI_MODEL='ai_model_name_here'
AI_RATE_LIMIT_DELAY_MS=2000
# Git Repository # Authentication & OIDC (Required)
GIT_REPO_URL=https://git.cc24.dev/mstoeck3/cc24-hub.git AUTH_SECRET=change-this-to-a-strong-secret-key-in-production
GIT_API_ENDPOINT=https://git.cc24.dev/api/v1 OIDC_ENDPOINT=https://your-oidc-provider.com
GIT_API_TOKEN= OIDC_CLIENT_ID=your-oidc-client-id
LOCAL_REPO_PATH=/var/git/cc24-hub OIDC_CLIENT_SECRET=your-oidc-client-secret
AUTHENTICATION_NECESSARY=true
# Application Configuration (Required)
PUBLIC_BASE_URL=https://your-domain.com
NODE_ENV=production
# AI Service Configuration (Required for AI features)
AI_MODEL=mistral-large-latest
AI_API_ENDPOINT=https://api.mistral.ai
AI_API_KEY=your-mistral-api-key
AI_RATE_LIMIT_DELAY_MS=1000
# Git Integration (Required for contributions)
GIT_REPO_URL=https://git.cc24.dev/mstoeck3/cc24-hub
GIT_PROVIDER=gitea GIT_PROVIDER=gitea
GIT_API_ENDPOINT=https://git.cc24.dev/api/v1
GIT_API_TOKEN=your-git-api-token
# OIDC Configuration # File Upload Configuration (Optional)
OIDC_ENDPOINT=https://oidc-provider.org
OIDC_CLIENT_ID=your_oidc_client_id
OIDC_CLIENT_SECRET=your_oidc_client_secret
AUTH_SECRET=your_super_secret_jwt_key_that_should_be_at_least_32_characters_long_for_security
AUTHENTICATION_NECESSARY=false # Always set this to true in prod
# Application
PUBLIC_BASE_URL=http://localhost:4321
# Media Storage
LOCAL_UPLOAD_PATH=./public/uploads LOCAL_UPLOAD_PATH=./public/uploads
# Nextcloud integration (optional)
NEXTCLOUD_ENDPOINT= # Nextcloud Integration (Optional)
NEXTCLOUD_USERNAME= NEXTCLOUD_ENDPOINT=https://your-nextcloud.com
NEXTCLOUD_PASSWORD= NEXTCLOUD_USERNAME=your-username
NEXTCLOUD_PASSWORD=your-password
NEXTCLOUD_UPLOAD_PATH=/kb-media NEXTCLOUD_UPLOAD_PATH=/kb-media
NEXTCLOUD_PUBLIC_URL= NEXTCLOUD_PUBLIC_URL=https://your-nextcloud.com/s/
# Custom upload limits (optional)
MAX_FILE_SIZE=52428800 # 50MB in bytes
MAX_UPLOADS_PER_HOUR=100
# Development/Production mode
NODE_ENV=development
# Logging level
LOG_LEVEL=info

809
README.md
View File

@ -1,34 +1,78 @@
# CC24-Hub # CC24-Hub
Ein kuratiertes Verzeichnis für digitale Forensik- und Incident-Response-Tools mit KI-gestützten Empfehlungen, entwickelt für die Seminargruppe CC24-w1. Ein kuratiertes Verzeichnis für Digital Forensics und Incident Response (DFIR) Tools, Methoden und Konzepte mit KI-gestützten Workflow-Empfehlungen.
## 🎯 Projektübersicht ## ✨ Funktionen
CC24-Hub bietet eine strukturierte Übersicht über bewährte DFIR-Tools, -Methoden und -Konzepte mit intelligenten Empfehlungsfunktionen. Das Projekt orientiert sich am NIST-Framework (SP 800-86) und kategorisiert nach forensischen Domänen und Untersuchungsphasen. ### 🎯 Hauptansichten
- **Kachelansicht (Grid View):** Übersichtliche Kartenansicht aller Tools/Methoden
- **Matrix-Ansicht:** Interaktive Matrix nach forensischen Domänen und Untersuchungsphasen (NIST Framework)
- **KI-Empfehlungen:** AI-gestützte Workflow-Empfehlungen basierend auf Szenario-Beschreibungen
### Hauptfunktionen ### 🔍 Navigation & Filterung
- **Tag-System:** Intelligente Filterung nach Kategorien und Eigenschaften
- **Volltext-Suche:** Durchsuchen von Namen, Beschreibungen und Tags
- **Domain/Phase-Filter:** Filterung nach forensischen Bereichen und Ermittlungsphasen
- **KI-gestützte Empfehlungen**: Workflow- und Tool-Vorschläge basierend auf forensischen Szenarien ### 📚 Inhaltstypen
- **Drei Kategorien**: Software-Tools, forensische Methoden UND Grundlagenkonzepte - **Software/Tools:** Open Source und proprietäre forensische Software
- **Matrix-Ansicht**: Visualisierung nach Domänen × Prozess-Phasen - **Methoden:** Bewährte forensische Verfahren und Prozesse
- **Erweiterte Filter**: Suche nach Name, Tags, Domäne, Phase, Lizenz - **Konzepte:** Grundlegendes Fachwissen und theoretische Grundlagen
- **CC24-Server Integration**: Direkte SSO-Links zu gehosteten Instanzen
- **Knowledgebase**: Erweiterte Dokumentation mit praktischen Erkenntnissen
- **Konzept-Verlinkung**: Automatische Verknüpfung zwischen Tools und Grundlagenkonzepten
- **Status-Monitoring**: Live-Überwachung verfügbarer Services
- **Responsive Design**: Dark/Light Mode, Mobile-optimiert
## 🛠️ Technischer Stack ### 📖 Knowledgebase
- **Erweiterte Dokumentation:** Detaillierte Artikel zu Tools und Methoden
- **Praktische Anleitungen:** Installation, Konfiguration und Best Practices
- **Markdown-basiert:** Einfache Erstellung und Wartung von Inhalten
- **Framework**: [Astro](https://astro.build/) mit Server-Side Rendering ### 🤝 Contribution-System
- **Backend**: Node.js mit API-Routen für KI und Authentifizierung - **Tool/Methoden-Beiträge:** Webformular für neue Einträge
- **Styling**: Vanilla CSS mit CSS Custom Properties - **Knowledgebase-Artikel:** Artikel-Editor mit Datei-Upload
- **Datenformat**: YAML für Tool-/Methoden-/Konzept-Definitionen - **Git-Integration:** Automatische Issue-Erstellung für Review-Prozess
- **KI-Integration**: Mistral AI über OpenAI-kompatible API - **File-Management:** Nextcloud-Integration für Medien-Uploads
- **Authentifizierung**: OIDC (OpenID Connect) mit JWT-Sessions
- **Node.js**: >=18.0.0
## 🚀 Installation & Deployment ### 🔐 Authentifizierung
- **OIDC-Integration:** Single Sign-On mit OpenID Connect
- **Berechtigungssteuerung:** Schutz für AI-Features und Contribution-System
- **Session-Management:** Sichere JWT-basierte Sessions
## 🛠 Technische Grundlage
- **Framework:** Astro 5.x mit TypeScript
- **Styling:** CSS Custom Properties mit Dark/Light Mode
- **API:** Node.js Backend mit Astro API Routes
- **Datenbank:** YAML-basierte Konfiguration (tools.yaml)
## 📋 Voraussetzungen
- **Node.js:** Version 18.x oder höher
- **npm:** Version 8.x oder höher
- **Nginx:** Für Reverse Proxy (Produktion)
## 🔧 Externe Abhängigkeiten (Optional)
### OIDC Provider
- **Zweck:** Benutzerauthentifizierung
- **Beispiel:** Nextcloud, Keycloak, Auth0
- **Konfiguration:** `OIDC_ENDPOINT`, `OIDC_CLIENT_ID`, `OIDC_CLIENT_SECRET`
### Nextcloud
- **Zweck:** File-Upload für Knowledgebase-Beiträge
- **Features:** Medien-Management, öffentliche Links
- **Konfiguration:** `NEXTCLOUD_ENDPOINT`, `NEXTCLOUD_USERNAME`, `NEXTCLOUD_PASSWORD`
### AI Service (Mistral/OpenAI-kompatibel)
- **Zweck:** KI-gestützte Tool-Empfehlungen
- **Konfiguration:** `AI_API_ENDPOINT`, `AI_API_KEY`, `AI_MODEL`
### Uptime Kuma
- **Zweck:** Status-Monitoring für gehostete Services
- **Integration:** Status-Badges in der Service-Übersicht
### Git Provider (Gitea/GitHub/GitLab)
- **Zweck:** Issue-Erstellung für Contributions
- **Konfiguration:** `GIT_PROVIDER`, `GIT_API_ENDPOINT`, `GIT_API_TOKEN`
## 🚀 Installation
### Lokale Entwicklung ### Lokale Entwicklung
@ -40,6 +84,10 @@ cd cc24-hub
# Dependencies installieren # Dependencies installieren
npm install npm install
# Umgebungsvariablen konfigurieren
cp .env.example .env
# .env bearbeiten (siehe Konfiguration unten)
# Development Server starten # Development Server starten
npm run dev npm run dev
``` ```
@ -48,150 +96,128 @@ Die Seite ist dann unter `http://localhost:4321` verfügbar.
### Produktions-Deployment ### Produktions-Deployment
#### Voraussetzungen #### 1. System vorbereiten
- Ubuntu/Debian server ```bash
- Node.js 18+ # System-Updates
- Nginx sudo apt update && sudo apt upgrade -y
- Domain
- SSL Zertifikat
#### Installationsschritte # Node.js installieren (Ubuntu/Debian)
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install -y nodejs
##### 1. Vorbereitung # Nginx installieren
sudo apt install nginx -y
# Systemd für Service-Management
sudo systemctl enable nginx
```
#### 2. Anwendung installieren
```bash ```bash
# Klonen des Repositorys # Klonen des Repositorys
git clone https://git.cc24.dev/mstoeck3/cc24-hub sudo git clone https://git.cc24.dev/mstoeck3/cc24-hub /var/www/cc24-hub
cd cc24-hub cd /var/www/cc24-hub
# Abhängigkeiten installieren # Abhängigkeiten installieren
npm install sudo npm install
# Production-Build anstoßen # Production-Build erstellen
npm run build sudo npm run build
```
##### 2. Webroot vorbereiten
```bash
# Webroot erstellen und Berechtigungen setzen
sudo mkdir -p /var/www/cc24-hub
sudo chown -R $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 # Berechtigungen setzen
sudo chown -R www-data:www-data /var/www/cc24-hub sudo chown -R www-data:www-data /var/www/cc24-hub
``` ```
##### 3. Umgebungsvariablen setzen #### 3. Umgebungsvariablen konfigurieren
Erstelle `/var/www/cc24-hub/.env`: Erstelle `/var/www/cc24-hub/.env`:
```bash ```bash
# AI Konfiguration # === GRUNDKONFIGURATION ===
AI_API_ENDPOINT=https://llm.mikoshi.de # hier geeigneten Endpunkt setzen NODE_ENV=production
AI_API_KEY=your_ai_api_key PUBLIC_BASE_URL=https://ihre-domain.de
AI_MODEL=mistral/mistral-small-latest # hier geeignetes KI-Modell wählen
# Authentifizierung ("false" setzen für Tests, oder wenn kostenlose KI verwendet wird) # === AI-KONFIGURATION (Optional) ===
AI_API_ENDPOINT=https://api.mistral.ai/v1
AI_API_KEY=your_mistral_api_key
AI_MODEL=mistral-small-latest
AI_RATE_LIMIT_DELAY_MS=2000
# === AUTHENTIFIZIERUNG ===
AUTHENTICATION_NECESSARY=true AUTHENTICATION_NECESSARY=true
OIDC_ENDPOINT=https://cloud.cc24.dev OIDC_ENDPOINT=https://ihr-oidc-provider.de
OIDC_CLIENT_ID=your_oidc_client_id OIDC_CLIENT_ID=cc24-hub-client
OIDC_CLIENT_SECRET=your_oidc_client_secret OIDC_CLIENT_SECRET=your_super_secret_client_secret
AUTH_SECRET=your_super_secret_jwt_key_min_32_chars AUTH_SECRET=your_jwt_secret_min_32_characters_long
# Public Configuration # === NEXTCLOUD (Optional) ===
PUBLIC_BASE_URL=https://your-domain.com # hier die URL setzen, mit der von außen zugegriffen wird NEXTCLOUD_ENDPOINT=https://ihre-nextcloud.de
NEXTCLOUD_USERNAME=cc24-hub-user
NEXTCLOUD_PASSWORD=nextcloud_app_password
NEXTCLOUD_UPLOAD_PATH=/kb-media
NEXTCLOUD_PUBLIC_URL=https://ihre-nextcloud.de/s
# === GIT-INTEGRATION (Optional) ===
GIT_PROVIDER=gitea
GIT_API_ENDPOINT=https://ihr-git-server.de/api/v1
GIT_API_TOKEN=your_git_api_token
GIT_REPO_URL=https://ihr-git-server.de/user/cc24-hub
# === UPLOAD-KONFIGURATION ===
LOCAL_UPLOAD_PATH=/var/www/cc24-hub/public/uploads
``` ```
```bash ```bash
# .env sichern # Berechtigungen sichern
sudo chmod 600 /var/www/cc24-hub/.env sudo chmod 600 /var/www/cc24-hub/.env
sudo chown www-data:www-data /var/www/cc24-hub/.env sudo chown www-data:www-data /var/www/cc24-hub/.env
``` ```
##### 4. Systemd-Service erstellen #### 4. Nginx konfigurieren
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`: Erstelle `/etc/nginx/sites-available/cc24-hub`:
```nginx ```nginx
server { server {
listen 80; listen 80;
server_name your-domain.com; server_name ihre-domain.de;
# Redirect HTTP to HTTPS
return 301 https://$server_name$request_uri; return 301 https://$server_name$request_uri;
} }
server { server {
listen 443 ssl http2; listen 443 ssl http2;
server_name your-domain.com; server_name ihre-domain.de;
# SSL Configuration (adjust paths for your certificates) # SSL Konfiguration (Let's Encrypt empfohlen)
ssl_certificate /etc/letsencrypt/live/your-domain.com/fullchain.pem; ssl_certificate /etc/letsencrypt/live/ihre-domain.de/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/your-domain.com/privkey.pem; ssl_certificate_key /etc/letsencrypt/live/ihre-domain.de/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 # Security Headers
add_header X-Frame-Options DENY; add_header X-Frame-Options DENY;
add_header X-Content-Type-Options nosniff; add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block"; add_header X-XSS-Protection "1; mode=block";
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; add_header Referrer-Policy "strict-origin-when-cross-origin";
# Proxy to Node.js application # Static Files
location / { location / {
proxy_pass http://localhost:3000; try_files $uri $uri/ @nodejs;
root /var/www/cc24-hub/dist;
index index.html;
# Cache static assets
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff2?|ttf)$ {
expires 1y;
add_header Cache-Control "public, immutable";
}
}
# API Routes to Node.js
location @nodejs {
proxy_pass http://localhost:4321;
proxy_http_version 1.1; proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade; proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade'; proxy_set_header Connection 'upgrade';
@ -203,360 +229,247 @@ server {
proxy_read_timeout 300s; proxy_read_timeout 300s;
proxy_connect_timeout 75s; proxy_connect_timeout 75s;
} }
# Optional: Serve static assets directly (performance optimization) # Upload limit
location /_astro/ { client_max_body_size 50M;
proxy_pass http://localhost:3000;
expires 1y;
add_header Cache-Control "public, immutable";
}
} }
``` ```
##### 6. Daemon starten und Autostart setzen
```bash ```bash
# Enable Nginx site # Site aktivieren
sudo ln -s /etc/nginx/sites-available/cc24-hub /etc/nginx/sites-enabled/ sudo ln -s /etc/nginx/sites-available/cc24-hub /etc/nginx/sites-enabled/
sudo nginx -t sudo nginx -t
sudo systemctl reload nginx sudo systemctl reload nginx
```
# Enable and start CC24-Hub service #### 5. Systemd Service einrichten
Erstelle `/etc/systemd/system/cc24-hub.service`:
```ini
[Unit]
Description=CC24-Hub DFIR Guide
After=network.target nginx.service
Wants=nginx.service
[Service]
Type=exec
User=www-data
Group=www-data
WorkingDirectory=/var/www/cc24-hub
Environment=NODE_ENV=production
ExecStart=/usr/bin/node ./dist/server/entry.mjs
Restart=always
RestartSec=10
StandardOutput=journal
StandardError=journal
# Security
NoNewPrivileges=yes
PrivateTmp=yes
ProtectSystem=strict
ProtectHome=yes
ReadWritePaths=/var/www/cc24-hub
CapabilityBoundingSet=
# Resource Limits
LimitNOFILE=65536
MemoryMax=512M
[Install]
WantedBy=multi-user.target
```
```bash
# Service aktivieren und starten
sudo systemctl daemon-reload sudo systemctl daemon-reload
sudo systemctl enable cc24-hub sudo systemctl enable cc24-hub
sudo systemctl start cc24-hub sudo systemctl start cc24-hub
# Check status # Status prüfen
sudo systemctl status cc24-hub sudo systemctl status cc24-hub
``` ```
##### 7. Deployment verifizieren ## 🔧 Konfiguration
### Minimalkonfiguration (ohne Auth)
```bash ```bash
# Check application logs # Nur für Tests geeignet
sudo journalctl -u cc24-hub -f AUTHENTICATION_NECESSARY=false
PUBLIC_BASE_URL=http://localhost:4321
# Check if app is responding
curl http://localhost:3000
# Check external access
curl https://your-domain.com
``` ```
#### OIDC Konfigurieren ### Tools-Datenbank
Nextcloud OIDC Einstellungen (sollte auch mit anderen OIDC-Anwendungen klappen): Die Tools werden in `src/data/tools.yaml` verwaltet. Vollständiges Beispiel:
- **Redirect URI**: `https://your-domain.com/auth/callback`
- **Logout URI**: `https://your-domain.com`
## 🔧 Datenformat & Kategorien
Die CC24-Hub verwaltet drei Kategorien von Einträgen in `src/data/tools.yaml`:
### 1. Software-Tools
```yaml ```yaml
tools: tools:
- name: "Autopsy" - name: Autopsy
icon: "📦" type: software # software|method|concept
type: "software" description: >-
description: "Die führende Open-Source-Alternative zu kommerziellen Forensik-Suiten" Die führende Open-Source-Alternative zu kommerziellen Forensik-Suiten mit
domains: ["incident-response", "static-investigations"] intuitiver grafischer Oberfläche. Besonders stark in der Timeline-Analyse,
phases: ["examination", "analysis"] Keyword-Suche und dem Carving gelöschter Dateien. Die modulare
platforms: ["Windows", "Linux"] Plugin-Architektur erlaubt Erweiterungen für spezielle
skillLevel: "intermediate" Untersuchungsszenarien.
accessType: "download" icon: 📦
url: "https://www.autopsy.com/" skillLevel: intermediate # novice|beginner|intermediate|advanced|expert
projectUrl: "https://autopsy.cc24.dev" # CC24-Server URL (optional) url: https://www.autopsy.com/
license: "Apache 2.0" domains:
knowledgebase: true # Hat erweiterte Dokumentation - incident-response
related_concepts: ["Hash Functions & Digital Signatures", "SQL Query Fundamentals"] # Verknüpfung zu Konzepten - static-investigations
tags: ["gui", "filesystem", "timeline-analysis"] - malware-analysis
statusUrl: "https://status.example.com/badge/1/status" # Status-Badge URL (optional) - mobile-forensics
``` - cloud-forensics
phases:
### 2. Forensische Methoden - examination
- analysis
```yaml platforms:
- name: "Live Memory Acquisition Procedure" - Windows
icon: "📋" - Linux
type: "method" related_concepts:
description: "Standardisiertes Verfahren zur forensisch korrekten Akquisition des Arbeitsspeichers" - SQL Query Fundamentals
domains: ["incident-response", "static-investigations"] - Hash Functions & Digital Signatures
phases: ["data-collection"] accessType: download # download|web|api|cli|service
platforms: [] # Methoden haben keine Plattformen license: Apache 2.0
skillLevel: "advanced" knowledgebase: false # true für erweiterte Dokumentation
accessType: null tags:
url: "https://www.nist.gov/publications/guide-integrating-forensic-techniques" - gui
projectUrl: null - filesystem
license: null - timeline-analysis
- carving
- artifact-extraction
- keyword-search
# Optional: Für gehostete Services
projectUrl: https://autopsy.ihre-domain.de
statusUrl: https://status.ihre-domain.de/api/badge/1/status
# Beispiel Methode
- name: Live Response Methodology
type: method
description: >-
Strukturierte Vorgehensweise zur Sammlung volatiler Daten
von laufenden Systemen ohne Shutdown.
icon: 📋
skillLevel: advanced
url: https://www.sans.org/white-papers/live-response/
domains:
- incident-response
phases:
- data-collection
related_concepts:
- Memory Forensics Fundamentals
tags:
- volatile-data
- live-analysis
- methodology
knowledgebase: true
# Beispiel Konzept
- name: Hash Functions & Digital Signatures
type: concept
description: >-
Kryptographische Grundlagen für Datenintegrität und
Authentifizierung in der digitalen Forensik.
icon: 🔐
skillLevel: intermediate
url: https://en.wikipedia.org/wiki/Cryptographic_hash_function
domains:
- incident-response
- static-investigations
- malware-analysis
phases:
- data-collection
- examination
tags:
- cryptography
- data-integrity
- evidence-preservation
knowledgebase: false knowledgebase: false
related_concepts: null # Können optional Konzepte verknüpfen
tags: ["memory-acquisition", "volatile-evidence", "procedure"] # Konfiguration der Domänen
domains:
- id: incident-response
name: Incident Response & Breach-Untersuchung
- id: static-investigations
name: Datenträgerforensik & Ermittlungen
- id: malware-analysis
name: Malware-Analyse & Reverse Engineering
- id: mobile-forensics
name: Mobile Geräte & App-Forensik
- id: cloud-forensics
name: Cloud & Virtuelle Umgebungen
# Konfiguration der Phasen (NIST Framework)
phases:
- id: data-collection
name: Datensammlung
description: Imaging, Acquisition, Remote Collection Tools
- id: examination
name: Auswertung
description: Parsing, Extraction, Initial Analysis Tools
- id: analysis
name: Analyse
description: Deep Analysis, Correlation, Visualization Tools
- id: reporting
name: Bericht & Präsentation
description: Documentation, Visualization, Presentation Tools
# Domänenübergreifende Kategorien
domain-agnostic-software:
- id: collaboration-general
name: Übergreifend & Kollaboration
description: Cross-cutting tools and collaboration platforms
- id: specific-os
name: Betriebssysteme
description: Operating Systems which focus on forensics
``` ```
### 3. Grundlagenkonzepte (NEU) ## 📦 Updates
```yaml
- name: "Regular Expressions (Regex)"
icon: "🔤"
type: "concept"
description: "Pattern matching language for searching, extracting, and manipulating text"
domains: ["incident-response", "malware-analysis"]
phases: ["examination", "analysis"]
platforms: [] # Konzepte haben keine Plattformen
skillLevel: "intermediate"
accessType: null
url: "https://regexr.com/"
projectUrl: null
license: null
knowledgebase: true # Erweiterte Erklärung in Knowledgebase
related_concepts: null # Konzepte verweisen nicht auf andere Konzepte
tags: ["pattern-matching", "text-processing", "log-analysis"]
```
### Verfügbare Kategorien
**Domänen:**
- `incident-response` - Incident Response & Breach-Untersuchung
- `static-investigations` - Datenträgerforensik & Ermittlungen
- `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 (NIST SP 800-86):**
- `data-collection` - Datensammlung
- `examination` - Auswertung
- `analysis` - Analyse
- `reporting` - Bericht & Präsentation
**Domain-agnostic Kategorien:**
- `collaboration-general` - Übergreifend & Kollaboration
- `specific-os` - Betriebssysteme
## 📚 Knowledgebase-System
### Erweiterte Dokumentation erstellen
Die Knowledgebase bietet detaillierte Artikel für Tools, Methoden und Konzepte. So erstellen Sie neue Einträge:
#### 1. Knowledgebase-Flag setzen
Setzen Sie in `src/data/tools.yaml` das Flag:
```yaml
knowledgebase: true
```
#### 2. Artikel-Datei erstellen
Erstellen Sie eine Markdown-Datei in `src/content/knowledgebase/`:
**Dateiname-Schema:** `[tool-name-slug].md`
**Beispiel:** `src/content/knowledgebase/autopsy.md`
```markdown
---
title: "Autopsy - Umfassende Forensik-Suite"
tool_name: "Autopsy"
description: "Detaillierte Anleitung und Best Practices für Autopsy"
last_updated: 2024-01-15
author: "CC24-Team"
difficulty: "intermediate"
categories: ["filesystem-analysis", "timeline-analysis"]
tags: ["gui", "windows", "linux", "open-source"]
sections:
overview: true
installation: true
configuration: true
usage_examples: true
best_practices: true
troubleshooting: true
advanced_topics: false
review_status: "published"
---
# Übersicht
Autopsy ist eine grafische Benutzeroberfläche für The Sleuth Kit (TSK) und bietet...
## Installation
### Windows
1. Download der neuesten Version von [autopsy.com](https://www.autopsy.com/)
2. Ausführung des Installers mit Administratorrechten
3. ...
## Konfiguration
### Grundeinstellungen
- Arbeitsverzeichnis festlegen
- Hash-Algorithmen auswählen
- ...
## Verwendungsbeispiele
### Fall 1: Gelöschte Dateien wiederherstellen
1. Neuen Fall erstellen
2. Image hinzufügen
3. ...
## Best Practices
- Immer Hash-Verifikation durchführen
- Regelmäßige Backups der Case-Datenbank
- ...
## Troubleshooting
### Problem: Autopsy startet nicht
**Lösung:** Java-Version überprüfen...
### Problem: Langsame Performance
**Lösung:** RAM-Zuteilung erhöhen...
## Weiterführende Themen
- Integration mit externen Tools
- Custom Modules entwickeln
- ...
```
#### 3. Schema-Validierung
Das System validiert automatisch folgende Felder:
**Pflichtfelder:**
- `title`: Anzeigename des Artikels
- `tool_name`: Exakter Name aus tools.yaml
- `description`: Kurze Beschreibung
- `last_updated`: Datum der letzten Aktualisierung
- `difficulty`: `novice|beginner|intermediate|advanced|expert`
**Optionale Felder:**
- `author`: Standard "CC24-Team"
- `categories`: Array von Kategorien
- `tags`: Array von Tags
- `sections`: Welche Abschnitte enthalten sind
- `review_status`: `draft|review|published` (Standard: `published`)
#### 4. Automatische Verlinkung
- Artikel sind automatisch über `/knowledgebase/[tool-slug]` erreichbar
- Links werden automatisch in Tool-Details angezeigt
- Suchfunktion indiziert Artikel-Inhalte
### Konzept-Verlinkung
Tools können mit Grundlagenkonzepten verknüpft werden:
```yaml
# Tool-Definition
- name: "Autopsy"
related_concepts: ["Hash Functions & Digital Signatures", "SQL Query Fundamentals"]
# Konzept-Definition
- name: "Hash Functions & Digital Signatures"
type: "concept"
description: "Cryptographic principles for data integrity verification"
```
Die KI-Empfehlungen nutzen diese Verlinkungen für Hintergrundwissen-Empfehlungen.
## 🤖 KI-Integration
### Workflow-Empfehlungen
Beschreibung forensischer Szenarien für maßgeschneiderte Workflows mit phasenbasierten Tool-Empfehlungen und Prioritätsbewertung.
### Tool-spezifische Empfehlungen
Konkrete Tool-Vorschläge für spezifische Probleme mit detaillierten Begründungen, Implementierungsansätzen und Vor-/Nachteilen.
### Konzept-Integration
Die KI berücksichtigt automatisch verknüpfte Grundlagenkonzepte und empfiehlt relevantes Hintergrundwissen.
**API-Endpunkt:** `/api/ai/query`
- **Rate Limiting**: 10 Anfragen pro Minute pro Benutzer
- **Modi**: `workflow` (Szenario-basiert) oder `tool` (Problem-spezifisch)
- **Authentifizierung**: Optional konfigurierbar via `AUTHENTICATION_NECESSARY`
## 🔐 Authentifizierung
OIDC-Integration mit JWT-Sessions:
- **6 Stunden Gültigkeit**
- **HTTP-Only Cookies** mit CSRF-Schutz
- **Nextcloud/Keycloak kompatibel**
**Relevante Dateien:**
- `src/utils/auth.ts` - Kern-Authentifizierungslogik
- `src/pages/api/auth/` - Auth-API-Endpunkte
## 📁 Datei-Referenz
### Wichtige Konfigurationsdateien
- `src/data/tools.yaml` - Hauptdatenbank für Tools, Methoden und Konzepte
- `src/content/config.ts` - Schema für Knowledgebase-Artikel
- `src/utils/dataService.js` - Datenverarbeitungslogik
- `src/styles/global.css` - Zentrale Stylesheet-Definitionen
### Content-Verzeichnisse
- `src/content/knowledgebase/` - Knowledgebase-Artikel (Markdown)
- `src/components/` - Wiederverwendbare UI-Komponenten
- `src/pages/api/` - Backend-API-Endpunkte
## 🤝 Beitragen
### Tool/Methode/Konzept hinzufügen
**Option 1: Direkte YAML-Bearbeitung**
1. Fork des Repositories erstellen
2. `src/data/tools.yaml` bearbeiten
3. Bei Bedarf Knowledgebase-Artikel erstellen
4. Pull Request mit Beschreibung erstellen
**Option 2: Web-Editor verwenden**
1. YAML-Editor öffnen (`/dfir_yaml_editor.html`)
2. Eintrag hinzufügen (Tool/Methode/Konzept)
3. YAML exportieren und in Pull Request einreichen
### Knowledgebase-Artikel erweitern
1. Tool in `tools.yaml` identifizieren
2. `knowledgebase: true` setzen
3. Artikel in `src/content/knowledgebase/[slug].md` erstellen
4. Schema-Validierung beachten
5. Pull Request einreichen
### Korrekturen & Verbesserungen
- Bug Reports und Feature Requests über Issues melden
- Code-Beiträge über Pull Requests willkommen
- Dokumentation und Übersetzungen erwünscht
## 🐛 Troubleshooting
**KI-Empfehlungen funktionieren nicht:**
- `.env` Datei korrekt konfiguriert?
- `AUTHENTICATION_NECESSARY=false` für Tests setzen
- API-Endpoint erreichbar?
**Authentifizierung schlägt fehl:**
- OIDC-Endpoints korrekt?
- Redirect-URIs im OIDC-Provider registriert?
- `AUTH_SECRET` mindestens 32 Zeichen?
**Knowledgebase-Artikel werden nicht angezeigt:**
- `knowledgebase: true` in tools.yaml gesetzt?
- Markdown-Datei existiert in `src/content/knowledgebase/`?
- Schema-Validierung erfolgreich?
**Logs prüfen:**
```bash ```bash
# Anwendungs-Logs # Repository aktualisieren
sudo journalctl -u cc24-hub -f cd /var/www/cc24-hub
sudo git pull
# Development-Modus # Dependencies aktualisieren
npm run dev sudo npm install
# Rebuild
sudo npm run build
# Service neustarten
sudo systemctl restart cc24-hub
``` ```
## 💾 Backup
Wichtige Dateien für Backup:
```bash
/var/www/cc24-hub/src/data/tools.yaml
/var/www/cc24-hub/.env
/etc/nginx/sites-available/cc24-hub
/etc/systemd/system/cc24-hub.service
```
## 🤝 Beiträge
Contributions sind willkommen! Bitte:
1. Issue im Repository erstellen
2. Feature-Branch erstellen
3. Pull Request öffnen
4. Tests durchführen
## 📞 Support
Bei Problemen oder Fragen:
- **Issues:** [Repository Issues](https://git.cc24.dev/mstoeck3/cc24-hub/issues)
- **Dokumentation:** Siehe `/knowledgebase` auf der Website
## 📄 Lizenz
Dieses Projekt steht unter der BSD-3-Clause Lizenz.

View File

@ -11,7 +11,6 @@ config();
// JWT session constants // JWT session constants
const SECRET_KEY = new TextEncoder().encode( const SECRET_KEY = new TextEncoder().encode(
process.env.AUTH_SECRET || process.env.AUTH_SECRET ||
process.env.OIDC_CLIENT_SECRET ||
'cc24-hub-default-secret-key-change-in-production' 'cc24-hub-default-secret-key-change-in-production'
); );
const SESSION_DURATION = 6 * 60 * 60; // 6 hours in seconds const SESSION_DURATION = 6 * 60 * 60; // 6 hours in seconds