From 6308c037096d15b63198a727a1d19ce6d07b7409 Mon Sep 17 00:00:00 2001 From: overcuriousity Date: Sun, 3 Aug 2025 12:41:02 +0200 Subject: [PATCH 01/19] enhancement 1: audit trail --- .env.example | 189 +++++++++++------ README.md | 8 +- src/components/AIQueryInterface.astro | 94 +++++++++ src/config/forensic.config.ts | 126 ++++++++++++ src/pages/api/ai/enhance-input.ts | 8 +- src/utils/aiPipeline.ts | 285 +++++++++++++++++++++++++- 6 files changed, 639 insertions(+), 71 deletions(-) create mode 100644 src/config/forensic.config.ts diff --git a/.env.example b/.env.example index cf2ad4b..db539be 100644 --- a/.env.example +++ b/.env.example @@ -1,79 +1,154 @@ -# =========================================== +# ============================================================================ # ForensicPathways Environment Configuration -# =========================================== +# ============================================================================ +# Copy this file to .env and adjust the values below. +# Settings are ordered by likelihood of needing adjustment during setup. -# === Authentication Configuration === +# ============================================================================ +# 1. CORE APPLICATION SETTINGS (REQUIRED - ADJUST FOR YOUR SETUP) +# ============================================================================ + +# Your application's public URL (used for redirects and links) +PUBLIC_BASE_URL=http://localhost:4321 + +# Application environment (development, production, staging) +NODE_ENV=development + +# Secret key for session encryption (CHANGE IN PRODUCTION!) +AUTH_SECRET=your-secret-key-change-in-production-please + +# ============================================================================ +# 2. AI SERVICES CONFIGURATION (REQUIRED FOR AI FEATURES) +# ============================================================================ + +# Main AI Analysis Service (for query processing and recommendations) +# Example uses Mistral AI - adjust endpoint/model as needed +AI_ANALYZER_ENDPOINT=https://api.mistral.ai/v1 +AI_ANALYZER_API_KEY=your-mistral-api-key-here +AI_ANALYZER_MODEL=mistral-small-latest + +# Vector Embeddings Service (for semantic search - can use same provider) +AI_EMBEDDINGS_ENABLED=true +AI_EMBEDDINGS_ENDPOINT=https://api.mistral.ai/v1/embeddings +AI_EMBEDDINGS_API_KEY=your-mistral-api-key-here +AI_EMBEDDINGS_MODEL=mistral-embed + +# ============================================================================ +# 3. AUTHENTICATION (OPTIONAL - SET TO 'true' IF NEEDED) +# ============================================================================ + +# Enable authentication for different features AUTHENTICATION_NECESSARY=false AUTHENTICATION_NECESSARY_CONTRIBUTIONS=false AUTHENTICATION_NECESSARY_AI=false -AUTH_SECRET=your-secret-key-change-in-production -# OIDC Configuration (if authentication enabled) +# OIDC Provider Settings (only needed if authentication enabled) OIDC_ENDPOINT=https://your-oidc-provider.com OIDC_CLIENT_ID=your-client-id OIDC_CLIENT_SECRET=your-client-secret -# =================================================================== -# AI CONFIGURATION - Complete Reference for Improved Pipeline -# =================================================================== +# ============================================================================ +# 4. ADVANCED AI CONFIGURATION (FINE-TUNING - DEFAULT VALUES USUALLY WORK) +# ============================================================================ -# === CORE AI ENDPOINTS & MODELS === -AI_API_ENDPOINT=https://llm.mikoshi.de -AI_API_KEY=sREDACTED3w -AI_MODEL='mistral/mistral-small-latest' +# Pipeline Performance Settings +AI_MAX_SELECTED_ITEMS=60 # Tools analyzed per micro-task +AI_EMBEDDING_CANDIDATES=60 # Vector search candidates +AI_MICRO_TASK_DELAY_MS=500 # Delay between AI micro-tasks -# === IMPROVED PIPELINE: Use separate analyzer model (mistral-small is fine) === -AI_ANALYZER_ENDPOINT=https://llm.mikoshi.de -AI_ANALYZER_API_KEY=skREDACTEDw3w -AI_ANALYZER_MODEL='mistral/mistral-small-latest' +# Rate Limiting (requests per minute) +AI_RATE_LIMIT_MAX_REQUESTS=6 # Main query rate limit +AI_MICRO_TASK_RATE_LIMIT=15 # Micro-task rate limit +AI_RATE_LIMIT_DELAY_MS=3000 # Delay between rate-limited calls -# === EMBEDDINGS CONFIGURATION === -AI_EMBEDDINGS_ENABLED=true -AI_EMBEDDINGS_ENDPOINT=https://api.mistral.ai/v1/embeddings -AI_EMBEDDINGS_API_KEY=ZREDACTED3wL -AI_EMBEDDINGS_MODEL=mistral-embed -AI_EMBEDDINGS_BATCH_SIZE=20 -AI_EMBEDDINGS_BATCH_DELAY_MS=1000 +# Embeddings Batch Processing +AI_EMBEDDINGS_BATCH_SIZE=20 # Embeddings processed per batch +AI_EMBEDDINGS_BATCH_DELAY_MS=1000 # Delay between embedding batches -# === PIPELINE: VectorIndex (HNSW) Configuration === -AI_MAX_SELECTED_ITEMS=60 # Tools visible to each micro-task -AI_EMBEDDING_CANDIDATES=60 # VectorIndex candidates (HNSW is more efficient) -AI_SIMILARITY_THRESHOLD=0.3 # Not used by VectorIndex (uses cosine distance internally) +# Timeouts and Limits +AI_MICRO_TASK_TIMEOUT_MS=25000 # Max time per micro-task +AI_QUEUE_MAX_SIZE=50 # Max queued requests +AI_SIMILARITY_THRESHOLD=0.3 # Vector similarity threshold -# === MICRO-TASK CONFIGURATION === -AI_MICRO_TASK_DELAY_MS=500 # Delay between micro-tasks -AI_MICRO_TASK_TIMEOUT_MS=25000 # Timeout per micro-task (increased for full context) +# ============================================================================ +# 5. FORENSIC AUDIT SYSTEM (OPTIONAL - FOR TRANSPARENCY AND DEBUGGING) +# ============================================================================ -# === RATE LIMITING === -AI_RATE_LIMIT_DELAY_MS=3000 # Main rate limit delay -AI_RATE_LIMIT_MAX_REQUESTS=6 # Main requests per minute (reduced - fewer but richer calls) -AI_MICRO_TASK_RATE_LIMIT=15 # Micro-task requests per minute (was 30) +# Enable detailed audit trail of AI decision-making +FORENSIC_AUDIT_ENABLED=false -# === QUEUE MANAGEMENT === -AI_QUEUE_MAX_SIZE=50 -AI_QUEUE_CLEANUP_INTERVAL_MS=300000 +# Audit detail level: minimal, standard, verbose +FORENSIC_AUDIT_DETAIL_LEVEL=standard -# === PERFORMANCE & MONITORING === -AI_MICRO_TASK_DEBUG=true -AI_PERFORMANCE_METRICS=true -AI_RESPONSE_CACHE_TTL_MS=3600000 +# Audit retention and limits +FORENSIC_AUDIT_RETENTION_HOURS=72 # Keep audit data for 3 days +FORENSIC_AUDIT_MAX_ENTRIES=50 # Max entries per request -# =================================================================== -# LEGACY VARIABLES (still used but less important) -# =================================================================== +# ============================================================================ +# 6. QUALITY CONTROL AND BIAS DETECTION (OPTIONAL - ADVANCED FEATURES) +# ============================================================================ -# These are still used by other parts of the system: -AI_RESPONSE_CACHE_TTL_MS=3600000 # For caching responses -AI_QUEUE_MAX_SIZE=50 # Queue management -AI_QUEUE_CLEANUP_INTERVAL_MS=300000 # Queue cleanup +# Confidence Scoring Weights (must sum to 1.0) +CONFIDENCE_EMBEDDINGS_WEIGHT=0.3 +CONFIDENCE_CONSENSUS_WEIGHT=0.25 +CONFIDENCE_DOMAIN_MATCH_WEIGHT=0.25 +CONFIDENCE_FRESHNESS_WEIGHT=0.2 -# === Application Configuration === -PUBLIC_BASE_URL=http://localhost:4321 -NODE_ENV=development +# Confidence Thresholds (0-100) +CONFIDENCE_MINIMUM_THRESHOLD=40 +CONFIDENCE_MEDIUM_THRESHOLD=60 +CONFIDENCE_HIGH_THRESHOLD=80 -# Nextcloud Integration (Optional) -NEXTCLOUD_ENDPOINT=https://your-nextcloud.com -NEXTCLOUD_USERNAME=your-username -NEXTCLOUD_PASSWORD=your-password -NEXTCLOUD_UPLOAD_PATH=/kb-media -NEXTCLOUD_PUBLIC_URL=https://your-nextcloud.com/s/ \ No newline at end of file +# Bias Detection Settings +BIAS_DETECTION_ENABLED=false +BIAS_POPULARITY_THRESHOLD=0.7 # Detect over-popular tools +BIAS_DIVERSITY_MINIMUM=0.6 # Require recommendation diversity +BIAS_CELEBRITY_TOOLS="Volatility 3,Wireshark,Autopsy,Maltego" + +# Quality Control Thresholds +QUALITY_MIN_RESPONSE_LENGTH=50 # Minimum AI response length +QUALITY_MIN_SELECTION_COUNT=1 # Minimum tools selected +QUALITY_MAX_PROCESSING_TIME_MS=30000 # Max processing time + +# ============================================================================ +# 7. USER INTERFACE PREFERENCES (OPTIONAL - UI DEFAULTS) +# ============================================================================ + +# Default UI behavior (users can override) +UI_SHOW_AUDIT_TRAIL_DEFAULT=false +UI_SHOW_CONFIDENCE_SCORES=true +UI_SHOW_BIAS_WARNINGS=true +UI_AUDIT_TRAIL_COLLAPSIBLE=true + +# ============================================================================ +# 8. EXTERNAL INTEGRATIONS (OPTIONAL - ONLY IF USING THESE SERVICES) +# ============================================================================ + +# Nextcloud Integration (for file uploads) +# NEXTCLOUD_ENDPOINT=https://your-nextcloud.com +# NEXTCLOUD_USERNAME=your-username +# NEXTCLOUD_PASSWORD=your-password +# NEXTCLOUD_UPLOAD_PATH=/kb-media +# NEXTCLOUD_PUBLIC_URL=https://your-nextcloud.com/s/ + +# ============================================================================ +# 9. PERFORMANCE AND MONITORING (OPTIONAL - FOR PRODUCTION OPTIMIZATION) +# ============================================================================ + +# Caching and Queue Management +AI_RESPONSE_CACHE_TTL_MS=3600000 # Cache responses for 1 hour +AI_QUEUE_CLEANUP_INTERVAL_MS=300000 # Cleanup queue every 5 minutes + +# Debug and Monitoring +AI_MICRO_TASK_DEBUG=false # Enable detailed micro-task logging +AI_PERFORMANCE_METRICS=false # Enable performance tracking + +# ============================================================================ +# SETUP CHECKLIST: +# ============================================================================ +# 1. Set PUBLIC_BASE_URL to your domain +# 2. Change AUTH_SECRET to a secure random string +# 3. Configure AI service endpoints and API keys +# 4. Set authentication options if needed +# 5. Test with default advanced settings before adjusting +# ============================================================================ \ No newline at end of file diff --git a/README.md b/README.md index 89aac12..b6f72a2 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ Ein kuratiertes Verzeichnis für Digital Forensics und Incident Response (DFIR) ### AI Service (Mistral/OpenAI-kompatibel) - **Zweck:** KI-gestützte Tool-Empfehlungen -- **Konfiguration:** `AI_API_ENDPOINT`, `AI_API_KEY`, `AI_MODEL` +- **Konfiguration:** `AI_ANALYZER_ENDPOINT`, `AI_ANALYZER_API_KEY`, `AI_ANALYZER_MODEL` ### Uptime Kuma - **Zweck:** Status-Monitoring für gehostete Services @@ -157,9 +157,9 @@ 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_ANALYZER_MODEL=mistral-large-latest +AI_ANALYZER_ENDPOINT=https://api.mistral.ai +AI_ANALYZER_API_KEY=your-mistral-api-key AI_RATE_LIMIT_DELAY_MS=1000 # Git Integration (Required for contributions) diff --git a/src/components/AIQueryInterface.astro b/src/components/AIQueryInterface.astro index 2061bed..585b4cf 100644 --- a/src/components/AIQueryInterface.astro +++ b/src/components/AIQueryInterface.astro @@ -711,6 +711,7 @@ class AIQueryInterface { ${this.renderBackgroundKnowledge(recommendation.background_knowledge)} ${this.renderWorkflowPhases(toolsByPhase, phaseOrder, phaseNames)} ${this.renderWorkflowSuggestion(recommendation.workflow_suggestion)} + ${this.renderAuditTrail(recommendation.auditTrail)} `; @@ -725,12 +726,105 @@ class AIQueryInterface { ${this.renderBackgroundKnowledge(recommendation.background_knowledge)} ${this.renderToolRecommendations(recommendation.recommended_tools)} ${this.renderAdditionalConsiderations(recommendation.additional_considerations)} + ${this.renderAuditTrail(recommendation.auditTrail)} `; this.elements.results.innerHTML = html; } + // NEW: Audit Trail Rendering Functions + renderAuditTrail(auditTrail) { + if (!auditTrail || !Array.isArray(auditTrail) || auditTrail.length === 0) { + return ''; + } + + // Reuse existing card and info styles from global.css + return ` +
+
+ + + + + + +

Forensic Audit Trail (${auditTrail.length} Entries)

+ +
+ +
+ `; + } + + renderAuditEntry(entry) { + const confidenceColor = entry.confidence >= 80 ? 'var(--color-accent)' : + entry.confidence >= 60 ? 'var(--color-warning)' : 'var(--color-error)'; + + const formattedTime = new Date(entry.timestamp).toLocaleTimeString('de-DE', { + hour: '2-digit', + minute: '2-digit', + second: '2-digit' + }); + + // Reuse existing grid and text utilities + return ` +
+
+ ${entry.phase} → ${entry.action} +
+ + ${entry.confidence}% confidence + + ${entry.processingTimeMs}ms + ${formattedTime} +
+
+
+
Input: ${this.formatAuditData(entry.input)}
+
Output: ${this.formatAuditData(entry.output)}
+
+ ${entry.metadata && Object.keys(entry.metadata).length > 0 ? ` +
+ Metadata: ${this.formatAuditData(entry.metadata)} +
+ ` : ''} +
+ `; + } + + formatAuditData(data) { + if (data === null || data === undefined) return 'null'; + if (typeof data === 'string') { + return data.length > 100 ? data.slice(0, 100) + '...' : data; + } + if (typeof data === 'number') return data.toString(); + if (typeof data === 'boolean') return data.toString(); + if (Array.isArray(data)) { + if (data.length === 0) return '[]'; + if (data.length <= 3) return JSON.stringify(data); + return `[${data.slice(0, 3).map(i => typeof i === 'string' ? i : JSON.stringify(i)).join(', ')}, ...+${data.length - 3}]`; + } + if (typeof data === 'object') { + const keys = Object.keys(data); + if (keys.length === 0) return '{}'; + if (keys.length <= 3) { + return '{' + keys.map(k => `${k}: ${typeof data[k] === 'string' ? data[k].slice(0, 20) + (data[k].length > 20 ? '...' : '') : JSON.stringify(data[k])}`).join(', ') + '}'; + } + return `{${keys.slice(0, 3).join(', ')}, ...+${keys.length - 3} keys}`; + } + return String(data); + } + renderHeader(title, query) { return `
diff --git a/src/config/forensic.config.ts b/src/config/forensic.config.ts new file mode 100644 index 0000000..5723854 --- /dev/null +++ b/src/config/forensic.config.ts @@ -0,0 +1,126 @@ +// src/config/forensic.config.ts +// Centralized configuration for forensic RAG enhancements + +export const FORENSIC_CONFIG = { + audit: { + enabled: process.env.FORENSIC_AUDIT_ENABLED === 'true', + detailLevel: (process.env.FORENSIC_AUDIT_DETAIL_LEVEL as 'minimal' | 'standard' | 'verbose') || 'standard', + retentionHours: parseInt(process.env.FORENSIC_AUDIT_RETENTION_HOURS || '72', 10), + maxEntriesPerRequest: parseInt(process.env.FORENSIC_AUDIT_MAX_ENTRIES || '50', 10) + }, + confidence: { + embeddingsWeight: parseFloat(process.env.CONFIDENCE_EMBEDDINGS_WEIGHT || '0.3'), + consensusWeight: parseFloat(process.env.CONFIDENCE_CONSENSUS_WEIGHT || '0.25'), + domainMatchWeight: parseFloat(process.env.CONFIDENCE_DOMAIN_MATCH_WEIGHT || '0.25'), + freshnessWeight: parseFloat(process.env.CONFIDENCE_FRESHNESS_WEIGHT || '0.2'), + minimumThreshold: parseInt(process.env.CONFIDENCE_MINIMUM_THRESHOLD || '40', 10), + highThreshold: parseInt(process.env.CONFIDENCE_HIGH_THRESHOLD || '80', 10), + mediumThreshold: parseInt(process.env.CONFIDENCE_MEDIUM_THRESHOLD || '60', 10) + }, + bias: { + enabled: process.env.BIAS_DETECTION_ENABLED === 'true', + popularityThreshold: parseFloat(process.env.BIAS_POPULARITY_THRESHOLD || '0.7'), + diversityMinimum: parseFloat(process.env.BIAS_DIVERSITY_MINIMUM || '0.6'), + domainMismatchThreshold: parseFloat(process.env.BIAS_DOMAIN_MISMATCH_THRESHOLD || '0.3'), + warningThreshold: parseInt(process.env.BIAS_WARNING_THRESHOLD || '3', 10), + celebrityTools: (process.env.BIAS_CELEBRITY_TOOLS || 'Volatility 3,Wireshark,Autopsy,Maltego').split(',').map(t => t.trim()) + }, + // Quality thresholds for various metrics + quality: { + minResponseLength: parseInt(process.env.QUALITY_MIN_RESPONSE_LENGTH || '50', 10), + minSelectionCount: parseInt(process.env.QUALITY_MIN_SELECTION_COUNT || '1', 10), + maxProcessingTime: parseInt(process.env.QUALITY_MAX_PROCESSING_TIME_MS || '30000', 10) + }, + // Display preferences + ui: { + showAuditTrailByDefault: process.env.UI_SHOW_AUDIT_TRAIL_DEFAULT === 'true', + showConfidenceScores: process.env.UI_SHOW_CONFIDENCE_SCORES !== 'false', + showBiasWarnings: process.env.UI_SHOW_BIAS_WARNINGS !== 'false', + auditTrailCollapsible: process.env.UI_AUDIT_TRAIL_COLLAPSIBLE !== 'false' + } +}; + +// Validation function to ensure configuration is valid +export function validateForensicConfig(): { valid: boolean; errors: string[] } { + const errors: string[] = []; + + // Validate audit configuration + if (FORENSIC_CONFIG.audit.retentionHours < 1 || FORENSIC_CONFIG.audit.retentionHours > 168) { + errors.push('FORENSIC_AUDIT_RETENTION_HOURS must be between 1 and 168 (1 week)'); + } + + if (!['minimal', 'standard', 'verbose'].includes(FORENSIC_CONFIG.audit.detailLevel)) { + errors.push('FORENSIC_AUDIT_DETAIL_LEVEL must be one of: minimal, standard, verbose'); + } + + // Validate confidence weights sum to approximately 1.0 + const weightSum = FORENSIC_CONFIG.confidence.embeddingsWeight + + FORENSIC_CONFIG.confidence.consensusWeight + + FORENSIC_CONFIG.confidence.domainMatchWeight + + FORENSIC_CONFIG.confidence.freshnessWeight; + + if (Math.abs(weightSum - 1.0) > 0.05) { + errors.push(`Confidence weights must sum to 1.0 (currently ${weightSum.toFixed(3)})`); + } + + // Validate threshold ranges + if (FORENSIC_CONFIG.confidence.minimumThreshold < 0 || FORENSIC_CONFIG.confidence.minimumThreshold > 100) { + errors.push('CONFIDENCE_MINIMUM_THRESHOLD must be between 0 and 100'); + } + + if (FORENSIC_CONFIG.confidence.highThreshold <= FORENSIC_CONFIG.confidence.mediumThreshold) { + errors.push('CONFIDENCE_HIGH_THRESHOLD must be greater than CONFIDENCE_MEDIUM_THRESHOLD'); + } + + // Validate bias thresholds + if (FORENSIC_CONFIG.bias.popularityThreshold < 0 || FORENSIC_CONFIG.bias.popularityThreshold > 1) { + errors.push('BIAS_POPULARITY_THRESHOLD must be between 0 and 1'); + } + + if (FORENSIC_CONFIG.bias.diversityMinimum < 0 || FORENSIC_CONFIG.bias.diversityMinimum > 1) { + errors.push('BIAS_DIVERSITY_MINIMUM must be between 0 and 1'); + } + + return { + valid: errors.length === 0, + errors + }; +} + +// Helper functions for configuration access +export function isAuditEnabled(): boolean { + return FORENSIC_CONFIG.audit.enabled; +} + +export function getAuditDetailLevel(): 'minimal' | 'standard' | 'verbose' { + return FORENSIC_CONFIG.audit.detailLevel; +} + +export function getConfidenceThresholds() { + return { + minimum: FORENSIC_CONFIG.confidence.minimumThreshold, + medium: FORENSIC_CONFIG.confidence.mediumThreshold, + high: FORENSIC_CONFIG.confidence.highThreshold + }; +} + +export function isBiasDetectionEnabled(): boolean { + return FORENSIC_CONFIG.bias.enabled; +} + +// Initialize and validate configuration on module load +const configValidation = validateForensicConfig(); +if (!configValidation.valid) { + console.warn('[FORENSIC CONFIG] Configuration validation failed:', configValidation.errors); + // In development, we might want to throw an error + if (process.env.NODE_ENV === 'development') { + throw new Error(`Forensic configuration invalid: ${configValidation.errors.join(', ')}`); + } +} + +console.log('[FORENSIC CONFIG] Configuration loaded:', { + auditEnabled: FORENSIC_CONFIG.audit.enabled, + confidenceEnabled: true, // Always enabled + biasDetectionEnabled: FORENSIC_CONFIG.bias.enabled, + detailLevel: FORENSIC_CONFIG.audit.detailLevel +}); \ No newline at end of file diff --git a/src/pages/api/ai/enhance-input.ts b/src/pages/api/ai/enhance-input.ts index d21c317..0d12a09 100644 --- a/src/pages/api/ai/enhance-input.ts +++ b/src/pages/api/ai/enhance-input.ts @@ -15,8 +15,8 @@ function getEnv(key: string): string { } const AI_ENDPOINT = getEnv('AI_ANALYZER_ENDPOINT'); -const AI_API_KEY = getEnv('AI_ANALYZER_API_KEY'); -const AI_MODEL = getEnv('AI_ANALYZER_MODEL'); +const AI_ANALYZER_API_KEY = getEnv('AI_ANALYZER_API_KEY'); +const AI_ANALYZER_MODEL = getEnv('AI_ANALYZER_MODEL'); const rateLimitStore = new Map(); const RATE_LIMIT_WINDOW = 60 * 1000; // 1 minute @@ -126,10 +126,10 @@ export const POST: APIRoute = async ({ request }) => { method: 'POST', headers: { 'Content-Type': 'application/json', - 'Authorization': `Bearer ${AI_API_KEY}` + 'Authorization': `Bearer ${AI_ANALYZER_API_KEY}` }, body: JSON.stringify({ - model: AI_MODEL, + model: AI_ANALYZER_MODEL, messages: [ { role: 'user', diff --git a/src/utils/aiPipeline.ts b/src/utils/aiPipeline.ts index ac727f7..f608077 100644 --- a/src/utils/aiPipeline.ts +++ b/src/utils/aiPipeline.ts @@ -1,4 +1,4 @@ -// src/utils/aiPipeline.ts +// src/utils/aiPipeline.ts - Enhanced with Audit Trail System import { getCompressedToolsDataForAI } from './dataService.js'; import { embeddingsService, type EmbeddingData } from './embeddings.js'; @@ -30,6 +30,19 @@ interface AnalysisResult { }; } +// NEW: Audit Trail Types +interface AuditEntry { + timestamp: number; + phase: string; // 'retrieval', 'selection', 'micro-task-N' + action: string; // 'embeddings-search', 'ai-selection', 'tool-evaluation' + input: any; // What went into this step + output: any; // What came out of this step + confidence: number; // 0-100: How confident we are in this step + processingTimeMs: number; + metadata: Record; // Additional context +} + +// Enhanced AnalysisContext with Audit Trail interface AnalysisContext { userQuery: string; mode: string; @@ -47,6 +60,9 @@ interface AnalysisContext { backgroundKnowledge?: Array<{concept: any, relevance: string}>; seenToolNames: Set; + + // NEW: Audit Trail + auditTrail: AuditEntry[]; } class ImprovedMicroTaskAIPipeline { @@ -58,6 +74,16 @@ class ImprovedMicroTaskAIPipeline { private maxContextTokens: number; private maxPromptTokens: number; + + // NEW: Audit Configuration + private auditConfig: { + enabled: boolean; + detailLevel: 'minimal' | 'standard' | 'verbose'; + retentionHours: number; + }; + + // NEW: Temporary audit storage for pre-context operations + private tempAuditEntries: AuditEntry[] = []; constructor() { this.config = { @@ -73,6 +99,13 @@ class ImprovedMicroTaskAIPipeline { this.maxContextTokens = parseInt(process.env.AI_MAX_CONTEXT_TOKENS || '4000', 10); this.maxPromptTokens = parseInt(process.env.AI_MAX_PROMPT_TOKENS || '1500', 10); + + // NEW: Initialize Audit Configuration + this.auditConfig = { + enabled: process.env.FORENSIC_AUDIT_ENABLED === 'true', + detailLevel: (process.env.FORENSIC_AUDIT_DETAIL_LEVEL as any) || 'standard', + retentionHours: parseInt(process.env.FORENSIC_AUDIT_RETENTION_HOURS || '72', 10) + }; } private getEnv(key: string): string { @@ -83,6 +116,94 @@ class ImprovedMicroTaskAIPipeline { return value; } + // NEW: Audit Trail Utility Functions + private addAuditEntry( + context: AnalysisContext | null, + phase: string, + action: string, + input: any, + output: any, + confidence: number, + startTime: number, + metadata: Record = {} + ): void { + if (!this.auditConfig.enabled) return; + + const auditEntry: AuditEntry = { + timestamp: Date.now(), + phase, + action, + input: this.auditConfig.detailLevel === 'verbose' ? input : this.summarizeForAudit(input), + output: this.auditConfig.detailLevel === 'verbose' ? output : this.summarizeForAudit(output), + confidence, + processingTimeMs: Date.now() - startTime, + metadata + }; + + if (context) { + context.auditTrail.push(auditEntry); + } else { + // Store in temporary array for later merging + this.tempAuditEntries.push(auditEntry); + } + + // Log for debugging when audit is enabled + console.log(`[AUDIT] ${phase}/${action}: ${confidence}% confidence, ${Date.now() - startTime}ms`); + } + + // NEW: Merge temporary audit entries into context + private mergeTemporaryAuditEntries(context: AnalysisContext): void { + if (!this.auditConfig.enabled || this.tempAuditEntries.length === 0) return; + + const entryCount = this.tempAuditEntries.length; + // Add temp entries to the beginning of the context audit trail + context.auditTrail.unshift(...this.tempAuditEntries); + this.tempAuditEntries = []; // Clear temp storage + + console.log(`[AUDIT] Merged ${entryCount} temporary audit entries into context`); + } + + private summarizeForAudit(data: any): any { + if (this.auditConfig.detailLevel === 'minimal') { + if (typeof data === 'string' && data.length > 100) { + return data.slice(0, 100) + '...[truncated]'; + } + if (Array.isArray(data) && data.length > 3) { + return [...data.slice(0, 3), `...[${data.length - 3} more items]`]; + } + } else if (this.auditConfig.detailLevel === 'standard') { + if (typeof data === 'string' && data.length > 500) { + return data.slice(0, 500) + '...[truncated]'; + } + if (Array.isArray(data) && data.length > 10) { + return [...data.slice(0, 10), `...[${data.length - 10} more items]`]; + } + } + return data; + } + + private calculateSelectionConfidence(result: any, candidateCount: number): number { + if (!result || !result.selectedTools) return 30; + + const selectionRatio = result.selectedTools.length / candidateCount; + const hasReasoning = result.reasoning && result.reasoning.length > 50; + + let confidence = 60; // Base confidence + + // Good selection ratio (not too many, not too few) + if (selectionRatio > 0.05 && selectionRatio < 0.3) confidence += 20; + else if (selectionRatio <= 0.05) confidence -= 10; // Too few + else confidence -= 15; // Too many + + // Has detailed reasoning + if (hasReasoning) confidence += 15; + + // Selected tools have good distribution + if (result.selectedConcepts && result.selectedConcepts.length > 0) confidence += 5; + + return Math.min(95, Math.max(25, confidence)); + } + private estimateTokens(text: string): number { return Math.ceil(text.length / 4); } @@ -140,6 +261,7 @@ class ImprovedMicroTaskAIPipeline { let selectionMethod = 'unknown'; if (embeddingsService.isEnabled()) { + const embeddingsStart = Date.now(); const similarItems = await embeddingsService.findSimilar( userQuery, this.embeddingCandidates, @@ -168,6 +290,17 @@ class ImprovedMicroTaskAIPipeline { candidateConcepts = toolsData.concepts; selectionMethod = 'full_dataset'; } + + // NEW: Add Audit Entry for Embeddings Search + if (this.auditConfig.enabled) { + this.addAuditEntry(null, 'retrieval', 'embeddings-search', + { query: userQuery, threshold: this.similarityThreshold, candidates: this.embeddingCandidates }, + { candidatesFound: similarItems.length, toolNames: Array.from(toolNames), conceptNames: Array.from(conceptNames) }, + similarItems.length >= 15 ? 85 : 60, // Confidence based on result quality + embeddingsStart, + { selectionMethod, embeddingsEnabled: true } + ); + } } else { console.log(`[IMPROVED PIPELINE] Embeddings disabled, using full dataset`); candidateTools = toolsData.tools; @@ -194,6 +327,8 @@ class ImprovedMicroTaskAIPipeline { mode: string, selectionMethod: string ) { + const selectionStart = Date.now(); + const modeInstruction = mode === 'workflow' ? 'The user wants a COMPREHENSIVE WORKFLOW with multiple tools/methods across different phases. Select 15-25 tools that cover the full investigation lifecycle.' : 'The user wants SPECIFIC TOOLS/METHODS that directly solve their particular problem. Select 3-8 tools that are most relevant and effective.'; @@ -298,6 +433,18 @@ Respond with ONLY this JSON format: if (!result || !Array.isArray(result.selectedTools) || !Array.isArray(result.selectedConcepts)) { console.error('[IMPROVED PIPELINE] AI selection returned invalid structure:', response.slice(0, 200)); + + // NEW: Add Audit Entry for Failed Selection + if (this.auditConfig.enabled) { + this.addAuditEntry(null, 'selection', 'ai-tool-selection-failed', + { candidateCount: candidateTools.length, mode, prompt: prompt.slice(0, 200) }, + { error: 'Invalid JSON structure', response: response.slice(0, 200) }, + 10, // Very low confidence + selectionStart, + { aiModel: this.config.model, selectionMethod } + ); + } + throw new Error('AI selection failed to return valid tool selection'); } @@ -315,6 +462,24 @@ Respond with ONLY this JSON format: console.log(`[IMPROVED PIPELINE] Final selection: ${selectedTools.length} tools with bias prevention applied`); + // NEW: Add Audit Entry for Successful Selection + if (this.auditConfig.enabled) { + const confidence = this.calculateSelectionConfidence(result, candidateTools.length); + + this.addAuditEntry(null, 'selection', 'ai-tool-selection', + { candidateCount: candidateTools.length, mode, promptLength: prompt.length }, + { + selectedToolCount: result.selectedTools.length, + selectedConceptCount: result.selectedConcepts.length, + reasoning: result.reasoning?.slice(0, 200) + '...', + finalToolNames: selectedTools.map(t => t.name) + }, + confidence, + selectionStart, + { aiModel: this.config.model, selectionMethod, promptTokens: this.estimateTokens(prompt) } + ); + } + return { selectedTools, selectedConcepts @@ -323,12 +488,25 @@ Respond with ONLY this JSON format: } catch (error) { console.error('[IMPROVED PIPELINE] AI selection failed:', error); + // NEW: Add Audit Entry for Selection Error + if (this.auditConfig.enabled) { + this.addAuditEntry(null, 'selection', 'ai-tool-selection-error', + { candidateCount: candidateTools.length, mode }, + { error: error.message }, + 5, // Very low confidence + selectionStart, + { aiModel: this.config.model, selectionMethod } + ); + } + console.log('[IMPROVED PIPELINE] Using emergency keyword-based selection'); return this.emergencyKeywordSelection(userQuery, candidateTools, candidateConcepts, mode); } } private emergencyKeywordSelection(userQuery: string, candidateTools: any[], candidateConcepts: any[], mode: string) { + const emergencyStart = Date.now(); + const queryLower = userQuery.toLowerCase(); const keywords = queryLower.split(/\s+/).filter(word => word.length > 3); @@ -354,6 +532,17 @@ Respond with ONLY this JSON format: console.log(`[IMPROVED PIPELINE] Emergency selection: ${selectedTools.length} tools, keywords: ${keywords.slice(0, 5).join(', ')}`); + // NEW: Add Audit Entry for Emergency Selection + if (this.auditConfig.enabled) { + this.addAuditEntry(null, 'selection', 'emergency-keyword-selection', + { keywords: keywords.slice(0, 10), candidateCount: candidateTools.length }, + { selectedCount: selectedTools.length, topScores: scoredTools.slice(0, 5).map(s => ({ name: s.tool.name, score: s.score })) }, + 40, // Moderate confidence for emergency selection + emergencyStart, + { selectionMethod: 'emergency_keyword' } + ); + } + return { selectedTools, selectedConcepts: candidateConcepts.slice(0, 3) @@ -382,21 +571,43 @@ Respond with ONLY this JSON format: try { const response = await this.callAI(contextPrompt, maxTokens); - return { + const result = { taskType: 'micro-task', content: response.trim(), processingTimeMs: Date.now() - startTime, success: true }; + + // NEW: Add Audit Entry for Successful Micro-Task + this.addAuditEntry(context, 'micro-task', 'ai-analysis', + { promptLength: contextPrompt.length, maxTokens }, + { responseLength: response.length, contentPreview: response.slice(0, 100) }, + response.length > 50 ? 80 : 60, // Confidence based on response quality + startTime, + { aiModel: this.config.model, contextUsed: context.contextHistory.length > 0 } + ); + + return result; } catch (error) { - return { + const result = { taskType: 'micro-task', content: '', processingTimeMs: Date.now() - startTime, success: false, error: error.message }; + + // NEW: Add Audit Entry for Failed Micro-Task + this.addAuditEntry(context, 'micro-task', 'ai-analysis-failed', + { promptLength: contextPrompt.length, maxTokens }, + { error: error.message }, + 5, // Very low confidence + startTime, + { aiModel: this.config.model, contextUsed: context.contextHistory.length > 0 } + ); + + return result; } } @@ -550,6 +761,15 @@ Antworten Sie AUSSCHLIESSLICH mit diesem JSON-Format (kein zusätzlicher Text): this.addToolToSelection(context, tool, phase.id, sel.priority, sel.justification); } }); + + // NEW: Add audit entry for tool selection + this.addAuditEntry(context, 'micro-task', 'phase-tool-selection', + { phase: phase.id, availableTools: phaseTools.length }, + { validSelections: validSelections.length, selectedTools: validSelections.map(s => s.toolName) }, + validSelections.length > 0 ? 75 : 30, + Date.now() - result.processingTimeMs, + { phaseName: phase.name } + ); } } @@ -595,6 +815,15 @@ Bewerten Sie nach forensischen Standards und antworten Sie AUSSCHLIESSLICH mit d rank } }, 'evaluation', evaluation.suitability_score); + + // NEW: Add audit entry for tool evaluation + this.addAuditEntry(context, 'micro-task', 'tool-evaluation', + { toolName: tool.name, rank }, + { suitabilityScore: evaluation.suitability_score, hasExplanation: !!evaluation.detailed_explanation }, + evaluation.suitability_score === 'high' ? 85 : evaluation.suitability_score === 'medium' ? 70 : 50, + Date.now() - result.processingTimeMs, + { toolType: tool.type } + ); } return result; @@ -644,6 +873,15 @@ Antworten Sie AUSSCHLIESSLICH mit diesem JSON-Format: concept: availableConcepts.find((c: any) => c.name === sel.conceptName), relevance: sel.relevance })); + + // NEW: Add audit entry for background knowledge selection + this.addAuditEntry(context, 'micro-task', 'background-knowledge-selection', + { availableConcepts: availableConcepts.length }, + { selectedConcepts: context.backgroundKnowledge?.length || 0 }, + context.backgroundKnowledge && context.backgroundKnowledge.length > 0 ? 75 : 40, + Date.now() - result.processingTimeMs, + {} + ); } } @@ -711,7 +949,10 @@ WICHTIG: Antworten Sie NUR in fließendem deutschen Text ohne Listen oder Markdo let completedTasks = 0; let failedTasks = 0; - console.log(`[IMPROVED PIPELINE] Starting ${mode} query processing with context continuity`); + // NEW: Clear any previous temporary audit entries + this.tempAuditEntries = []; + + console.log(`[IMPROVED PIPELINE] Starting ${mode} query processing with context continuity and audit trail`); try { // Stage 1: Get intelligent candidates (embeddings + AI selection) @@ -725,11 +966,25 @@ WICHTIG: Antworten Sie NUR in fließendem deutschen Text ohne Listen oder Markdo contextHistory: [], maxContextLength: this.maxContextTokens, currentContextLength: 0, - seenToolNames: new Set() + seenToolNames: new Set(), + // NEW: Initialize audit trail + auditTrail: [] }; + // NEW: Merge any temporary audit entries from pre-context operations + this.mergeTemporaryAuditEntries(context); + console.log(`[IMPROVED PIPELINE] Starting micro-tasks with ${filteredData.tools.length} tools visible`); + // NEW: Add initial audit entry + this.addAuditEntry(context, 'initialization', 'pipeline-start', + { userQuery, mode, toolsDataLoaded: !!toolsData }, + { candidateTools: filteredData.tools.length, candidateConcepts: filteredData.concepts.length }, + 90, // High confidence for initialization + startTime, + { auditEnabled: this.auditConfig.enabled } + ); + // MICRO-TASK SEQUENCE // Task 1: Scenario/Problem Analysis @@ -776,6 +1031,15 @@ WICHTIG: Antworten Sie NUR in fließendem deutschen Text ohne Listen oder Markdo // Build final recommendation const recommendation = this.buildRecommendation(context, mode, finalResult.content); + // NEW: Add final audit entry + this.addAuditEntry(context, 'completion', 'pipeline-end', + { completedTasks, failedTasks }, + { finalRecommendation: !!recommendation, auditEntriesGenerated: context.auditTrail.length }, + completedTasks > failedTasks ? 85 : 60, + startTime, + { totalProcessingTimeMs: Date.now() - startTime } + ); + const processingStats = { embeddingsUsed: embeddingsService.isEnabled(), candidatesFromEmbeddings: filteredData.tools.length, @@ -789,14 +1053,23 @@ WICHTIG: Antworten Sie NUR in fließendem deutschen Text ohne Listen oder Markdo console.log(`[IMPROVED PIPELINE] Completed: ${completedTasks} tasks, Failed: ${failedTasks} tasks`); console.log(`[IMPROVED PIPELINE] Unique tools selected: ${context.seenToolNames.size}`); + console.log(`[IMPROVED PIPELINE] Audit trail entries: ${context.auditTrail.length}`); return { - recommendation, + recommendation: { + ...recommendation, + // NEW: Include audit trail in response + auditTrail: this.auditConfig.enabled ? context.auditTrail : undefined + }, processingStats }; } catch (error) { console.error('[IMPROVED PIPELINE] Processing failed:', error); + + // NEW: Ensure temp audit entries are cleared even on error + this.tempAuditEntries = []; + throw error; } } -- 2.39.5 From fe5eb78353c31e586b1ad77e755bf967a91e4a8f Mon Sep 17 00:00:00 2001 From: overcuriousity Date: Sun, 3 Aug 2025 14:28:04 +0200 Subject: [PATCH 02/19] enhancement 1 --- src/components/AIQueryInterface.astro | 212 +++++++++++++++++++++++--- src/styles/global.css | 103 +++++++++++++ 2 files changed, 296 insertions(+), 19 deletions(-) diff --git a/src/components/AIQueryInterface.astro b/src/components/AIQueryInterface.astro index 585b4cf..0c8d86e 100644 --- a/src/components/AIQueryInterface.astro +++ b/src/components/AIQueryInterface.astro @@ -733,35 +733,209 @@ class AIQueryInterface { this.elements.results.innerHTML = html; } - // NEW: Audit Trail Rendering Functions renderAuditTrail(auditTrail) { if (!auditTrail || !Array.isArray(auditTrail) || auditTrail.length === 0) { return ''; } - // Reuse existing card and info styles from global.css + // Calculate summary statistics + const totalTime = auditTrail.reduce((sum, entry) => sum + entry.processingTimeMs, 0); + const avgConfidence = auditTrail.reduce((sum, entry) => sum + entry.confidence, 0) / auditTrail.length; + const lowConfidenceSteps = auditTrail.filter(entry => entry.confidence < 60).length; + const highConfidenceSteps = auditTrail.filter(entry => entry.confidence >= 80).length; + + // Group entries by phase for better organization + const groupedEntries = auditTrail.reduce((groups, entry) => { + if (!groups[entry.phase]) groups[entry.phase] = []; + groups[entry.phase].push(entry); + return groups; + }, {}); + return ` -
-
- - - - - - -

Forensic Audit Trail (${auditTrail.length} Entries)

- -
- + + +
+ `; + } + + renderPhaseGroup(phase, entries) { + const phaseIcons = { + 'initialization': '🚀', + 'retrieval': '🔍', + 'selection': '🎯', + 'micro-task': '⚡', + 'completion': '✅' + }; + + const phaseNames = { + 'initialization': 'Initialisierung', + 'retrieval': 'Datensuche', + 'selection': 'Tool-Auswahl', + 'micro-task': 'Detail-Analyse', + 'completion': 'Finalisierung' + }; + + const avgConfidence = entries.reduce((sum, entry) => sum + entry.confidence, 0) / entries.length; + const totalTime = entries.reduce((sum, entry) => sum + entry.processingTimeMs, 0); + + return ` +
+
+
+ ${phaseIcons[phase] || '📋'} + ${phaseNames[phase] || phase} +
+
+
+
+
+
+ ${Math.round(avgConfidence)}% +
+
+ +
+ ${entries.map(entry => this.renderSimplifiedEntry(entry)).join('')} +
+
+ `; + } + + renderSimplifiedEntry(entry) { + const actionIcons = { + 'pipeline-start': '▶️', + 'embeddings-search': '🔍', + 'ai-tool-selection': '🎯', + 'ai-analysis': '🧠', + 'phase-tool-selection': '⚙️', + 'tool-evaluation': '📊', + 'background-knowledge-selection': '📚', + 'pipeline-end': '🏁' + }; + + const actionNames = { + 'pipeline-start': 'Analyse gestartet', + 'embeddings-search': 'Ähnliche Tools gesucht', + 'ai-tool-selection': 'Tools automatisch ausgewählt', + 'ai-analysis': 'KI-Analyse durchgeführt', + 'phase-tool-selection': 'Phasen-Tools evaluiert', + 'tool-evaluation': 'Tool-Bewertung erstellt', + 'background-knowledge-selection': 'Hintergrundwissen ausgewählt', + 'pipeline-end': 'Analyse abgeschlossen' + }; + + const confidenceColor = entry.confidence >= 80 ? 'var(--color-accent)' : + entry.confidence >= 60 ? 'var(--color-warning)' : 'var(--color-error)'; + + return ` +
+ ${actionIcons[entry.action] || '📋'} +
+
${actionNames[entry.action] || entry.action}
+ ${entry.output && typeof entry.output === 'object' && entry.output.selectedToolCount ? + `
${entry.output.selectedToolCount} Tools ausgewählt
` : ''} +
+
+
+
+
+ ${entry.confidence}% + ${entry.processingTimeMs}ms +
+
+ `; + } + + renderTechnicalEntry(entry) { + const formattedTime = new Date(entry.timestamp).toLocaleTimeString('de-DE', { + hour: '2-digit', + minute: '2-digit', + second: '2-digit' + }); + + return ` +
+
+ ${entry.phase}/${entry.action} + ${formattedTime} • ${entry.processingTimeMs}ms +
+ ${entry.input && Object.keys(entry.input).length > 0 ? ` +
+ Input: ${this.formatAuditData(entry.input)} +
+ ` : ''} + ${entry.output && Object.keys(entry.output).length > 0 ? ` +
+ Output: ${this.formatAuditData(entry.output)} +
+ ` : ''}
`; } diff --git a/src/styles/global.css b/src/styles/global.css index 0515ccc..ca7ceee 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -3769,4 +3769,107 @@ footer { border: none; border-top: 1px solid var(--color-border); margin: 2rem 0; +} + +/* =================================================================== + 26. ENHANCED AUDIT TRAIL STYLES + ================================================================= */ + +.audit-process-flow { + position: relative; +} + +.phase-group { + position: relative; +} + +.phase-group:not(:last-child)::after { + content: ''; + position: absolute; + left: 13px; + bottom: -8px; + width: 2px; + height: 16px; + background: linear-gradient(to bottom, var(--color-border) 0%, transparent 100%); +} + +.confidence-indicator { + position: relative; + overflow: hidden; +} + +.confidence-indicator::after { + content: ''; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: linear-gradient(45deg, transparent 25%, rgba(255,255,255,0.1) 25%, rgba(255,255,255,0.1) 50%, transparent 50%, transparent 75%, rgba(255,255,255,0.1) 75%); + background-size: 4px 4px; + animation: confidence-shimmer 2s linear infinite; +} + +@keyframes confidence-shimmer { + 0% { transform: translateX(-4px); } + 100% { transform: translateX(4px); } +} + +.toggle-icon { + transition: transform 0.2s ease; +} + +/* Hover effects for audit entries */ +.audit-trail-details .hover\\:bg-secondary:hover { + background-color: var(--color-bg-secondary); +} + +/* Progress indicators */ +.audit-progress-step { + position: relative; + display: flex; + align-items: center; + gap: 0.75rem; + padding: 0.5rem; + border-radius: 0.375rem; + transition: var(--transition-fast); +} + +.audit-progress-step::before { + content: ''; + width: 8px; + height: 8px; + border-radius: 50%; + flex-shrink: 0; + transition: var(--transition-fast); +} + +.audit-progress-step.success::before { + background-color: var(--color-accent); +} + +.audit-progress-step.warning::before { + background-color: var(--color-warning); +} + +.audit-progress-step.error::before { + background-color: var(--color-error); +} + +/* Responsive adjustments for audit trail */ +@media (width <= 768px) { + .audit-process-flow .grid-cols-3 { + grid-template-columns: 1fr; + gap: 1rem; + } + + .phase-group .flex { + flex-direction: column; + align-items: flex-start; + gap: 0.5rem; + } + + .confidence-indicator { + width: 100%; + } } \ No newline at end of file -- 2.39.5 From 6c73a20dfff63d1b484ea4b386332fd672c73c7b Mon Sep 17 00:00:00 2001 From: overcuriousity Date: Sun, 3 Aug 2025 23:57:55 +0200 Subject: [PATCH 03/19] tuning --- .astro/data-store.json | 2 +- src/config/prompts.ts | 239 ++++++++++++++++++++++++++++++++++++++++ src/utils/aiPipeline.ts | 210 +++-------------------------------- 3 files changed, 255 insertions(+), 196 deletions(-) create mode 100644 src/config/prompts.ts diff --git a/.astro/data-store.json b/.astro/data-store.json index c143cad..e8d169a 100644 --- a/.astro/data-store.json +++ b/.astro/data-store.json @@ -1 +1 @@ -[["Map",1,2,7,8],"meta::meta",["Map",3,4,5,6],"astro-version","5.12.3","astro-config-digest","{\"root\":{},\"srcDir\":{},\"publicDir\":{},\"outDir\":{},\"cacheDir\":{},\"compressHTML\":true,\"base\":\"/\",\"trailingSlash\":\"ignore\",\"output\":\"server\",\"scopedStyleStrategy\":\"attribute\",\"build\":{\"format\":\"directory\",\"client\":{},\"server\":{},\"assets\":\"_astro\",\"serverEntry\":\"entry.mjs\",\"redirects\":true,\"inlineStylesheets\":\"auto\",\"concurrency\":1},\"server\":{\"open\":false,\"host\":true,\"port\":4321,\"streaming\":true,\"allowedHosts\":[]},\"redirects\":{},\"image\":{\"endpoint\":{\"route\":\"/_image\",\"entrypoint\":\"astro/assets/endpoint/node\"},\"service\":{\"entrypoint\":\"astro/assets/services/sharp\",\"config\":{}},\"domains\":[],\"remotePatterns\":[],\"responsiveStyles\":false},\"devToolbar\":{\"enabled\":true},\"markdown\":{\"syntaxHighlight\":{\"type\":\"shiki\",\"excludeLangs\":[\"math\"]},\"shikiConfig\":{\"langs\":[],\"langAlias\":{},\"theme\":\"github-dark\",\"themes\":{},\"wrap\":false,\"transformers\":[]},\"remarkPlugins\":[],\"rehypePlugins\":[],\"remarkRehype\":{},\"gfm\":true,\"smartypants\":true},\"security\":{\"checkOrigin\":true},\"env\":{\"schema\":{},\"validateSecrets\":false},\"experimental\":{\"clientPrerender\":false,\"contentIntellisense\":false,\"headingIdCompat\":false,\"preserveScriptOrder\":false,\"liveContentCollections\":false,\"csp\":false,\"rawEnvValues\":false},\"legacy\":{\"collections\":false},\"session\":{\"driver\":\"fs-lite\",\"options\":{\"base\":\"/var/home/user01/Projekte/forensic-pathways/node_modules/.astro/sessions\"}}}","knowledgebase",["Map",9,10,100,101,149,150,223,224,288,289,344,345],"misp",{"id":9,"data":11,"body":35,"filePath":36,"digest":37,"rendered":38,"legacyId":99},{"title":12,"tool_name":13,"description":14,"last_updated":15,"author":16,"difficulty":17,"categories":18,"tags":24,"sections":31,"review_status":34},"MISP - Plattform für Threat Intelligence Sharing","MISP","Das Rückgrat des modernen Threat-Intelligence-Sharings mit über 40.000 aktiven Instanzen weltweit.",["Date","2025-07-20T00:00:00.000Z"],"Claude 4 Sonnet","intermediate",[19,20,21,22,23],"incident-response","static-investigations","malware-analysis","network-forensics","cloud-forensics",[25,26,27,28,29,30],"web-based","threat-intelligence","api","correlation","ioc-sharing","automation",{"overview":32,"installation":32,"configuration":32,"usage_examples":32,"best_practices":32,"troubleshooting":32,"advanced_topics":33},true,false,"published","> **⚠️ Hinweis**: Dies ist ein vorläufiger, KI-generierter Knowledgebase-Eintrag. Wir freuen uns über Verbesserungen und Ergänzungen durch die Community!\n\n\n# Übersicht\n\n**MISP (Malware Information Sharing Platform & Threat Sharing)** ist eine freie Open-Source-Plattform zur strukturierten Erfassung, Speicherung, Analyse und gemeinsamen Nutzung von Cyber-Bedrohungsdaten. Mit über 40.000 Instanzen weltweit ist MISP der De-facto-Standard für den Austausch von Indicators of Compromise (IoCs) und Threat Intelligence zwischen CERTs, SOCs, Strafverfolgungsbehörden und anderen sicherheitsrelevanten Organisationen.\n\nDie föderierte Architektur ermöglicht einen kontrollierten, dezentralen Austausch von Informationen über vertrauenswürdige Partner hinweg. Durch Taxonomien, Tags und integrierte APIs ist eine automatische Anreicherung, Korrelation und Verarbeitung von Informationen in SIEMs, Firewalls oder Endpoint-Lösungen möglich.\n\n## Installation\n\n### Voraussetzungen\n\n- **Server-Betriebssystem:** Linux (empfohlen: Debian/Ubuntu)\n- **Abhängigkeiten:** MariaDB/MySQL, PHP, Apache/Nginx, Redis\n- **Ressourcen:** Mindestens 4 GB RAM, SSD empfohlen\n\n### Installationsschritte\n\n```bash\n# Beispiel für Debian/Ubuntu:\nsudo apt update && sudo apt install -y curl gnupg git python3 python3-pip redis-server mariadb-server apache2 php libapache2-mod-php\n\n# MISP klonen\ngit clone https://github.com/MISP/MISP.git /var/www/MISP\n\n# Setup-Skript nutzen\ncd /var/www/MISP && bash INSTALL/INSTALL.debian.sh\n````\n\nWeitere Details: [Offizielle Installationsanleitung](https://misp.github.io/MISP/INSTALL.debian/)\n\n## Konfiguration\n\n### Webserver\n\n* HTTPS aktivieren (Let's Encrypt oder Reverse Proxy)\n* PHP-Konfiguration anpassen (`upload_max_filesize`, `memory_limit`, `post_max_size`)\n\n### Benutzerrollen\n\n* Administrator, Org-Admin, Analyst etc.\n* Zugriffsbeschränkungen nach Organisation/Feed definierbar\n\n### Feeds und Galaxies\n\n* Aktivierung von Feeds (z. B. CIRCL, Abuse.ch, OpenCTI)\n* Nutzung von Galaxies zur Klassifizierung (APT-Gruppen, Malware-Familien)\n\n## Verwendungsbeispiele\n\n### Beispiel 1: Import von IoCs aus externem Feed\n\n1. Feed aktivieren unter **Administration → List Feeds**\n2. Feed synchronisieren\n3. Ereignisse durchsuchen, analysieren, ggf. mit eigenen Daten korrelieren\n\n### Beispiel 2: Automatisierte Anbindung an SIEM\n\n* REST-API-Token erstellen\n* API-Calls zur Abfrage neuer Events (z. B. mit Python, Logstash oder MISP Workbench)\n* Integration in Security-Systeme über JSON/STIX export\n\n## Best Practices\n\n* Regelmäßige Backups der Datenbank\n* Taxonomien konsistent verwenden\n* Nutzung der Sighting-Funktion zur Validierung von IoCs\n* Vertrauensstufen (TLP, PAP) korrekt setzen\n* Nicht nur konsumieren – auch teilen!\n\n## Troubleshooting\n\n### Problem: MISP-Feeds laden nicht\n\n**Lösung:**\n\n* Internetverbindung prüfen\n* Cronjobs aktiv?\n* Logs prüfen: `/var/www/MISP/app/tmp/logs/error.log`\n\n### Problem: API gibt 403 zurück\n\n**Lösung:**\n\n* Ist der API-Key korrekt und aktiv?\n* Rechte des Benutzers überprüfen\n* IP-Filter im MISP-Backend beachten\n\n### Problem: Hohe Datenbanklast\n\n**Lösung:**\n\n* Indizes optimieren\n* Redis aktivieren\n* Alte Events regelmäßig archivieren oder löschen\n\n## Weiterführende Themen\n\n* STIX2-Import/Export\n* Erweiterungen mit MISP Modules (z. B. für Virustotal, YARA)\n* Föderierte Netzwerke und Community-Portale\n* Integration mit OpenCTI oder TheHive\n\n---\n\n**Links:**\n\n* 🌐 [Offizielle Projektseite](https://misp-project.org/)\n* 📦 [CC24-MISP-Instanz](https://misp.cc24.dev)\n* 📊 [Status-Monitoring](https://status.mikoshi.de/api/badge/34/status)\n\nLizenz: **AGPL-3.0**","src/content/knowledgebase/misp.md","35930fa919a46964",{"html":39,"metadata":40},"\u003Cblockquote>\n\u003Cp>\u003Cstrong>⚠️ Hinweis\u003C/strong>: Dies ist ein vorläufiger, KI-generierter Knowledgebase-Eintrag. Wir freuen uns über Verbesserungen und Ergänzungen durch die Community!\u003C/p>\n\u003C/blockquote>\n\u003Ch1 id=\"übersicht\">Übersicht\u003C/h1>\n\u003Cp>\u003Cstrong>MISP (Malware Information Sharing Platform & Threat Sharing)\u003C/strong> ist eine freie Open-Source-Plattform zur strukturierten Erfassung, Speicherung, Analyse und gemeinsamen Nutzung von Cyber-Bedrohungsdaten. Mit über 40.000 Instanzen weltweit ist MISP der De-facto-Standard für den Austausch von Indicators of Compromise (IoCs) und Threat Intelligence zwischen CERTs, SOCs, Strafverfolgungsbehörden und anderen sicherheitsrelevanten Organisationen.\u003C/p>\n\u003Cp>Die föderierte Architektur ermöglicht einen kontrollierten, dezentralen Austausch von Informationen über vertrauenswürdige Partner hinweg. Durch Taxonomien, Tags und integrierte APIs ist eine automatische Anreicherung, Korrelation und Verarbeitung von Informationen in SIEMs, Firewalls oder Endpoint-Lösungen möglich.\u003C/p>\n\u003Ch2 id=\"installation\">Installation\u003C/h2>\n\u003Ch3 id=\"voraussetzungen\">Voraussetzungen\u003C/h3>\n\u003Cul>\n\u003Cli>\u003Cstrong>Server-Betriebssystem:\u003C/strong> Linux (empfohlen: Debian/Ubuntu)\u003C/li>\n\u003Cli>\u003Cstrong>Abhängigkeiten:\u003C/strong> MariaDB/MySQL, PHP, Apache/Nginx, Redis\u003C/li>\n\u003Cli>\u003Cstrong>Ressourcen:\u003C/strong> Mindestens 4 GB RAM, SSD empfohlen\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"installationsschritte\">Installationsschritte\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Beispiel für Debian/Ubuntu:\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apt\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> update\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> && \u003C/span>\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apt\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> install\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -y\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> curl\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> gnupg\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> git\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> python3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> python3-pip\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> redis-server\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> mariadb-server\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apache2\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> php\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> libapache2-mod-php\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># MISP klonen\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">git\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> clone\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> https://github.com/MISP/MISP.git\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /var/www/MISP\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Setup-Skript nutzen\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">cd\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /var/www/MISP\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> && \u003C/span>\u003Cspan style=\"color:#B392F0\">bash\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> INSTALL/INSTALL.debian.sh\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Cp>Weitere Details: \u003Ca href=\"https://misp.github.io/MISP/INSTALL.debian/\">Offizielle Installationsanleitung\u003C/a>\u003C/p>\n\u003Ch2 id=\"konfiguration\">Konfiguration\u003C/h2>\n\u003Ch3 id=\"webserver\">Webserver\u003C/h3>\n\u003Cul>\n\u003Cli>HTTPS aktivieren (Let’s Encrypt oder Reverse Proxy)\u003C/li>\n\u003Cli>PHP-Konfiguration anpassen (\u003Ccode>upload_max_filesize\u003C/code>, \u003Ccode>memory_limit\u003C/code>, \u003Ccode>post_max_size\u003C/code>)\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"benutzerrollen\">Benutzerrollen\u003C/h3>\n\u003Cul>\n\u003Cli>Administrator, Org-Admin, Analyst etc.\u003C/li>\n\u003Cli>Zugriffsbeschränkungen nach Organisation/Feed definierbar\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"feeds-und-galaxies\">Feeds und Galaxies\u003C/h3>\n\u003Cul>\n\u003Cli>Aktivierung von Feeds (z. B. CIRCL, Abuse.ch, OpenCTI)\u003C/li>\n\u003Cli>Nutzung von Galaxies zur Klassifizierung (APT-Gruppen, Malware-Familien)\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"verwendungsbeispiele\">Verwendungsbeispiele\u003C/h2>\n\u003Ch3 id=\"beispiel-1-import-von-iocs-aus-externem-feed\">Beispiel 1: Import von IoCs aus externem Feed\u003C/h3>\n\u003Col>\n\u003Cli>Feed aktivieren unter \u003Cstrong>Administration → List Feeds\u003C/strong>\u003C/li>\n\u003Cli>Feed synchronisieren\u003C/li>\n\u003Cli>Ereignisse durchsuchen, analysieren, ggf. mit eigenen Daten korrelieren\u003C/li>\n\u003C/ol>\n\u003Ch3 id=\"beispiel-2-automatisierte-anbindung-an-siem\">Beispiel 2: Automatisierte Anbindung an SIEM\u003C/h3>\n\u003Cul>\n\u003Cli>REST-API-Token erstellen\u003C/li>\n\u003Cli>API-Calls zur Abfrage neuer Events (z. B. mit Python, Logstash oder MISP Workbench)\u003C/li>\n\u003Cli>Integration in Security-Systeme über JSON/STIX export\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"best-practices\">Best Practices\u003C/h2>\n\u003Cul>\n\u003Cli>Regelmäßige Backups der Datenbank\u003C/li>\n\u003Cli>Taxonomien konsistent verwenden\u003C/li>\n\u003Cli>Nutzung der Sighting-Funktion zur Validierung von IoCs\u003C/li>\n\u003Cli>Vertrauensstufen (TLP, PAP) korrekt setzen\u003C/li>\n\u003Cli>Nicht nur konsumieren – auch teilen!\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"troubleshooting\">Troubleshooting\u003C/h2>\n\u003Ch3 id=\"problem-misp-feeds-laden-nicht\">Problem: MISP-Feeds laden nicht\u003C/h3>\n\u003Cp>\u003Cstrong>Lösung:\u003C/strong>\u003C/p>\n\u003Cul>\n\u003Cli>Internetverbindung prüfen\u003C/li>\n\u003Cli>Cronjobs aktiv?\u003C/li>\n\u003Cli>Logs prüfen: \u003Ccode>/var/www/MISP/app/tmp/logs/error.log\u003C/code>\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"problem-api-gibt-403-zurück\">Problem: API gibt 403 zurück\u003C/h3>\n\u003Cp>\u003Cstrong>Lösung:\u003C/strong>\u003C/p>\n\u003Cul>\n\u003Cli>Ist der API-Key korrekt und aktiv?\u003C/li>\n\u003Cli>Rechte des Benutzers überprüfen\u003C/li>\n\u003Cli>IP-Filter im MISP-Backend beachten\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"problem-hohe-datenbanklast\">Problem: Hohe Datenbanklast\u003C/h3>\n\u003Cp>\u003Cstrong>Lösung:\u003C/strong>\u003C/p>\n\u003Cul>\n\u003Cli>Indizes optimieren\u003C/li>\n\u003Cli>Redis aktivieren\u003C/li>\n\u003Cli>Alte Events regelmäßig archivieren oder löschen\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"weiterführende-themen\">Weiterführende Themen\u003C/h2>\n\u003Cul>\n\u003Cli>STIX2-Import/Export\u003C/li>\n\u003Cli>Erweiterungen mit MISP Modules (z. B. für Virustotal, YARA)\u003C/li>\n\u003Cli>Föderierte Netzwerke und Community-Portale\u003C/li>\n\u003Cli>Integration mit OpenCTI oder TheHive\u003C/li>\n\u003C/ul>\n\u003Chr>\n\u003Cp>\u003Cstrong>Links:\u003C/strong>\u003C/p>\n\u003Cul>\n\u003Cli>🌐 \u003Ca href=\"https://misp-project.org/\">Offizielle Projektseite\u003C/a>\u003C/li>\n\u003Cli>📦 \u003Ca href=\"https://misp.cc24.dev\">CC24-MISP-Instanz\u003C/a>\u003C/li>\n\u003Cli>📊 \u003Ca href=\"https://status.mikoshi.de/api/badge/34/status\">Status-Monitoring\u003C/a>\u003C/li>\n\u003C/ul>\n\u003Cp>Lizenz: \u003Cstrong>AGPL-3.0\u003C/strong>\u003C/p>",{"headings":41,"localImagePaths":96,"remoteImagePaths":97,"frontmatter":11,"imagePaths":98},[42,46,50,54,57,60,63,66,69,72,75,78,81,84,87,90,93],{"depth":43,"slug":44,"text":45},1,"übersicht","Übersicht",{"depth":47,"slug":48,"text":49},2,"installation","Installation",{"depth":51,"slug":52,"text":53},3,"voraussetzungen","Voraussetzungen",{"depth":51,"slug":55,"text":56},"installationsschritte","Installationsschritte",{"depth":47,"slug":58,"text":59},"konfiguration","Konfiguration",{"depth":51,"slug":61,"text":62},"webserver","Webserver",{"depth":51,"slug":64,"text":65},"benutzerrollen","Benutzerrollen",{"depth":51,"slug":67,"text":68},"feeds-und-galaxies","Feeds und Galaxies",{"depth":47,"slug":70,"text":71},"verwendungsbeispiele","Verwendungsbeispiele",{"depth":51,"slug":73,"text":74},"beispiel-1-import-von-iocs-aus-externem-feed","Beispiel 1: Import von IoCs aus externem Feed",{"depth":51,"slug":76,"text":77},"beispiel-2-automatisierte-anbindung-an-siem","Beispiel 2: Automatisierte Anbindung an SIEM",{"depth":47,"slug":79,"text":80},"best-practices","Best Practices",{"depth":47,"slug":82,"text":83},"troubleshooting","Troubleshooting",{"depth":51,"slug":85,"text":86},"problem-misp-feeds-laden-nicht","Problem: MISP-Feeds laden nicht",{"depth":51,"slug":88,"text":89},"problem-api-gibt-403-zurück","Problem: API gibt 403 zurück",{"depth":51,"slug":91,"text":92},"problem-hohe-datenbanklast","Problem: Hohe Datenbanklast",{"depth":47,"slug":94,"text":95},"weiterführende-themen","Weiterführende Themen",[],[],[],"misp.md","regular-expressions-regex",{"id":100,"data":102,"body":116,"filePath":117,"digest":118,"rendered":119,"legacyId":148},{"title":103,"tool_name":104,"description":105,"last_updated":106,"author":16,"difficulty":17,"categories":107,"tags":109,"sections":115,"review_status":34},"Regular Expressions (Regex) – Musterbasierte Textanalyse","Regular Expressions (Regex)","Pattern matching language für Suche, Extraktion und Manipulation von Text in forensischen Analysen.",["Date","2025-07-20T00:00:00.000Z"],[19,21,22,108],"fraud-investigation",[110,111,112,113,114],"pattern-matching","text-processing","log-analysis","string-manipulation","search-algorithms",{"overview":32,"installation":33,"configuration":33,"usage_examples":32,"best_practices":32,"troubleshooting":33,"advanced_topics":32},"> **⚠️ Hinweis**: Dies ist ein vorläufiger, KI-generierter Knowledgebase-Eintrag. Wir freuen uns über Verbesserungen und Ergänzungen durch die Community!\n\n\n# Übersicht\n\n**Regular Expressions (Regex)** sind ein leistungsfähiges Werkzeug zur Erkennung, Extraktion und Transformation von Zeichenfolgen anhand vordefinierter Muster. In der digitalen Forensik sind Regex-Ausdrücke unverzichtbar: Sie helfen beim Auffinden von IP-Adressen, Hash-Werten, Dateipfaden, Malware-Signaturen oder Kreditkartennummern in großen Mengen unstrukturierter Daten wie Logdateien, Netzwerktraces oder Memory Dumps.\n\nRegex ist nicht auf eine bestimmte Plattform oder Software beschränkt – es wird in nahezu allen gängigen Programmiersprachen, Texteditoren und forensischen Tools unterstützt.\n\n## Verwendungsbeispiele\n\n### 1. IP-Adressen extrahieren\n\n```regex\n\\b(?:\\d{1,3}\\.){3}\\d{1,3}\\b\n````\n\nVerwendung:\n\n* Finden von IP-Adressen in Firewall-Logs oder Packet Captures.\n* Beispiel-Zeile:\n\n ```\n Connection from 192.168.1.101 to port 443 established\n ```\n\n### 2. E-Mail-Adressen identifizieren\n\n```regex\n[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}\n```\n\nVerwendung:\n\n* Erkennung von kompromittierten Accounts in Phishing-E-Mails.\n* Analyse von Useraktivitäten oder Kommunikationsverläufen.\n\n### 3. Hash-Werte erkennen (z. B. SHA-256)\n\n```regex\n\\b[A-Fa-f0-9]{64}\\b\n```\n\nVerwendung:\n\n* Extraktion von Malware-Hashes aus Memory Dumps oder YARA-Logs.\n\n### 4. Zeitstempel in Logdateien extrahieren\n\n```regex\n\\d{4}-\\d{2}-\\d{2}[ T]\\d{2}:\\d{2}:\\d{2}\n```\n\nVerwendung:\n\n* Zeitsensitive Korrelationsanalysen (z. B. bei Intrusion Detection oder Timeline-Rekonstruktionen).\n\n## Best Practices\n\n* **Regex testen**: Nutze Plattformen wie [regexr.com](https://regexr.com/) oder [regex101.com](https://regex101.com/) zur Validierung.\n* **Performance beachten**: Komplexe Ausdrücke können ineffizient sein und Systeme verlangsamen – verwende Lazy Quantifiers (`*?`, `+?`) bei Bedarf.\n* **Escape-Zeichen korrekt anwenden**: Spezielle Zeichen wie `.` oder `\\` müssen bei Bedarf mit `\\\\` oder `\\.` maskiert werden.\n* **Portabilität prüfen**: Unterschiedliche Regex-Engines (z. B. Python `re`, PCRE, JavaScript) interpretieren manche Syntax leicht unterschiedlich.\n* **Lesbarkeit fördern**: Verwende benannte Gruppen (`(?P\u003Cname>...)`) und Kommentare (`(?x)`), um reguläre Ausdrücke besser wartbar zu machen.\n\n## Weiterführende Themen\n\n### Lookaheads und Lookbehinds\n\nMit **Lookaheads** (`(?=...)`) und **Lookbehinds** (`(?\u003C=...)`) können Bedingungen formuliert werden, ohne dass der Text Teil des Matchs wird.\n\nBeispiel: Alle `.exe`-Dateinamen **ohne** das Wort `safe` davor matchen:\n\n```regex\n(?\u003C!safe\\s)[\\w-]+\\.exe\n```\n\n### Regex in Forensik-Tools\n\n* **YARA**: Unterstützt Regex zur Erstellung von Malware-Signaturen.\n* **Wireshark**: Filtert Payloads anhand von Regex-ähnlicher Syntax.\n* **Splunk & ELK**: Verwenden Regex für Logparsing und Visualisierung.\n* **Volatility Plugins**: Extrahieren Artefakte mit Regex-basierten Scans.\n\n---\n\n> 🔤 **Regex ist ein universelles Werkzeug für Analysten, Ermittler und Entwickler, um versteckte Informationen schnell und flexibel aufzuspüren.**\n>\n> Nutze es überall dort, wo Textdaten eine Rolle spielen.","src/content/knowledgebase/regular-expressions-regex.md","247bcf48ebdc9ba0",{"html":120,"metadata":121},"\u003Cblockquote>\n\u003Cp>\u003Cstrong>⚠️ Hinweis\u003C/strong>: Dies ist ein vorläufiger, KI-generierter Knowledgebase-Eintrag. Wir freuen uns über Verbesserungen und Ergänzungen durch die Community!\u003C/p>\n\u003C/blockquote>\n\u003Ch1 id=\"übersicht\">Übersicht\u003C/h1>\n\u003Cp>\u003Cstrong>Regular Expressions (Regex)\u003C/strong> sind ein leistungsfähiges Werkzeug zur Erkennung, Extraktion und Transformation von Zeichenfolgen anhand vordefinierter Muster. In der digitalen Forensik sind Regex-Ausdrücke unverzichtbar: Sie helfen beim Auffinden von IP-Adressen, Hash-Werten, Dateipfaden, Malware-Signaturen oder Kreditkartennummern in großen Mengen unstrukturierter Daten wie Logdateien, Netzwerktraces oder Memory Dumps.\u003C/p>\n\u003Cp>Regex ist nicht auf eine bestimmte Plattform oder Software beschränkt – es wird in nahezu allen gängigen Programmiersprachen, Texteditoren und forensischen Tools unterstützt.\u003C/p>\n\u003Ch2 id=\"verwendungsbeispiele\">Verwendungsbeispiele\u003C/h2>\n\u003Ch3 id=\"1-ip-adressen-extrahieren\">1. IP-Adressen extrahieren\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"regex\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">\\b(?:\\d\u003C/span>\u003Cspan style=\"color:#F97583\">{1,3}\u003C/span>\u003Cspan style=\"color:#79B8FF\">\\.)\u003C/span>\u003Cspan style=\"color:#F97583\">{3}\u003C/span>\u003Cspan style=\"color:#79B8FF\">\\d\u003C/span>\u003Cspan style=\"color:#F97583\">{1,3}\u003C/span>\u003Cspan style=\"color:#79B8FF\">\\b\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Cp>Verwendung:\u003C/p>\n\u003Cul>\n\u003Cli>\n\u003Cp>Finden von IP-Adressen in Firewall-Logs oder Packet Captures.\u003C/p>\n\u003C/li>\n\u003Cli>\n\u003Cp>Beispiel-Zeile:\u003C/p>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"plaintext\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan>Connection from 192.168.1.101 to port 443 established\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"2-e-mail-adressen-identifizieren\">2. E-Mail-Adressen identifizieren\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"regex\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">[a-zA-Z0-9._%+-]\u003C/span>\u003Cspan style=\"color:#F97583\">+\u003C/span>\u003Cspan style=\"color:#DBEDFF\">@\u003C/span>\u003Cspan style=\"color:#79B8FF\">[a-zA-Z0-9.-]\u003C/span>\u003Cspan style=\"color:#F97583\">+\u003C/span>\u003Cspan style=\"color:#79B8FF\">\\.[a-zA-Z]\u003C/span>\u003Cspan style=\"color:#F97583\">{2,}\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Cp>Verwendung:\u003C/p>\n\u003Cul>\n\u003Cli>Erkennung von kompromittierten Accounts in Phishing-E-Mails.\u003C/li>\n\u003Cli>Analyse von Useraktivitäten oder Kommunikationsverläufen.\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"3-hash-werte-erkennen-zb-sha-256\">3. Hash-Werte erkennen (z. B. SHA-256)\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"regex\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">\\b[A-Fa-f0-9]\u003C/span>\u003Cspan style=\"color:#F97583\">{64}\u003C/span>\u003Cspan style=\"color:#79B8FF\">\\b\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Cp>Verwendung:\u003C/p>\n\u003Cul>\n\u003Cli>Extraktion von Malware-Hashes aus Memory Dumps oder YARA-Logs.\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"4-zeitstempel-in-logdateien-extrahieren\">4. Zeitstempel in Logdateien extrahieren\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"regex\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">\\d\u003C/span>\u003Cspan style=\"color:#F97583\">{4}\u003C/span>\u003Cspan style=\"color:#DBEDFF\">-\u003C/span>\u003Cspan style=\"color:#79B8FF\">\\d\u003C/span>\u003Cspan style=\"color:#F97583\">{2}\u003C/span>\u003Cspan style=\"color:#DBEDFF\">-\u003C/span>\u003Cspan style=\"color:#79B8FF\">\\d\u003C/span>\u003Cspan style=\"color:#F97583\">{2}\u003C/span>\u003Cspan style=\"color:#79B8FF\">[ T]\\d\u003C/span>\u003Cspan style=\"color:#F97583\">{2}\u003C/span>\u003Cspan style=\"color:#DBEDFF\">:\u003C/span>\u003Cspan style=\"color:#79B8FF\">\\d\u003C/span>\u003Cspan style=\"color:#F97583\">{2}\u003C/span>\u003Cspan style=\"color:#DBEDFF\">:\u003C/span>\u003Cspan style=\"color:#79B8FF\">\\d\u003C/span>\u003Cspan style=\"color:#F97583\">{2}\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Cp>Verwendung:\u003C/p>\n\u003Cul>\n\u003Cli>Zeitsensitive Korrelationsanalysen (z. B. bei Intrusion Detection oder Timeline-Rekonstruktionen).\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"best-practices\">Best Practices\u003C/h2>\n\u003Cul>\n\u003Cli>\u003Cstrong>Regex testen\u003C/strong>: Nutze Plattformen wie \u003Ca href=\"https://regexr.com/\">regexr.com\u003C/a> oder \u003Ca href=\"https://regex101.com/\">regex101.com\u003C/a> zur Validierung.\u003C/li>\n\u003Cli>\u003Cstrong>Performance beachten\u003C/strong>: Komplexe Ausdrücke können ineffizient sein und Systeme verlangsamen – verwende Lazy Quantifiers (\u003Ccode>*?\u003C/code>, \u003Ccode>+?\u003C/code>) bei Bedarf.\u003C/li>\n\u003Cli>\u003Cstrong>Escape-Zeichen korrekt anwenden\u003C/strong>: Spezielle Zeichen wie \u003Ccode>.\u003C/code> oder \u003Ccode>\\\u003C/code> müssen bei Bedarf mit \u003Ccode>\\\\\u003C/code> oder \u003Ccode>\\.\u003C/code> maskiert werden.\u003C/li>\n\u003Cli>\u003Cstrong>Portabilität prüfen\u003C/strong>: Unterschiedliche Regex-Engines (z. B. Python \u003Ccode>re\u003C/code>, PCRE, JavaScript) interpretieren manche Syntax leicht unterschiedlich.\u003C/li>\n\u003Cli>\u003Cstrong>Lesbarkeit fördern\u003C/strong>: Verwende benannte Gruppen (\u003Ccode>(?P<name>...)\u003C/code>) und Kommentare (\u003Ccode>(?x)\u003C/code>), um reguläre Ausdrücke besser wartbar zu machen.\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"weiterführende-themen\">Weiterführende Themen\u003C/h2>\n\u003Ch3 id=\"lookaheads-und-lookbehinds\">Lookaheads und Lookbehinds\u003C/h3>\n\u003Cp>Mit \u003Cstrong>Lookaheads\u003C/strong> (\u003Ccode>(?=...)\u003C/code>) und \u003Cstrong>Lookbehinds\u003C/strong> (\u003Ccode>(?<=...)\u003C/code>) können Bedingungen formuliert werden, ohne dass der Text Teil des Matchs wird.\u003C/p>\n\u003Cp>Beispiel: Alle \u003Ccode>.exe\u003C/code>-Dateinamen \u003Cstrong>ohne\u003C/strong> das Wort \u003Ccode>safe\u003C/code> davor matchen:\u003C/p>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"regex\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">(?<!\u003C/span>\u003Cspan style=\"color:#DBEDFF\">safe\u003C/span>\u003Cspan style=\"color:#79B8FF\">\\s\u003C/span>\u003Cspan style=\"color:#F97583\">)\u003C/span>\u003Cspan style=\"color:#79B8FF\">[\\w-]\u003C/span>\u003Cspan style=\"color:#F97583\">+\u003C/span>\u003Cspan style=\"color:#79B8FF\">\\.\u003C/span>\u003Cspan style=\"color:#DBEDFF\">exe\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"regex-in-forensik-tools\">Regex in Forensik-Tools\u003C/h3>\n\u003Cul>\n\u003Cli>\u003Cstrong>YARA\u003C/strong>: Unterstützt Regex zur Erstellung von Malware-Signaturen.\u003C/li>\n\u003Cli>\u003Cstrong>Wireshark\u003C/strong>: Filtert Payloads anhand von Regex-ähnlicher Syntax.\u003C/li>\n\u003Cli>\u003Cstrong>Splunk & ELK\u003C/strong>: Verwenden Regex für Logparsing und Visualisierung.\u003C/li>\n\u003Cli>\u003Cstrong>Volatility Plugins\u003C/strong>: Extrahieren Artefakte mit Regex-basierten Scans.\u003C/li>\n\u003C/ul>\n\u003Chr>\n\u003Cblockquote>\n\u003Cp>🔤 \u003Cstrong>Regex ist ein universelles Werkzeug für Analysten, Ermittler und Entwickler, um versteckte Informationen schnell und flexibel aufzuspüren.\u003C/strong>\u003C/p>\n\u003Cp>Nutze es überall dort, wo Textdaten eine Rolle spielen.\u003C/p>\n\u003C/blockquote>",{"headings":122,"localImagePaths":145,"remoteImagePaths":146,"frontmatter":102,"imagePaths":147},[123,124,125,128,131,134,137,138,139,142],{"depth":43,"slug":44,"text":45},{"depth":47,"slug":70,"text":71},{"depth":51,"slug":126,"text":127},"1-ip-adressen-extrahieren","1. IP-Adressen extrahieren",{"depth":51,"slug":129,"text":130},"2-e-mail-adressen-identifizieren","2. E-Mail-Adressen identifizieren",{"depth":51,"slug":132,"text":133},"3-hash-werte-erkennen-zb-sha-256","3. Hash-Werte erkennen (z. B. SHA-256)",{"depth":51,"slug":135,"text":136},"4-zeitstempel-in-logdateien-extrahieren","4. Zeitstempel in Logdateien extrahieren",{"depth":47,"slug":79,"text":80},{"depth":47,"slug":94,"text":95},{"depth":51,"slug":140,"text":141},"lookaheads-und-lookbehinds","Lookaheads und Lookbehinds",{"depth":51,"slug":143,"text":144},"regex-in-forensik-tools","Regex in Forensik-Tools",[],[],[],"regular-expressions-regex.md","kali-linux",{"id":149,"data":151,"body":166,"filePath":167,"digest":168,"rendered":169,"legacyId":222},{"title":152,"tool_name":153,"description":154,"last_updated":155,"author":16,"difficulty":17,"categories":156,"tags":159,"sections":165,"review_status":34},"Kali Linux - Die Hacker-Distribution für Forensik & Penetration Testing","Kali Linux","Leitfaden zur Installation, Nutzung und Best Practices für Kali Linux – die All-in-One-Plattform für Security-Profis.",["Date","2025-07-20T00:00:00.000Z"],[19,157,158],"forensics","penetration-testing",[160,161,158,162,163,164],"live-boot","tool-collection","forensics-suite","virtualization","arm-support",{"overview":32,"installation":32,"configuration":32,"usage_examples":32,"best_practices":32,"troubleshooting":32,"advanced_topics":32},"> **⚠️ Hinweis**: Dies ist ein vorläufiger, KI-generierter Knowledgebase-Eintrag. Wir freuen uns über Verbesserungen und Ergänzungen durch die Community!\n\n\n# Übersicht\n\nKali Linux ist eine auf Debian basierende Linux-Distribution, die speziell für Penetration Testing, digitale Forensik, Reverse Engineering und Incident Response entwickelt wurde. Mit über 600 vorinstallierten Tools ist sie ein unverzichtbares Werkzeug für Security-Experten, Ermittler und forensische Analysten. Die Live-Boot-Funktion erlaubt es, Systeme ohne Spuren zu hinterlassen zu analysieren – ideal für forensische Untersuchungen.\n\n## Installation\n\n### Option 1: Live-System (USB/DVD)\n\n1. ISO-Image von [kali.org](https://www.kali.org/get-kali/) herunterladen.\n2. Mit **Rufus** oder **balenaEtcher** auf einen USB-Stick schreiben.\n3. Vom USB-Stick booten (ggf. Boot-Reihenfolge im BIOS anpassen).\n4. Kali kann direkt ohne Installation im Live-Modus verwendet werden.\n\n### Option 2: Installation auf Festplatte\n\n1. ISO-Image booten und **Graphical Install** wählen.\n2. Schritt-für-Schritt durch den Installationsassistenten navigieren:\n - Sprache, Zeitzone und Tastaturlayout auswählen\n - Partitionierung konfigurieren (automatisch oder manuell)\n - Benutzerkonten erstellen\n3. Nach Installation Neustart durchführen.\n\n### Option 3: Virtuelle Maschine (VM)\n\n- Offizielle VM-Images für VirtualBox und VMware von der [Kali-Website](https://www.kali.org/get-kali/#kali-virtual-machines)\n- Importieren, ggf. Netzwerkbrücke und Shared Folders aktivieren\n\n## Konfiguration\n\n### Netzwerkeinstellungen\n\n- Konfiguration über `nmtui` oder `/etc/network/interfaces`\n- VPN und Proxy-Integration über GUI oder Terminal\n\n### Updates & Paketquellen\n\n```bash\nsudo apt update && sudo apt full-upgrade\n````\n\n> Hinweis: `kali-rolling` ist die Standard-Distribution für kontinuierliche Updates.\n\n### Sprache & Lokalisierung\n\n```bash\nsudo dpkg-reconfigure locales\nsudo dpkg-reconfigure keyboard-configuration\n```\n\n## Verwendungsbeispiele\n\n### 1. Netzwerkscan mit Nmap\n\n```bash\nnmap -sS -T4 -A 192.168.1.0/24\n```\n\n### 2. Passwort-Cracking mit John the Ripper\n\n```bash\njohn --wordlist=/usr/share/wordlists/rockyou.txt hashes.txt\n```\n\n### 3. Forensik mit Autopsy\n\n```bash\nautopsy &\n```\n\n### 4. Android-Analyse mit MobSF (in Docker)\n\n```bash\ndocker pull opensecurity/mobile-security-framework-mobsf\ndocker run -it -p 8000:8000 mobsf\n```\n\n## Best Practices\n\n* Nutze immer **aktuelle Snapshots** oder VM-Clones vor gefährlichen Tests\n* Verwende separate Netzwerke (z. B. Host-only oder NAT) für Tests\n* Deaktiviere automatisches WLAN bei forensischen Analysen\n* Prüfe und aktualisiere regelmäßig Toolsets (`apt`, `git`, `pip`)\n* Halte deine ISO-Images versioniert für forensische Reproduzierbarkeit\n\n## Troubleshooting\n\n### Problem: Keine Internetverbindung nach Installation\n\n**Lösung:** Netzwerkadapter prüfen, ggf. mit `ifconfig` oder `ip a` überprüfen, DHCP aktivieren.\n\n### Problem: Tools fehlen nach Update\n\n**Lösung:** Tool-Gruppen wie `kali-linux-default` manuell nachinstallieren:\n\n```bash\nsudo apt install kali-linux-default\n```\n\n### Problem: „Permission Denied“ bei Tools\n\n**Lösung:** Root-Rechte nutzen oder mit `sudo` ausführen.\n\n## Weiterführende Themen\n\n* **Kustomisierung von Kali ISOs** mit `live-build`\n* **NetHunter**: Kali für mobile Geräte (Android)\n* **Kali Purple**: Defensive Security Suite\n* Integration mit **Cloud-Infrastrukturen** via WSL oder Azure\n\n---\n\n**Links & Ressourcen:**\n\n* Offizielle Website: [https://kali.org](https://kali.org/)\n* Dokumentation: [https://docs.kali.org/](https://docs.kali.org/)\n* GitLab Repo: [https://gitlab.com/kalilinux](https://gitlab.com/kalilinux)\n* Discord-Community: [https://discord.com/invite/kali-linux](https://discord.com/invite/kali-linux)","src/content/knowledgebase/kali-linux.md","09243ebc79d75dbc",{"html":170,"metadata":171},"\u003Cblockquote>\n\u003Cp>\u003Cstrong>⚠️ Hinweis\u003C/strong>: Dies ist ein vorläufiger, KI-generierter Knowledgebase-Eintrag. Wir freuen uns über Verbesserungen und Ergänzungen durch die Community!\u003C/p>\n\u003C/blockquote>\n\u003Ch1 id=\"übersicht\">Übersicht\u003C/h1>\n\u003Cp>Kali Linux ist eine auf Debian basierende Linux-Distribution, die speziell für Penetration Testing, digitale Forensik, Reverse Engineering und Incident Response entwickelt wurde. Mit über 600 vorinstallierten Tools ist sie ein unverzichtbares Werkzeug für Security-Experten, Ermittler und forensische Analysten. Die Live-Boot-Funktion erlaubt es, Systeme ohne Spuren zu hinterlassen zu analysieren – ideal für forensische Untersuchungen.\u003C/p>\n\u003Ch2 id=\"installation\">Installation\u003C/h2>\n\u003Ch3 id=\"option-1-live-system-usbdvd\">Option 1: Live-System (USB/DVD)\u003C/h3>\n\u003Col>\n\u003Cli>ISO-Image von \u003Ca href=\"https://www.kali.org/get-kali/\">kali.org\u003C/a> herunterladen.\u003C/li>\n\u003Cli>Mit \u003Cstrong>Rufus\u003C/strong> oder \u003Cstrong>balenaEtcher\u003C/strong> auf einen USB-Stick schreiben.\u003C/li>\n\u003Cli>Vom USB-Stick booten (ggf. Boot-Reihenfolge im BIOS anpassen).\u003C/li>\n\u003Cli>Kali kann direkt ohne Installation im Live-Modus verwendet werden.\u003C/li>\n\u003C/ol>\n\u003Ch3 id=\"option-2-installation-auf-festplatte\">Option 2: Installation auf Festplatte\u003C/h3>\n\u003Col>\n\u003Cli>ISO-Image booten und \u003Cstrong>Graphical Install\u003C/strong> wählen.\u003C/li>\n\u003Cli>Schritt-für-Schritt durch den Installationsassistenten navigieren:\n\u003Cul>\n\u003Cli>Sprache, Zeitzone und Tastaturlayout auswählen\u003C/li>\n\u003Cli>Partitionierung konfigurieren (automatisch oder manuell)\u003C/li>\n\u003Cli>Benutzerkonten erstellen\u003C/li>\n\u003C/ul>\n\u003C/li>\n\u003Cli>Nach Installation Neustart durchführen.\u003C/li>\n\u003C/ol>\n\u003Ch3 id=\"option-3-virtuelle-maschine-vm\">Option 3: Virtuelle Maschine (VM)\u003C/h3>\n\u003Cul>\n\u003Cli>Offizielle VM-Images für VirtualBox und VMware von der \u003Ca href=\"https://www.kali.org/get-kali/#kali-virtual-machines\">Kali-Website\u003C/a>\u003C/li>\n\u003Cli>Importieren, ggf. Netzwerkbrücke und Shared Folders aktivieren\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"konfiguration\">Konfiguration\u003C/h2>\n\u003Ch3 id=\"netzwerkeinstellungen\">Netzwerkeinstellungen\u003C/h3>\n\u003Cul>\n\u003Cli>Konfiguration über \u003Ccode>nmtui\u003C/code> oder \u003Ccode>/etc/network/interfaces\u003C/code>\u003C/li>\n\u003Cli>VPN und Proxy-Integration über GUI oder Terminal\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"updates--paketquellen\">Updates & Paketquellen\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apt\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> update\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> && \u003C/span>\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apt\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> full-upgrade\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Cblockquote>\n\u003Cp>Hinweis: \u003Ccode>kali-rolling\u003C/code> ist die Standard-Distribution für kontinuierliche Updates.\u003C/p>\n\u003C/blockquote>\n\u003Ch3 id=\"sprache--lokalisierung\">Sprache & Lokalisierung\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> dpkg-reconfigure\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> locales\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> dpkg-reconfigure\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> keyboard-configuration\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"verwendungsbeispiele\">Verwendungsbeispiele\u003C/h2>\n\u003Ch3 id=\"1-netzwerkscan-mit-nmap\">1. Netzwerkscan mit Nmap\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">nmap\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -sS\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -T4\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -A\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> 192.168.1.0/24\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"2-passwort-cracking-mit-john-the-ripper\">2. Passwort-Cracking mit John the Ripper\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">john\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --wordlist=/usr/share/wordlists/rockyou.txt\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> hashes.txt\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"3-forensik-mit-autopsy\">3. Forensik mit Autopsy\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">autopsy\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> &\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"4-android-analyse-mit-mobsf-in-docker\">4. Android-Analyse mit MobSF (in Docker)\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">docker\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> pull\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> opensecurity/mobile-security-framework-mobsf\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">docker\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> run\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -it\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -p\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> 8000:8000\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> mobsf\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"best-practices\">Best Practices\u003C/h2>\n\u003Cul>\n\u003Cli>Nutze immer \u003Cstrong>aktuelle Snapshots\u003C/strong> oder VM-Clones vor gefährlichen Tests\u003C/li>\n\u003Cli>Verwende separate Netzwerke (z. B. Host-only oder NAT) für Tests\u003C/li>\n\u003Cli>Deaktiviere automatisches WLAN bei forensischen Analysen\u003C/li>\n\u003Cli>Prüfe und aktualisiere regelmäßig Toolsets (\u003Ccode>apt\u003C/code>, \u003Ccode>git\u003C/code>, \u003Ccode>pip\u003C/code>)\u003C/li>\n\u003Cli>Halte deine ISO-Images versioniert für forensische Reproduzierbarkeit\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"troubleshooting\">Troubleshooting\u003C/h2>\n\u003Ch3 id=\"problem-keine-internetverbindung-nach-installation\">Problem: Keine Internetverbindung nach Installation\u003C/h3>\n\u003Cp>\u003Cstrong>Lösung:\u003C/strong> Netzwerkadapter prüfen, ggf. mit \u003Ccode>ifconfig\u003C/code> oder \u003Ccode>ip a\u003C/code> überprüfen, DHCP aktivieren.\u003C/p>\n\u003Ch3 id=\"problem-tools-fehlen-nach-update\">Problem: Tools fehlen nach Update\u003C/h3>\n\u003Cp>\u003Cstrong>Lösung:\u003C/strong> Tool-Gruppen wie \u003Ccode>kali-linux-default\u003C/code> manuell nachinstallieren:\u003C/p>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apt\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> install\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> kali-linux-default\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"problem-permission-denied-bei-tools\">Problem: „Permission Denied“ bei Tools\u003C/h3>\n\u003Cp>\u003Cstrong>Lösung:\u003C/strong> Root-Rechte nutzen oder mit \u003Ccode>sudo\u003C/code> ausführen.\u003C/p>\n\u003Ch2 id=\"weiterführende-themen\">Weiterführende Themen\u003C/h2>\n\u003Cul>\n\u003Cli>\u003Cstrong>Kustomisierung von Kali ISOs\u003C/strong> mit \u003Ccode>live-build\u003C/code>\u003C/li>\n\u003Cli>\u003Cstrong>NetHunter\u003C/strong>: Kali für mobile Geräte (Android)\u003C/li>\n\u003Cli>\u003Cstrong>Kali Purple\u003C/strong>: Defensive Security Suite\u003C/li>\n\u003Cli>Integration mit \u003Cstrong>Cloud-Infrastrukturen\u003C/strong> via WSL oder Azure\u003C/li>\n\u003C/ul>\n\u003Chr>\n\u003Cp>\u003Cstrong>Links & Ressourcen:\u003C/strong>\u003C/p>\n\u003Cul>\n\u003Cli>Offizielle Website: \u003Ca href=\"https://kali.org/\">https://kali.org\u003C/a>\u003C/li>\n\u003Cli>Dokumentation: \u003Ca href=\"https://docs.kali.org/\">https://docs.kali.org/\u003C/a>\u003C/li>\n\u003Cli>GitLab Repo: \u003Ca href=\"https://gitlab.com/kalilinux\">https://gitlab.com/kalilinux\u003C/a>\u003C/li>\n\u003Cli>Discord-Community: \u003Ca href=\"https://discord.com/invite/kali-linux\">https://discord.com/invite/kali-linux\u003C/a>\u003C/li>\n\u003C/ul>",{"headings":172,"localImagePaths":219,"remoteImagePaths":220,"frontmatter":151,"imagePaths":221},[173,174,175,178,181,184,185,188,191,194,195,198,201,204,207,208,209,212,215,218],{"depth":43,"slug":44,"text":45},{"depth":47,"slug":48,"text":49},{"depth":51,"slug":176,"text":177},"option-1-live-system-usbdvd","Option 1: Live-System (USB/DVD)",{"depth":51,"slug":179,"text":180},"option-2-installation-auf-festplatte","Option 2: Installation auf Festplatte",{"depth":51,"slug":182,"text":183},"option-3-virtuelle-maschine-vm","Option 3: Virtuelle Maschine (VM)",{"depth":47,"slug":58,"text":59},{"depth":51,"slug":186,"text":187},"netzwerkeinstellungen","Netzwerkeinstellungen",{"depth":51,"slug":189,"text":190},"updates--paketquellen","Updates & Paketquellen",{"depth":51,"slug":192,"text":193},"sprache--lokalisierung","Sprache & Lokalisierung",{"depth":47,"slug":70,"text":71},{"depth":51,"slug":196,"text":197},"1-netzwerkscan-mit-nmap","1. Netzwerkscan mit Nmap",{"depth":51,"slug":199,"text":200},"2-passwort-cracking-mit-john-the-ripper","2. Passwort-Cracking mit John the Ripper",{"depth":51,"slug":202,"text":203},"3-forensik-mit-autopsy","3. Forensik mit Autopsy",{"depth":51,"slug":205,"text":206},"4-android-analyse-mit-mobsf-in-docker","4. Android-Analyse mit MobSF (in Docker)",{"depth":47,"slug":79,"text":80},{"depth":47,"slug":82,"text":83},{"depth":51,"slug":210,"text":211},"problem-keine-internetverbindung-nach-installation","Problem: Keine Internetverbindung nach Installation",{"depth":51,"slug":213,"text":214},"problem-tools-fehlen-nach-update","Problem: Tools fehlen nach Update",{"depth":51,"slug":216,"text":217},"problem-permission-denied-bei-tools","Problem: „Permission Denied“ bei Tools",{"depth":47,"slug":94,"text":95},[],[],[],"kali-linux.md","velociraptor",{"id":223,"data":225,"body":239,"filePath":240,"digest":241,"rendered":242,"legacyId":287},{"title":226,"tool_name":227,"description":228,"last_updated":229,"author":16,"difficulty":230,"categories":231,"tags":232,"sections":238,"review_status":34},"Velociraptor – Skalierbare Endpoint-Forensik mit VQL","Velociraptor","Detaillierte Anleitung und Best Practices für Velociraptor – Remote-Forensik der nächsten Generation",["Date","2025-07-20T00:00:00.000Z"],"advanced",[19,21,22],[25,233,234,235,236,237],"endpoint-monitoring","artifact-extraction","scripting","live-forensics","hunting",{"overview":32,"installation":32,"configuration":32,"usage_examples":32,"best_practices":32,"troubleshooting":32,"advanced_topics":32},"> **⚠️ Hinweis**: Dies ist ein vorläufiger, KI-generierter Knowledgebase-Eintrag. Wir freuen uns über Verbesserungen und Ergänzungen durch die Community!\n\n\n# Übersicht\n\nVelociraptor ist ein Open-Source-Tool zur Endpoint-Forensik mit Fokus auf Skalierbarkeit, Präzision und Geschwindigkeit. Es ermöglicht die zielgerichtete Erfassung und Analyse digitaler Artefakte über eine eigene Query Language – VQL (Velociraptor Query Language). Die Architektur erlaubt remote Zugriff auf tausende Endpoints gleichzeitig, ohne dass vollständige Disk-Images erforderlich sind.\n\n## Hauptmerkmale\n\n- 🌐 Web-basierte Benutzeroberfläche\n- 💡 VQL – mächtige, SQL-ähnliche Abfragesprache\n- 🚀 Hochskalierbare Hunt-Funktionalität\n- 🔍 Artefaktbasierte Sammlung (ohne Full-Image)\n- 🖥️ Plattformunterstützung für Windows, macOS, Linux\n- 📦 Apache 2.0 Lizenz – Open Source\n\nWeitere Infos: [velociraptor.app](https://www.velociraptor.app/) \nProjektspiegel: [raptor.cc24.dev](https://raptor.cc24.dev) \nStatus: ![Status](https://status.mikoshi.de/api/badge/33/status)\n\n---\n\n## Installation\n\n### Voraussetzungen\n\n- Python ≥ 3.9\n- Adminrechte auf dem System\n- Firewall-Freigaben für Webport (Standard: 8000)\n\n### Installation unter Linux/macOS\n\n```bash\nwget https://github.com/Velocidex/velociraptor/releases/latest/download/velociraptor\nchmod +x velociraptor\nsudo mv velociraptor /usr/local/bin/\n````\n\n### Installation unter Windows\n\n1. Download der `.exe` von der [Release-Seite](https://github.com/Velocidex/velociraptor/releases)\n2. Ausführung in PowerShell mit Adminrechten:\n\n ```powershell\n .\\velociraptor.exe config generate > server.config.yaml\n ```\n\n---\n\n## Konfiguration\n\n### Server Setup\n\n1. Generiere die Konfigurationsdatei:\n\n ```bash\n velociraptor config generate > server.config.yaml\n ```\n2. Starte den Server:\n\n ```bash\n velociraptor --config server.config.yaml frontend\n ```\n3. Zugriff über Browser via `https://\u003Chostname>:8000`\n\n### Client Deployment\n\n* MSI/EXE für Windows, oder `deb/rpm` für Linux\n* Unterstützt automatische Registrierung am Server\n* Deployment über GPO, Puppet, Ansible etc. möglich\n\n---\n\n## Verwendungsbeispiele\n\n### 1. Live-Memory-Artefakte sammeln\n\n```vql\nSELECT * FROM Artifact.MemoryInfo()\n```\n\n### 2. Hunt starten auf verdächtige Prozesse\n\n```vql\nSELECT * FROM pslist()\nWHERE Name =~ \"mimikatz|cobaltstrike\"\n```\n\n### 3. Dateiinhalt extrahieren\n\n```vql\nSELECT * FROM glob(globs=\"C:\\\\Users\\\\*\\\\AppData\\\\*.dat\")\n```\n\n---\n\n## Best Practices\n\n* Erstelle eigene Artefakte für unternehmensspezifische Bedrohungsmodelle\n* Verwende \"Notebook\"-Funktion für strukturierte Analysen\n* Nutze \"Labels\", um Endpoints zu organisieren (z. B. `location:Berlin`)\n* Kombiniere Velociraptor mit SIEM/EDR-Systemen über REST API\n\n---\n\n## Troubleshooting\n\n### Problem: Keine Verbindung vom Client zum Server\n\n**Lösung:**\n\n* Ports freigegeben? (Default: 8000/tcp)\n* TLS-Zertifikate korrekt generiert?\n* `server.config.yaml` auf korrekte `public_ip` prüfen\n\n### Problem: Hunt hängt in Warteschleife\n\n**Lösung:**\n\n* Genügend Worker-Prozesse aktiv?\n* Endpoint online?\n* `log_level` auf `debug` setzen und Log analysieren\n\n---\n\n## Weiterführende Themen\n\n* Eigene Artefakte schreiben mit VQL\n* Integration mit ELK Stack\n* Automatisiertes Incident Response Playbook\n* Velociraptor als IR-as-a-Service einsetzen\n\n---\n\n🧠 **Tipp:** Die Lernkurve bei VQL ist steil – aber mit hohem ROI. Testumgebung aufsetzen und mit Community-Artefakten starten.\n\n📚 Weitere Ressourcen:\n\n* [Offizielle Doku](https://docs.velociraptor.app/)\n* [YouTube Channel](https://www.youtube.com/c/VelociraptorDFIR)\n* [Community auf Discord](https://www.velociraptor.app/community/)","src/content/knowledgebase/velociraptor.md","05636b9b97e61d17",{"html":243,"metadata":244},"\u003Cblockquote>\n\u003Cp>\u003Cstrong>⚠️ Hinweis\u003C/strong>: Dies ist ein vorläufiger, KI-generierter Knowledgebase-Eintrag. Wir freuen uns über Verbesserungen und Ergänzungen durch die Community!\u003C/p>\n\u003C/blockquote>\n\u003Ch1 id=\"übersicht\">Übersicht\u003C/h1>\n\u003Cp>Velociraptor ist ein Open-Source-Tool zur Endpoint-Forensik mit Fokus auf Skalierbarkeit, Präzision und Geschwindigkeit. Es ermöglicht die zielgerichtete Erfassung und Analyse digitaler Artefakte über eine eigene Query Language – VQL (Velociraptor Query Language). Die Architektur erlaubt remote Zugriff auf tausende Endpoints gleichzeitig, ohne dass vollständige Disk-Images erforderlich sind.\u003C/p>\n\u003Ch2 id=\"hauptmerkmale\">Hauptmerkmale\u003C/h2>\n\u003Cul>\n\u003Cli>🌐 Web-basierte Benutzeroberfläche\u003C/li>\n\u003Cli>💡 VQL – mächtige, SQL-ähnliche Abfragesprache\u003C/li>\n\u003Cli>🚀 Hochskalierbare Hunt-Funktionalität\u003C/li>\n\u003Cli>🔍 Artefaktbasierte Sammlung (ohne Full-Image)\u003C/li>\n\u003Cli>🖥️ Plattformunterstützung für Windows, macOS, Linux\u003C/li>\n\u003Cli>📦 Apache 2.0 Lizenz – Open Source\u003C/li>\n\u003C/ul>\n\u003Cp>Weitere Infos: \u003Ca href=\"https://www.velociraptor.app/\">velociraptor.app\u003C/a>\u003Cbr>\nProjektspiegel: \u003Ca href=\"https://raptor.cc24.dev\">raptor.cc24.dev\u003C/a>\u003Cbr>\nStatus: \u003Cimg src=\"https://status.mikoshi.de/api/badge/33/status\" alt=\"Status\">\u003C/p>\n\u003Chr>\n\u003Ch2 id=\"installation\">Installation\u003C/h2>\n\u003Ch3 id=\"voraussetzungen\">Voraussetzungen\u003C/h3>\n\u003Cul>\n\u003Cli>Python ≥ 3.9\u003C/li>\n\u003Cli>Adminrechte auf dem System\u003C/li>\n\u003Cli>Firewall-Freigaben für Webport (Standard: 8000)\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"installation-unter-linuxmacos\">Installation unter Linux/macOS\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">wget\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> https://github.com/Velocidex/velociraptor/releases/latest/download/velociraptor\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">chmod\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> +x\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> velociraptor\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> mv\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> velociraptor\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /usr/local/bin/\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"installation-unter-windows\">Installation unter Windows\u003C/h3>\n\u003Col>\n\u003Cli>\n\u003Cp>Download der \u003Ccode>.exe\u003C/code> von der \u003Ca href=\"https://github.com/Velocidex/velociraptor/releases\">Release-Seite\u003C/a>\u003C/p>\n\u003C/li>\n\u003Cli>\n\u003Cp>Ausführung in PowerShell mit Adminrechten:\u003C/p>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"powershell\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">.\\\u003C/span>\u003Cspan style=\"color:#79B8FF\">velociraptor.exe\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> config generate \u003C/span>\u003Cspan style=\"color:#F97583\">>\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> server.config.yaml\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003C/li>\n\u003C/ol>\n\u003Chr>\n\u003Ch2 id=\"konfiguration\">Konfiguration\u003C/h2>\n\u003Ch3 id=\"server-setup\">Server Setup\u003C/h3>\n\u003Col>\n\u003Cli>\n\u003Cp>Generiere die Konfigurationsdatei:\u003C/p>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">velociraptor\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> config\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> generate\u003C/span>\u003Cspan style=\"color:#F97583\"> >\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> server.config.yaml\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003C/li>\n\u003Cli>\n\u003Cp>Starte den Server:\u003C/p>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">velociraptor\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --config\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> server.config.yaml\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> frontend\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003C/li>\n\u003Cli>\n\u003Cp>Zugriff über Browser via \u003Ccode>https://<hostname>:8000\u003C/code>\u003C/p>\n\u003C/li>\n\u003C/ol>\n\u003Ch3 id=\"client-deployment\">Client Deployment\u003C/h3>\n\u003Cul>\n\u003Cli>MSI/EXE für Windows, oder \u003Ccode>deb/rpm\u003C/code> für Linux\u003C/li>\n\u003Cli>Unterstützt automatische Registrierung am Server\u003C/li>\n\u003Cli>Deployment über GPO, Puppet, Ansible etc. möglich\u003C/li>\n\u003C/ul>\n\u003Chr>\n\u003Ch2 id=\"verwendungsbeispiele\">Verwendungsbeispiele\u003C/h2>\n\u003Ch3 id=\"1-live-memory-artefakte-sammeln\">1. Live-Memory-Artefakte sammeln\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"plaintext\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan>SELECT * FROM Artifact.MemoryInfo()\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"2-hunt-starten-auf-verdächtige-prozesse\">2. Hunt starten auf verdächtige Prozesse\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"plaintext\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan>SELECT * FROM pslist()\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan>WHERE Name =~ \"mimikatz|cobaltstrike\"\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"3-dateiinhalt-extrahieren\">3. Dateiinhalt extrahieren\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"plaintext\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan>SELECT * FROM glob(globs=\"C:\\\\Users\\\\*\\\\AppData\\\\*.dat\")\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Chr>\n\u003Ch2 id=\"best-practices\">Best Practices\u003C/h2>\n\u003Cul>\n\u003Cli>Erstelle eigene Artefakte für unternehmensspezifische Bedrohungsmodelle\u003C/li>\n\u003Cli>Verwende “Notebook”-Funktion für strukturierte Analysen\u003C/li>\n\u003Cli>Nutze “Labels”, um Endpoints zu organisieren (z. B. \u003Ccode>location:Berlin\u003C/code>)\u003C/li>\n\u003Cli>Kombiniere Velociraptor mit SIEM/EDR-Systemen über REST API\u003C/li>\n\u003C/ul>\n\u003Chr>\n\u003Ch2 id=\"troubleshooting\">Troubleshooting\u003C/h2>\n\u003Ch3 id=\"problem-keine-verbindung-vom-client-zum-server\">Problem: Keine Verbindung vom Client zum Server\u003C/h3>\n\u003Cp>\u003Cstrong>Lösung:\u003C/strong>\u003C/p>\n\u003Cul>\n\u003Cli>Ports freigegeben? (Default: 8000/tcp)\u003C/li>\n\u003Cli>TLS-Zertifikate korrekt generiert?\u003C/li>\n\u003Cli>\u003Ccode>server.config.yaml\u003C/code> auf korrekte \u003Ccode>public_ip\u003C/code> prüfen\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"problem-hunt-hängt-in-warteschleife\">Problem: Hunt hängt in Warteschleife\u003C/h3>\n\u003Cp>\u003Cstrong>Lösung:\u003C/strong>\u003C/p>\n\u003Cul>\n\u003Cli>Genügend Worker-Prozesse aktiv?\u003C/li>\n\u003Cli>Endpoint online?\u003C/li>\n\u003Cli>\u003Ccode>log_level\u003C/code> auf \u003Ccode>debug\u003C/code> setzen und Log analysieren\u003C/li>\n\u003C/ul>\n\u003Chr>\n\u003Ch2 id=\"weiterführende-themen\">Weiterführende Themen\u003C/h2>\n\u003Cul>\n\u003Cli>Eigene Artefakte schreiben mit VQL\u003C/li>\n\u003Cli>Integration mit ELK Stack\u003C/li>\n\u003Cli>Automatisiertes Incident Response Playbook\u003C/li>\n\u003Cli>Velociraptor als IR-as-a-Service einsetzen\u003C/li>\n\u003C/ul>\n\u003Chr>\n\u003Cp>🧠 \u003Cstrong>Tipp:\u003C/strong> Die Lernkurve bei VQL ist steil – aber mit hohem ROI. Testumgebung aufsetzen und mit Community-Artefakten starten.\u003C/p>\n\u003Cp>📚 Weitere Ressourcen:\u003C/p>\n\u003Cul>\n\u003Cli>\u003Ca href=\"https://docs.velociraptor.app/\">Offizielle Doku\u003C/a>\u003C/li>\n\u003Cli>\u003Ca href=\"https://www.youtube.com/c/VelociraptorDFIR\">YouTube Channel\u003C/a>\u003C/li>\n\u003Cli>\u003Ca href=\"https://www.velociraptor.app/community/\">Community auf Discord\u003C/a>\u003C/li>\n\u003C/ul>",{"headings":245,"localImagePaths":284,"remoteImagePaths":285,"frontmatter":225,"imagePaths":286},[246,247,250,251,252,255,258,259,262,265,266,269,272,275,276,277,280,283],{"depth":43,"slug":44,"text":45},{"depth":47,"slug":248,"text":249},"hauptmerkmale","Hauptmerkmale",{"depth":47,"slug":48,"text":49},{"depth":51,"slug":52,"text":53},{"depth":51,"slug":253,"text":254},"installation-unter-linuxmacos","Installation unter Linux/macOS",{"depth":51,"slug":256,"text":257},"installation-unter-windows","Installation unter Windows",{"depth":47,"slug":58,"text":59},{"depth":51,"slug":260,"text":261},"server-setup","Server Setup",{"depth":51,"slug":263,"text":264},"client-deployment","Client Deployment",{"depth":47,"slug":70,"text":71},{"depth":51,"slug":267,"text":268},"1-live-memory-artefakte-sammeln","1. Live-Memory-Artefakte sammeln",{"depth":51,"slug":270,"text":271},"2-hunt-starten-auf-verdächtige-prozesse","2. Hunt starten auf verdächtige Prozesse",{"depth":51,"slug":273,"text":274},"3-dateiinhalt-extrahieren","3. Dateiinhalt extrahieren",{"depth":47,"slug":79,"text":80},{"depth":47,"slug":82,"text":83},{"depth":51,"slug":278,"text":279},"problem-keine-verbindung-vom-client-zum-server","Problem: Keine Verbindung vom Client zum Server",{"depth":51,"slug":281,"text":282},"problem-hunt-hängt-in-warteschleife","Problem: Hunt hängt in Warteschleife",{"depth":47,"slug":94,"text":95},[],[],[],"velociraptor.md","nextcloud",{"id":288,"data":290,"body":304,"filePath":305,"digest":306,"rendered":307,"legacyId":343},{"title":291,"tool_name":292,"description":293,"last_updated":294,"author":16,"difficulty":295,"categories":296,"tags":298,"sections":303,"review_status":34},"Nextcloud - Sichere Kollaborationsplattform","Nextcloud","Detaillierte Anleitung und Best Practices für Nextcloud in forensischen Einsatzszenarien",["Date","2025-07-20T00:00:00.000Z"],"novice",[297],"collaboration-general",[25,299,300,27,301,302],"collaboration","file-sharing","encryption","document-management",{"overview":32,"installation":32,"configuration":32,"usage_examples":32,"best_practices":32,"troubleshooting":32,"advanced_topics":33},"> **⚠️ Hinweis**: Dies ist ein vorläufiger, KI-generierter Knowledgebase-Eintrag. Wir freuen uns über Verbesserungen und Ergänzungen durch die Community!\n\n\n# Übersicht\n\nNextcloud ist eine Open-Source-Cloud-Suite, die speziell für die sichere Zusammenarbeit entwickelt wurde. Sie eignet sich ideal für forensische Teams, da sie eine DSGVO-konforme Umgebung mit verschlüsselter Dateiablage, Office-Integration und Videokonferenzen bereitstellt. Zusätzlich bietet Nextcloud einen integrierten SSO-Provider, der das Identitätsmanagement für andere forensische Tools stark vereinfacht.\n\nSkalierbar von kleinen Raspberry-Pi-Installationen bis hin zu hochverfügbaren Multi-Node-Setups.\n\n- **Website:** [nextcloud.com](https://nextcloud.com/)\n- **Demo/Projektinstanz:** [cloud.cc24.dev](https://cloud.cc24.dev)\n- **Statusseite:** [Mikoshi Status](https://status.mikoshi.de/api/badge/11/status)\n- **Lizenz:** AGPL-3.0\n\n---\n\n## Installation\n\n### Voraussetzungen\n\n- Linux-Server oder Raspberry Pi\n- PHP 8.1 oder höher\n- MariaDB/PostgreSQL\n- Webserver (Apache/Nginx)\n- SSL-Zertifikat (empfohlen: Let's Encrypt)\n\n### Installationsschritte (Ubuntu Beispiel)\n\n```bash\nsudo apt update && sudo apt upgrade\nsudo apt install apache2 mariadb-server libapache2-mod-php php php-mysql \\\n php-gd php-xml php-mbstring php-curl php-zip php-intl php-bcmath unzip\n\nwget https://download.nextcloud.com/server/releases/latest.zip\nunzip latest.zip -d /var/www/\nchown -R www-data:www-data /var/www/nextcloud\n````\n\nDanach den Web-Installer im Browser aufrufen (`https://\u003Cyour-domain>/nextcloud`) und Setup abschließen.\n\n## Konfiguration\n\n* **Trusted Domains** in `config.php` definieren\n* SSO mit OpenID Connect aktivieren\n* Dateiverschlüsselung aktivieren (`Settings → Security`)\n* Benutzer und Gruppen über LDAP oder SAML integrieren\n\n## Verwendungsbeispiele\n\n### Gemeinsame Fallbearbeitung\n\n1. Ermittlungsordner als geteiltes Gruppenverzeichnis anlegen\n2. Versionierung und Kommentare zu forensischen Berichten aktivieren\n3. Vorschau für Office-Dateien, PDFs und Bilder direkt im Browser nutzen\n\n### Videokonferenzen mit \"Nextcloud Talk\"\n\n* Sichere Kommunikation zwischen Ermittlern und Sachverständigen\n* Ende-zu-Ende-verschlüsselt\n* Bildschirmfreigabe möglich\n\n### Automatischer Dateiimport per API\n\n* REST-Schnittstelle nutzen, um z. B. automatisch Logdateien oder Exportdaten hochzuladen\n* Ideal für Anbindung an SIEM, DLP oder Analyse-Pipelines\n\n## Best Practices\n\n* Zwei-Faktor-Authentifizierung aktivieren\n* Tägliche Backups der Datenbank und Datenstruktur\n* Nutzung von OnlyOffice oder Collabora für revisionssichere Dokumentenbearbeitung\n* Zugriff regelmäßig überprüfen, insbesondere bei externen Partnern\n\n## Troubleshooting\n\n### Problem: Langsame Performance\n\n**Lösung:** APCu aktivieren und Caching optimieren (`config.php → 'memcache.local'`).\n\n### Problem: Dateien erscheinen nicht im Sync\n\n**Lösung:** Cronjob für `files:scan` konfigurieren oder manuell ausführen:\n\n```bash\nsudo -u www-data php /var/www/nextcloud/occ files:scan --all\n```\n\n### Problem: Fehlermeldung \"Trusted domain not set\"\n\n**Lösung:** In `config/config.php` Eintrag `trusted_domains` korrekt konfigurieren:\n\n```php\n'trusted_domains' =>\n array (\n 0 => 'yourdomain.tld',\n 1 => 'cloud.cc24.dev',\n ),\n```\n\n## Weiterführende Themen\n\n* **Integration mit Forensik-Plattformen** (über WebDAV, API oder SSO)\n* **Custom Apps entwickeln** für spezielle Ermittlungs-Workflows\n* **Auditing aktivieren**: Nutzung und Änderungen nachvollziehen mit Protokollierungsfunktionen","src/content/knowledgebase/nextcloud.md","9294074e6083e37b",{"html":308,"metadata":309},"\u003Cblockquote>\n\u003Cp>\u003Cstrong>⚠️ Hinweis\u003C/strong>: Dies ist ein vorläufiger, KI-generierter Knowledgebase-Eintrag. Wir freuen uns über Verbesserungen und Ergänzungen durch die Community!\u003C/p>\n\u003C/blockquote>\n\u003Ch1 id=\"übersicht\">Übersicht\u003C/h1>\n\u003Cp>Nextcloud ist eine Open-Source-Cloud-Suite, die speziell für die sichere Zusammenarbeit entwickelt wurde. Sie eignet sich ideal für forensische Teams, da sie eine DSGVO-konforme Umgebung mit verschlüsselter Dateiablage, Office-Integration und Videokonferenzen bereitstellt. Zusätzlich bietet Nextcloud einen integrierten SSO-Provider, der das Identitätsmanagement für andere forensische Tools stark vereinfacht.\u003C/p>\n\u003Cp>Skalierbar von kleinen Raspberry-Pi-Installationen bis hin zu hochverfügbaren Multi-Node-Setups.\u003C/p>\n\u003Cul>\n\u003Cli>\u003Cstrong>Website:\u003C/strong> \u003Ca href=\"https://nextcloud.com/\">nextcloud.com\u003C/a>\u003C/li>\n\u003Cli>\u003Cstrong>Demo/Projektinstanz:\u003C/strong> \u003Ca href=\"https://cloud.cc24.dev\">cloud.cc24.dev\u003C/a>\u003C/li>\n\u003Cli>\u003Cstrong>Statusseite:\u003C/strong> \u003Ca href=\"https://status.mikoshi.de/api/badge/11/status\">Mikoshi Status\u003C/a>\u003C/li>\n\u003Cli>\u003Cstrong>Lizenz:\u003C/strong> AGPL-3.0\u003C/li>\n\u003C/ul>\n\u003Chr>\n\u003Ch2 id=\"installation\">Installation\u003C/h2>\n\u003Ch3 id=\"voraussetzungen\">Voraussetzungen\u003C/h3>\n\u003Cul>\n\u003Cli>Linux-Server oder Raspberry Pi\u003C/li>\n\u003Cli>PHP 8.1 oder höher\u003C/li>\n\u003Cli>MariaDB/PostgreSQL\u003C/li>\n\u003Cli>Webserver (Apache/Nginx)\u003C/li>\n\u003Cli>SSL-Zertifikat (empfohlen: Let’s Encrypt)\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"installationsschritte-ubuntu-beispiel\">Installationsschritte (Ubuntu Beispiel)\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apt\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> update\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> && \u003C/span>\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apt\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> upgrade\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apt\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> install\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apache2\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> mariadb-server\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> libapache2-mod-php\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> php\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> php-mysql\u003C/span>\u003Cspan style=\"color:#79B8FF\"> \\\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#9ECBFF\"> php-gd\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> php-xml\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> php-mbstring\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> php-curl\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> php-zip\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> php-intl\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> php-bcmath\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> unzip\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">wget\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> https://download.nextcloud.com/server/releases/latest.zip\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">unzip\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> latest.zip\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -d\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /var/www/\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">chown\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -R\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> www-data:www-data\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /var/www/nextcloud\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Cp>Danach den Web-Installer im Browser aufrufen (\u003Ccode>https://<your-domain>/nextcloud\u003C/code>) und Setup abschließen.\u003C/p>\n\u003Ch2 id=\"konfiguration\">Konfiguration\u003C/h2>\n\u003Cul>\n\u003Cli>\u003Cstrong>Trusted Domains\u003C/strong> in \u003Ccode>config.php\u003C/code> definieren\u003C/li>\n\u003Cli>SSO mit OpenID Connect aktivieren\u003C/li>\n\u003Cli>Dateiverschlüsselung aktivieren (\u003Ccode>Settings → Security\u003C/code>)\u003C/li>\n\u003Cli>Benutzer und Gruppen über LDAP oder SAML integrieren\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"verwendungsbeispiele\">Verwendungsbeispiele\u003C/h2>\n\u003Ch3 id=\"gemeinsame-fallbearbeitung\">Gemeinsame Fallbearbeitung\u003C/h3>\n\u003Col>\n\u003Cli>Ermittlungsordner als geteiltes Gruppenverzeichnis anlegen\u003C/li>\n\u003Cli>Versionierung und Kommentare zu forensischen Berichten aktivieren\u003C/li>\n\u003Cli>Vorschau für Office-Dateien, PDFs und Bilder direkt im Browser nutzen\u003C/li>\n\u003C/ol>\n\u003Ch3 id=\"videokonferenzen-mit-nextcloud-talk\">Videokonferenzen mit “Nextcloud Talk”\u003C/h3>\n\u003Cul>\n\u003Cli>Sichere Kommunikation zwischen Ermittlern und Sachverständigen\u003C/li>\n\u003Cli>Ende-zu-Ende-verschlüsselt\u003C/li>\n\u003Cli>Bildschirmfreigabe möglich\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"automatischer-dateiimport-per-api\">Automatischer Dateiimport per API\u003C/h3>\n\u003Cul>\n\u003Cli>REST-Schnittstelle nutzen, um z. B. automatisch Logdateien oder Exportdaten hochzuladen\u003C/li>\n\u003Cli>Ideal für Anbindung an SIEM, DLP oder Analyse-Pipelines\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"best-practices\">Best Practices\u003C/h2>\n\u003Cul>\n\u003Cli>Zwei-Faktor-Authentifizierung aktivieren\u003C/li>\n\u003Cli>Tägliche Backups der Datenbank und Datenstruktur\u003C/li>\n\u003Cli>Nutzung von OnlyOffice oder Collabora für revisionssichere Dokumentenbearbeitung\u003C/li>\n\u003Cli>Zugriff regelmäßig überprüfen, insbesondere bei externen Partnern\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"troubleshooting\">Troubleshooting\u003C/h2>\n\u003Ch3 id=\"problem-langsame-performance\">Problem: Langsame Performance\u003C/h3>\n\u003Cp>\u003Cstrong>Lösung:\u003C/strong> APCu aktivieren und Caching optimieren (\u003Ccode>config.php → 'memcache.local'\u003C/code>).\u003C/p>\n\u003Ch3 id=\"problem-dateien-erscheinen-nicht-im-sync\">Problem: Dateien erscheinen nicht im Sync\u003C/h3>\n\u003Cp>\u003Cstrong>Lösung:\u003C/strong> Cronjob für \u003Ccode>files:scan\u003C/code> konfigurieren oder manuell ausführen:\u003C/p>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -u\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> www-data\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> php\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /var/www/nextcloud/occ\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> files:scan\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --all\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"problem-fehlermeldung-trusted-domain-not-set\">Problem: Fehlermeldung “Trusted domain not set”\u003C/h3>\n\u003Cp>\u003Cstrong>Lösung:\u003C/strong> In \u003Ccode>config/config.php\u003C/code> Eintrag \u003Ccode>trusted_domains\u003C/code> korrekt konfigurieren:\u003C/p>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"php\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#9ECBFF\">'trusted_domains'\u003C/span>\u003Cspan style=\"color:#F97583\"> =>\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\"> array\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> (\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\"> 0\u003C/span>\u003Cspan style=\"color:#F97583\"> =>\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> 'yourdomain.tld'\u003C/span>\u003Cspan style=\"color:#E1E4E8\">,\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\"> 1\u003C/span>\u003Cspan style=\"color:#F97583\"> =>\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> 'cloud.cc24.dev'\u003C/span>\u003Cspan style=\"color:#E1E4E8\">,\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\"> ),\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"weiterführende-themen\">Weiterführende Themen\u003C/h2>\n\u003Cul>\n\u003Cli>\u003Cstrong>Integration mit Forensik-Plattformen\u003C/strong> (über WebDAV, API oder SSO)\u003C/li>\n\u003Cli>\u003Cstrong>Custom Apps entwickeln\u003C/strong> für spezielle Ermittlungs-Workflows\u003C/li>\n\u003Cli>\u003Cstrong>Auditing aktivieren\u003C/strong>: Nutzung und Änderungen nachvollziehen mit Protokollierungsfunktionen\u003C/li>\n\u003C/ul>",{"headings":310,"localImagePaths":340,"remoteImagePaths":341,"frontmatter":290,"imagePaths":342},[311,312,313,314,317,318,319,322,325,328,329,330,333,336,339],{"depth":43,"slug":44,"text":45},{"depth":47,"slug":48,"text":49},{"depth":51,"slug":52,"text":53},{"depth":51,"slug":315,"text":316},"installationsschritte-ubuntu-beispiel","Installationsschritte (Ubuntu Beispiel)",{"depth":47,"slug":58,"text":59},{"depth":47,"slug":70,"text":71},{"depth":51,"slug":320,"text":321},"gemeinsame-fallbearbeitung","Gemeinsame Fallbearbeitung",{"depth":51,"slug":323,"text":324},"videokonferenzen-mit-nextcloud-talk","Videokonferenzen mit “Nextcloud Talk”",{"depth":51,"slug":326,"text":327},"automatischer-dateiimport-per-api","Automatischer Dateiimport per API",{"depth":47,"slug":79,"text":80},{"depth":47,"slug":82,"text":83},{"depth":51,"slug":331,"text":332},"problem-langsame-performance","Problem: Langsame Performance",{"depth":51,"slug":334,"text":335},"problem-dateien-erscheinen-nicht-im-sync","Problem: Dateien erscheinen nicht im Sync",{"depth":51,"slug":337,"text":338},"problem-fehlermeldung-trusted-domain-not-set","Problem: Fehlermeldung “Trusted domain not set”",{"depth":47,"slug":94,"text":95},[],[],[],"nextcloud.md","android-logical-imaging",{"id":344,"data":346,"body":359,"filePath":360,"digest":361,"rendered":362,"legacyId":590},{"title":347,"tool_name":348,"description":349,"last_updated":350,"author":351,"difficulty":230,"categories":352,"tags":354,"sections":358,"review_status":34},"Extraktion logischer Dateisysteme alter Android-Smartphones - eine KI-Recherche","Android Logical Imaging","Wie man alte Android-Handys aufbekommen könnte - eine Recherche von Claude",["Date","2025-07-21T00:00:00.000Z"],"Claude 4 Sonnet (Research)",[353],"data-collection",[355,356,357],"imaging","filesystem","hardware-interface",{"overview":32,"installation":32,"configuration":32,"usage_examples":32,"best_practices":32,"troubleshooting":32,"advanced_topics":32},"# Übersicht\n\nOpen-Source Android Forensik bietet robuste Alternativen zu kommerziellen Lösungen wie Cellebrite UFED und Magnet AXIOM. Besonders für ältere Android-Geräte (5+ Jahre) existieren bewährte Methoden zur Datenextraktion und -analyse.\n\n## Kernkomponenten des Open-Source Forensik-Stacks\n\n**Autopsy Digital Forensics Platform** bildet das Fundament mit GUI-basierter Analyse und integrierten Android-Parsing-Fähigkeiten. Die Plattform unterstützt **ALEAPP (Android Logs Events And Protobuf Parser)**, das über 100 Artefakt-Kategorien aus Android-Extraktionen parst.\n\n**Mobile Verification Toolkit (MVT)** von Amnesty International bietet spezialisierte Command-Line-Tools für Android-Analyse mit Fokus auf Kompromittierungserkennung.\n\n**SIFT Workstation** stellt eine komplette Ubuntu-basierte forensische Umgebung mit 125+ vorinstallierten Tools bereit.\n\n## Erfolgsraten nach Gerätealter\n\n- **Pre-2017 Geräte**: 85-98% logische Extraktion, 30-70% physische Extraktion\n- **2017-2019 Geräte**: 80-95% logische Extraktion, 15-35% physische Extraktion \n- **2020+ Geräte**: 70-85% logische Extraktion, 5-15% physische Extraktion\n\n# Installation\n\n## SIFT Workstation Setup\n\n### Systemanforderungen\n- Quad-Core CPU 2.5GHz+\n- 16GB+ RAM\n- 500GB+ SSD Speicher\n- USB 3.0+ Anschlüsse\n\n### Installation\n1. Download von [SANS SIFT Workstation](https://www.sans.org/tools/sift-workstation/)\n2. VMware/VirtualBox Import der OVA-Datei\n3. VM-Konfiguration: 8GB+ RAM, 4+ CPU-Kerne\n\n```bash\n# Update nach Installation\nsudo apt update && sudo apt upgrade -y\nsudo sift update\n```\n\n## Autopsy Installation\n\n### Windows Installation\n1. Download von [autopsy.com](https://www.autopsy.com/)\n2. Java 8+ Installation erforderlich\n3. Installation mit Administratorrechten\n\n### Linux Installation\n```bash\n# Ubuntu/Debian\nsudo apt install autopsy sleuthkit\n# Oder manueller Download und Installation\nwget https://github.com/sleuthkit/autopsy/releases/latest\n```\n\n## Essential Tools Installation\n\n### Android Debug Bridge (ADB)\n```bash\n# Ubuntu/Debian\nsudo apt install android-tools-adb android-tools-fastboot\n\n# Windows - Download Android Platform Tools\n# https://developer.android.com/studio/releases/platform-tools\n```\n\n### ALEAPP Installation\n```bash\ngit clone https://github.com/abrignoni/ALEAPP.git\ncd ALEAPP\npip3 install -r requirements.txt\n```\n\n### Mobile Verification Toolkit (MVT)\n```bash\npip3 install mvt\n# Oder via GitHub für neueste Version\ngit clone https://github.com/mvt-project/mvt.git\ncd mvt && pip3 install .\n```\n\n### Andriller Installation\n```bash\ngit clone https://github.com/den4uk/andriller.git\ncd andriller\npip3 install -r requirements.txt\n```\n\n# Konfiguration\n\n## ADB Setup und Gerätevorbereitung\n\n### USB-Debugging aktivieren\n1. Entwickleroptionen freischalten (7x Build-Nummer antippen)\n2. USB-Debugging aktivieren\n3. Gerät via USB verbinden\n4. RSA-Fingerprint akzeptieren\n\n### ADB Verbindung testen\n```bash\nadb devices\n# Sollte Gerät mit \"device\" Status zeigen\nadb shell getprop ro.build.version.release # Android Version\nadb shell getprop ro.product.model # Gerätemodell\n```\n\n## Autopsy Projektkonfiguration\n\n### Case-Setup\n1. Neuen Fall erstellen\n2. Ermittler-Informationen eingeben\n3. Case-Verzeichnis festlegen (ausreichend Speicherplatz)\n\n### Android Analyzer Module aktivieren\n- Tools → Options → Modules\n- Android Analyzer aktivieren\n- ALEAPP Integration konfigurieren\n\n### Hash-Algorithmen konfigurieren\n- MD5, SHA-1, SHA-256 für Integritätsprüfung\n- Automatische Hash-Berechnung bei Import aktivieren\n\n## MVT Konfiguration\n\n### Konfigurationsdatei erstellen\n```yaml\n# ~/.mvt/config.yaml\nadb_path: \"/usr/bin/adb\"\noutput_folder: \"/home/user/mvt_output\"\n```\n\n# Verwendungsbeispiele\n\n## Fall 1: Logische Datenextraktion mit ADB\n\n### Geräteinformationen sammeln\n```bash\n# Systeminfo\nadb shell getprop > device_properties.txt\nadb shell cat /proc/version > kernel_info.txt\nadb shell mount > mount_info.txt\n\n# Installierte Apps\nadb shell pm list packages -f > installed_packages.txt\n```\n\n### Datenbank-Extraktion\n```bash\n# SMS/MMS Datenbank\nadb pull /data/data/com.android.providers.telephony/databases/mmssms.db\n\n# Kontakte\nadb pull /data/data/com.android.providers.contacts/databases/contacts2.db\n\n# Anrufliste \nadb pull /data/data/com.android.providers.contacts/databases/calllog.db\n```\n\n### WhatsApp Datenextraktion\n```bash\n# WhatsApp Datenbanken (Root erforderlich)\nadb shell su -c \"cp -r /data/data/com.whatsapp/ /sdcard/whatsapp_backup/\"\nadb pull /sdcard/whatsapp_backup/\n```\n\n## Fall 2: Android Backup-Analyse\n\n### Vollständiges Backup erstellen\n```bash\n# Umfassendes Backup (ohne Root)\nadb backup -all -system -apk -shared -f backup.ab\n\n# Backup entschlüsseln (falls verschlüsselt)\njava -jar abe.jar unpack backup.ab backup.tar\ntar -xf backup.tar\n```\n\n### Backup mit ALEAPP analysieren\n```bash\npython3 aleappGUI.py\n# Oder Command-Line\npython3 aleapp.py -t tar -i backup.tar -o output_folder\n```\n\n## Fall 3: MVT Kompromittierungsanalyse\n\n### Live-Geräteanalyse\n```bash\n# ADB-basierte Analyse\nmvt-android check-adb --output /path/to/output/\n\n# Backup-Analyse\nmvt-android check-backup --output /path/to/output/ backup.ab\n```\n\n### IOC-Suche mit Pegasus-Indikatoren\n```bash\n# Mit vorgefertigten IOCs\nmvt-android check-adb --iocs /path/to/pegasus.stix2 --output results/\n```\n\n## Fall 4: Physische Extraktion (Root erforderlich)\n\n### Device Rooting - MediaTek Geräte\n```bash\n# MTKClient für MediaTek-Chipsets\ngit clone https://github.com/bkerler/mtkclient.git\ncd mtkclient\npython3 mtk payload\n\n# Nach erfolgreichem Root\nadb shell su\n```\n\n### Vollständiges Memory Dump\n```bash\n# Partitionslayout ermitteln\nadb shell su -c \"cat /proc/partitions\"\nadb shell su -c \"ls -la /dev/block/\"\n\n# Vollständiges Device Image (Root erforderlich)\nadb shell su -c \"dd if=/dev/block/mmcblk0 of=/sdcard/full_device.img bs=4096\"\nadb pull /sdcard/full_device.img\n```\n\n# Best Practices\n\n## Rechtliche Compliance\n\n### Dokumentation und Chain of Custody\n- **Vollständige Dokumentation**: Wer, Was, Wann, Wo, Warum\n- **Hash-Verifikation**: MD5/SHA-256 für alle extrahierten Daten\n- **Nur forensische Kopien analysieren**, niemals Originaldaten\n- **Schriftliche Genehmigung** für Geräteanalyse einholen\n\n### Familiengeräte und Nachlässe\n- Genehmigung durch Nachlassverwalter erforderlich\n- Gerichtsbeschlüsse für Cloud-Zugang eventuell nötig\n- Drittpartei-Kommunikation kann weiterhin geschützt sein\n\n## Technische Best Practices\n\n### Hash-Integrität sicherstellen\n```bash\n# Hash vor und nach Transfer prüfen\nmd5sum original_file.db\nsha256sum original_file.db\n\n# Hash-Verifikation dokumentieren\necho \"$(date): MD5: $(md5sum file.db)\" >> chain_of_custody.log\n```\n\n### Sichere Arbeitsumgebung\n- Isolierte VM für Forensik-Arbeit\n- Netzwerk-Isolation während Analyse\n- Verschlüsselte Speicherung aller Evidenz\n- Regelmäßige Backups der Case-Datenbanken\n\n### Qualitätssicherung\n- Peer-Review kritischer Analysen\n- Standardisierte Arbeitsabläufe (SOPs)\n- Regelmäßige Tool-Validierung\n- Kontinuierliche Weiterbildung\n\n## Erfolgsmaximierung nach Gerätehersteller\n\n### MediaTek-Geräte (Höchste Erfolgsrate)\n- BootROM-Exploits für MT6735, MT6737, MT6750, MT6753, MT6797\n- MTKClient für Hardware-Level-Zugang\n- Erfolgsrate: 80%+ für Geräte 2015-2019\n\n### Samsung-Geräte\n- Ältere Knox-Implementierungen umgehbar\n- Emergency Dialer Exploits für Android 4.x\n- Erfolgsrate: 40-70% je nach Knox-Version\n\n### Pixel/Nexus-Geräte\n- Bootloader-Unlocking oft möglich\n- Fastboot-basierte Recovery-Installation\n- Erfolgsrate: 60-80% bei freigeschaltetem Bootloader\n\n# Troubleshooting\n\n## Problem: ADB erkennt Gerät nicht\n\n### Lösung: USB-Treiber und Berechtigungen\n```bash\n# Linux: USB-Berechtigungen prüfen\nlsusb | grep -i android\nsudo chmod 666 /dev/bus/usb/XXX/XXX\n\n# udev-Regeln erstellen\necho 'SUBSYSTEM==\"usb\", ATTR{idVendor}==\"18d1\", MODE=\"0666\", GROUP=\"plugdev\"' | sudo tee /etc/udev/rules.d/51-android.rules\nsudo udevadm control --reload-rules\n```\n\n### Windows: Treiber-Installation\n1. Geräte-Manager öffnen\n2. Android-Gerät mit Warnsymbol finden\n3. Treiber manuell installieren (Android USB Driver)\n\n## Problem: Verschlüsselte Android Backups\n\n### Lösung: Android Backup Extractor\n```bash\n# ADB Backup Extractor installieren\ngit clone https://github.com/nelenkov/android-backup-extractor.git\ncd android-backup-extractor\ngradle build\n\n# Backup entschlüsseln\njava -jar abe.jar unpack backup.ab backup.tar [password]\n```\n\n## Problem: Unzureichende Berechtigungen für Datenextraktion\n\n### Lösung: Alternative Extraktionsmethoden\n```bash\n# AFLogical OSE für begrenzte Extraktion ohne Root\n# WhatsApp Key/DB Extractor für spezifische Apps\n# Backup-basierte Extraktion als Fallback\n\n# Custom Recovery für erweiterten Zugang\nfastboot flash recovery twrp-device.img\n```\n\n## Problem: ALEAPP Parsing-Fehler\n\n### Lösung: Datenformat-Probleme beheben\n```bash\n# Log-Dateien prüfen\npython3 aleapp.py -t dir -i /path/to/data -o output --debug\n\n# Spezifische Parser deaktivieren\n# Manuelle SQLite-Analyse bei Parser-Fehlern\nsqlite3 database.db \".tables\"\nsqlite3 database.db \".schema table_name\"\n```\n\n# Erweiterte Techniken\n\n## Memory Forensics mit LiME\n\n### LiME für ARM-Devices kompilieren\n```bash\n# Cross-Compilation Setup\nexport ARCH=arm\nexport CROSS_COMPILE=arm-linux-gnueabi-\nexport KERNEL_DIR=/path/to/kernel/source\n\n# LiME Module kompilieren\ngit clone https://github.com/504ensicsLabs/LiME.git\ncd LiME/src\nmake\n\n# Memory Dump erstellen (Root erforderlich)\nadb push lime.ko /data/local/tmp/\nadb shell su -c \"insmod /data/local/tmp/lime.ko 'path=/sdcard/memory.lime format=lime'\"\n```\n\n### Volatility-Analyse von Android Memory\n```bash\n# Memory Dump analysieren\npython vol.py -f memory.lime --profile=Linux \u003Cprofile> linux.pslist\npython vol.py -f memory.lime --profile=Linux \u003Cprofile> linux.bash\npython vol.py -f memory.lime --profile=Linux \u003Cprofile> linux.netstat\n```\n\n## FRIDA-basierte Runtime-Analyse\n\n### FRIDA für Kryptographie-Hooks\n```javascript\n// crypto_hooks.js - SSL/TLS Traffic abfangen\nJava.perform(function() {\n var SSLContext = Java.use(\"javax.net.ssl.SSLContext\");\n SSLContext.init.overload('[Ljavax.net.ssl.KeyManager;', '[Ljavax.net.ssl.TrustManager;', 'java.security.SecureRandom').implementation = function(keyManagers, trustManagers, secureRandom) {\n console.log(\"[+] SSLContext.init() called\");\n this.init(keyManagers, trustManagers, secureRandom);\n };\n});\n```\n\n### FRIDA Installation und Verwendung\n```bash\n# FRIDA Server auf Android-Gerät installieren\nadb push frida-server /data/local/tmp/\nadb shell su -c \"chmod 755 /data/local/tmp/frida-server\"\nadb shell su -c \"/data/local/tmp/frida-server &\"\n\n# Script ausführen\nfrida -U -l crypto_hooks.js com.target.package\n```\n\n## Custom Recovery und Fastboot-Exploits\n\n### TWRP Installation für forensischen Zugang\n```bash\n# Bootloader entsperren (Herstellerabhängig)\nfastboot oem unlock\n# Oder\nfastboot flashing unlock\n\n# TWRP flashen\nfastboot flash recovery twrp-device.img\nfastboot boot twrp-device.img # Temporäre Installation\n\n# In TWRP: ADB-Zugang mit Root-Berechtigungen\nadb shell mount /system\nadb shell mount /data\n```\n\n### Partitions-Imaging mit dd\n```bash\n# Vollständige Partition-Liste\nadb shell cat /proc/partitions\n\n# Kritische Partitionen extrahieren\nadb shell dd if=/dev/block/bootdevice/by-name/system of=/external_sd/system.img\nadb shell dd if=/dev/block/bootdevice/by-name/userdata of=/external_sd/userdata.img\nadb shell dd if=/dev/block/bootdevice/by-name/boot of=/external_sd/boot.img\n```\n\n## SQLite Forensics und gelöschte Daten\n\n### Erweiterte SQLite-Analyse\n```bash\n# Freelist-Analyse für gelöschte Einträge\nsqlite3 database.db \"PRAGMA freelist_count;\"\nsqlite3 database.db \"PRAGMA page_size;\"\n\n# WAL-Datei Analyse\nsqlite3 database.db \"PRAGMA wal_checkpoint;\"\nstrings database.db-wal | grep -i \"search_term\"\n\n# Undark für Deleted Record Recovery\nundark database.db --freelist --export-csv\n```\n\n### Timeline-Rekonstruktion\n```bash\n# Autopsy Timeline-Generierung\n# Tools → Generate Timeline\n# Analyse von MAC-Times (Modified, Accessed, Created)\n\n# Plaso Timeline-Tools\nlog2timeline.py timeline.plaso /path/to/android/data/\npsort.py -o dynamic timeline.plaso\n```\n\n## Weiterführende Ressourcen\n\n### Dokumentation und Standards\n- [NIST SP 800-101 Rev. 1 - Mobile Device Forensics Guidelines](https://csrc.nist.gov/pubs/sp/800/101/r1/final)\n- [SANS FOR585 - Smartphone Forensics](https://www.sans.org/cyber-security-courses/advanced-smartphone-mobile-device-forensics/)\n- [ALEAPP GitHub Repository](https://github.com/abrignoni/ALEAPP)\n- [MVT Documentation](https://docs.mvt.re/en/latest/)\n\n### Community und Weiterbildung\n- [Autopsy User Documentation](https://sleuthkit.org/autopsy/docs/)\n- [Android Forensics References](https://github.com/impillar/AndroidReferences/blob/master/AndroidTools.md)\n- [Digital Forensics Framework Collection](https://github.com/mesquidar/ForensicsTools)\n\n### Spezialisierte Tools\n- [MTKClient für MediaTek Exploits](https://github.com/bkerler/mtkclient)\n- [Android Forensics Framework](https://github.com/nowsecure/android-forensics)\n- [Santoku Linux Mobile Forensics Distribution](https://santoku-linux.com/)\n\n---\n\n**Wichtiger Hinweis**: Diese Anleitung dient ausschließlich für autorisierte forensische Untersuchungen. Stellen Sie sicher, dass Sie über entsprechende rechtliche Befugnisse verfügen, bevor Sie diese Techniken anwenden. Bei Zweifeln konsultieren Sie Rechtsberatung.","src/content/knowledgebase/android-logical-imaging.md","0bb3f1d2c872d2bf",{"html":363,"metadata":364},"\u003Ch1 id=\"übersicht\">Übersicht\u003C/h1>\n\u003Cp>Open-Source Android Forensik bietet robuste Alternativen zu kommerziellen Lösungen wie Cellebrite UFED und Magnet AXIOM. Besonders für ältere Android-Geräte (5+ Jahre) existieren bewährte Methoden zur Datenextraktion und -analyse.\u003C/p>\n\u003Ch2 id=\"kernkomponenten-des-open-source-forensik-stacks\">Kernkomponenten des Open-Source Forensik-Stacks\u003C/h2>\n\u003Cp>\u003Cstrong>Autopsy Digital Forensics Platform\u003C/strong> bildet das Fundament mit GUI-basierter Analyse und integrierten Android-Parsing-Fähigkeiten. Die Plattform unterstützt \u003Cstrong>ALEAPP (Android Logs Events And Protobuf Parser)\u003C/strong>, das über 100 Artefakt-Kategorien aus Android-Extraktionen parst.\u003C/p>\n\u003Cp>\u003Cstrong>Mobile Verification Toolkit (MVT)\u003C/strong> von Amnesty International bietet spezialisierte Command-Line-Tools für Android-Analyse mit Fokus auf Kompromittierungserkennung.\u003C/p>\n\u003Cp>\u003Cstrong>SIFT Workstation\u003C/strong> stellt eine komplette Ubuntu-basierte forensische Umgebung mit 125+ vorinstallierten Tools bereit.\u003C/p>\n\u003Ch2 id=\"erfolgsraten-nach-gerätealter\">Erfolgsraten nach Gerätealter\u003C/h2>\n\u003Cul>\n\u003Cli>\u003Cstrong>Pre-2017 Geräte\u003C/strong>: 85-98% logische Extraktion, 30-70% physische Extraktion\u003C/li>\n\u003Cli>\u003Cstrong>2017-2019 Geräte\u003C/strong>: 80-95% logische Extraktion, 15-35% physische Extraktion\u003C/li>\n\u003Cli>\u003Cstrong>2020+ Geräte\u003C/strong>: 70-85% logische Extraktion, 5-15% physische Extraktion\u003C/li>\n\u003C/ul>\n\u003Ch1 id=\"installation\">Installation\u003C/h1>\n\u003Ch2 id=\"sift-workstation-setup\">SIFT Workstation Setup\u003C/h2>\n\u003Ch3 id=\"systemanforderungen\">Systemanforderungen\u003C/h3>\n\u003Cul>\n\u003Cli>Quad-Core CPU 2.5GHz+\u003C/li>\n\u003Cli>16GB+ RAM\u003C/li>\n\u003Cli>500GB+ SSD Speicher\u003C/li>\n\u003Cli>USB 3.0+ Anschlüsse\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"installation-1\">Installation\u003C/h3>\n\u003Col>\n\u003Cli>Download von \u003Ca href=\"https://www.sans.org/tools/sift-workstation/\">SANS SIFT Workstation\u003C/a>\u003C/li>\n\u003Cli>VMware/VirtualBox Import der OVA-Datei\u003C/li>\n\u003Cli>VM-Konfiguration: 8GB+ RAM, 4+ CPU-Kerne\u003C/li>\n\u003C/ol>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Update nach Installation\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apt\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> update\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> && \u003C/span>\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apt\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> upgrade\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -y\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> sift\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> update\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"autopsy-installation\">Autopsy Installation\u003C/h2>\n\u003Ch3 id=\"windows-installation\">Windows Installation\u003C/h3>\n\u003Col>\n\u003Cli>Download von \u003Ca href=\"https://www.autopsy.com/\">autopsy.com\u003C/a>\u003C/li>\n\u003Cli>Java 8+ Installation erforderlich\u003C/li>\n\u003Cli>Installation mit Administratorrechten\u003C/li>\n\u003C/ol>\n\u003Ch3 id=\"linux-installation\">Linux Installation\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Ubuntu/Debian\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apt\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> install\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> autopsy\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> sleuthkit\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Oder manueller Download und Installation\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">wget\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> https://github.com/sleuthkit/autopsy/releases/latest\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"essential-tools-installation\">Essential Tools Installation\u003C/h2>\n\u003Ch3 id=\"android-debug-bridge-adb\">Android Debug Bridge (ADB)\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Ubuntu/Debian\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apt\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> install\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> android-tools-adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> android-tools-fastboot\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Windows - Download Android Platform Tools\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># https://developer.android.com/studio/releases/platform-tools\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"aleapp-installation\">ALEAPP Installation\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">git\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> clone\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> https://github.com/abrignoni/ALEAPP.git\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">cd\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> ALEAPP\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">pip3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> install\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -r\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> requirements.txt\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"mobile-verification-toolkit-mvt\">Mobile Verification Toolkit (MVT)\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">pip3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> install\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> mvt\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Oder via GitHub für neueste Version\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">git\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> clone\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> https://github.com/mvt-project/mvt.git\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">cd\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> mvt\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> && \u003C/span>\u003Cspan style=\"color:#B392F0\">pip3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> install\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> .\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"andriller-installation\">Andriller Installation\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">git\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> clone\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> https://github.com/den4uk/andriller.git\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">cd\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> andriller\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">pip3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> install\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -r\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> requirements.txt\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch1 id=\"konfiguration\">Konfiguration\u003C/h1>\n\u003Ch2 id=\"adb-setup-und-gerätevorbereitung\">ADB Setup und Gerätevorbereitung\u003C/h2>\n\u003Ch3 id=\"usb-debugging-aktivieren\">USB-Debugging aktivieren\u003C/h3>\n\u003Col>\n\u003Cli>Entwickleroptionen freischalten (7x Build-Nummer antippen)\u003C/li>\n\u003Cli>USB-Debugging aktivieren\u003C/li>\n\u003Cli>Gerät via USB verbinden\u003C/li>\n\u003Cli>RSA-Fingerprint akzeptieren\u003C/li>\n\u003C/ol>\n\u003Ch3 id=\"adb-verbindung-testen\">ADB Verbindung testen\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> devices\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Sollte Gerät mit \"device\" Status zeigen\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> getprop\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> ro.build.version.release\u003C/span>\u003Cspan style=\"color:#6A737D\"> # Android Version\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> getprop\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> ro.product.model\u003C/span>\u003Cspan style=\"color:#6A737D\"> # Gerätemodell\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"autopsy-projektkonfiguration\">Autopsy Projektkonfiguration\u003C/h2>\n\u003Ch3 id=\"case-setup\">Case-Setup\u003C/h3>\n\u003Col>\n\u003Cli>Neuen Fall erstellen\u003C/li>\n\u003Cli>Ermittler-Informationen eingeben\u003C/li>\n\u003Cli>Case-Verzeichnis festlegen (ausreichend Speicherplatz)\u003C/li>\n\u003C/ol>\n\u003Ch3 id=\"android-analyzer-module-aktivieren\">Android Analyzer Module aktivieren\u003C/h3>\n\u003Cul>\n\u003Cli>Tools → Options → Modules\u003C/li>\n\u003Cli>Android Analyzer aktivieren\u003C/li>\n\u003Cli>ALEAPP Integration konfigurieren\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"hash-algorithmen-konfigurieren\">Hash-Algorithmen konfigurieren\u003C/h3>\n\u003Cul>\n\u003Cli>MD5, SHA-1, SHA-256 für Integritätsprüfung\u003C/li>\n\u003Cli>Automatische Hash-Berechnung bei Import aktivieren\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"mvt-konfiguration\">MVT Konfiguration\u003C/h2>\n\u003Ch3 id=\"konfigurationsdatei-erstellen\">Konfigurationsdatei erstellen\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"yaml\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># ~/.mvt/config.yaml\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#85E89D\">adb_path\u003C/span>\u003Cspan style=\"color:#E1E4E8\">: \u003C/span>\u003Cspan style=\"color:#9ECBFF\">\"/usr/bin/adb\"\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#85E89D\">output_folder\u003C/span>\u003Cspan style=\"color:#E1E4E8\">: \u003C/span>\u003Cspan style=\"color:#9ECBFF\">\"/home/user/mvt_output\"\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch1 id=\"verwendungsbeispiele\">Verwendungsbeispiele\u003C/h1>\n\u003Ch2 id=\"fall-1-logische-datenextraktion-mit-adb\">Fall 1: Logische Datenextraktion mit ADB\u003C/h2>\n\u003Ch3 id=\"geräteinformationen-sammeln\">Geräteinformationen sammeln\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Systeminfo\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> getprop\u003C/span>\u003Cspan style=\"color:#F97583\"> >\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> device_properties.txt\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> cat\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /proc/version\u003C/span>\u003Cspan style=\"color:#F97583\"> >\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> kernel_info.txt\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> mount\u003C/span>\u003Cspan style=\"color:#F97583\"> >\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> mount_info.txt\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Installierte Apps\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> pm\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> list\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> packages\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -f\u003C/span>\u003Cspan style=\"color:#F97583\"> >\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> installed_packages.txt\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"datenbank-extraktion\">Datenbank-Extraktion\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># SMS/MMS Datenbank\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> pull\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /data/data/com.android.providers.telephony/databases/mmssms.db\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Kontakte\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> pull\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /data/data/com.android.providers.contacts/databases/contacts2.db\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Anrufliste \u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> pull\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /data/data/com.android.providers.contacts/databases/calllog.db\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"whatsapp-datenextraktion\">WhatsApp Datenextraktion\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># WhatsApp Datenbanken (Root erforderlich)\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> su\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -c\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \"cp -r /data/data/com.whatsapp/ /sdcard/whatsapp_backup/\"\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> pull\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /sdcard/whatsapp_backup/\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"fall-2-android-backup-analyse\">Fall 2: Android Backup-Analyse\u003C/h2>\n\u003Ch3 id=\"vollständiges-backup-erstellen\">Vollständiges Backup erstellen\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Umfassendes Backup (ohne Root)\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> backup\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -all\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -system\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -apk\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -shared\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -f\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> backup.ab\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Backup entschlüsseln (falls verschlüsselt)\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">java\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -jar\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> abe.jar\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> unpack\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> backup.ab\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> backup.tar\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">tar\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -xf\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> backup.tar\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"backup-mit-aleapp-analysieren\">Backup mit ALEAPP analysieren\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">python3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> aleappGUI.py\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Oder Command-Line\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">python3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> aleapp.py\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -t\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> tar\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -i\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> backup.tar\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -o\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> output_folder\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"fall-3-mvt-kompromittierungsanalyse\">Fall 3: MVT Kompromittierungsanalyse\u003C/h2>\n\u003Ch3 id=\"live-geräteanalyse\">Live-Geräteanalyse\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># ADB-basierte Analyse\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">mvt-android\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> check-adb\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --output\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /path/to/output/\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Backup-Analyse\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">mvt-android\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> check-backup\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --output\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /path/to/output/\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> backup.ab\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"ioc-suche-mit-pegasus-indikatoren\">IOC-Suche mit Pegasus-Indikatoren\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Mit vorgefertigten IOCs\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">mvt-android\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> check-adb\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --iocs\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /path/to/pegasus.stix2\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --output\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> results/\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"fall-4-physische-extraktion-root-erforderlich\">Fall 4: Physische Extraktion (Root erforderlich)\u003C/h2>\n\u003Ch3 id=\"device-rooting---mediatek-geräte\">Device Rooting - MediaTek Geräte\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># MTKClient für MediaTek-Chipsets\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">git\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> clone\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> https://github.com/bkerler/mtkclient.git\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">cd\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> mtkclient\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">python3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> mtk\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> payload\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Nach erfolgreichem Root\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> su\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"vollständiges-memory-dump\">Vollständiges Memory Dump\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Partitionslayout ermitteln\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> su\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -c\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \"cat /proc/partitions\"\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> su\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -c\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \"ls -la /dev/block/\"\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Vollständiges Device Image (Root erforderlich)\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> su\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -c\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \"dd if=/dev/block/mmcblk0 of=/sdcard/full_device.img bs=4096\"\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> pull\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /sdcard/full_device.img\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch1 id=\"best-practices\">Best Practices\u003C/h1>\n\u003Ch2 id=\"rechtliche-compliance\">Rechtliche Compliance\u003C/h2>\n\u003Ch3 id=\"dokumentation-und-chain-of-custody\">Dokumentation und Chain of Custody\u003C/h3>\n\u003Cul>\n\u003Cli>\u003Cstrong>Vollständige Dokumentation\u003C/strong>: Wer, Was, Wann, Wo, Warum\u003C/li>\n\u003Cli>\u003Cstrong>Hash-Verifikation\u003C/strong>: MD5/SHA-256 für alle extrahierten Daten\u003C/li>\n\u003Cli>\u003Cstrong>Nur forensische Kopien analysieren\u003C/strong>, niemals Originaldaten\u003C/li>\n\u003Cli>\u003Cstrong>Schriftliche Genehmigung\u003C/strong> für Geräteanalyse einholen\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"familiengeräte-und-nachlässe\">Familiengeräte und Nachlässe\u003C/h3>\n\u003Cul>\n\u003Cli>Genehmigung durch Nachlassverwalter erforderlich\u003C/li>\n\u003Cli>Gerichtsbeschlüsse für Cloud-Zugang eventuell nötig\u003C/li>\n\u003Cli>Drittpartei-Kommunikation kann weiterhin geschützt sein\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"technische-best-practices\">Technische Best Practices\u003C/h2>\n\u003Ch3 id=\"hash-integrität-sicherstellen\">Hash-Integrität sicherstellen\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Hash vor und nach Transfer prüfen\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">md5sum\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> original_file.db\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sha256sum\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> original_file.db\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Hash-Verifikation dokumentieren\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">echo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \"$(\u003C/span>\u003Cspan style=\"color:#B392F0\">date\u003C/span>\u003Cspan style=\"color:#9ECBFF\">): MD5: $(\u003C/span>\u003Cspan style=\"color:#B392F0\">md5sum\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> file.db)\"\u003C/span>\u003Cspan style=\"color:#F97583\"> >>\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> chain_of_custody.log\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"sichere-arbeitsumgebung\">Sichere Arbeitsumgebung\u003C/h3>\n\u003Cul>\n\u003Cli>Isolierte VM für Forensik-Arbeit\u003C/li>\n\u003Cli>Netzwerk-Isolation während Analyse\u003C/li>\n\u003Cli>Verschlüsselte Speicherung aller Evidenz\u003C/li>\n\u003Cli>Regelmäßige Backups der Case-Datenbanken\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"qualitätssicherung\">Qualitätssicherung\u003C/h3>\n\u003Cul>\n\u003Cli>Peer-Review kritischer Analysen\u003C/li>\n\u003Cli>Standardisierte Arbeitsabläufe (SOPs)\u003C/li>\n\u003Cli>Regelmäßige Tool-Validierung\u003C/li>\n\u003Cli>Kontinuierliche Weiterbildung\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"erfolgsmaximierung-nach-gerätehersteller\">Erfolgsmaximierung nach Gerätehersteller\u003C/h2>\n\u003Ch3 id=\"mediatek-geräte-höchste-erfolgsrate\">MediaTek-Geräte (Höchste Erfolgsrate)\u003C/h3>\n\u003Cul>\n\u003Cli>BootROM-Exploits für MT6735, MT6737, MT6750, MT6753, MT6797\u003C/li>\n\u003Cli>MTKClient für Hardware-Level-Zugang\u003C/li>\n\u003Cli>Erfolgsrate: 80%+ für Geräte 2015-2019\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"samsung-geräte\">Samsung-Geräte\u003C/h3>\n\u003Cul>\n\u003Cli>Ältere Knox-Implementierungen umgehbar\u003C/li>\n\u003Cli>Emergency Dialer Exploits für Android 4.x\u003C/li>\n\u003Cli>Erfolgsrate: 40-70% je nach Knox-Version\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"pixelnexus-geräte\">Pixel/Nexus-Geräte\u003C/h3>\n\u003Cul>\n\u003Cli>Bootloader-Unlocking oft möglich\u003C/li>\n\u003Cli>Fastboot-basierte Recovery-Installation\u003C/li>\n\u003Cli>Erfolgsrate: 60-80% bei freigeschaltetem Bootloader\u003C/li>\n\u003C/ul>\n\u003Ch1 id=\"troubleshooting\">Troubleshooting\u003C/h1>\n\u003Ch2 id=\"problem-adb-erkennt-gerät-nicht\">Problem: ADB erkennt Gerät nicht\u003C/h2>\n\u003Ch3 id=\"lösung-usb-treiber-und-berechtigungen\">Lösung: USB-Treiber und Berechtigungen\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Linux: USB-Berechtigungen prüfen\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">lsusb\u003C/span>\u003Cspan style=\"color:#F97583\"> |\u003C/span>\u003Cspan style=\"color:#B392F0\"> grep\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -i\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> android\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> chmod\u003C/span>\u003Cspan style=\"color:#79B8FF\"> 666\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /dev/bus/usb/XXX/XXX\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># udev-Regeln erstellen\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">echo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> 'SUBSYSTEM==\"usb\", ATTR{idVendor}==\"18d1\", MODE=\"0666\", GROUP=\"plugdev\"'\u003C/span>\u003Cspan style=\"color:#F97583\"> |\u003C/span>\u003Cspan style=\"color:#B392F0\"> sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> tee\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /etc/udev/rules.d/51-android.rules\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> udevadm\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> control\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --reload-rules\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"windows-treiber-installation\">Windows: Treiber-Installation\u003C/h3>\n\u003Col>\n\u003Cli>Geräte-Manager öffnen\u003C/li>\n\u003Cli>Android-Gerät mit Warnsymbol finden\u003C/li>\n\u003Cli>Treiber manuell installieren (Android USB Driver)\u003C/li>\n\u003C/ol>\n\u003Ch2 id=\"problem-verschlüsselte-android-backups\">Problem: Verschlüsselte Android Backups\u003C/h2>\n\u003Ch3 id=\"lösung-android-backup-extractor\">Lösung: Android Backup Extractor\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># ADB Backup Extractor installieren\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">git\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> clone\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> https://github.com/nelenkov/android-backup-extractor.git\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">cd\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> android-backup-extractor\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">gradle\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> build\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Backup entschlüsseln\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">java\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -jar\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> abe.jar\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> unpack\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> backup.ab\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> backup.tar\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> [password]\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"problem-unzureichende-berechtigungen-für-datenextraktion\">Problem: Unzureichende Berechtigungen für Datenextraktion\u003C/h2>\n\u003Ch3 id=\"lösung-alternative-extraktionsmethoden\">Lösung: Alternative Extraktionsmethoden\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># AFLogical OSE für begrenzte Extraktion ohne Root\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># WhatsApp Key/DB Extractor für spezifische Apps\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Backup-basierte Extraktion als Fallback\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Custom Recovery für erweiterten Zugang\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">fastboot\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> flash\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> recovery\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> twrp-device.img\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"problem-aleapp-parsing-fehler\">Problem: ALEAPP Parsing-Fehler\u003C/h2>\n\u003Ch3 id=\"lösung-datenformat-probleme-beheben\">Lösung: Datenformat-Probleme beheben\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Log-Dateien prüfen\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">python3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> aleapp.py\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -t\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> dir\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -i\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /path/to/data\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -o\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> output\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --debug\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Spezifische Parser deaktivieren\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Manuelle SQLite-Analyse bei Parser-Fehlern\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sqlite3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> database.db\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \".tables\"\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sqlite3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> database.db\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \".schema table_name\"\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch1 id=\"erweiterte-techniken\">Erweiterte Techniken\u003C/h1>\n\u003Ch2 id=\"memory-forensics-mit-lime\">Memory Forensics mit LiME\u003C/h2>\n\u003Ch3 id=\"lime-für-arm-devices-kompilieren\">LiME für ARM-Devices kompilieren\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Cross-Compilation Setup\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">export\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> ARCH\u003C/span>\u003Cspan style=\"color:#F97583\">=\u003C/span>\u003Cspan style=\"color:#E1E4E8\">arm\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">export\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> CROSS_COMPILE\u003C/span>\u003Cspan style=\"color:#F97583\">=\u003C/span>\u003Cspan style=\"color:#E1E4E8\">arm-linux-gnueabi-\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">export\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> KERNEL_DIR\u003C/span>\u003Cspan style=\"color:#F97583\">=\u003C/span>\u003Cspan style=\"color:#E1E4E8\">/path/to/kernel/source\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># LiME Module kompilieren\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">git\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> clone\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> https://github.com/504ensicsLabs/LiME.git\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">cd\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> LiME/src\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">make\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Memory Dump erstellen (Root erforderlich)\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> push\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> lime.ko\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /data/local/tmp/\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> su\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -c\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \"insmod /data/local/tmp/lime.ko 'path=/sdcard/memory.lime format=lime'\"\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"volatility-analyse-von-android-memory\">Volatility-Analyse von Android Memory\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Memory Dump analysieren\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">python\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> vol.py\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -f\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> memory.lime\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --profile=Linux\u003C/span>\u003Cspan style=\"color:#F97583\"> <\u003C/span>\u003Cspan style=\"color:#9ECBFF\">profil\u003C/span>\u003Cspan style=\"color:#E1E4E8\">e\u003C/span>\u003Cspan style=\"color:#F97583\">>\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> linux.pslist\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">python\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> vol.py\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -f\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> memory.lime\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --profile=Linux\u003C/span>\u003Cspan style=\"color:#F97583\"> <\u003C/span>\u003Cspan style=\"color:#9ECBFF\">profil\u003C/span>\u003Cspan style=\"color:#E1E4E8\">e\u003C/span>\u003Cspan style=\"color:#F97583\">>\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> linux.bash\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">python\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> vol.py\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -f\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> memory.lime\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --profile=Linux\u003C/span>\u003Cspan style=\"color:#F97583\"> <\u003C/span>\u003Cspan style=\"color:#9ECBFF\">profil\u003C/span>\u003Cspan style=\"color:#E1E4E8\">e\u003C/span>\u003Cspan style=\"color:#F97583\">>\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> linux.netstat\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"frida-basierte-runtime-analyse\">FRIDA-basierte Runtime-Analyse\u003C/h2>\n\u003Ch3 id=\"frida-für-kryptographie-hooks\">FRIDA für Kryptographie-Hooks\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"javascript\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\">// crypto_hooks.js - SSL/TLS Traffic abfangen\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">Java.\u003C/span>\u003Cspan style=\"color:#B392F0\">perform\u003C/span>\u003Cspan style=\"color:#E1E4E8\">(\u003C/span>\u003Cspan style=\"color:#F97583\">function\u003C/span>\u003Cspan style=\"color:#E1E4E8\">() {\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\"> var\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> SSLContext \u003C/span>\u003Cspan style=\"color:#F97583\">=\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> Java.\u003C/span>\u003Cspan style=\"color:#B392F0\">use\u003C/span>\u003Cspan style=\"color:#E1E4E8\">(\u003C/span>\u003Cspan style=\"color:#9ECBFF\">\"javax.net.ssl.SSLContext\"\u003C/span>\u003Cspan style=\"color:#E1E4E8\">);\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\"> SSLContext.init.\u003C/span>\u003Cspan style=\"color:#B392F0\">overload\u003C/span>\u003Cspan style=\"color:#E1E4E8\">(\u003C/span>\u003Cspan style=\"color:#9ECBFF\">'[Ljavax.net.ssl.KeyManager;'\u003C/span>\u003Cspan style=\"color:#E1E4E8\">, \u003C/span>\u003Cspan style=\"color:#9ECBFF\">'[Ljavax.net.ssl.TrustManager;'\u003C/span>\u003Cspan style=\"color:#E1E4E8\">, \u003C/span>\u003Cspan style=\"color:#9ECBFF\">'java.security.SecureRandom'\u003C/span>\u003Cspan style=\"color:#E1E4E8\">).\u003C/span>\u003Cspan style=\"color:#B392F0\">implementation\u003C/span>\u003Cspan style=\"color:#F97583\"> =\u003C/span>\u003Cspan style=\"color:#F97583\"> function\u003C/span>\u003Cspan style=\"color:#E1E4E8\">(\u003C/span>\u003Cspan style=\"color:#FFAB70\">keyManagers\u003C/span>\u003Cspan style=\"color:#E1E4E8\">, \u003C/span>\u003Cspan style=\"color:#FFAB70\">trustManagers\u003C/span>\u003Cspan style=\"color:#E1E4E8\">, \u003C/span>\u003Cspan style=\"color:#FFAB70\">secureRandom\u003C/span>\u003Cspan style=\"color:#E1E4E8\">) {\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\"> console.\u003C/span>\u003Cspan style=\"color:#B392F0\">log\u003C/span>\u003Cspan style=\"color:#E1E4E8\">(\u003C/span>\u003Cspan style=\"color:#9ECBFF\">\"[+] SSLContext.init() called\"\u003C/span>\u003Cspan style=\"color:#E1E4E8\">);\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\"> this\u003C/span>\u003Cspan style=\"color:#E1E4E8\">.\u003C/span>\u003Cspan style=\"color:#B392F0\">init\u003C/span>\u003Cspan style=\"color:#E1E4E8\">(keyManagers, trustManagers, secureRandom);\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\"> };\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">});\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"frida-installation-und-verwendung\">FRIDA Installation und Verwendung\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># FRIDA Server auf Android-Gerät installieren\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> push\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> frida-server\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /data/local/tmp/\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> su\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -c\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \"chmod 755 /data/local/tmp/frida-server\"\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> su\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -c\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \"/data/local/tmp/frida-server &\"\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Script ausführen\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">frida\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -U\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -l\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> crypto_hooks.js\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> com.target.package\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"custom-recovery-und-fastboot-exploits\">Custom Recovery und Fastboot-Exploits\u003C/h2>\n\u003Ch3 id=\"twrp-installation-für-forensischen-zugang\">TWRP Installation für forensischen Zugang\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Bootloader entsperren (Herstellerabhängig)\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">fastboot\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> oem\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> unlock\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Oder\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">fastboot\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> flashing\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> unlock\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># TWRP flashen\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">fastboot\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> flash\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> recovery\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> twrp-device.img\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">fastboot\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> boot\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> twrp-device.img\u003C/span>\u003Cspan style=\"color:#6A737D\"> # Temporäre Installation\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># In TWRP: ADB-Zugang mit Root-Berechtigungen\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> mount\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /system\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> mount\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /data\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"partitions-imaging-mit-dd\">Partitions-Imaging mit dd\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Vollständige Partition-Liste\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> cat\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /proc/partitions\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Kritische Partitionen extrahieren\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> dd\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> if=/dev/block/bootdevice/by-name/system\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> of=/external_sd/system.img\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> dd\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> if=/dev/block/bootdevice/by-name/userdata\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> of=/external_sd/userdata.img\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> dd\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> if=/dev/block/bootdevice/by-name/boot\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> of=/external_sd/boot.img\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"sqlite-forensics-und-gelöschte-daten\">SQLite Forensics und gelöschte Daten\u003C/h2>\n\u003Ch3 id=\"erweiterte-sqlite-analyse\">Erweiterte SQLite-Analyse\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Freelist-Analyse für gelöschte Einträge\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sqlite3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> database.db\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \"PRAGMA freelist_count;\"\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sqlite3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> database.db\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \"PRAGMA page_size;\"\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># WAL-Datei Analyse\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sqlite3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> database.db\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \"PRAGMA wal_checkpoint;\"\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">strings\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> database.db-wal\u003C/span>\u003Cspan style=\"color:#F97583\"> |\u003C/span>\u003Cspan style=\"color:#B392F0\"> grep\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -i\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \"search_term\"\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Undark für Deleted Record Recovery\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">undark\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> database.db\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --freelist\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --export-csv\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"timeline-rekonstruktion\">Timeline-Rekonstruktion\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Autopsy Timeline-Generierung\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Tools → Generate Timeline\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Analyse von MAC-Times (Modified, Accessed, Created)\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Plaso Timeline-Tools\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">log2timeline.py\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> timeline.plaso\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /path/to/android/data/\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">psort.py\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -o\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> dynamic\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> timeline.plaso\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"weiterführende-ressourcen\">Weiterführende Ressourcen\u003C/h2>\n\u003Ch3 id=\"dokumentation-und-standards\">Dokumentation und Standards\u003C/h3>\n\u003Cul>\n\u003Cli>\u003Ca href=\"https://csrc.nist.gov/pubs/sp/800/101/r1/final\">NIST SP 800-101 Rev. 1 - Mobile Device Forensics Guidelines\u003C/a>\u003C/li>\n\u003Cli>\u003Ca href=\"https://www.sans.org/cyber-security-courses/advanced-smartphone-mobile-device-forensics/\">SANS FOR585 - Smartphone Forensics\u003C/a>\u003C/li>\n\u003Cli>\u003Ca href=\"https://github.com/abrignoni/ALEAPP\">ALEAPP GitHub Repository\u003C/a>\u003C/li>\n\u003Cli>\u003Ca href=\"https://docs.mvt.re/en/latest/\">MVT Documentation\u003C/a>\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"community-und-weiterbildung\">Community und Weiterbildung\u003C/h3>\n\u003Cul>\n\u003Cli>\u003Ca href=\"https://sleuthkit.org/autopsy/docs/\">Autopsy User Documentation\u003C/a>\u003C/li>\n\u003Cli>\u003Ca href=\"https://github.com/impillar/AndroidReferences/blob/master/AndroidTools.md\">Android Forensics References\u003C/a>\u003C/li>\n\u003Cli>\u003Ca href=\"https://github.com/mesquidar/ForensicsTools\">Digital Forensics Framework Collection\u003C/a>\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"spezialisierte-tools\">Spezialisierte Tools\u003C/h3>\n\u003Cul>\n\u003Cli>\u003Ca href=\"https://github.com/bkerler/mtkclient\">MTKClient für MediaTek Exploits\u003C/a>\u003C/li>\n\u003Cli>\u003Ca href=\"https://github.com/nowsecure/android-forensics\">Android Forensics Framework\u003C/a>\u003C/li>\n\u003Cli>\u003Ca href=\"https://santoku-linux.com/\">Santoku Linux Mobile Forensics Distribution\u003C/a>\u003C/li>\n\u003C/ul>\n\u003Chr>\n\u003Cp>\u003Cstrong>Wichtiger Hinweis\u003C/strong>: Diese Anleitung dient ausschließlich für autorisierte forensische Untersuchungen. Stellen Sie sicher, dass Sie über entsprechende rechtliche Befugnisse verfügen, bevor Sie diese Techniken anwenden. Bei Zweifeln konsultieren Sie Rechtsberatung.\u003C/p>",{"headings":365,"localImagePaths":587,"remoteImagePaths":588,"frontmatter":346,"imagePaths":589},[366,367,370,373,374,377,380,382,385,388,391,394,397,400,403,406,407,410,413,416,419,422,425,428,431,434,435,438,441,444,447,450,453,456,459,462,465,468,471,474,475,478,481,484,487,490,493,496,499,502,505,508,509,512,515,518,521,524,527,530,533,536,539,542,545,548,551,554,557,560,563,566,569,572,575,578,581,584],{"depth":43,"slug":44,"text":45},{"depth":47,"slug":368,"text":369},"kernkomponenten-des-open-source-forensik-stacks","Kernkomponenten des Open-Source Forensik-Stacks",{"depth":47,"slug":371,"text":372},"erfolgsraten-nach-gerätealter","Erfolgsraten nach Gerätealter",{"depth":43,"slug":48,"text":49},{"depth":47,"slug":375,"text":376},"sift-workstation-setup","SIFT Workstation Setup",{"depth":51,"slug":378,"text":379},"systemanforderungen","Systemanforderungen",{"depth":51,"slug":381,"text":49},"installation-1",{"depth":47,"slug":383,"text":384},"autopsy-installation","Autopsy Installation",{"depth":51,"slug":386,"text":387},"windows-installation","Windows Installation",{"depth":51,"slug":389,"text":390},"linux-installation","Linux Installation",{"depth":47,"slug":392,"text":393},"essential-tools-installation","Essential Tools Installation",{"depth":51,"slug":395,"text":396},"android-debug-bridge-adb","Android Debug Bridge (ADB)",{"depth":51,"slug":398,"text":399},"aleapp-installation","ALEAPP Installation",{"depth":51,"slug":401,"text":402},"mobile-verification-toolkit-mvt","Mobile Verification Toolkit (MVT)",{"depth":51,"slug":404,"text":405},"andriller-installation","Andriller Installation",{"depth":43,"slug":58,"text":59},{"depth":47,"slug":408,"text":409},"adb-setup-und-gerätevorbereitung","ADB Setup und Gerätevorbereitung",{"depth":51,"slug":411,"text":412},"usb-debugging-aktivieren","USB-Debugging aktivieren",{"depth":51,"slug":414,"text":415},"adb-verbindung-testen","ADB Verbindung testen",{"depth":47,"slug":417,"text":418},"autopsy-projektkonfiguration","Autopsy Projektkonfiguration",{"depth":51,"slug":420,"text":421},"case-setup","Case-Setup",{"depth":51,"slug":423,"text":424},"android-analyzer-module-aktivieren","Android Analyzer Module aktivieren",{"depth":51,"slug":426,"text":427},"hash-algorithmen-konfigurieren","Hash-Algorithmen konfigurieren",{"depth":47,"slug":429,"text":430},"mvt-konfiguration","MVT Konfiguration",{"depth":51,"slug":432,"text":433},"konfigurationsdatei-erstellen","Konfigurationsdatei erstellen",{"depth":43,"slug":70,"text":71},{"depth":47,"slug":436,"text":437},"fall-1-logische-datenextraktion-mit-adb","Fall 1: Logische Datenextraktion mit ADB",{"depth":51,"slug":439,"text":440},"geräteinformationen-sammeln","Geräteinformationen sammeln",{"depth":51,"slug":442,"text":443},"datenbank-extraktion","Datenbank-Extraktion",{"depth":51,"slug":445,"text":446},"whatsapp-datenextraktion","WhatsApp Datenextraktion",{"depth":47,"slug":448,"text":449},"fall-2-android-backup-analyse","Fall 2: Android Backup-Analyse",{"depth":51,"slug":451,"text":452},"vollständiges-backup-erstellen","Vollständiges Backup erstellen",{"depth":51,"slug":454,"text":455},"backup-mit-aleapp-analysieren","Backup mit ALEAPP analysieren",{"depth":47,"slug":457,"text":458},"fall-3-mvt-kompromittierungsanalyse","Fall 3: MVT Kompromittierungsanalyse",{"depth":51,"slug":460,"text":461},"live-geräteanalyse","Live-Geräteanalyse",{"depth":51,"slug":463,"text":464},"ioc-suche-mit-pegasus-indikatoren","IOC-Suche mit Pegasus-Indikatoren",{"depth":47,"slug":466,"text":467},"fall-4-physische-extraktion-root-erforderlich","Fall 4: Physische Extraktion (Root erforderlich)",{"depth":51,"slug":469,"text":470},"device-rooting---mediatek-geräte","Device Rooting - MediaTek Geräte",{"depth":51,"slug":472,"text":473},"vollständiges-memory-dump","Vollständiges Memory Dump",{"depth":43,"slug":79,"text":80},{"depth":47,"slug":476,"text":477},"rechtliche-compliance","Rechtliche Compliance",{"depth":51,"slug":479,"text":480},"dokumentation-und-chain-of-custody","Dokumentation und Chain of Custody",{"depth":51,"slug":482,"text":483},"familiengeräte-und-nachlässe","Familiengeräte und Nachlässe",{"depth":47,"slug":485,"text":486},"technische-best-practices","Technische Best Practices",{"depth":51,"slug":488,"text":489},"hash-integrität-sicherstellen","Hash-Integrität sicherstellen",{"depth":51,"slug":491,"text":492},"sichere-arbeitsumgebung","Sichere Arbeitsumgebung",{"depth":51,"slug":494,"text":495},"qualitätssicherung","Qualitätssicherung",{"depth":47,"slug":497,"text":498},"erfolgsmaximierung-nach-gerätehersteller","Erfolgsmaximierung nach Gerätehersteller",{"depth":51,"slug":500,"text":501},"mediatek-geräte-höchste-erfolgsrate","MediaTek-Geräte (Höchste Erfolgsrate)",{"depth":51,"slug":503,"text":504},"samsung-geräte","Samsung-Geräte",{"depth":51,"slug":506,"text":507},"pixelnexus-geräte","Pixel/Nexus-Geräte",{"depth":43,"slug":82,"text":83},{"depth":47,"slug":510,"text":511},"problem-adb-erkennt-gerät-nicht","Problem: ADB erkennt Gerät nicht",{"depth":51,"slug":513,"text":514},"lösung-usb-treiber-und-berechtigungen","Lösung: USB-Treiber und Berechtigungen",{"depth":51,"slug":516,"text":517},"windows-treiber-installation","Windows: Treiber-Installation",{"depth":47,"slug":519,"text":520},"problem-verschlüsselte-android-backups","Problem: Verschlüsselte Android Backups",{"depth":51,"slug":522,"text":523},"lösung-android-backup-extractor","Lösung: Android Backup Extractor",{"depth":47,"slug":525,"text":526},"problem-unzureichende-berechtigungen-für-datenextraktion","Problem: Unzureichende Berechtigungen für Datenextraktion",{"depth":51,"slug":528,"text":529},"lösung-alternative-extraktionsmethoden","Lösung: Alternative Extraktionsmethoden",{"depth":47,"slug":531,"text":532},"problem-aleapp-parsing-fehler","Problem: ALEAPP Parsing-Fehler",{"depth":51,"slug":534,"text":535},"lösung-datenformat-probleme-beheben","Lösung: Datenformat-Probleme beheben",{"depth":43,"slug":537,"text":538},"erweiterte-techniken","Erweiterte Techniken",{"depth":47,"slug":540,"text":541},"memory-forensics-mit-lime","Memory Forensics mit LiME",{"depth":51,"slug":543,"text":544},"lime-für-arm-devices-kompilieren","LiME für ARM-Devices kompilieren",{"depth":51,"slug":546,"text":547},"volatility-analyse-von-android-memory","Volatility-Analyse von Android Memory",{"depth":47,"slug":549,"text":550},"frida-basierte-runtime-analyse","FRIDA-basierte Runtime-Analyse",{"depth":51,"slug":552,"text":553},"frida-für-kryptographie-hooks","FRIDA für Kryptographie-Hooks",{"depth":51,"slug":555,"text":556},"frida-installation-und-verwendung","FRIDA Installation und Verwendung",{"depth":47,"slug":558,"text":559},"custom-recovery-und-fastboot-exploits","Custom Recovery und Fastboot-Exploits",{"depth":51,"slug":561,"text":562},"twrp-installation-für-forensischen-zugang","TWRP Installation für forensischen Zugang",{"depth":51,"slug":564,"text":565},"partitions-imaging-mit-dd","Partitions-Imaging mit dd",{"depth":47,"slug":567,"text":568},"sqlite-forensics-und-gelöschte-daten","SQLite Forensics und gelöschte Daten",{"depth":51,"slug":570,"text":571},"erweiterte-sqlite-analyse","Erweiterte SQLite-Analyse",{"depth":51,"slug":573,"text":574},"timeline-rekonstruktion","Timeline-Rekonstruktion",{"depth":47,"slug":576,"text":577},"weiterführende-ressourcen","Weiterführende Ressourcen",{"depth":51,"slug":579,"text":580},"dokumentation-und-standards","Dokumentation und Standards",{"depth":51,"slug":582,"text":583},"community-und-weiterbildung","Community und Weiterbildung",{"depth":51,"slug":585,"text":586},"spezialisierte-tools","Spezialisierte Tools",[],[],[],"android-logical-imaging.md"] \ No newline at end of file +[["Map",1,2,7,8],"meta::meta",["Map",3,4,5,6],"astro-version","5.12.8","astro-config-digest","{\"root\":{},\"srcDir\":{},\"publicDir\":{},\"outDir\":{},\"cacheDir\":{},\"compressHTML\":true,\"base\":\"/\",\"trailingSlash\":\"ignore\",\"output\":\"server\",\"scopedStyleStrategy\":\"attribute\",\"build\":{\"format\":\"directory\",\"client\":{},\"server\":{},\"assets\":\"_astro\",\"serverEntry\":\"entry.mjs\",\"redirects\":true,\"inlineStylesheets\":\"auto\",\"concurrency\":1},\"server\":{\"open\":false,\"host\":true,\"port\":4321,\"streaming\":true,\"allowedHosts\":[]},\"redirects\":{},\"image\":{\"endpoint\":{\"route\":\"/_image\",\"entrypoint\":\"astro/assets/endpoint/node\"},\"service\":{\"entrypoint\":\"astro/assets/services/sharp\",\"config\":{}},\"domains\":[],\"remotePatterns\":[],\"responsiveStyles\":false},\"devToolbar\":{\"enabled\":true},\"markdown\":{\"syntaxHighlight\":{\"type\":\"shiki\",\"excludeLangs\":[\"math\"]},\"shikiConfig\":{\"langs\":[],\"langAlias\":{},\"theme\":\"github-dark\",\"themes\":{},\"wrap\":false,\"transformers\":[]},\"remarkPlugins\":[],\"rehypePlugins\":[],\"remarkRehype\":{},\"gfm\":true,\"smartypants\":true},\"security\":{\"checkOrigin\":true},\"env\":{\"schema\":{},\"validateSecrets\":false},\"experimental\":{\"clientPrerender\":false,\"contentIntellisense\":false,\"headingIdCompat\":false,\"preserveScriptOrder\":false,\"liveContentCollections\":false,\"csp\":false,\"rawEnvValues\":false},\"legacy\":{\"collections\":false},\"session\":{\"driver\":\"fs-lite\",\"options\":{\"base\":\"/var/home/user01/Projekte/forensic-pathways/node_modules/.astro/sessions\"}}}","knowledgebase",["Map",9,10,100,101,149,150,223,224,288,289,344,345],"misp",{"id":9,"data":11,"body":35,"filePath":36,"digest":37,"rendered":38,"legacyId":99},{"title":12,"tool_name":13,"description":14,"last_updated":15,"author":16,"difficulty":17,"categories":18,"tags":24,"sections":31,"review_status":34},"MISP - Plattform für Threat Intelligence Sharing","MISP","Das Rückgrat des modernen Threat-Intelligence-Sharings mit über 40.000 aktiven Instanzen weltweit.",["Date","2025-07-20T00:00:00.000Z"],"Claude 4 Sonnet","intermediate",[19,20,21,22,23],"incident-response","static-investigations","malware-analysis","network-forensics","cloud-forensics",[25,26,27,28,29,30],"web-based","threat-intelligence","api","correlation","ioc-sharing","automation",{"overview":32,"installation":32,"configuration":32,"usage_examples":32,"best_practices":32,"troubleshooting":32,"advanced_topics":33},true,false,"published","> **⚠️ Hinweis**: Dies ist ein vorläufiger, KI-generierter Knowledgebase-Eintrag. Wir freuen uns über Verbesserungen und Ergänzungen durch die Community!\n\n\n# Übersicht\n\n**MISP (Malware Information Sharing Platform & Threat Sharing)** ist eine freie Open-Source-Plattform zur strukturierten Erfassung, Speicherung, Analyse und gemeinsamen Nutzung von Cyber-Bedrohungsdaten. Mit über 40.000 Instanzen weltweit ist MISP der De-facto-Standard für den Austausch von Indicators of Compromise (IoCs) und Threat Intelligence zwischen CERTs, SOCs, Strafverfolgungsbehörden und anderen sicherheitsrelevanten Organisationen.\n\nDie föderierte Architektur ermöglicht einen kontrollierten, dezentralen Austausch von Informationen über vertrauenswürdige Partner hinweg. Durch Taxonomien, Tags und integrierte APIs ist eine automatische Anreicherung, Korrelation und Verarbeitung von Informationen in SIEMs, Firewalls oder Endpoint-Lösungen möglich.\n\n## Installation\n\n### Voraussetzungen\n\n- **Server-Betriebssystem:** Linux (empfohlen: Debian/Ubuntu)\n- **Abhängigkeiten:** MariaDB/MySQL, PHP, Apache/Nginx, Redis\n- **Ressourcen:** Mindestens 4 GB RAM, SSD empfohlen\n\n### Installationsschritte\n\n```bash\n# Beispiel für Debian/Ubuntu:\nsudo apt update && sudo apt install -y curl gnupg git python3 python3-pip redis-server mariadb-server apache2 php libapache2-mod-php\n\n# MISP klonen\ngit clone https://github.com/MISP/MISP.git /var/www/MISP\n\n# Setup-Skript nutzen\ncd /var/www/MISP && bash INSTALL/INSTALL.debian.sh\n````\n\nWeitere Details: [Offizielle Installationsanleitung](https://misp.github.io/MISP/INSTALL.debian/)\n\n## Konfiguration\n\n### Webserver\n\n* HTTPS aktivieren (Let's Encrypt oder Reverse Proxy)\n* PHP-Konfiguration anpassen (`upload_max_filesize`, `memory_limit`, `post_max_size`)\n\n### Benutzerrollen\n\n* Administrator, Org-Admin, Analyst etc.\n* Zugriffsbeschränkungen nach Organisation/Feed definierbar\n\n### Feeds und Galaxies\n\n* Aktivierung von Feeds (z. B. CIRCL, Abuse.ch, OpenCTI)\n* Nutzung von Galaxies zur Klassifizierung (APT-Gruppen, Malware-Familien)\n\n## Verwendungsbeispiele\n\n### Beispiel 1: Import von IoCs aus externem Feed\n\n1. Feed aktivieren unter **Administration → List Feeds**\n2. Feed synchronisieren\n3. Ereignisse durchsuchen, analysieren, ggf. mit eigenen Daten korrelieren\n\n### Beispiel 2: Automatisierte Anbindung an SIEM\n\n* REST-API-Token erstellen\n* API-Calls zur Abfrage neuer Events (z. B. mit Python, Logstash oder MISP Workbench)\n* Integration in Security-Systeme über JSON/STIX export\n\n## Best Practices\n\n* Regelmäßige Backups der Datenbank\n* Taxonomien konsistent verwenden\n* Nutzung der Sighting-Funktion zur Validierung von IoCs\n* Vertrauensstufen (TLP, PAP) korrekt setzen\n* Nicht nur konsumieren – auch teilen!\n\n## Troubleshooting\n\n### Problem: MISP-Feeds laden nicht\n\n**Lösung:**\n\n* Internetverbindung prüfen\n* Cronjobs aktiv?\n* Logs prüfen: `/var/www/MISP/app/tmp/logs/error.log`\n\n### Problem: API gibt 403 zurück\n\n**Lösung:**\n\n* Ist der API-Key korrekt und aktiv?\n* Rechte des Benutzers überprüfen\n* IP-Filter im MISP-Backend beachten\n\n### Problem: Hohe Datenbanklast\n\n**Lösung:**\n\n* Indizes optimieren\n* Redis aktivieren\n* Alte Events regelmäßig archivieren oder löschen\n\n## Weiterführende Themen\n\n* STIX2-Import/Export\n* Erweiterungen mit MISP Modules (z. B. für Virustotal, YARA)\n* Föderierte Netzwerke und Community-Portale\n* Integration mit OpenCTI oder TheHive\n\n---\n\n**Links:**\n\n* 🌐 [Offizielle Projektseite](https://misp-project.org/)\n* 📦 [CC24-MISP-Instanz](https://misp.cc24.dev)\n* 📊 [Status-Monitoring](https://status.mikoshi.de/api/badge/34/status)\n\nLizenz: **AGPL-3.0**","src/content/knowledgebase/misp.md","35930fa919a46964",{"html":39,"metadata":40},"\u003Cblockquote>\n\u003Cp>\u003Cstrong>⚠️ Hinweis\u003C/strong>: Dies ist ein vorläufiger, KI-generierter Knowledgebase-Eintrag. Wir freuen uns über Verbesserungen und Ergänzungen durch die Community!\u003C/p>\n\u003C/blockquote>\n\u003Ch1 id=\"übersicht\">Übersicht\u003C/h1>\n\u003Cp>\u003Cstrong>MISP (Malware Information Sharing Platform & Threat Sharing)\u003C/strong> ist eine freie Open-Source-Plattform zur strukturierten Erfassung, Speicherung, Analyse und gemeinsamen Nutzung von Cyber-Bedrohungsdaten. Mit über 40.000 Instanzen weltweit ist MISP der De-facto-Standard für den Austausch von Indicators of Compromise (IoCs) und Threat Intelligence zwischen CERTs, SOCs, Strafverfolgungsbehörden und anderen sicherheitsrelevanten Organisationen.\u003C/p>\n\u003Cp>Die föderierte Architektur ermöglicht einen kontrollierten, dezentralen Austausch von Informationen über vertrauenswürdige Partner hinweg. Durch Taxonomien, Tags und integrierte APIs ist eine automatische Anreicherung, Korrelation und Verarbeitung von Informationen in SIEMs, Firewalls oder Endpoint-Lösungen möglich.\u003C/p>\n\u003Ch2 id=\"installation\">Installation\u003C/h2>\n\u003Ch3 id=\"voraussetzungen\">Voraussetzungen\u003C/h3>\n\u003Cul>\n\u003Cli>\u003Cstrong>Server-Betriebssystem:\u003C/strong> Linux (empfohlen: Debian/Ubuntu)\u003C/li>\n\u003Cli>\u003Cstrong>Abhängigkeiten:\u003C/strong> MariaDB/MySQL, PHP, Apache/Nginx, Redis\u003C/li>\n\u003Cli>\u003Cstrong>Ressourcen:\u003C/strong> Mindestens 4 GB RAM, SSD empfohlen\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"installationsschritte\">Installationsschritte\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Beispiel für Debian/Ubuntu:\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apt\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> update\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> && \u003C/span>\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apt\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> install\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -y\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> curl\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> gnupg\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> git\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> python3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> python3-pip\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> redis-server\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> mariadb-server\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apache2\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> php\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> libapache2-mod-php\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># MISP klonen\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">git\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> clone\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> https://github.com/MISP/MISP.git\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /var/www/MISP\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Setup-Skript nutzen\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">cd\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /var/www/MISP\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> && \u003C/span>\u003Cspan style=\"color:#B392F0\">bash\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> INSTALL/INSTALL.debian.sh\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Cp>Weitere Details: \u003Ca href=\"https://misp.github.io/MISP/INSTALL.debian/\">Offizielle Installationsanleitung\u003C/a>\u003C/p>\n\u003Ch2 id=\"konfiguration\">Konfiguration\u003C/h2>\n\u003Ch3 id=\"webserver\">Webserver\u003C/h3>\n\u003Cul>\n\u003Cli>HTTPS aktivieren (Let’s Encrypt oder Reverse Proxy)\u003C/li>\n\u003Cli>PHP-Konfiguration anpassen (\u003Ccode>upload_max_filesize\u003C/code>, \u003Ccode>memory_limit\u003C/code>, \u003Ccode>post_max_size\u003C/code>)\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"benutzerrollen\">Benutzerrollen\u003C/h3>\n\u003Cul>\n\u003Cli>Administrator, Org-Admin, Analyst etc.\u003C/li>\n\u003Cli>Zugriffsbeschränkungen nach Organisation/Feed definierbar\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"feeds-und-galaxies\">Feeds und Galaxies\u003C/h3>\n\u003Cul>\n\u003Cli>Aktivierung von Feeds (z. B. CIRCL, Abuse.ch, OpenCTI)\u003C/li>\n\u003Cli>Nutzung von Galaxies zur Klassifizierung (APT-Gruppen, Malware-Familien)\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"verwendungsbeispiele\">Verwendungsbeispiele\u003C/h2>\n\u003Ch3 id=\"beispiel-1-import-von-iocs-aus-externem-feed\">Beispiel 1: Import von IoCs aus externem Feed\u003C/h3>\n\u003Col>\n\u003Cli>Feed aktivieren unter \u003Cstrong>Administration → List Feeds\u003C/strong>\u003C/li>\n\u003Cli>Feed synchronisieren\u003C/li>\n\u003Cli>Ereignisse durchsuchen, analysieren, ggf. mit eigenen Daten korrelieren\u003C/li>\n\u003C/ol>\n\u003Ch3 id=\"beispiel-2-automatisierte-anbindung-an-siem\">Beispiel 2: Automatisierte Anbindung an SIEM\u003C/h3>\n\u003Cul>\n\u003Cli>REST-API-Token erstellen\u003C/li>\n\u003Cli>API-Calls zur Abfrage neuer Events (z. B. mit Python, Logstash oder MISP Workbench)\u003C/li>\n\u003Cli>Integration in Security-Systeme über JSON/STIX export\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"best-practices\">Best Practices\u003C/h2>\n\u003Cul>\n\u003Cli>Regelmäßige Backups der Datenbank\u003C/li>\n\u003Cli>Taxonomien konsistent verwenden\u003C/li>\n\u003Cli>Nutzung der Sighting-Funktion zur Validierung von IoCs\u003C/li>\n\u003Cli>Vertrauensstufen (TLP, PAP) korrekt setzen\u003C/li>\n\u003Cli>Nicht nur konsumieren – auch teilen!\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"troubleshooting\">Troubleshooting\u003C/h2>\n\u003Ch3 id=\"problem-misp-feeds-laden-nicht\">Problem: MISP-Feeds laden nicht\u003C/h3>\n\u003Cp>\u003Cstrong>Lösung:\u003C/strong>\u003C/p>\n\u003Cul>\n\u003Cli>Internetverbindung prüfen\u003C/li>\n\u003Cli>Cronjobs aktiv?\u003C/li>\n\u003Cli>Logs prüfen: \u003Ccode>/var/www/MISP/app/tmp/logs/error.log\u003C/code>\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"problem-api-gibt-403-zurück\">Problem: API gibt 403 zurück\u003C/h3>\n\u003Cp>\u003Cstrong>Lösung:\u003C/strong>\u003C/p>\n\u003Cul>\n\u003Cli>Ist der API-Key korrekt und aktiv?\u003C/li>\n\u003Cli>Rechte des Benutzers überprüfen\u003C/li>\n\u003Cli>IP-Filter im MISP-Backend beachten\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"problem-hohe-datenbanklast\">Problem: Hohe Datenbanklast\u003C/h3>\n\u003Cp>\u003Cstrong>Lösung:\u003C/strong>\u003C/p>\n\u003Cul>\n\u003Cli>Indizes optimieren\u003C/li>\n\u003Cli>Redis aktivieren\u003C/li>\n\u003Cli>Alte Events regelmäßig archivieren oder löschen\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"weiterführende-themen\">Weiterführende Themen\u003C/h2>\n\u003Cul>\n\u003Cli>STIX2-Import/Export\u003C/li>\n\u003Cli>Erweiterungen mit MISP Modules (z. B. für Virustotal, YARA)\u003C/li>\n\u003Cli>Föderierte Netzwerke und Community-Portale\u003C/li>\n\u003Cli>Integration mit OpenCTI oder TheHive\u003C/li>\n\u003C/ul>\n\u003Chr>\n\u003Cp>\u003Cstrong>Links:\u003C/strong>\u003C/p>\n\u003Cul>\n\u003Cli>🌐 \u003Ca href=\"https://misp-project.org/\">Offizielle Projektseite\u003C/a>\u003C/li>\n\u003Cli>📦 \u003Ca href=\"https://misp.cc24.dev\">CC24-MISP-Instanz\u003C/a>\u003C/li>\n\u003Cli>📊 \u003Ca href=\"https://status.mikoshi.de/api/badge/34/status\">Status-Monitoring\u003C/a>\u003C/li>\n\u003C/ul>\n\u003Cp>Lizenz: \u003Cstrong>AGPL-3.0\u003C/strong>\u003C/p>",{"headings":41,"localImagePaths":96,"remoteImagePaths":97,"frontmatter":11,"imagePaths":98},[42,46,50,54,57,60,63,66,69,72,75,78,81,84,87,90,93],{"depth":43,"slug":44,"text":45},1,"übersicht","Übersicht",{"depth":47,"slug":48,"text":49},2,"installation","Installation",{"depth":51,"slug":52,"text":53},3,"voraussetzungen","Voraussetzungen",{"depth":51,"slug":55,"text":56},"installationsschritte","Installationsschritte",{"depth":47,"slug":58,"text":59},"konfiguration","Konfiguration",{"depth":51,"slug":61,"text":62},"webserver","Webserver",{"depth":51,"slug":64,"text":65},"benutzerrollen","Benutzerrollen",{"depth":51,"slug":67,"text":68},"feeds-und-galaxies","Feeds und Galaxies",{"depth":47,"slug":70,"text":71},"verwendungsbeispiele","Verwendungsbeispiele",{"depth":51,"slug":73,"text":74},"beispiel-1-import-von-iocs-aus-externem-feed","Beispiel 1: Import von IoCs aus externem Feed",{"depth":51,"slug":76,"text":77},"beispiel-2-automatisierte-anbindung-an-siem","Beispiel 2: Automatisierte Anbindung an SIEM",{"depth":47,"slug":79,"text":80},"best-practices","Best Practices",{"depth":47,"slug":82,"text":83},"troubleshooting","Troubleshooting",{"depth":51,"slug":85,"text":86},"problem-misp-feeds-laden-nicht","Problem: MISP-Feeds laden nicht",{"depth":51,"slug":88,"text":89},"problem-api-gibt-403-zurück","Problem: API gibt 403 zurück",{"depth":51,"slug":91,"text":92},"problem-hohe-datenbanklast","Problem: Hohe Datenbanklast",{"depth":47,"slug":94,"text":95},"weiterführende-themen","Weiterführende Themen",[],[],[],"misp.md","regular-expressions-regex",{"id":100,"data":102,"body":116,"filePath":117,"digest":118,"rendered":119,"legacyId":148},{"title":103,"tool_name":104,"description":105,"last_updated":106,"author":16,"difficulty":17,"categories":107,"tags":109,"sections":115,"review_status":34},"Regular Expressions (Regex) – Musterbasierte Textanalyse","Regular Expressions (Regex)","Pattern matching language für Suche, Extraktion und Manipulation von Text in forensischen Analysen.",["Date","2025-07-20T00:00:00.000Z"],[19,21,22,108],"fraud-investigation",[110,111,112,113,114],"pattern-matching","text-processing","log-analysis","string-manipulation","search-algorithms",{"overview":32,"installation":33,"configuration":33,"usage_examples":32,"best_practices":32,"troubleshooting":33,"advanced_topics":32},"> **⚠️ Hinweis**: Dies ist ein vorläufiger, KI-generierter Knowledgebase-Eintrag. Wir freuen uns über Verbesserungen und Ergänzungen durch die Community!\n\n\n# Übersicht\n\n**Regular Expressions (Regex)** sind ein leistungsfähiges Werkzeug zur Erkennung, Extraktion und Transformation von Zeichenfolgen anhand vordefinierter Muster. In der digitalen Forensik sind Regex-Ausdrücke unverzichtbar: Sie helfen beim Auffinden von IP-Adressen, Hash-Werten, Dateipfaden, Malware-Signaturen oder Kreditkartennummern in großen Mengen unstrukturierter Daten wie Logdateien, Netzwerktraces oder Memory Dumps.\n\nRegex ist nicht auf eine bestimmte Plattform oder Software beschränkt – es wird in nahezu allen gängigen Programmiersprachen, Texteditoren und forensischen Tools unterstützt.\n\n## Verwendungsbeispiele\n\n### 1. IP-Adressen extrahieren\n\n```regex\n\\b(?:\\d{1,3}\\.){3}\\d{1,3}\\b\n````\n\nVerwendung:\n\n* Finden von IP-Adressen in Firewall-Logs oder Packet Captures.\n* Beispiel-Zeile:\n\n ```\n Connection from 192.168.1.101 to port 443 established\n ```\n\n### 2. E-Mail-Adressen identifizieren\n\n```regex\n[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}\n```\n\nVerwendung:\n\n* Erkennung von kompromittierten Accounts in Phishing-E-Mails.\n* Analyse von Useraktivitäten oder Kommunikationsverläufen.\n\n### 3. Hash-Werte erkennen (z. B. SHA-256)\n\n```regex\n\\b[A-Fa-f0-9]{64}\\b\n```\n\nVerwendung:\n\n* Extraktion von Malware-Hashes aus Memory Dumps oder YARA-Logs.\n\n### 4. Zeitstempel in Logdateien extrahieren\n\n```regex\n\\d{4}-\\d{2}-\\d{2}[ T]\\d{2}:\\d{2}:\\d{2}\n```\n\nVerwendung:\n\n* Zeitsensitive Korrelationsanalysen (z. B. bei Intrusion Detection oder Timeline-Rekonstruktionen).\n\n## Best Practices\n\n* **Regex testen**: Nutze Plattformen wie [regexr.com](https://regexr.com/) oder [regex101.com](https://regex101.com/) zur Validierung.\n* **Performance beachten**: Komplexe Ausdrücke können ineffizient sein und Systeme verlangsamen – verwende Lazy Quantifiers (`*?`, `+?`) bei Bedarf.\n* **Escape-Zeichen korrekt anwenden**: Spezielle Zeichen wie `.` oder `\\` müssen bei Bedarf mit `\\\\` oder `\\.` maskiert werden.\n* **Portabilität prüfen**: Unterschiedliche Regex-Engines (z. B. Python `re`, PCRE, JavaScript) interpretieren manche Syntax leicht unterschiedlich.\n* **Lesbarkeit fördern**: Verwende benannte Gruppen (`(?P\u003Cname>...)`) und Kommentare (`(?x)`), um reguläre Ausdrücke besser wartbar zu machen.\n\n## Weiterführende Themen\n\n### Lookaheads und Lookbehinds\n\nMit **Lookaheads** (`(?=...)`) und **Lookbehinds** (`(?\u003C=...)`) können Bedingungen formuliert werden, ohne dass der Text Teil des Matchs wird.\n\nBeispiel: Alle `.exe`-Dateinamen **ohne** das Wort `safe` davor matchen:\n\n```regex\n(?\u003C!safe\\s)[\\w-]+\\.exe\n```\n\n### Regex in Forensik-Tools\n\n* **YARA**: Unterstützt Regex zur Erstellung von Malware-Signaturen.\n* **Wireshark**: Filtert Payloads anhand von Regex-ähnlicher Syntax.\n* **Splunk & ELK**: Verwenden Regex für Logparsing und Visualisierung.\n* **Volatility Plugins**: Extrahieren Artefakte mit Regex-basierten Scans.\n\n---\n\n> 🔤 **Regex ist ein universelles Werkzeug für Analysten, Ermittler und Entwickler, um versteckte Informationen schnell und flexibel aufzuspüren.**\n>\n> Nutze es überall dort, wo Textdaten eine Rolle spielen.","src/content/knowledgebase/regular-expressions-regex.md","247bcf48ebdc9ba0",{"html":120,"metadata":121},"\u003Cblockquote>\n\u003Cp>\u003Cstrong>⚠️ Hinweis\u003C/strong>: Dies ist ein vorläufiger, KI-generierter Knowledgebase-Eintrag. Wir freuen uns über Verbesserungen und Ergänzungen durch die Community!\u003C/p>\n\u003C/blockquote>\n\u003Ch1 id=\"übersicht\">Übersicht\u003C/h1>\n\u003Cp>\u003Cstrong>Regular Expressions (Regex)\u003C/strong> sind ein leistungsfähiges Werkzeug zur Erkennung, Extraktion und Transformation von Zeichenfolgen anhand vordefinierter Muster. In der digitalen Forensik sind Regex-Ausdrücke unverzichtbar: Sie helfen beim Auffinden von IP-Adressen, Hash-Werten, Dateipfaden, Malware-Signaturen oder Kreditkartennummern in großen Mengen unstrukturierter Daten wie Logdateien, Netzwerktraces oder Memory Dumps.\u003C/p>\n\u003Cp>Regex ist nicht auf eine bestimmte Plattform oder Software beschränkt – es wird in nahezu allen gängigen Programmiersprachen, Texteditoren und forensischen Tools unterstützt.\u003C/p>\n\u003Ch2 id=\"verwendungsbeispiele\">Verwendungsbeispiele\u003C/h2>\n\u003Ch3 id=\"1-ip-adressen-extrahieren\">1. IP-Adressen extrahieren\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"regex\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">\\b(?:\\d\u003C/span>\u003Cspan style=\"color:#F97583\">{1,3}\u003C/span>\u003Cspan style=\"color:#79B8FF\">\\.)\u003C/span>\u003Cspan style=\"color:#F97583\">{3}\u003C/span>\u003Cspan style=\"color:#79B8FF\">\\d\u003C/span>\u003Cspan style=\"color:#F97583\">{1,3}\u003C/span>\u003Cspan style=\"color:#79B8FF\">\\b\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Cp>Verwendung:\u003C/p>\n\u003Cul>\n\u003Cli>\n\u003Cp>Finden von IP-Adressen in Firewall-Logs oder Packet Captures.\u003C/p>\n\u003C/li>\n\u003Cli>\n\u003Cp>Beispiel-Zeile:\u003C/p>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"plaintext\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan>Connection from 192.168.1.101 to port 443 established\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"2-e-mail-adressen-identifizieren\">2. E-Mail-Adressen identifizieren\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"regex\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">[a-zA-Z0-9._%+-]\u003C/span>\u003Cspan style=\"color:#F97583\">+\u003C/span>\u003Cspan style=\"color:#DBEDFF\">@\u003C/span>\u003Cspan style=\"color:#79B8FF\">[a-zA-Z0-9.-]\u003C/span>\u003Cspan style=\"color:#F97583\">+\u003C/span>\u003Cspan style=\"color:#79B8FF\">\\.[a-zA-Z]\u003C/span>\u003Cspan style=\"color:#F97583\">{2,}\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Cp>Verwendung:\u003C/p>\n\u003Cul>\n\u003Cli>Erkennung von kompromittierten Accounts in Phishing-E-Mails.\u003C/li>\n\u003Cli>Analyse von Useraktivitäten oder Kommunikationsverläufen.\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"3-hash-werte-erkennen-zb-sha-256\">3. Hash-Werte erkennen (z. B. SHA-256)\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"regex\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">\\b[A-Fa-f0-9]\u003C/span>\u003Cspan style=\"color:#F97583\">{64}\u003C/span>\u003Cspan style=\"color:#79B8FF\">\\b\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Cp>Verwendung:\u003C/p>\n\u003Cul>\n\u003Cli>Extraktion von Malware-Hashes aus Memory Dumps oder YARA-Logs.\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"4-zeitstempel-in-logdateien-extrahieren\">4. Zeitstempel in Logdateien extrahieren\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"regex\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">\\d\u003C/span>\u003Cspan style=\"color:#F97583\">{4}\u003C/span>\u003Cspan style=\"color:#DBEDFF\">-\u003C/span>\u003Cspan style=\"color:#79B8FF\">\\d\u003C/span>\u003Cspan style=\"color:#F97583\">{2}\u003C/span>\u003Cspan style=\"color:#DBEDFF\">-\u003C/span>\u003Cspan style=\"color:#79B8FF\">\\d\u003C/span>\u003Cspan style=\"color:#F97583\">{2}\u003C/span>\u003Cspan style=\"color:#79B8FF\">[ T]\\d\u003C/span>\u003Cspan style=\"color:#F97583\">{2}\u003C/span>\u003Cspan style=\"color:#DBEDFF\">:\u003C/span>\u003Cspan style=\"color:#79B8FF\">\\d\u003C/span>\u003Cspan style=\"color:#F97583\">{2}\u003C/span>\u003Cspan style=\"color:#DBEDFF\">:\u003C/span>\u003Cspan style=\"color:#79B8FF\">\\d\u003C/span>\u003Cspan style=\"color:#F97583\">{2}\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Cp>Verwendung:\u003C/p>\n\u003Cul>\n\u003Cli>Zeitsensitive Korrelationsanalysen (z. B. bei Intrusion Detection oder Timeline-Rekonstruktionen).\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"best-practices\">Best Practices\u003C/h2>\n\u003Cul>\n\u003Cli>\u003Cstrong>Regex testen\u003C/strong>: Nutze Plattformen wie \u003Ca href=\"https://regexr.com/\">regexr.com\u003C/a> oder \u003Ca href=\"https://regex101.com/\">regex101.com\u003C/a> zur Validierung.\u003C/li>\n\u003Cli>\u003Cstrong>Performance beachten\u003C/strong>: Komplexe Ausdrücke können ineffizient sein und Systeme verlangsamen – verwende Lazy Quantifiers (\u003Ccode>*?\u003C/code>, \u003Ccode>+?\u003C/code>) bei Bedarf.\u003C/li>\n\u003Cli>\u003Cstrong>Escape-Zeichen korrekt anwenden\u003C/strong>: Spezielle Zeichen wie \u003Ccode>.\u003C/code> oder \u003Ccode>\\\u003C/code> müssen bei Bedarf mit \u003Ccode>\\\\\u003C/code> oder \u003Ccode>\\.\u003C/code> maskiert werden.\u003C/li>\n\u003Cli>\u003Cstrong>Portabilität prüfen\u003C/strong>: Unterschiedliche Regex-Engines (z. B. Python \u003Ccode>re\u003C/code>, PCRE, JavaScript) interpretieren manche Syntax leicht unterschiedlich.\u003C/li>\n\u003Cli>\u003Cstrong>Lesbarkeit fördern\u003C/strong>: Verwende benannte Gruppen (\u003Ccode>(?P<name>...)\u003C/code>) und Kommentare (\u003Ccode>(?x)\u003C/code>), um reguläre Ausdrücke besser wartbar zu machen.\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"weiterführende-themen\">Weiterführende Themen\u003C/h2>\n\u003Ch3 id=\"lookaheads-und-lookbehinds\">Lookaheads und Lookbehinds\u003C/h3>\n\u003Cp>Mit \u003Cstrong>Lookaheads\u003C/strong> (\u003Ccode>(?=...)\u003C/code>) und \u003Cstrong>Lookbehinds\u003C/strong> (\u003Ccode>(?<=...)\u003C/code>) können Bedingungen formuliert werden, ohne dass der Text Teil des Matchs wird.\u003C/p>\n\u003Cp>Beispiel: Alle \u003Ccode>.exe\u003C/code>-Dateinamen \u003Cstrong>ohne\u003C/strong> das Wort \u003Ccode>safe\u003C/code> davor matchen:\u003C/p>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"regex\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">(?<!\u003C/span>\u003Cspan style=\"color:#DBEDFF\">safe\u003C/span>\u003Cspan style=\"color:#79B8FF\">\\s\u003C/span>\u003Cspan style=\"color:#F97583\">)\u003C/span>\u003Cspan style=\"color:#79B8FF\">[\\w-]\u003C/span>\u003Cspan style=\"color:#F97583\">+\u003C/span>\u003Cspan style=\"color:#79B8FF\">\\.\u003C/span>\u003Cspan style=\"color:#DBEDFF\">exe\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"regex-in-forensik-tools\">Regex in Forensik-Tools\u003C/h3>\n\u003Cul>\n\u003Cli>\u003Cstrong>YARA\u003C/strong>: Unterstützt Regex zur Erstellung von Malware-Signaturen.\u003C/li>\n\u003Cli>\u003Cstrong>Wireshark\u003C/strong>: Filtert Payloads anhand von Regex-ähnlicher Syntax.\u003C/li>\n\u003Cli>\u003Cstrong>Splunk & ELK\u003C/strong>: Verwenden Regex für Logparsing und Visualisierung.\u003C/li>\n\u003Cli>\u003Cstrong>Volatility Plugins\u003C/strong>: Extrahieren Artefakte mit Regex-basierten Scans.\u003C/li>\n\u003C/ul>\n\u003Chr>\n\u003Cblockquote>\n\u003Cp>🔤 \u003Cstrong>Regex ist ein universelles Werkzeug für Analysten, Ermittler und Entwickler, um versteckte Informationen schnell und flexibel aufzuspüren.\u003C/strong>\u003C/p>\n\u003Cp>Nutze es überall dort, wo Textdaten eine Rolle spielen.\u003C/p>\n\u003C/blockquote>",{"headings":122,"localImagePaths":145,"remoteImagePaths":146,"frontmatter":102,"imagePaths":147},[123,124,125,128,131,134,137,138,139,142],{"depth":43,"slug":44,"text":45},{"depth":47,"slug":70,"text":71},{"depth":51,"slug":126,"text":127},"1-ip-adressen-extrahieren","1. IP-Adressen extrahieren",{"depth":51,"slug":129,"text":130},"2-e-mail-adressen-identifizieren","2. E-Mail-Adressen identifizieren",{"depth":51,"slug":132,"text":133},"3-hash-werte-erkennen-zb-sha-256","3. Hash-Werte erkennen (z. B. SHA-256)",{"depth":51,"slug":135,"text":136},"4-zeitstempel-in-logdateien-extrahieren","4. Zeitstempel in Logdateien extrahieren",{"depth":47,"slug":79,"text":80},{"depth":47,"slug":94,"text":95},{"depth":51,"slug":140,"text":141},"lookaheads-und-lookbehinds","Lookaheads und Lookbehinds",{"depth":51,"slug":143,"text":144},"regex-in-forensik-tools","Regex in Forensik-Tools",[],[],[],"regular-expressions-regex.md","kali-linux",{"id":149,"data":151,"body":166,"filePath":167,"digest":168,"rendered":169,"legacyId":222},{"title":152,"tool_name":153,"description":154,"last_updated":155,"author":16,"difficulty":17,"categories":156,"tags":159,"sections":165,"review_status":34},"Kali Linux - Die Hacker-Distribution für Forensik & Penetration Testing","Kali Linux","Leitfaden zur Installation, Nutzung und Best Practices für Kali Linux – die All-in-One-Plattform für Security-Profis.",["Date","2025-07-20T00:00:00.000Z"],[19,157,158],"forensics","penetration-testing",[160,161,158,162,163,164],"live-boot","tool-collection","forensics-suite","virtualization","arm-support",{"overview":32,"installation":32,"configuration":32,"usage_examples":32,"best_practices":32,"troubleshooting":32,"advanced_topics":32},"> **⚠️ Hinweis**: Dies ist ein vorläufiger, KI-generierter Knowledgebase-Eintrag. Wir freuen uns über Verbesserungen und Ergänzungen durch die Community!\n\n\n# Übersicht\n\nKali Linux ist eine auf Debian basierende Linux-Distribution, die speziell für Penetration Testing, digitale Forensik, Reverse Engineering und Incident Response entwickelt wurde. Mit über 600 vorinstallierten Tools ist sie ein unverzichtbares Werkzeug für Security-Experten, Ermittler und forensische Analysten. Die Live-Boot-Funktion erlaubt es, Systeme ohne Spuren zu hinterlassen zu analysieren – ideal für forensische Untersuchungen.\n\n## Installation\n\n### Option 1: Live-System (USB/DVD)\n\n1. ISO-Image von [kali.org](https://www.kali.org/get-kali/) herunterladen.\n2. Mit **Rufus** oder **balenaEtcher** auf einen USB-Stick schreiben.\n3. Vom USB-Stick booten (ggf. Boot-Reihenfolge im BIOS anpassen).\n4. Kali kann direkt ohne Installation im Live-Modus verwendet werden.\n\n### Option 2: Installation auf Festplatte\n\n1. ISO-Image booten und **Graphical Install** wählen.\n2. Schritt-für-Schritt durch den Installationsassistenten navigieren:\n - Sprache, Zeitzone und Tastaturlayout auswählen\n - Partitionierung konfigurieren (automatisch oder manuell)\n - Benutzerkonten erstellen\n3. Nach Installation Neustart durchführen.\n\n### Option 3: Virtuelle Maschine (VM)\n\n- Offizielle VM-Images für VirtualBox und VMware von der [Kali-Website](https://www.kali.org/get-kali/#kali-virtual-machines)\n- Importieren, ggf. Netzwerkbrücke und Shared Folders aktivieren\n\n## Konfiguration\n\n### Netzwerkeinstellungen\n\n- Konfiguration über `nmtui` oder `/etc/network/interfaces`\n- VPN und Proxy-Integration über GUI oder Terminal\n\n### Updates & Paketquellen\n\n```bash\nsudo apt update && sudo apt full-upgrade\n````\n\n> Hinweis: `kali-rolling` ist die Standard-Distribution für kontinuierliche Updates.\n\n### Sprache & Lokalisierung\n\n```bash\nsudo dpkg-reconfigure locales\nsudo dpkg-reconfigure keyboard-configuration\n```\n\n## Verwendungsbeispiele\n\n### 1. Netzwerkscan mit Nmap\n\n```bash\nnmap -sS -T4 -A 192.168.1.0/24\n```\n\n### 2. Passwort-Cracking mit John the Ripper\n\n```bash\njohn --wordlist=/usr/share/wordlists/rockyou.txt hashes.txt\n```\n\n### 3. Forensik mit Autopsy\n\n```bash\nautopsy &\n```\n\n### 4. Android-Analyse mit MobSF (in Docker)\n\n```bash\ndocker pull opensecurity/mobile-security-framework-mobsf\ndocker run -it -p 8000:8000 mobsf\n```\n\n## Best Practices\n\n* Nutze immer **aktuelle Snapshots** oder VM-Clones vor gefährlichen Tests\n* Verwende separate Netzwerke (z. B. Host-only oder NAT) für Tests\n* Deaktiviere automatisches WLAN bei forensischen Analysen\n* Prüfe und aktualisiere regelmäßig Toolsets (`apt`, `git`, `pip`)\n* Halte deine ISO-Images versioniert für forensische Reproduzierbarkeit\n\n## Troubleshooting\n\n### Problem: Keine Internetverbindung nach Installation\n\n**Lösung:** Netzwerkadapter prüfen, ggf. mit `ifconfig` oder `ip a` überprüfen, DHCP aktivieren.\n\n### Problem: Tools fehlen nach Update\n\n**Lösung:** Tool-Gruppen wie `kali-linux-default` manuell nachinstallieren:\n\n```bash\nsudo apt install kali-linux-default\n```\n\n### Problem: „Permission Denied“ bei Tools\n\n**Lösung:** Root-Rechte nutzen oder mit `sudo` ausführen.\n\n## Weiterführende Themen\n\n* **Kustomisierung von Kali ISOs** mit `live-build`\n* **NetHunter**: Kali für mobile Geräte (Android)\n* **Kali Purple**: Defensive Security Suite\n* Integration mit **Cloud-Infrastrukturen** via WSL oder Azure\n\n---\n\n**Links & Ressourcen:**\n\n* Offizielle Website: [https://kali.org](https://kali.org/)\n* Dokumentation: [https://docs.kali.org/](https://docs.kali.org/)\n* GitLab Repo: [https://gitlab.com/kalilinux](https://gitlab.com/kalilinux)\n* Discord-Community: [https://discord.com/invite/kali-linux](https://discord.com/invite/kali-linux)","src/content/knowledgebase/kali-linux.md","09243ebc79d75dbc",{"html":170,"metadata":171},"\u003Cblockquote>\n\u003Cp>\u003Cstrong>⚠️ Hinweis\u003C/strong>: Dies ist ein vorläufiger, KI-generierter Knowledgebase-Eintrag. Wir freuen uns über Verbesserungen und Ergänzungen durch die Community!\u003C/p>\n\u003C/blockquote>\n\u003Ch1 id=\"übersicht\">Übersicht\u003C/h1>\n\u003Cp>Kali Linux ist eine auf Debian basierende Linux-Distribution, die speziell für Penetration Testing, digitale Forensik, Reverse Engineering und Incident Response entwickelt wurde. Mit über 600 vorinstallierten Tools ist sie ein unverzichtbares Werkzeug für Security-Experten, Ermittler und forensische Analysten. Die Live-Boot-Funktion erlaubt es, Systeme ohne Spuren zu hinterlassen zu analysieren – ideal für forensische Untersuchungen.\u003C/p>\n\u003Ch2 id=\"installation\">Installation\u003C/h2>\n\u003Ch3 id=\"option-1-live-system-usbdvd\">Option 1: Live-System (USB/DVD)\u003C/h3>\n\u003Col>\n\u003Cli>ISO-Image von \u003Ca href=\"https://www.kali.org/get-kali/\">kali.org\u003C/a> herunterladen.\u003C/li>\n\u003Cli>Mit \u003Cstrong>Rufus\u003C/strong> oder \u003Cstrong>balenaEtcher\u003C/strong> auf einen USB-Stick schreiben.\u003C/li>\n\u003Cli>Vom USB-Stick booten (ggf. Boot-Reihenfolge im BIOS anpassen).\u003C/li>\n\u003Cli>Kali kann direkt ohne Installation im Live-Modus verwendet werden.\u003C/li>\n\u003C/ol>\n\u003Ch3 id=\"option-2-installation-auf-festplatte\">Option 2: Installation auf Festplatte\u003C/h3>\n\u003Col>\n\u003Cli>ISO-Image booten und \u003Cstrong>Graphical Install\u003C/strong> wählen.\u003C/li>\n\u003Cli>Schritt-für-Schritt durch den Installationsassistenten navigieren:\n\u003Cul>\n\u003Cli>Sprache, Zeitzone und Tastaturlayout auswählen\u003C/li>\n\u003Cli>Partitionierung konfigurieren (automatisch oder manuell)\u003C/li>\n\u003Cli>Benutzerkonten erstellen\u003C/li>\n\u003C/ul>\n\u003C/li>\n\u003Cli>Nach Installation Neustart durchführen.\u003C/li>\n\u003C/ol>\n\u003Ch3 id=\"option-3-virtuelle-maschine-vm\">Option 3: Virtuelle Maschine (VM)\u003C/h3>\n\u003Cul>\n\u003Cli>Offizielle VM-Images für VirtualBox und VMware von der \u003Ca href=\"https://www.kali.org/get-kali/#kali-virtual-machines\">Kali-Website\u003C/a>\u003C/li>\n\u003Cli>Importieren, ggf. Netzwerkbrücke und Shared Folders aktivieren\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"konfiguration\">Konfiguration\u003C/h2>\n\u003Ch3 id=\"netzwerkeinstellungen\">Netzwerkeinstellungen\u003C/h3>\n\u003Cul>\n\u003Cli>Konfiguration über \u003Ccode>nmtui\u003C/code> oder \u003Ccode>/etc/network/interfaces\u003C/code>\u003C/li>\n\u003Cli>VPN und Proxy-Integration über GUI oder Terminal\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"updates--paketquellen\">Updates & Paketquellen\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apt\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> update\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> && \u003C/span>\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apt\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> full-upgrade\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Cblockquote>\n\u003Cp>Hinweis: \u003Ccode>kali-rolling\u003C/code> ist die Standard-Distribution für kontinuierliche Updates.\u003C/p>\n\u003C/blockquote>\n\u003Ch3 id=\"sprache--lokalisierung\">Sprache & Lokalisierung\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> dpkg-reconfigure\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> locales\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> dpkg-reconfigure\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> keyboard-configuration\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"verwendungsbeispiele\">Verwendungsbeispiele\u003C/h2>\n\u003Ch3 id=\"1-netzwerkscan-mit-nmap\">1. Netzwerkscan mit Nmap\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">nmap\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -sS\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -T4\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -A\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> 192.168.1.0/24\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"2-passwort-cracking-mit-john-the-ripper\">2. Passwort-Cracking mit John the Ripper\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">john\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --wordlist=/usr/share/wordlists/rockyou.txt\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> hashes.txt\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"3-forensik-mit-autopsy\">3. Forensik mit Autopsy\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">autopsy\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> &\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"4-android-analyse-mit-mobsf-in-docker\">4. Android-Analyse mit MobSF (in Docker)\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">docker\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> pull\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> opensecurity/mobile-security-framework-mobsf\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">docker\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> run\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -it\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -p\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> 8000:8000\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> mobsf\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"best-practices\">Best Practices\u003C/h2>\n\u003Cul>\n\u003Cli>Nutze immer \u003Cstrong>aktuelle Snapshots\u003C/strong> oder VM-Clones vor gefährlichen Tests\u003C/li>\n\u003Cli>Verwende separate Netzwerke (z. B. Host-only oder NAT) für Tests\u003C/li>\n\u003Cli>Deaktiviere automatisches WLAN bei forensischen Analysen\u003C/li>\n\u003Cli>Prüfe und aktualisiere regelmäßig Toolsets (\u003Ccode>apt\u003C/code>, \u003Ccode>git\u003C/code>, \u003Ccode>pip\u003C/code>)\u003C/li>\n\u003Cli>Halte deine ISO-Images versioniert für forensische Reproduzierbarkeit\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"troubleshooting\">Troubleshooting\u003C/h2>\n\u003Ch3 id=\"problem-keine-internetverbindung-nach-installation\">Problem: Keine Internetverbindung nach Installation\u003C/h3>\n\u003Cp>\u003Cstrong>Lösung:\u003C/strong> Netzwerkadapter prüfen, ggf. mit \u003Ccode>ifconfig\u003C/code> oder \u003Ccode>ip a\u003C/code> überprüfen, DHCP aktivieren.\u003C/p>\n\u003Ch3 id=\"problem-tools-fehlen-nach-update\">Problem: Tools fehlen nach Update\u003C/h3>\n\u003Cp>\u003Cstrong>Lösung:\u003C/strong> Tool-Gruppen wie \u003Ccode>kali-linux-default\u003C/code> manuell nachinstallieren:\u003C/p>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apt\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> install\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> kali-linux-default\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"problem-permission-denied-bei-tools\">Problem: „Permission Denied“ bei Tools\u003C/h3>\n\u003Cp>\u003Cstrong>Lösung:\u003C/strong> Root-Rechte nutzen oder mit \u003Ccode>sudo\u003C/code> ausführen.\u003C/p>\n\u003Ch2 id=\"weiterführende-themen\">Weiterführende Themen\u003C/h2>\n\u003Cul>\n\u003Cli>\u003Cstrong>Kustomisierung von Kali ISOs\u003C/strong> mit \u003Ccode>live-build\u003C/code>\u003C/li>\n\u003Cli>\u003Cstrong>NetHunter\u003C/strong>: Kali für mobile Geräte (Android)\u003C/li>\n\u003Cli>\u003Cstrong>Kali Purple\u003C/strong>: Defensive Security Suite\u003C/li>\n\u003Cli>Integration mit \u003Cstrong>Cloud-Infrastrukturen\u003C/strong> via WSL oder Azure\u003C/li>\n\u003C/ul>\n\u003Chr>\n\u003Cp>\u003Cstrong>Links & Ressourcen:\u003C/strong>\u003C/p>\n\u003Cul>\n\u003Cli>Offizielle Website: \u003Ca href=\"https://kali.org/\">https://kali.org\u003C/a>\u003C/li>\n\u003Cli>Dokumentation: \u003Ca href=\"https://docs.kali.org/\">https://docs.kali.org/\u003C/a>\u003C/li>\n\u003Cli>GitLab Repo: \u003Ca href=\"https://gitlab.com/kalilinux\">https://gitlab.com/kalilinux\u003C/a>\u003C/li>\n\u003Cli>Discord-Community: \u003Ca href=\"https://discord.com/invite/kali-linux\">https://discord.com/invite/kali-linux\u003C/a>\u003C/li>\n\u003C/ul>",{"headings":172,"localImagePaths":219,"remoteImagePaths":220,"frontmatter":151,"imagePaths":221},[173,174,175,178,181,184,185,188,191,194,195,198,201,204,207,208,209,212,215,218],{"depth":43,"slug":44,"text":45},{"depth":47,"slug":48,"text":49},{"depth":51,"slug":176,"text":177},"option-1-live-system-usbdvd","Option 1: Live-System (USB/DVD)",{"depth":51,"slug":179,"text":180},"option-2-installation-auf-festplatte","Option 2: Installation auf Festplatte",{"depth":51,"slug":182,"text":183},"option-3-virtuelle-maschine-vm","Option 3: Virtuelle Maschine (VM)",{"depth":47,"slug":58,"text":59},{"depth":51,"slug":186,"text":187},"netzwerkeinstellungen","Netzwerkeinstellungen",{"depth":51,"slug":189,"text":190},"updates--paketquellen","Updates & Paketquellen",{"depth":51,"slug":192,"text":193},"sprache--lokalisierung","Sprache & Lokalisierung",{"depth":47,"slug":70,"text":71},{"depth":51,"slug":196,"text":197},"1-netzwerkscan-mit-nmap","1. Netzwerkscan mit Nmap",{"depth":51,"slug":199,"text":200},"2-passwort-cracking-mit-john-the-ripper","2. Passwort-Cracking mit John the Ripper",{"depth":51,"slug":202,"text":203},"3-forensik-mit-autopsy","3. Forensik mit Autopsy",{"depth":51,"slug":205,"text":206},"4-android-analyse-mit-mobsf-in-docker","4. Android-Analyse mit MobSF (in Docker)",{"depth":47,"slug":79,"text":80},{"depth":47,"slug":82,"text":83},{"depth":51,"slug":210,"text":211},"problem-keine-internetverbindung-nach-installation","Problem: Keine Internetverbindung nach Installation",{"depth":51,"slug":213,"text":214},"problem-tools-fehlen-nach-update","Problem: Tools fehlen nach Update",{"depth":51,"slug":216,"text":217},"problem-permission-denied-bei-tools","Problem: „Permission Denied“ bei Tools",{"depth":47,"slug":94,"text":95},[],[],[],"kali-linux.md","velociraptor",{"id":223,"data":225,"body":239,"filePath":240,"digest":241,"rendered":242,"legacyId":287},{"title":226,"tool_name":227,"description":228,"last_updated":229,"author":16,"difficulty":230,"categories":231,"tags":232,"sections":238,"review_status":34},"Velociraptor – Skalierbare Endpoint-Forensik mit VQL","Velociraptor","Detaillierte Anleitung und Best Practices für Velociraptor – Remote-Forensik der nächsten Generation",["Date","2025-07-20T00:00:00.000Z"],"advanced",[19,21,22],[25,233,234,235,236,237],"endpoint-monitoring","artifact-extraction","scripting","live-forensics","hunting",{"overview":32,"installation":32,"configuration":32,"usage_examples":32,"best_practices":32,"troubleshooting":32,"advanced_topics":32},"> **⚠️ Hinweis**: Dies ist ein vorläufiger, KI-generierter Knowledgebase-Eintrag. Wir freuen uns über Verbesserungen und Ergänzungen durch die Community!\n\n\n# Übersicht\n\nVelociraptor ist ein Open-Source-Tool zur Endpoint-Forensik mit Fokus auf Skalierbarkeit, Präzision und Geschwindigkeit. Es ermöglicht die zielgerichtete Erfassung und Analyse digitaler Artefakte über eine eigene Query Language – VQL (Velociraptor Query Language). Die Architektur erlaubt remote Zugriff auf tausende Endpoints gleichzeitig, ohne dass vollständige Disk-Images erforderlich sind.\n\n## Hauptmerkmale\n\n- 🌐 Web-basierte Benutzeroberfläche\n- 💡 VQL – mächtige, SQL-ähnliche Abfragesprache\n- 🚀 Hochskalierbare Hunt-Funktionalität\n- 🔍 Artefaktbasierte Sammlung (ohne Full-Image)\n- 🖥️ Plattformunterstützung für Windows, macOS, Linux\n- 📦 Apache 2.0 Lizenz – Open Source\n\nWeitere Infos: [velociraptor.app](https://www.velociraptor.app/) \nProjektspiegel: [raptor.cc24.dev](https://raptor.cc24.dev) \nStatus: ![Status](https://status.mikoshi.de/api/badge/33/status)\n\n---\n\n## Installation\n\n### Voraussetzungen\n\n- Python ≥ 3.9\n- Adminrechte auf dem System\n- Firewall-Freigaben für Webport (Standard: 8000)\n\n### Installation unter Linux/macOS\n\n```bash\nwget https://github.com/Velocidex/velociraptor/releases/latest/download/velociraptor\nchmod +x velociraptor\nsudo mv velociraptor /usr/local/bin/\n````\n\n### Installation unter Windows\n\n1. Download der `.exe` von der [Release-Seite](https://github.com/Velocidex/velociraptor/releases)\n2. Ausführung in PowerShell mit Adminrechten:\n\n ```powershell\n .\\velociraptor.exe config generate > server.config.yaml\n ```\n\n---\n\n## Konfiguration\n\n### Server Setup\n\n1. Generiere die Konfigurationsdatei:\n\n ```bash\n velociraptor config generate > server.config.yaml\n ```\n2. Starte den Server:\n\n ```bash\n velociraptor --config server.config.yaml frontend\n ```\n3. Zugriff über Browser via `https://\u003Chostname>:8000`\n\n### Client Deployment\n\n* MSI/EXE für Windows, oder `deb/rpm` für Linux\n* Unterstützt automatische Registrierung am Server\n* Deployment über GPO, Puppet, Ansible etc. möglich\n\n---\n\n## Verwendungsbeispiele\n\n### 1. Live-Memory-Artefakte sammeln\n\n```vql\nSELECT * FROM Artifact.MemoryInfo()\n```\n\n### 2. Hunt starten auf verdächtige Prozesse\n\n```vql\nSELECT * FROM pslist()\nWHERE Name =~ \"mimikatz|cobaltstrike\"\n```\n\n### 3. Dateiinhalt extrahieren\n\n```vql\nSELECT * FROM glob(globs=\"C:\\\\Users\\\\*\\\\AppData\\\\*.dat\")\n```\n\n---\n\n## Best Practices\n\n* Erstelle eigene Artefakte für unternehmensspezifische Bedrohungsmodelle\n* Verwende \"Notebook\"-Funktion für strukturierte Analysen\n* Nutze \"Labels\", um Endpoints zu organisieren (z. B. `location:Berlin`)\n* Kombiniere Velociraptor mit SIEM/EDR-Systemen über REST API\n\n---\n\n## Troubleshooting\n\n### Problem: Keine Verbindung vom Client zum Server\n\n**Lösung:**\n\n* Ports freigegeben? (Default: 8000/tcp)\n* TLS-Zertifikate korrekt generiert?\n* `server.config.yaml` auf korrekte `public_ip` prüfen\n\n### Problem: Hunt hängt in Warteschleife\n\n**Lösung:**\n\n* Genügend Worker-Prozesse aktiv?\n* Endpoint online?\n* `log_level` auf `debug` setzen und Log analysieren\n\n---\n\n## Weiterführende Themen\n\n* Eigene Artefakte schreiben mit VQL\n* Integration mit ELK Stack\n* Automatisiertes Incident Response Playbook\n* Velociraptor als IR-as-a-Service einsetzen\n\n---\n\n🧠 **Tipp:** Die Lernkurve bei VQL ist steil – aber mit hohem ROI. Testumgebung aufsetzen und mit Community-Artefakten starten.\n\n📚 Weitere Ressourcen:\n\n* [Offizielle Doku](https://docs.velociraptor.app/)\n* [YouTube Channel](https://www.youtube.com/c/VelociraptorDFIR)\n* [Community auf Discord](https://www.velociraptor.app/community/)","src/content/knowledgebase/velociraptor.md","05636b9b97e61d17",{"html":243,"metadata":244},"\u003Cblockquote>\n\u003Cp>\u003Cstrong>⚠️ Hinweis\u003C/strong>: Dies ist ein vorläufiger, KI-generierter Knowledgebase-Eintrag. Wir freuen uns über Verbesserungen und Ergänzungen durch die Community!\u003C/p>\n\u003C/blockquote>\n\u003Ch1 id=\"übersicht\">Übersicht\u003C/h1>\n\u003Cp>Velociraptor ist ein Open-Source-Tool zur Endpoint-Forensik mit Fokus auf Skalierbarkeit, Präzision und Geschwindigkeit. Es ermöglicht die zielgerichtete Erfassung und Analyse digitaler Artefakte über eine eigene Query Language – VQL (Velociraptor Query Language). Die Architektur erlaubt remote Zugriff auf tausende Endpoints gleichzeitig, ohne dass vollständige Disk-Images erforderlich sind.\u003C/p>\n\u003Ch2 id=\"hauptmerkmale\">Hauptmerkmale\u003C/h2>\n\u003Cul>\n\u003Cli>🌐 Web-basierte Benutzeroberfläche\u003C/li>\n\u003Cli>💡 VQL – mächtige, SQL-ähnliche Abfragesprache\u003C/li>\n\u003Cli>🚀 Hochskalierbare Hunt-Funktionalität\u003C/li>\n\u003Cli>🔍 Artefaktbasierte Sammlung (ohne Full-Image)\u003C/li>\n\u003Cli>🖥️ Plattformunterstützung für Windows, macOS, Linux\u003C/li>\n\u003Cli>📦 Apache 2.0 Lizenz – Open Source\u003C/li>\n\u003C/ul>\n\u003Cp>Weitere Infos: \u003Ca href=\"https://www.velociraptor.app/\">velociraptor.app\u003C/a>\u003Cbr>\nProjektspiegel: \u003Ca href=\"https://raptor.cc24.dev\">raptor.cc24.dev\u003C/a>\u003Cbr>\nStatus: \u003Cimg src=\"https://status.mikoshi.de/api/badge/33/status\" alt=\"Status\">\u003C/p>\n\u003Chr>\n\u003Ch2 id=\"installation\">Installation\u003C/h2>\n\u003Ch3 id=\"voraussetzungen\">Voraussetzungen\u003C/h3>\n\u003Cul>\n\u003Cli>Python ≥ 3.9\u003C/li>\n\u003Cli>Adminrechte auf dem System\u003C/li>\n\u003Cli>Firewall-Freigaben für Webport (Standard: 8000)\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"installation-unter-linuxmacos\">Installation unter Linux/macOS\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">wget\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> https://github.com/Velocidex/velociraptor/releases/latest/download/velociraptor\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">chmod\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> +x\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> velociraptor\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> mv\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> velociraptor\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /usr/local/bin/\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"installation-unter-windows\">Installation unter Windows\u003C/h3>\n\u003Col>\n\u003Cli>\n\u003Cp>Download der \u003Ccode>.exe\u003C/code> von der \u003Ca href=\"https://github.com/Velocidex/velociraptor/releases\">Release-Seite\u003C/a>\u003C/p>\n\u003C/li>\n\u003Cli>\n\u003Cp>Ausführung in PowerShell mit Adminrechten:\u003C/p>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"powershell\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">.\\\u003C/span>\u003Cspan style=\"color:#79B8FF\">velociraptor.exe\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> config generate \u003C/span>\u003Cspan style=\"color:#F97583\">>\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> server.config.yaml\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003C/li>\n\u003C/ol>\n\u003Chr>\n\u003Ch2 id=\"konfiguration\">Konfiguration\u003C/h2>\n\u003Ch3 id=\"server-setup\">Server Setup\u003C/h3>\n\u003Col>\n\u003Cli>\n\u003Cp>Generiere die Konfigurationsdatei:\u003C/p>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">velociraptor\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> config\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> generate\u003C/span>\u003Cspan style=\"color:#F97583\"> >\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> server.config.yaml\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003C/li>\n\u003Cli>\n\u003Cp>Starte den Server:\u003C/p>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">velociraptor\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --config\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> server.config.yaml\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> frontend\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003C/li>\n\u003Cli>\n\u003Cp>Zugriff über Browser via \u003Ccode>https://<hostname>:8000\u003C/code>\u003C/p>\n\u003C/li>\n\u003C/ol>\n\u003Ch3 id=\"client-deployment\">Client Deployment\u003C/h3>\n\u003Cul>\n\u003Cli>MSI/EXE für Windows, oder \u003Ccode>deb/rpm\u003C/code> für Linux\u003C/li>\n\u003Cli>Unterstützt automatische Registrierung am Server\u003C/li>\n\u003Cli>Deployment über GPO, Puppet, Ansible etc. möglich\u003C/li>\n\u003C/ul>\n\u003Chr>\n\u003Ch2 id=\"verwendungsbeispiele\">Verwendungsbeispiele\u003C/h2>\n\u003Ch3 id=\"1-live-memory-artefakte-sammeln\">1. Live-Memory-Artefakte sammeln\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"plaintext\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan>SELECT * FROM Artifact.MemoryInfo()\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"2-hunt-starten-auf-verdächtige-prozesse\">2. Hunt starten auf verdächtige Prozesse\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"plaintext\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan>SELECT * FROM pslist()\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan>WHERE Name =~ \"mimikatz|cobaltstrike\"\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"3-dateiinhalt-extrahieren\">3. Dateiinhalt extrahieren\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"plaintext\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan>SELECT * FROM glob(globs=\"C:\\\\Users\\\\*\\\\AppData\\\\*.dat\")\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Chr>\n\u003Ch2 id=\"best-practices\">Best Practices\u003C/h2>\n\u003Cul>\n\u003Cli>Erstelle eigene Artefakte für unternehmensspezifische Bedrohungsmodelle\u003C/li>\n\u003Cli>Verwende “Notebook”-Funktion für strukturierte Analysen\u003C/li>\n\u003Cli>Nutze “Labels”, um Endpoints zu organisieren (z. B. \u003Ccode>location:Berlin\u003C/code>)\u003C/li>\n\u003Cli>Kombiniere Velociraptor mit SIEM/EDR-Systemen über REST API\u003C/li>\n\u003C/ul>\n\u003Chr>\n\u003Ch2 id=\"troubleshooting\">Troubleshooting\u003C/h2>\n\u003Ch3 id=\"problem-keine-verbindung-vom-client-zum-server\">Problem: Keine Verbindung vom Client zum Server\u003C/h3>\n\u003Cp>\u003Cstrong>Lösung:\u003C/strong>\u003C/p>\n\u003Cul>\n\u003Cli>Ports freigegeben? (Default: 8000/tcp)\u003C/li>\n\u003Cli>TLS-Zertifikate korrekt generiert?\u003C/li>\n\u003Cli>\u003Ccode>server.config.yaml\u003C/code> auf korrekte \u003Ccode>public_ip\u003C/code> prüfen\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"problem-hunt-hängt-in-warteschleife\">Problem: Hunt hängt in Warteschleife\u003C/h3>\n\u003Cp>\u003Cstrong>Lösung:\u003C/strong>\u003C/p>\n\u003Cul>\n\u003Cli>Genügend Worker-Prozesse aktiv?\u003C/li>\n\u003Cli>Endpoint online?\u003C/li>\n\u003Cli>\u003Ccode>log_level\u003C/code> auf \u003Ccode>debug\u003C/code> setzen und Log analysieren\u003C/li>\n\u003C/ul>\n\u003Chr>\n\u003Ch2 id=\"weiterführende-themen\">Weiterführende Themen\u003C/h2>\n\u003Cul>\n\u003Cli>Eigene Artefakte schreiben mit VQL\u003C/li>\n\u003Cli>Integration mit ELK Stack\u003C/li>\n\u003Cli>Automatisiertes Incident Response Playbook\u003C/li>\n\u003Cli>Velociraptor als IR-as-a-Service einsetzen\u003C/li>\n\u003C/ul>\n\u003Chr>\n\u003Cp>🧠 \u003Cstrong>Tipp:\u003C/strong> Die Lernkurve bei VQL ist steil – aber mit hohem ROI. Testumgebung aufsetzen und mit Community-Artefakten starten.\u003C/p>\n\u003Cp>📚 Weitere Ressourcen:\u003C/p>\n\u003Cul>\n\u003Cli>\u003Ca href=\"https://docs.velociraptor.app/\">Offizielle Doku\u003C/a>\u003C/li>\n\u003Cli>\u003Ca href=\"https://www.youtube.com/c/VelociraptorDFIR\">YouTube Channel\u003C/a>\u003C/li>\n\u003Cli>\u003Ca href=\"https://www.velociraptor.app/community/\">Community auf Discord\u003C/a>\u003C/li>\n\u003C/ul>",{"headings":245,"localImagePaths":284,"remoteImagePaths":285,"frontmatter":225,"imagePaths":286},[246,247,250,251,252,255,258,259,262,265,266,269,272,275,276,277,280,283],{"depth":43,"slug":44,"text":45},{"depth":47,"slug":248,"text":249},"hauptmerkmale","Hauptmerkmale",{"depth":47,"slug":48,"text":49},{"depth":51,"slug":52,"text":53},{"depth":51,"slug":253,"text":254},"installation-unter-linuxmacos","Installation unter Linux/macOS",{"depth":51,"slug":256,"text":257},"installation-unter-windows","Installation unter Windows",{"depth":47,"slug":58,"text":59},{"depth":51,"slug":260,"text":261},"server-setup","Server Setup",{"depth":51,"slug":263,"text":264},"client-deployment","Client Deployment",{"depth":47,"slug":70,"text":71},{"depth":51,"slug":267,"text":268},"1-live-memory-artefakte-sammeln","1. Live-Memory-Artefakte sammeln",{"depth":51,"slug":270,"text":271},"2-hunt-starten-auf-verdächtige-prozesse","2. Hunt starten auf verdächtige Prozesse",{"depth":51,"slug":273,"text":274},"3-dateiinhalt-extrahieren","3. Dateiinhalt extrahieren",{"depth":47,"slug":79,"text":80},{"depth":47,"slug":82,"text":83},{"depth":51,"slug":278,"text":279},"problem-keine-verbindung-vom-client-zum-server","Problem: Keine Verbindung vom Client zum Server",{"depth":51,"slug":281,"text":282},"problem-hunt-hängt-in-warteschleife","Problem: Hunt hängt in Warteschleife",{"depth":47,"slug":94,"text":95},[],[],[],"velociraptor.md","nextcloud",{"id":288,"data":290,"body":304,"filePath":305,"digest":306,"rendered":307,"legacyId":343},{"title":291,"tool_name":292,"description":293,"last_updated":294,"author":16,"difficulty":295,"categories":296,"tags":298,"sections":303,"review_status":34},"Nextcloud - Sichere Kollaborationsplattform","Nextcloud","Detaillierte Anleitung und Best Practices für Nextcloud in forensischen Einsatzszenarien",["Date","2025-07-20T00:00:00.000Z"],"novice",[297],"collaboration-general",[25,299,300,27,301,302],"collaboration","file-sharing","encryption","document-management",{"overview":32,"installation":32,"configuration":32,"usage_examples":32,"best_practices":32,"troubleshooting":32,"advanced_topics":33},"> **⚠️ Hinweis**: Dies ist ein vorläufiger, KI-generierter Knowledgebase-Eintrag. Wir freuen uns über Verbesserungen und Ergänzungen durch die Community!\n\n\n# Übersicht\n\nNextcloud ist eine Open-Source-Cloud-Suite, die speziell für die sichere Zusammenarbeit entwickelt wurde. Sie eignet sich ideal für forensische Teams, da sie eine DSGVO-konforme Umgebung mit verschlüsselter Dateiablage, Office-Integration und Videokonferenzen bereitstellt. Zusätzlich bietet Nextcloud einen integrierten SSO-Provider, der das Identitätsmanagement für andere forensische Tools stark vereinfacht.\n\nSkalierbar von kleinen Raspberry-Pi-Installationen bis hin zu hochverfügbaren Multi-Node-Setups.\n\n- **Website:** [nextcloud.com](https://nextcloud.com/)\n- **Demo/Projektinstanz:** [cloud.cc24.dev](https://cloud.cc24.dev)\n- **Statusseite:** [Mikoshi Status](https://status.mikoshi.de/api/badge/11/status)\n- **Lizenz:** AGPL-3.0\n\n---\n\n## Installation\n\n### Voraussetzungen\n\n- Linux-Server oder Raspberry Pi\n- PHP 8.1 oder höher\n- MariaDB/PostgreSQL\n- Webserver (Apache/Nginx)\n- SSL-Zertifikat (empfohlen: Let's Encrypt)\n\n### Installationsschritte (Ubuntu Beispiel)\n\n```bash\nsudo apt update && sudo apt upgrade\nsudo apt install apache2 mariadb-server libapache2-mod-php php php-mysql \\\n php-gd php-xml php-mbstring php-curl php-zip php-intl php-bcmath unzip\n\nwget https://download.nextcloud.com/server/releases/latest.zip\nunzip latest.zip -d /var/www/\nchown -R www-data:www-data /var/www/nextcloud\n````\n\nDanach den Web-Installer im Browser aufrufen (`https://\u003Cyour-domain>/nextcloud`) und Setup abschließen.\n\n## Konfiguration\n\n* **Trusted Domains** in `config.php` definieren\n* SSO mit OpenID Connect aktivieren\n* Dateiverschlüsselung aktivieren (`Settings → Security`)\n* Benutzer und Gruppen über LDAP oder SAML integrieren\n\n## Verwendungsbeispiele\n\n### Gemeinsame Fallbearbeitung\n\n1. Ermittlungsordner als geteiltes Gruppenverzeichnis anlegen\n2. Versionierung und Kommentare zu forensischen Berichten aktivieren\n3. Vorschau für Office-Dateien, PDFs und Bilder direkt im Browser nutzen\n\n### Videokonferenzen mit \"Nextcloud Talk\"\n\n* Sichere Kommunikation zwischen Ermittlern und Sachverständigen\n* Ende-zu-Ende-verschlüsselt\n* Bildschirmfreigabe möglich\n\n### Automatischer Dateiimport per API\n\n* REST-Schnittstelle nutzen, um z. B. automatisch Logdateien oder Exportdaten hochzuladen\n* Ideal für Anbindung an SIEM, DLP oder Analyse-Pipelines\n\n## Best Practices\n\n* Zwei-Faktor-Authentifizierung aktivieren\n* Tägliche Backups der Datenbank und Datenstruktur\n* Nutzung von OnlyOffice oder Collabora für revisionssichere Dokumentenbearbeitung\n* Zugriff regelmäßig überprüfen, insbesondere bei externen Partnern\n\n## Troubleshooting\n\n### Problem: Langsame Performance\n\n**Lösung:** APCu aktivieren und Caching optimieren (`config.php → 'memcache.local'`).\n\n### Problem: Dateien erscheinen nicht im Sync\n\n**Lösung:** Cronjob für `files:scan` konfigurieren oder manuell ausführen:\n\n```bash\nsudo -u www-data php /var/www/nextcloud/occ files:scan --all\n```\n\n### Problem: Fehlermeldung \"Trusted domain not set\"\n\n**Lösung:** In `config/config.php` Eintrag `trusted_domains` korrekt konfigurieren:\n\n```php\n'trusted_domains' =>\n array (\n 0 => 'yourdomain.tld',\n 1 => 'cloud.cc24.dev',\n ),\n```\n\n## Weiterführende Themen\n\n* **Integration mit Forensik-Plattformen** (über WebDAV, API oder SSO)\n* **Custom Apps entwickeln** für spezielle Ermittlungs-Workflows\n* **Auditing aktivieren**: Nutzung und Änderungen nachvollziehen mit Protokollierungsfunktionen","src/content/knowledgebase/nextcloud.md","9294074e6083e37b",{"html":308,"metadata":309},"\u003Cblockquote>\n\u003Cp>\u003Cstrong>⚠️ Hinweis\u003C/strong>: Dies ist ein vorläufiger, KI-generierter Knowledgebase-Eintrag. Wir freuen uns über Verbesserungen und Ergänzungen durch die Community!\u003C/p>\n\u003C/blockquote>\n\u003Ch1 id=\"übersicht\">Übersicht\u003C/h1>\n\u003Cp>Nextcloud ist eine Open-Source-Cloud-Suite, die speziell für die sichere Zusammenarbeit entwickelt wurde. Sie eignet sich ideal für forensische Teams, da sie eine DSGVO-konforme Umgebung mit verschlüsselter Dateiablage, Office-Integration und Videokonferenzen bereitstellt. Zusätzlich bietet Nextcloud einen integrierten SSO-Provider, der das Identitätsmanagement für andere forensische Tools stark vereinfacht.\u003C/p>\n\u003Cp>Skalierbar von kleinen Raspberry-Pi-Installationen bis hin zu hochverfügbaren Multi-Node-Setups.\u003C/p>\n\u003Cul>\n\u003Cli>\u003Cstrong>Website:\u003C/strong> \u003Ca href=\"https://nextcloud.com/\">nextcloud.com\u003C/a>\u003C/li>\n\u003Cli>\u003Cstrong>Demo/Projektinstanz:\u003C/strong> \u003Ca href=\"https://cloud.cc24.dev\">cloud.cc24.dev\u003C/a>\u003C/li>\n\u003Cli>\u003Cstrong>Statusseite:\u003C/strong> \u003Ca href=\"https://status.mikoshi.de/api/badge/11/status\">Mikoshi Status\u003C/a>\u003C/li>\n\u003Cli>\u003Cstrong>Lizenz:\u003C/strong> AGPL-3.0\u003C/li>\n\u003C/ul>\n\u003Chr>\n\u003Ch2 id=\"installation\">Installation\u003C/h2>\n\u003Ch3 id=\"voraussetzungen\">Voraussetzungen\u003C/h3>\n\u003Cul>\n\u003Cli>Linux-Server oder Raspberry Pi\u003C/li>\n\u003Cli>PHP 8.1 oder höher\u003C/li>\n\u003Cli>MariaDB/PostgreSQL\u003C/li>\n\u003Cli>Webserver (Apache/Nginx)\u003C/li>\n\u003Cli>SSL-Zertifikat (empfohlen: Let’s Encrypt)\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"installationsschritte-ubuntu-beispiel\">Installationsschritte (Ubuntu Beispiel)\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apt\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> update\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> && \u003C/span>\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apt\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> upgrade\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apt\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> install\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apache2\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> mariadb-server\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> libapache2-mod-php\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> php\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> php-mysql\u003C/span>\u003Cspan style=\"color:#79B8FF\"> \\\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#9ECBFF\"> php-gd\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> php-xml\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> php-mbstring\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> php-curl\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> php-zip\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> php-intl\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> php-bcmath\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> unzip\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">wget\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> https://download.nextcloud.com/server/releases/latest.zip\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">unzip\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> latest.zip\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -d\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /var/www/\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">chown\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -R\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> www-data:www-data\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /var/www/nextcloud\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Cp>Danach den Web-Installer im Browser aufrufen (\u003Ccode>https://<your-domain>/nextcloud\u003C/code>) und Setup abschließen.\u003C/p>\n\u003Ch2 id=\"konfiguration\">Konfiguration\u003C/h2>\n\u003Cul>\n\u003Cli>\u003Cstrong>Trusted Domains\u003C/strong> in \u003Ccode>config.php\u003C/code> definieren\u003C/li>\n\u003Cli>SSO mit OpenID Connect aktivieren\u003C/li>\n\u003Cli>Dateiverschlüsselung aktivieren (\u003Ccode>Settings → Security\u003C/code>)\u003C/li>\n\u003Cli>Benutzer und Gruppen über LDAP oder SAML integrieren\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"verwendungsbeispiele\">Verwendungsbeispiele\u003C/h2>\n\u003Ch3 id=\"gemeinsame-fallbearbeitung\">Gemeinsame Fallbearbeitung\u003C/h3>\n\u003Col>\n\u003Cli>Ermittlungsordner als geteiltes Gruppenverzeichnis anlegen\u003C/li>\n\u003Cli>Versionierung und Kommentare zu forensischen Berichten aktivieren\u003C/li>\n\u003Cli>Vorschau für Office-Dateien, PDFs und Bilder direkt im Browser nutzen\u003C/li>\n\u003C/ol>\n\u003Ch3 id=\"videokonferenzen-mit-nextcloud-talk\">Videokonferenzen mit “Nextcloud Talk”\u003C/h3>\n\u003Cul>\n\u003Cli>Sichere Kommunikation zwischen Ermittlern und Sachverständigen\u003C/li>\n\u003Cli>Ende-zu-Ende-verschlüsselt\u003C/li>\n\u003Cli>Bildschirmfreigabe möglich\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"automatischer-dateiimport-per-api\">Automatischer Dateiimport per API\u003C/h3>\n\u003Cul>\n\u003Cli>REST-Schnittstelle nutzen, um z. B. automatisch Logdateien oder Exportdaten hochzuladen\u003C/li>\n\u003Cli>Ideal für Anbindung an SIEM, DLP oder Analyse-Pipelines\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"best-practices\">Best Practices\u003C/h2>\n\u003Cul>\n\u003Cli>Zwei-Faktor-Authentifizierung aktivieren\u003C/li>\n\u003Cli>Tägliche Backups der Datenbank und Datenstruktur\u003C/li>\n\u003Cli>Nutzung von OnlyOffice oder Collabora für revisionssichere Dokumentenbearbeitung\u003C/li>\n\u003Cli>Zugriff regelmäßig überprüfen, insbesondere bei externen Partnern\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"troubleshooting\">Troubleshooting\u003C/h2>\n\u003Ch3 id=\"problem-langsame-performance\">Problem: Langsame Performance\u003C/h3>\n\u003Cp>\u003Cstrong>Lösung:\u003C/strong> APCu aktivieren und Caching optimieren (\u003Ccode>config.php → 'memcache.local'\u003C/code>).\u003C/p>\n\u003Ch3 id=\"problem-dateien-erscheinen-nicht-im-sync\">Problem: Dateien erscheinen nicht im Sync\u003C/h3>\n\u003Cp>\u003Cstrong>Lösung:\u003C/strong> Cronjob für \u003Ccode>files:scan\u003C/code> konfigurieren oder manuell ausführen:\u003C/p>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -u\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> www-data\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> php\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /var/www/nextcloud/occ\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> files:scan\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --all\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"problem-fehlermeldung-trusted-domain-not-set\">Problem: Fehlermeldung “Trusted domain not set”\u003C/h3>\n\u003Cp>\u003Cstrong>Lösung:\u003C/strong> In \u003Ccode>config/config.php\u003C/code> Eintrag \u003Ccode>trusted_domains\u003C/code> korrekt konfigurieren:\u003C/p>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"php\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#9ECBFF\">'trusted_domains'\u003C/span>\u003Cspan style=\"color:#F97583\"> =>\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\"> array\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> (\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\"> 0\u003C/span>\u003Cspan style=\"color:#F97583\"> =>\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> 'yourdomain.tld'\u003C/span>\u003Cspan style=\"color:#E1E4E8\">,\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\"> 1\u003C/span>\u003Cspan style=\"color:#F97583\"> =>\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> 'cloud.cc24.dev'\u003C/span>\u003Cspan style=\"color:#E1E4E8\">,\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\"> ),\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"weiterführende-themen\">Weiterführende Themen\u003C/h2>\n\u003Cul>\n\u003Cli>\u003Cstrong>Integration mit Forensik-Plattformen\u003C/strong> (über WebDAV, API oder SSO)\u003C/li>\n\u003Cli>\u003Cstrong>Custom Apps entwickeln\u003C/strong> für spezielle Ermittlungs-Workflows\u003C/li>\n\u003Cli>\u003Cstrong>Auditing aktivieren\u003C/strong>: Nutzung und Änderungen nachvollziehen mit Protokollierungsfunktionen\u003C/li>\n\u003C/ul>",{"headings":310,"localImagePaths":340,"remoteImagePaths":341,"frontmatter":290,"imagePaths":342},[311,312,313,314,317,318,319,322,325,328,329,330,333,336,339],{"depth":43,"slug":44,"text":45},{"depth":47,"slug":48,"text":49},{"depth":51,"slug":52,"text":53},{"depth":51,"slug":315,"text":316},"installationsschritte-ubuntu-beispiel","Installationsschritte (Ubuntu Beispiel)",{"depth":47,"slug":58,"text":59},{"depth":47,"slug":70,"text":71},{"depth":51,"slug":320,"text":321},"gemeinsame-fallbearbeitung","Gemeinsame Fallbearbeitung",{"depth":51,"slug":323,"text":324},"videokonferenzen-mit-nextcloud-talk","Videokonferenzen mit “Nextcloud Talk”",{"depth":51,"slug":326,"text":327},"automatischer-dateiimport-per-api","Automatischer Dateiimport per API",{"depth":47,"slug":79,"text":80},{"depth":47,"slug":82,"text":83},{"depth":51,"slug":331,"text":332},"problem-langsame-performance","Problem: Langsame Performance",{"depth":51,"slug":334,"text":335},"problem-dateien-erscheinen-nicht-im-sync","Problem: Dateien erscheinen nicht im Sync",{"depth":51,"slug":337,"text":338},"problem-fehlermeldung-trusted-domain-not-set","Problem: Fehlermeldung “Trusted domain not set”",{"depth":47,"slug":94,"text":95},[],[],[],"nextcloud.md","android-logical-imaging",{"id":344,"data":346,"body":359,"filePath":360,"digest":361,"rendered":362,"legacyId":590},{"title":347,"tool_name":348,"description":349,"last_updated":350,"author":351,"difficulty":230,"categories":352,"tags":354,"sections":358,"review_status":34},"Extraktion logischer Dateisysteme alter Android-Smartphones - eine KI-Recherche","Android Logical Imaging","Wie man alte Android-Handys aufbekommen könnte - eine Recherche von Claude",["Date","2025-07-21T00:00:00.000Z"],"Claude 4 Sonnet (Research)",[353],"data-collection",[355,356,357],"imaging","filesystem","hardware-interface",{"overview":32,"installation":32,"configuration":32,"usage_examples":32,"best_practices":32,"troubleshooting":32,"advanced_topics":32},"# Übersicht\n\nOpen-Source Android Forensik bietet robuste Alternativen zu kommerziellen Lösungen wie Cellebrite UFED und Magnet AXIOM. Besonders für ältere Android-Geräte (5+ Jahre) existieren bewährte Methoden zur Datenextraktion und -analyse.\n\n## Kernkomponenten des Open-Source Forensik-Stacks\n\n**Autopsy Digital Forensics Platform** bildet das Fundament mit GUI-basierter Analyse und integrierten Android-Parsing-Fähigkeiten. Die Plattform unterstützt **ALEAPP (Android Logs Events And Protobuf Parser)**, das über 100 Artefakt-Kategorien aus Android-Extraktionen parst.\n\n**Mobile Verification Toolkit (MVT)** von Amnesty International bietet spezialisierte Command-Line-Tools für Android-Analyse mit Fokus auf Kompromittierungserkennung.\n\n**SIFT Workstation** stellt eine komplette Ubuntu-basierte forensische Umgebung mit 125+ vorinstallierten Tools bereit.\n\n## Erfolgsraten nach Gerätealter\n\n- **Pre-2017 Geräte**: 85-98% logische Extraktion, 30-70% physische Extraktion\n- **2017-2019 Geräte**: 80-95% logische Extraktion, 15-35% physische Extraktion \n- **2020+ Geräte**: 70-85% logische Extraktion, 5-15% physische Extraktion\n\n# Installation\n\n## SIFT Workstation Setup\n\n### Systemanforderungen\n- Quad-Core CPU 2.5GHz+\n- 16GB+ RAM\n- 500GB+ SSD Speicher\n- USB 3.0+ Anschlüsse\n\n### Installation\n1. Download von [SANS SIFT Workstation](https://www.sans.org/tools/sift-workstation/)\n2. VMware/VirtualBox Import der OVA-Datei\n3. VM-Konfiguration: 8GB+ RAM, 4+ CPU-Kerne\n\n```bash\n# Update nach Installation\nsudo apt update && sudo apt upgrade -y\nsudo sift update\n```\n\n## Autopsy Installation\n\n### Windows Installation\n1. Download von [autopsy.com](https://www.autopsy.com/)\n2. Java 8+ Installation erforderlich\n3. Installation mit Administratorrechten\n\n### Linux Installation\n```bash\n# Ubuntu/Debian\nsudo apt install autopsy sleuthkit\n# Oder manueller Download und Installation\nwget https://github.com/sleuthkit/autopsy/releases/latest\n```\n\n## Essential Tools Installation\n\n### Android Debug Bridge (ADB)\n```bash\n# Ubuntu/Debian\nsudo apt install android-tools-adb android-tools-fastboot\n\n# Windows - Download Android Platform Tools\n# https://developer.android.com/studio/releases/platform-tools\n```\n\n### ALEAPP Installation\n```bash\ngit clone https://github.com/abrignoni/ALEAPP.git\ncd ALEAPP\npip3 install -r requirements.txt\n```\n\n### Mobile Verification Toolkit (MVT)\n```bash\npip3 install mvt\n# Oder via GitHub für neueste Version\ngit clone https://github.com/mvt-project/mvt.git\ncd mvt && pip3 install .\n```\n\n### Andriller Installation\n```bash\ngit clone https://github.com/den4uk/andriller.git\ncd andriller\npip3 install -r requirements.txt\n```\n\n# Konfiguration\n\n## ADB Setup und Gerätevorbereitung\n\n### USB-Debugging aktivieren\n1. Entwickleroptionen freischalten (7x Build-Nummer antippen)\n2. USB-Debugging aktivieren\n3. Gerät via USB verbinden\n4. RSA-Fingerprint akzeptieren\n\n### ADB Verbindung testen\n```bash\nadb devices\n# Sollte Gerät mit \"device\" Status zeigen\nadb shell getprop ro.build.version.release # Android Version\nadb shell getprop ro.product.model # Gerätemodell\n```\n\n## Autopsy Projektkonfiguration\n\n### Case-Setup\n1. Neuen Fall erstellen\n2. Ermittler-Informationen eingeben\n3. Case-Verzeichnis festlegen (ausreichend Speicherplatz)\n\n### Android Analyzer Module aktivieren\n- Tools → Options → Modules\n- Android Analyzer aktivieren\n- ALEAPP Integration konfigurieren\n\n### Hash-Algorithmen konfigurieren\n- MD5, SHA-1, SHA-256 für Integritätsprüfung\n- Automatische Hash-Berechnung bei Import aktivieren\n\n## MVT Konfiguration\n\n### Konfigurationsdatei erstellen\n```yaml\n# ~/.mvt/config.yaml\nadb_path: \"/usr/bin/adb\"\noutput_folder: \"/home/user/mvt_output\"\n```\n\n# Verwendungsbeispiele\n\n## Fall 1: Logische Datenextraktion mit ADB\n\n### Geräteinformationen sammeln\n```bash\n# Systeminfo\nadb shell getprop > device_properties.txt\nadb shell cat /proc/version > kernel_info.txt\nadb shell mount > mount_info.txt\n\n# Installierte Apps\nadb shell pm list packages -f > installed_packages.txt\n```\n\n### Datenbank-Extraktion\n```bash\n# SMS/MMS Datenbank\nadb pull /data/data/com.android.providers.telephony/databases/mmssms.db\n\n# Kontakte\nadb pull /data/data/com.android.providers.contacts/databases/contacts2.db\n\n# Anrufliste \nadb pull /data/data/com.android.providers.contacts/databases/calllog.db\n```\n\n### WhatsApp Datenextraktion\n```bash\n# WhatsApp Datenbanken (Root erforderlich)\nadb shell su -c \"cp -r /data/data/com.whatsapp/ /sdcard/whatsapp_backup/\"\nadb pull /sdcard/whatsapp_backup/\n```\n\n## Fall 2: Android Backup-Analyse\n\n### Vollständiges Backup erstellen\n```bash\n# Umfassendes Backup (ohne Root)\nadb backup -all -system -apk -shared -f backup.ab\n\n# Backup entschlüsseln (falls verschlüsselt)\njava -jar abe.jar unpack backup.ab backup.tar\ntar -xf backup.tar\n```\n\n### Backup mit ALEAPP analysieren\n```bash\npython3 aleappGUI.py\n# Oder Command-Line\npython3 aleapp.py -t tar -i backup.tar -o output_folder\n```\n\n## Fall 3: MVT Kompromittierungsanalyse\n\n### Live-Geräteanalyse\n```bash\n# ADB-basierte Analyse\nmvt-android check-adb --output /path/to/output/\n\n# Backup-Analyse\nmvt-android check-backup --output /path/to/output/ backup.ab\n```\n\n### IOC-Suche mit Pegasus-Indikatoren\n```bash\n# Mit vorgefertigten IOCs\nmvt-android check-adb --iocs /path/to/pegasus.stix2 --output results/\n```\n\n## Fall 4: Physische Extraktion (Root erforderlich)\n\n### Device Rooting - MediaTek Geräte\n```bash\n# MTKClient für MediaTek-Chipsets\ngit clone https://github.com/bkerler/mtkclient.git\ncd mtkclient\npython3 mtk payload\n\n# Nach erfolgreichem Root\nadb shell su\n```\n\n### Vollständiges Memory Dump\n```bash\n# Partitionslayout ermitteln\nadb shell su -c \"cat /proc/partitions\"\nadb shell su -c \"ls -la /dev/block/\"\n\n# Vollständiges Device Image (Root erforderlich)\nadb shell su -c \"dd if=/dev/block/mmcblk0 of=/sdcard/full_device.img bs=4096\"\nadb pull /sdcard/full_device.img\n```\n\n# Best Practices\n\n## Rechtliche Compliance\n\n### Dokumentation und Chain of Custody\n- **Vollständige Dokumentation**: Wer, Was, Wann, Wo, Warum\n- **Hash-Verifikation**: MD5/SHA-256 für alle extrahierten Daten\n- **Nur forensische Kopien analysieren**, niemals Originaldaten\n- **Schriftliche Genehmigung** für Geräteanalyse einholen\n\n### Familiengeräte und Nachlässe\n- Genehmigung durch Nachlassverwalter erforderlich\n- Gerichtsbeschlüsse für Cloud-Zugang eventuell nötig\n- Drittpartei-Kommunikation kann weiterhin geschützt sein\n\n## Technische Best Practices\n\n### Hash-Integrität sicherstellen\n```bash\n# Hash vor und nach Transfer prüfen\nmd5sum original_file.db\nsha256sum original_file.db\n\n# Hash-Verifikation dokumentieren\necho \"$(date): MD5: $(md5sum file.db)\" >> chain_of_custody.log\n```\n\n### Sichere Arbeitsumgebung\n- Isolierte VM für Forensik-Arbeit\n- Netzwerk-Isolation während Analyse\n- Verschlüsselte Speicherung aller Evidenz\n- Regelmäßige Backups der Case-Datenbanken\n\n### Qualitätssicherung\n- Peer-Review kritischer Analysen\n- Standardisierte Arbeitsabläufe (SOPs)\n- Regelmäßige Tool-Validierung\n- Kontinuierliche Weiterbildung\n\n## Erfolgsmaximierung nach Gerätehersteller\n\n### MediaTek-Geräte (Höchste Erfolgsrate)\n- BootROM-Exploits für MT6735, MT6737, MT6750, MT6753, MT6797\n- MTKClient für Hardware-Level-Zugang\n- Erfolgsrate: 80%+ für Geräte 2015-2019\n\n### Samsung-Geräte\n- Ältere Knox-Implementierungen umgehbar\n- Emergency Dialer Exploits für Android 4.x\n- Erfolgsrate: 40-70% je nach Knox-Version\n\n### Pixel/Nexus-Geräte\n- Bootloader-Unlocking oft möglich\n- Fastboot-basierte Recovery-Installation\n- Erfolgsrate: 60-80% bei freigeschaltetem Bootloader\n\n# Troubleshooting\n\n## Problem: ADB erkennt Gerät nicht\n\n### Lösung: USB-Treiber und Berechtigungen\n```bash\n# Linux: USB-Berechtigungen prüfen\nlsusb | grep -i android\nsudo chmod 666 /dev/bus/usb/XXX/XXX\n\n# udev-Regeln erstellen\necho 'SUBSYSTEM==\"usb\", ATTR{idVendor}==\"18d1\", MODE=\"0666\", GROUP=\"plugdev\"' | sudo tee /etc/udev/rules.d/51-android.rules\nsudo udevadm control --reload-rules\n```\n\n### Windows: Treiber-Installation\n1. Geräte-Manager öffnen\n2. Android-Gerät mit Warnsymbol finden\n3. Treiber manuell installieren (Android USB Driver)\n\n## Problem: Verschlüsselte Android Backups\n\n### Lösung: Android Backup Extractor\n```bash\n# ADB Backup Extractor installieren\ngit clone https://github.com/nelenkov/android-backup-extractor.git\ncd android-backup-extractor\ngradle build\n\n# Backup entschlüsseln\njava -jar abe.jar unpack backup.ab backup.tar [password]\n```\n\n## Problem: Unzureichende Berechtigungen für Datenextraktion\n\n### Lösung: Alternative Extraktionsmethoden\n```bash\n# AFLogical OSE für begrenzte Extraktion ohne Root\n# WhatsApp Key/DB Extractor für spezifische Apps\n# Backup-basierte Extraktion als Fallback\n\n# Custom Recovery für erweiterten Zugang\nfastboot flash recovery twrp-device.img\n```\n\n## Problem: ALEAPP Parsing-Fehler\n\n### Lösung: Datenformat-Probleme beheben\n```bash\n# Log-Dateien prüfen\npython3 aleapp.py -t dir -i /path/to/data -o output --debug\n\n# Spezifische Parser deaktivieren\n# Manuelle SQLite-Analyse bei Parser-Fehlern\nsqlite3 database.db \".tables\"\nsqlite3 database.db \".schema table_name\"\n```\n\n# Erweiterte Techniken\n\n## Memory Forensics mit LiME\n\n### LiME für ARM-Devices kompilieren\n```bash\n# Cross-Compilation Setup\nexport ARCH=arm\nexport CROSS_COMPILE=arm-linux-gnueabi-\nexport KERNEL_DIR=/path/to/kernel/source\n\n# LiME Module kompilieren\ngit clone https://github.com/504ensicsLabs/LiME.git\ncd LiME/src\nmake\n\n# Memory Dump erstellen (Root erforderlich)\nadb push lime.ko /data/local/tmp/\nadb shell su -c \"insmod /data/local/tmp/lime.ko 'path=/sdcard/memory.lime format=lime'\"\n```\n\n### Volatility-Analyse von Android Memory\n```bash\n# Memory Dump analysieren\npython vol.py -f memory.lime --profile=Linux \u003Cprofile> linux.pslist\npython vol.py -f memory.lime --profile=Linux \u003Cprofile> linux.bash\npython vol.py -f memory.lime --profile=Linux \u003Cprofile> linux.netstat\n```\n\n## FRIDA-basierte Runtime-Analyse\n\n### FRIDA für Kryptographie-Hooks\n```javascript\n// crypto_hooks.js - SSL/TLS Traffic abfangen\nJava.perform(function() {\n var SSLContext = Java.use(\"javax.net.ssl.SSLContext\");\n SSLContext.init.overload('[Ljavax.net.ssl.KeyManager;', '[Ljavax.net.ssl.TrustManager;', 'java.security.SecureRandom').implementation = function(keyManagers, trustManagers, secureRandom) {\n console.log(\"[+] SSLContext.init() called\");\n this.init(keyManagers, trustManagers, secureRandom);\n };\n});\n```\n\n### FRIDA Installation und Verwendung\n```bash\n# FRIDA Server auf Android-Gerät installieren\nadb push frida-server /data/local/tmp/\nadb shell su -c \"chmod 755 /data/local/tmp/frida-server\"\nadb shell su -c \"/data/local/tmp/frida-server &\"\n\n# Script ausführen\nfrida -U -l crypto_hooks.js com.target.package\n```\n\n## Custom Recovery und Fastboot-Exploits\n\n### TWRP Installation für forensischen Zugang\n```bash\n# Bootloader entsperren (Herstellerabhängig)\nfastboot oem unlock\n# Oder\nfastboot flashing unlock\n\n# TWRP flashen\nfastboot flash recovery twrp-device.img\nfastboot boot twrp-device.img # Temporäre Installation\n\n# In TWRP: ADB-Zugang mit Root-Berechtigungen\nadb shell mount /system\nadb shell mount /data\n```\n\n### Partitions-Imaging mit dd\n```bash\n# Vollständige Partition-Liste\nadb shell cat /proc/partitions\n\n# Kritische Partitionen extrahieren\nadb shell dd if=/dev/block/bootdevice/by-name/system of=/external_sd/system.img\nadb shell dd if=/dev/block/bootdevice/by-name/userdata of=/external_sd/userdata.img\nadb shell dd if=/dev/block/bootdevice/by-name/boot of=/external_sd/boot.img\n```\n\n## SQLite Forensics und gelöschte Daten\n\n### Erweiterte SQLite-Analyse\n```bash\n# Freelist-Analyse für gelöschte Einträge\nsqlite3 database.db \"PRAGMA freelist_count;\"\nsqlite3 database.db \"PRAGMA page_size;\"\n\n# WAL-Datei Analyse\nsqlite3 database.db \"PRAGMA wal_checkpoint;\"\nstrings database.db-wal | grep -i \"search_term\"\n\n# Undark für Deleted Record Recovery\nundark database.db --freelist --export-csv\n```\n\n### Timeline-Rekonstruktion\n```bash\n# Autopsy Timeline-Generierung\n# Tools → Generate Timeline\n# Analyse von MAC-Times (Modified, Accessed, Created)\n\n# Plaso Timeline-Tools\nlog2timeline.py timeline.plaso /path/to/android/data/\npsort.py -o dynamic timeline.plaso\n```\n\n## Weiterführende Ressourcen\n\n### Dokumentation und Standards\n- [NIST SP 800-101 Rev. 1 - Mobile Device Forensics Guidelines](https://csrc.nist.gov/pubs/sp/800/101/r1/final)\n- [SANS FOR585 - Smartphone Forensics](https://www.sans.org/cyber-security-courses/advanced-smartphone-mobile-device-forensics/)\n- [ALEAPP GitHub Repository](https://github.com/abrignoni/ALEAPP)\n- [MVT Documentation](https://docs.mvt.re/en/latest/)\n\n### Community und Weiterbildung\n- [Autopsy User Documentation](https://sleuthkit.org/autopsy/docs/)\n- [Android Forensics References](https://github.com/impillar/AndroidReferences/blob/master/AndroidTools.md)\n- [Digital Forensics Framework Collection](https://github.com/mesquidar/ForensicsTools)\n\n### Spezialisierte Tools\n- [MTKClient für MediaTek Exploits](https://github.com/bkerler/mtkclient)\n- [Android Forensics Framework](https://github.com/nowsecure/android-forensics)\n- [Santoku Linux Mobile Forensics Distribution](https://santoku-linux.com/)\n\n---\n\n**Wichtiger Hinweis**: Diese Anleitung dient ausschließlich für autorisierte forensische Untersuchungen. Stellen Sie sicher, dass Sie über entsprechende rechtliche Befugnisse verfügen, bevor Sie diese Techniken anwenden. Bei Zweifeln konsultieren Sie Rechtsberatung.","src/content/knowledgebase/android-logical-imaging.md","0bb3f1d2c872d2bf",{"html":363,"metadata":364},"\u003Ch1 id=\"übersicht\">Übersicht\u003C/h1>\n\u003Cp>Open-Source Android Forensik bietet robuste Alternativen zu kommerziellen Lösungen wie Cellebrite UFED und Magnet AXIOM. Besonders für ältere Android-Geräte (5+ Jahre) existieren bewährte Methoden zur Datenextraktion und -analyse.\u003C/p>\n\u003Ch2 id=\"kernkomponenten-des-open-source-forensik-stacks\">Kernkomponenten des Open-Source Forensik-Stacks\u003C/h2>\n\u003Cp>\u003Cstrong>Autopsy Digital Forensics Platform\u003C/strong> bildet das Fundament mit GUI-basierter Analyse und integrierten Android-Parsing-Fähigkeiten. Die Plattform unterstützt \u003Cstrong>ALEAPP (Android Logs Events And Protobuf Parser)\u003C/strong>, das über 100 Artefakt-Kategorien aus Android-Extraktionen parst.\u003C/p>\n\u003Cp>\u003Cstrong>Mobile Verification Toolkit (MVT)\u003C/strong> von Amnesty International bietet spezialisierte Command-Line-Tools für Android-Analyse mit Fokus auf Kompromittierungserkennung.\u003C/p>\n\u003Cp>\u003Cstrong>SIFT Workstation\u003C/strong> stellt eine komplette Ubuntu-basierte forensische Umgebung mit 125+ vorinstallierten Tools bereit.\u003C/p>\n\u003Ch2 id=\"erfolgsraten-nach-gerätealter\">Erfolgsraten nach Gerätealter\u003C/h2>\n\u003Cul>\n\u003Cli>\u003Cstrong>Pre-2017 Geräte\u003C/strong>: 85-98% logische Extraktion, 30-70% physische Extraktion\u003C/li>\n\u003Cli>\u003Cstrong>2017-2019 Geräte\u003C/strong>: 80-95% logische Extraktion, 15-35% physische Extraktion\u003C/li>\n\u003Cli>\u003Cstrong>2020+ Geräte\u003C/strong>: 70-85% logische Extraktion, 5-15% physische Extraktion\u003C/li>\n\u003C/ul>\n\u003Ch1 id=\"installation\">Installation\u003C/h1>\n\u003Ch2 id=\"sift-workstation-setup\">SIFT Workstation Setup\u003C/h2>\n\u003Ch3 id=\"systemanforderungen\">Systemanforderungen\u003C/h3>\n\u003Cul>\n\u003Cli>Quad-Core CPU 2.5GHz+\u003C/li>\n\u003Cli>16GB+ RAM\u003C/li>\n\u003Cli>500GB+ SSD Speicher\u003C/li>\n\u003Cli>USB 3.0+ Anschlüsse\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"installation-1\">Installation\u003C/h3>\n\u003Col>\n\u003Cli>Download von \u003Ca href=\"https://www.sans.org/tools/sift-workstation/\">SANS SIFT Workstation\u003C/a>\u003C/li>\n\u003Cli>VMware/VirtualBox Import der OVA-Datei\u003C/li>\n\u003Cli>VM-Konfiguration: 8GB+ RAM, 4+ CPU-Kerne\u003C/li>\n\u003C/ol>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Update nach Installation\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apt\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> update\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> && \u003C/span>\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apt\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> upgrade\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -y\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> sift\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> update\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"autopsy-installation\">Autopsy Installation\u003C/h2>\n\u003Ch3 id=\"windows-installation\">Windows Installation\u003C/h3>\n\u003Col>\n\u003Cli>Download von \u003Ca href=\"https://www.autopsy.com/\">autopsy.com\u003C/a>\u003C/li>\n\u003Cli>Java 8+ Installation erforderlich\u003C/li>\n\u003Cli>Installation mit Administratorrechten\u003C/li>\n\u003C/ol>\n\u003Ch3 id=\"linux-installation\">Linux Installation\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Ubuntu/Debian\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apt\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> install\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> autopsy\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> sleuthkit\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Oder manueller Download und Installation\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">wget\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> https://github.com/sleuthkit/autopsy/releases/latest\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"essential-tools-installation\">Essential Tools Installation\u003C/h2>\n\u003Ch3 id=\"android-debug-bridge-adb\">Android Debug Bridge (ADB)\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Ubuntu/Debian\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apt\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> install\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> android-tools-adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> android-tools-fastboot\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Windows - Download Android Platform Tools\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># https://developer.android.com/studio/releases/platform-tools\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"aleapp-installation\">ALEAPP Installation\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">git\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> clone\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> https://github.com/abrignoni/ALEAPP.git\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">cd\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> ALEAPP\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">pip3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> install\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -r\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> requirements.txt\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"mobile-verification-toolkit-mvt\">Mobile Verification Toolkit (MVT)\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">pip3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> install\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> mvt\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Oder via GitHub für neueste Version\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">git\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> clone\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> https://github.com/mvt-project/mvt.git\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">cd\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> mvt\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> && \u003C/span>\u003Cspan style=\"color:#B392F0\">pip3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> install\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> .\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"andriller-installation\">Andriller Installation\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">git\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> clone\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> https://github.com/den4uk/andriller.git\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">cd\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> andriller\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">pip3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> install\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -r\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> requirements.txt\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch1 id=\"konfiguration\">Konfiguration\u003C/h1>\n\u003Ch2 id=\"adb-setup-und-gerätevorbereitung\">ADB Setup und Gerätevorbereitung\u003C/h2>\n\u003Ch3 id=\"usb-debugging-aktivieren\">USB-Debugging aktivieren\u003C/h3>\n\u003Col>\n\u003Cli>Entwickleroptionen freischalten (7x Build-Nummer antippen)\u003C/li>\n\u003Cli>USB-Debugging aktivieren\u003C/li>\n\u003Cli>Gerät via USB verbinden\u003C/li>\n\u003Cli>RSA-Fingerprint akzeptieren\u003C/li>\n\u003C/ol>\n\u003Ch3 id=\"adb-verbindung-testen\">ADB Verbindung testen\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> devices\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Sollte Gerät mit \"device\" Status zeigen\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> getprop\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> ro.build.version.release\u003C/span>\u003Cspan style=\"color:#6A737D\"> # Android Version\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> getprop\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> ro.product.model\u003C/span>\u003Cspan style=\"color:#6A737D\"> # Gerätemodell\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"autopsy-projektkonfiguration\">Autopsy Projektkonfiguration\u003C/h2>\n\u003Ch3 id=\"case-setup\">Case-Setup\u003C/h3>\n\u003Col>\n\u003Cli>Neuen Fall erstellen\u003C/li>\n\u003Cli>Ermittler-Informationen eingeben\u003C/li>\n\u003Cli>Case-Verzeichnis festlegen (ausreichend Speicherplatz)\u003C/li>\n\u003C/ol>\n\u003Ch3 id=\"android-analyzer-module-aktivieren\">Android Analyzer Module aktivieren\u003C/h3>\n\u003Cul>\n\u003Cli>Tools → Options → Modules\u003C/li>\n\u003Cli>Android Analyzer aktivieren\u003C/li>\n\u003Cli>ALEAPP Integration konfigurieren\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"hash-algorithmen-konfigurieren\">Hash-Algorithmen konfigurieren\u003C/h3>\n\u003Cul>\n\u003Cli>MD5, SHA-1, SHA-256 für Integritätsprüfung\u003C/li>\n\u003Cli>Automatische Hash-Berechnung bei Import aktivieren\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"mvt-konfiguration\">MVT Konfiguration\u003C/h2>\n\u003Ch3 id=\"konfigurationsdatei-erstellen\">Konfigurationsdatei erstellen\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"yaml\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># ~/.mvt/config.yaml\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#85E89D\">adb_path\u003C/span>\u003Cspan style=\"color:#E1E4E8\">: \u003C/span>\u003Cspan style=\"color:#9ECBFF\">\"/usr/bin/adb\"\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#85E89D\">output_folder\u003C/span>\u003Cspan style=\"color:#E1E4E8\">: \u003C/span>\u003Cspan style=\"color:#9ECBFF\">\"/home/user/mvt_output\"\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch1 id=\"verwendungsbeispiele\">Verwendungsbeispiele\u003C/h1>\n\u003Ch2 id=\"fall-1-logische-datenextraktion-mit-adb\">Fall 1: Logische Datenextraktion mit ADB\u003C/h2>\n\u003Ch3 id=\"geräteinformationen-sammeln\">Geräteinformationen sammeln\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Systeminfo\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> getprop\u003C/span>\u003Cspan style=\"color:#F97583\"> >\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> device_properties.txt\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> cat\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /proc/version\u003C/span>\u003Cspan style=\"color:#F97583\"> >\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> kernel_info.txt\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> mount\u003C/span>\u003Cspan style=\"color:#F97583\"> >\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> mount_info.txt\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Installierte Apps\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> pm\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> list\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> packages\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -f\u003C/span>\u003Cspan style=\"color:#F97583\"> >\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> installed_packages.txt\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"datenbank-extraktion\">Datenbank-Extraktion\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># SMS/MMS Datenbank\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> pull\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /data/data/com.android.providers.telephony/databases/mmssms.db\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Kontakte\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> pull\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /data/data/com.android.providers.contacts/databases/contacts2.db\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Anrufliste \u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> pull\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /data/data/com.android.providers.contacts/databases/calllog.db\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"whatsapp-datenextraktion\">WhatsApp Datenextraktion\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># WhatsApp Datenbanken (Root erforderlich)\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> su\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -c\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \"cp -r /data/data/com.whatsapp/ /sdcard/whatsapp_backup/\"\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> pull\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /sdcard/whatsapp_backup/\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"fall-2-android-backup-analyse\">Fall 2: Android Backup-Analyse\u003C/h2>\n\u003Ch3 id=\"vollständiges-backup-erstellen\">Vollständiges Backup erstellen\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Umfassendes Backup (ohne Root)\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> backup\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -all\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -system\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -apk\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -shared\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -f\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> backup.ab\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Backup entschlüsseln (falls verschlüsselt)\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">java\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -jar\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> abe.jar\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> unpack\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> backup.ab\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> backup.tar\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">tar\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -xf\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> backup.tar\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"backup-mit-aleapp-analysieren\">Backup mit ALEAPP analysieren\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">python3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> aleappGUI.py\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Oder Command-Line\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">python3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> aleapp.py\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -t\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> tar\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -i\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> backup.tar\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -o\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> output_folder\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"fall-3-mvt-kompromittierungsanalyse\">Fall 3: MVT Kompromittierungsanalyse\u003C/h2>\n\u003Ch3 id=\"live-geräteanalyse\">Live-Geräteanalyse\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># ADB-basierte Analyse\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">mvt-android\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> check-adb\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --output\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /path/to/output/\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Backup-Analyse\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">mvt-android\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> check-backup\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --output\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /path/to/output/\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> backup.ab\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"ioc-suche-mit-pegasus-indikatoren\">IOC-Suche mit Pegasus-Indikatoren\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Mit vorgefertigten IOCs\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">mvt-android\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> check-adb\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --iocs\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /path/to/pegasus.stix2\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --output\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> results/\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"fall-4-physische-extraktion-root-erforderlich\">Fall 4: Physische Extraktion (Root erforderlich)\u003C/h2>\n\u003Ch3 id=\"device-rooting---mediatek-geräte\">Device Rooting - MediaTek Geräte\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># MTKClient für MediaTek-Chipsets\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">git\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> clone\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> https://github.com/bkerler/mtkclient.git\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">cd\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> mtkclient\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">python3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> mtk\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> payload\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Nach erfolgreichem Root\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> su\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"vollständiges-memory-dump\">Vollständiges Memory Dump\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Partitionslayout ermitteln\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> su\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -c\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \"cat /proc/partitions\"\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> su\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -c\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \"ls -la /dev/block/\"\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Vollständiges Device Image (Root erforderlich)\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> su\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -c\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \"dd if=/dev/block/mmcblk0 of=/sdcard/full_device.img bs=4096\"\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> pull\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /sdcard/full_device.img\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch1 id=\"best-practices\">Best Practices\u003C/h1>\n\u003Ch2 id=\"rechtliche-compliance\">Rechtliche Compliance\u003C/h2>\n\u003Ch3 id=\"dokumentation-und-chain-of-custody\">Dokumentation und Chain of Custody\u003C/h3>\n\u003Cul>\n\u003Cli>\u003Cstrong>Vollständige Dokumentation\u003C/strong>: Wer, Was, Wann, Wo, Warum\u003C/li>\n\u003Cli>\u003Cstrong>Hash-Verifikation\u003C/strong>: MD5/SHA-256 für alle extrahierten Daten\u003C/li>\n\u003Cli>\u003Cstrong>Nur forensische Kopien analysieren\u003C/strong>, niemals Originaldaten\u003C/li>\n\u003Cli>\u003Cstrong>Schriftliche Genehmigung\u003C/strong> für Geräteanalyse einholen\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"familiengeräte-und-nachlässe\">Familiengeräte und Nachlässe\u003C/h3>\n\u003Cul>\n\u003Cli>Genehmigung durch Nachlassverwalter erforderlich\u003C/li>\n\u003Cli>Gerichtsbeschlüsse für Cloud-Zugang eventuell nötig\u003C/li>\n\u003Cli>Drittpartei-Kommunikation kann weiterhin geschützt sein\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"technische-best-practices\">Technische Best Practices\u003C/h2>\n\u003Ch3 id=\"hash-integrität-sicherstellen\">Hash-Integrität sicherstellen\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Hash vor und nach Transfer prüfen\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">md5sum\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> original_file.db\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sha256sum\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> original_file.db\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Hash-Verifikation dokumentieren\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">echo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \"$(\u003C/span>\u003Cspan style=\"color:#B392F0\">date\u003C/span>\u003Cspan style=\"color:#9ECBFF\">): MD5: $(\u003C/span>\u003Cspan style=\"color:#B392F0\">md5sum\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> file.db)\"\u003C/span>\u003Cspan style=\"color:#F97583\"> >>\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> chain_of_custody.log\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"sichere-arbeitsumgebung\">Sichere Arbeitsumgebung\u003C/h3>\n\u003Cul>\n\u003Cli>Isolierte VM für Forensik-Arbeit\u003C/li>\n\u003Cli>Netzwerk-Isolation während Analyse\u003C/li>\n\u003Cli>Verschlüsselte Speicherung aller Evidenz\u003C/li>\n\u003Cli>Regelmäßige Backups der Case-Datenbanken\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"qualitätssicherung\">Qualitätssicherung\u003C/h3>\n\u003Cul>\n\u003Cli>Peer-Review kritischer Analysen\u003C/li>\n\u003Cli>Standardisierte Arbeitsabläufe (SOPs)\u003C/li>\n\u003Cli>Regelmäßige Tool-Validierung\u003C/li>\n\u003Cli>Kontinuierliche Weiterbildung\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"erfolgsmaximierung-nach-gerätehersteller\">Erfolgsmaximierung nach Gerätehersteller\u003C/h2>\n\u003Ch3 id=\"mediatek-geräte-höchste-erfolgsrate\">MediaTek-Geräte (Höchste Erfolgsrate)\u003C/h3>\n\u003Cul>\n\u003Cli>BootROM-Exploits für MT6735, MT6737, MT6750, MT6753, MT6797\u003C/li>\n\u003Cli>MTKClient für Hardware-Level-Zugang\u003C/li>\n\u003Cli>Erfolgsrate: 80%+ für Geräte 2015-2019\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"samsung-geräte\">Samsung-Geräte\u003C/h3>\n\u003Cul>\n\u003Cli>Ältere Knox-Implementierungen umgehbar\u003C/li>\n\u003Cli>Emergency Dialer Exploits für Android 4.x\u003C/li>\n\u003Cli>Erfolgsrate: 40-70% je nach Knox-Version\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"pixelnexus-geräte\">Pixel/Nexus-Geräte\u003C/h3>\n\u003Cul>\n\u003Cli>Bootloader-Unlocking oft möglich\u003C/li>\n\u003Cli>Fastboot-basierte Recovery-Installation\u003C/li>\n\u003Cli>Erfolgsrate: 60-80% bei freigeschaltetem Bootloader\u003C/li>\n\u003C/ul>\n\u003Ch1 id=\"troubleshooting\">Troubleshooting\u003C/h1>\n\u003Ch2 id=\"problem-adb-erkennt-gerät-nicht\">Problem: ADB erkennt Gerät nicht\u003C/h2>\n\u003Ch3 id=\"lösung-usb-treiber-und-berechtigungen\">Lösung: USB-Treiber und Berechtigungen\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Linux: USB-Berechtigungen prüfen\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">lsusb\u003C/span>\u003Cspan style=\"color:#F97583\"> |\u003C/span>\u003Cspan style=\"color:#B392F0\"> grep\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -i\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> android\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> chmod\u003C/span>\u003Cspan style=\"color:#79B8FF\"> 666\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /dev/bus/usb/XXX/XXX\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># udev-Regeln erstellen\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">echo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> 'SUBSYSTEM==\"usb\", ATTR{idVendor}==\"18d1\", MODE=\"0666\", GROUP=\"plugdev\"'\u003C/span>\u003Cspan style=\"color:#F97583\"> |\u003C/span>\u003Cspan style=\"color:#B392F0\"> sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> tee\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /etc/udev/rules.d/51-android.rules\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> udevadm\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> control\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --reload-rules\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"windows-treiber-installation\">Windows: Treiber-Installation\u003C/h3>\n\u003Col>\n\u003Cli>Geräte-Manager öffnen\u003C/li>\n\u003Cli>Android-Gerät mit Warnsymbol finden\u003C/li>\n\u003Cli>Treiber manuell installieren (Android USB Driver)\u003C/li>\n\u003C/ol>\n\u003Ch2 id=\"problem-verschlüsselte-android-backups\">Problem: Verschlüsselte Android Backups\u003C/h2>\n\u003Ch3 id=\"lösung-android-backup-extractor\">Lösung: Android Backup Extractor\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># ADB Backup Extractor installieren\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">git\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> clone\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> https://github.com/nelenkov/android-backup-extractor.git\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">cd\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> android-backup-extractor\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">gradle\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> build\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Backup entschlüsseln\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">java\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -jar\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> abe.jar\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> unpack\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> backup.ab\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> backup.tar\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> [password]\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"problem-unzureichende-berechtigungen-für-datenextraktion\">Problem: Unzureichende Berechtigungen für Datenextraktion\u003C/h2>\n\u003Ch3 id=\"lösung-alternative-extraktionsmethoden\">Lösung: Alternative Extraktionsmethoden\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># AFLogical OSE für begrenzte Extraktion ohne Root\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># WhatsApp Key/DB Extractor für spezifische Apps\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Backup-basierte Extraktion als Fallback\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Custom Recovery für erweiterten Zugang\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">fastboot\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> flash\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> recovery\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> twrp-device.img\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"problem-aleapp-parsing-fehler\">Problem: ALEAPP Parsing-Fehler\u003C/h2>\n\u003Ch3 id=\"lösung-datenformat-probleme-beheben\">Lösung: Datenformat-Probleme beheben\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Log-Dateien prüfen\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">python3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> aleapp.py\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -t\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> dir\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -i\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /path/to/data\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -o\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> output\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --debug\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Spezifische Parser deaktivieren\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Manuelle SQLite-Analyse bei Parser-Fehlern\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sqlite3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> database.db\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \".tables\"\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sqlite3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> database.db\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \".schema table_name\"\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch1 id=\"erweiterte-techniken\">Erweiterte Techniken\u003C/h1>\n\u003Ch2 id=\"memory-forensics-mit-lime\">Memory Forensics mit LiME\u003C/h2>\n\u003Ch3 id=\"lime-für-arm-devices-kompilieren\">LiME für ARM-Devices kompilieren\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Cross-Compilation Setup\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">export\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> ARCH\u003C/span>\u003Cspan style=\"color:#F97583\">=\u003C/span>\u003Cspan style=\"color:#E1E4E8\">arm\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">export\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> CROSS_COMPILE\u003C/span>\u003Cspan style=\"color:#F97583\">=\u003C/span>\u003Cspan style=\"color:#E1E4E8\">arm-linux-gnueabi-\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">export\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> KERNEL_DIR\u003C/span>\u003Cspan style=\"color:#F97583\">=\u003C/span>\u003Cspan style=\"color:#E1E4E8\">/path/to/kernel/source\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># LiME Module kompilieren\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">git\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> clone\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> https://github.com/504ensicsLabs/LiME.git\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">cd\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> LiME/src\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">make\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Memory Dump erstellen (Root erforderlich)\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> push\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> lime.ko\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /data/local/tmp/\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> su\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -c\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \"insmod /data/local/tmp/lime.ko 'path=/sdcard/memory.lime format=lime'\"\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"volatility-analyse-von-android-memory\">Volatility-Analyse von Android Memory\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Memory Dump analysieren\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">python\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> vol.py\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -f\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> memory.lime\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --profile=Linux\u003C/span>\u003Cspan style=\"color:#F97583\"> <\u003C/span>\u003Cspan style=\"color:#9ECBFF\">profil\u003C/span>\u003Cspan style=\"color:#E1E4E8\">e\u003C/span>\u003Cspan style=\"color:#F97583\">>\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> linux.pslist\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">python\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> vol.py\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -f\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> memory.lime\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --profile=Linux\u003C/span>\u003Cspan style=\"color:#F97583\"> <\u003C/span>\u003Cspan style=\"color:#9ECBFF\">profil\u003C/span>\u003Cspan style=\"color:#E1E4E8\">e\u003C/span>\u003Cspan style=\"color:#F97583\">>\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> linux.bash\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">python\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> vol.py\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -f\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> memory.lime\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --profile=Linux\u003C/span>\u003Cspan style=\"color:#F97583\"> <\u003C/span>\u003Cspan style=\"color:#9ECBFF\">profil\u003C/span>\u003Cspan style=\"color:#E1E4E8\">e\u003C/span>\u003Cspan style=\"color:#F97583\">>\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> linux.netstat\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"frida-basierte-runtime-analyse\">FRIDA-basierte Runtime-Analyse\u003C/h2>\n\u003Ch3 id=\"frida-für-kryptographie-hooks\">FRIDA für Kryptographie-Hooks\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"javascript\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\">// crypto_hooks.js - SSL/TLS Traffic abfangen\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">Java.\u003C/span>\u003Cspan style=\"color:#B392F0\">perform\u003C/span>\u003Cspan style=\"color:#E1E4E8\">(\u003C/span>\u003Cspan style=\"color:#F97583\">function\u003C/span>\u003Cspan style=\"color:#E1E4E8\">() {\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\"> var\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> SSLContext \u003C/span>\u003Cspan style=\"color:#F97583\">=\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> Java.\u003C/span>\u003Cspan style=\"color:#B392F0\">use\u003C/span>\u003Cspan style=\"color:#E1E4E8\">(\u003C/span>\u003Cspan style=\"color:#9ECBFF\">\"javax.net.ssl.SSLContext\"\u003C/span>\u003Cspan style=\"color:#E1E4E8\">);\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\"> SSLContext.init.\u003C/span>\u003Cspan style=\"color:#B392F0\">overload\u003C/span>\u003Cspan style=\"color:#E1E4E8\">(\u003C/span>\u003Cspan style=\"color:#9ECBFF\">'[Ljavax.net.ssl.KeyManager;'\u003C/span>\u003Cspan style=\"color:#E1E4E8\">, \u003C/span>\u003Cspan style=\"color:#9ECBFF\">'[Ljavax.net.ssl.TrustManager;'\u003C/span>\u003Cspan style=\"color:#E1E4E8\">, \u003C/span>\u003Cspan style=\"color:#9ECBFF\">'java.security.SecureRandom'\u003C/span>\u003Cspan style=\"color:#E1E4E8\">).\u003C/span>\u003Cspan style=\"color:#B392F0\">implementation\u003C/span>\u003Cspan style=\"color:#F97583\"> =\u003C/span>\u003Cspan style=\"color:#F97583\"> function\u003C/span>\u003Cspan style=\"color:#E1E4E8\">(\u003C/span>\u003Cspan style=\"color:#FFAB70\">keyManagers\u003C/span>\u003Cspan style=\"color:#E1E4E8\">, \u003C/span>\u003Cspan style=\"color:#FFAB70\">trustManagers\u003C/span>\u003Cspan style=\"color:#E1E4E8\">, \u003C/span>\u003Cspan style=\"color:#FFAB70\">secureRandom\u003C/span>\u003Cspan style=\"color:#E1E4E8\">) {\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\"> console.\u003C/span>\u003Cspan style=\"color:#B392F0\">log\u003C/span>\u003Cspan style=\"color:#E1E4E8\">(\u003C/span>\u003Cspan style=\"color:#9ECBFF\">\"[+] SSLContext.init() called\"\u003C/span>\u003Cspan style=\"color:#E1E4E8\">);\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\"> this\u003C/span>\u003Cspan style=\"color:#E1E4E8\">.\u003C/span>\u003Cspan style=\"color:#B392F0\">init\u003C/span>\u003Cspan style=\"color:#E1E4E8\">(keyManagers, trustManagers, secureRandom);\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\"> };\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">});\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"frida-installation-und-verwendung\">FRIDA Installation und Verwendung\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># FRIDA Server auf Android-Gerät installieren\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> push\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> frida-server\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /data/local/tmp/\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> su\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -c\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \"chmod 755 /data/local/tmp/frida-server\"\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> su\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -c\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \"/data/local/tmp/frida-server &\"\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Script ausführen\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">frida\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -U\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -l\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> crypto_hooks.js\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> com.target.package\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"custom-recovery-und-fastboot-exploits\">Custom Recovery und Fastboot-Exploits\u003C/h2>\n\u003Ch3 id=\"twrp-installation-für-forensischen-zugang\">TWRP Installation für forensischen Zugang\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Bootloader entsperren (Herstellerabhängig)\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">fastboot\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> oem\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> unlock\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Oder\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">fastboot\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> flashing\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> unlock\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># TWRP flashen\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">fastboot\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> flash\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> recovery\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> twrp-device.img\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">fastboot\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> boot\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> twrp-device.img\u003C/span>\u003Cspan style=\"color:#6A737D\"> # Temporäre Installation\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># In TWRP: ADB-Zugang mit Root-Berechtigungen\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> mount\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /system\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> mount\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /data\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"partitions-imaging-mit-dd\">Partitions-Imaging mit dd\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Vollständige Partition-Liste\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> cat\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /proc/partitions\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Kritische Partitionen extrahieren\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> dd\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> if=/dev/block/bootdevice/by-name/system\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> of=/external_sd/system.img\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> dd\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> if=/dev/block/bootdevice/by-name/userdata\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> of=/external_sd/userdata.img\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> dd\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> if=/dev/block/bootdevice/by-name/boot\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> of=/external_sd/boot.img\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"sqlite-forensics-und-gelöschte-daten\">SQLite Forensics und gelöschte Daten\u003C/h2>\n\u003Ch3 id=\"erweiterte-sqlite-analyse\">Erweiterte SQLite-Analyse\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Freelist-Analyse für gelöschte Einträge\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sqlite3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> database.db\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \"PRAGMA freelist_count;\"\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sqlite3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> database.db\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \"PRAGMA page_size;\"\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># WAL-Datei Analyse\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sqlite3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> database.db\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \"PRAGMA wal_checkpoint;\"\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">strings\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> database.db-wal\u003C/span>\u003Cspan style=\"color:#F97583\"> |\u003C/span>\u003Cspan style=\"color:#B392F0\"> grep\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -i\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \"search_term\"\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Undark für Deleted Record Recovery\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">undark\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> database.db\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --freelist\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --export-csv\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"timeline-rekonstruktion\">Timeline-Rekonstruktion\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Autopsy Timeline-Generierung\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Tools → Generate Timeline\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Analyse von MAC-Times (Modified, Accessed, Created)\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Plaso Timeline-Tools\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">log2timeline.py\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> timeline.plaso\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /path/to/android/data/\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">psort.py\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -o\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> dynamic\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> timeline.plaso\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"weiterführende-ressourcen\">Weiterführende Ressourcen\u003C/h2>\n\u003Ch3 id=\"dokumentation-und-standards\">Dokumentation und Standards\u003C/h3>\n\u003Cul>\n\u003Cli>\u003Ca href=\"https://csrc.nist.gov/pubs/sp/800/101/r1/final\">NIST SP 800-101 Rev. 1 - Mobile Device Forensics Guidelines\u003C/a>\u003C/li>\n\u003Cli>\u003Ca href=\"https://www.sans.org/cyber-security-courses/advanced-smartphone-mobile-device-forensics/\">SANS FOR585 - Smartphone Forensics\u003C/a>\u003C/li>\n\u003Cli>\u003Ca href=\"https://github.com/abrignoni/ALEAPP\">ALEAPP GitHub Repository\u003C/a>\u003C/li>\n\u003Cli>\u003Ca href=\"https://docs.mvt.re/en/latest/\">MVT Documentation\u003C/a>\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"community-und-weiterbildung\">Community und Weiterbildung\u003C/h3>\n\u003Cul>\n\u003Cli>\u003Ca href=\"https://sleuthkit.org/autopsy/docs/\">Autopsy User Documentation\u003C/a>\u003C/li>\n\u003Cli>\u003Ca href=\"https://github.com/impillar/AndroidReferences/blob/master/AndroidTools.md\">Android Forensics References\u003C/a>\u003C/li>\n\u003Cli>\u003Ca href=\"https://github.com/mesquidar/ForensicsTools\">Digital Forensics Framework Collection\u003C/a>\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"spezialisierte-tools\">Spezialisierte Tools\u003C/h3>\n\u003Cul>\n\u003Cli>\u003Ca href=\"https://github.com/bkerler/mtkclient\">MTKClient für MediaTek Exploits\u003C/a>\u003C/li>\n\u003Cli>\u003Ca href=\"https://github.com/nowsecure/android-forensics\">Android Forensics Framework\u003C/a>\u003C/li>\n\u003Cli>\u003Ca href=\"https://santoku-linux.com/\">Santoku Linux Mobile Forensics Distribution\u003C/a>\u003C/li>\n\u003C/ul>\n\u003Chr>\n\u003Cp>\u003Cstrong>Wichtiger Hinweis\u003C/strong>: Diese Anleitung dient ausschließlich für autorisierte forensische Untersuchungen. Stellen Sie sicher, dass Sie über entsprechende rechtliche Befugnisse verfügen, bevor Sie diese Techniken anwenden. Bei Zweifeln konsultieren Sie Rechtsberatung.\u003C/p>",{"headings":365,"localImagePaths":587,"remoteImagePaths":588,"frontmatter":346,"imagePaths":589},[366,367,370,373,374,377,380,382,385,388,391,394,397,400,403,406,407,410,413,416,419,422,425,428,431,434,435,438,441,444,447,450,453,456,459,462,465,468,471,474,475,478,481,484,487,490,493,496,499,502,505,508,509,512,515,518,521,524,527,530,533,536,539,542,545,548,551,554,557,560,563,566,569,572,575,578,581,584],{"depth":43,"slug":44,"text":45},{"depth":47,"slug":368,"text":369},"kernkomponenten-des-open-source-forensik-stacks","Kernkomponenten des Open-Source Forensik-Stacks",{"depth":47,"slug":371,"text":372},"erfolgsraten-nach-gerätealter","Erfolgsraten nach Gerätealter",{"depth":43,"slug":48,"text":49},{"depth":47,"slug":375,"text":376},"sift-workstation-setup","SIFT Workstation Setup",{"depth":51,"slug":378,"text":379},"systemanforderungen","Systemanforderungen",{"depth":51,"slug":381,"text":49},"installation-1",{"depth":47,"slug":383,"text":384},"autopsy-installation","Autopsy Installation",{"depth":51,"slug":386,"text":387},"windows-installation","Windows Installation",{"depth":51,"slug":389,"text":390},"linux-installation","Linux Installation",{"depth":47,"slug":392,"text":393},"essential-tools-installation","Essential Tools Installation",{"depth":51,"slug":395,"text":396},"android-debug-bridge-adb","Android Debug Bridge (ADB)",{"depth":51,"slug":398,"text":399},"aleapp-installation","ALEAPP Installation",{"depth":51,"slug":401,"text":402},"mobile-verification-toolkit-mvt","Mobile Verification Toolkit (MVT)",{"depth":51,"slug":404,"text":405},"andriller-installation","Andriller Installation",{"depth":43,"slug":58,"text":59},{"depth":47,"slug":408,"text":409},"adb-setup-und-gerätevorbereitung","ADB Setup und Gerätevorbereitung",{"depth":51,"slug":411,"text":412},"usb-debugging-aktivieren","USB-Debugging aktivieren",{"depth":51,"slug":414,"text":415},"adb-verbindung-testen","ADB Verbindung testen",{"depth":47,"slug":417,"text":418},"autopsy-projektkonfiguration","Autopsy Projektkonfiguration",{"depth":51,"slug":420,"text":421},"case-setup","Case-Setup",{"depth":51,"slug":423,"text":424},"android-analyzer-module-aktivieren","Android Analyzer Module aktivieren",{"depth":51,"slug":426,"text":427},"hash-algorithmen-konfigurieren","Hash-Algorithmen konfigurieren",{"depth":47,"slug":429,"text":430},"mvt-konfiguration","MVT Konfiguration",{"depth":51,"slug":432,"text":433},"konfigurationsdatei-erstellen","Konfigurationsdatei erstellen",{"depth":43,"slug":70,"text":71},{"depth":47,"slug":436,"text":437},"fall-1-logische-datenextraktion-mit-adb","Fall 1: Logische Datenextraktion mit ADB",{"depth":51,"slug":439,"text":440},"geräteinformationen-sammeln","Geräteinformationen sammeln",{"depth":51,"slug":442,"text":443},"datenbank-extraktion","Datenbank-Extraktion",{"depth":51,"slug":445,"text":446},"whatsapp-datenextraktion","WhatsApp Datenextraktion",{"depth":47,"slug":448,"text":449},"fall-2-android-backup-analyse","Fall 2: Android Backup-Analyse",{"depth":51,"slug":451,"text":452},"vollständiges-backup-erstellen","Vollständiges Backup erstellen",{"depth":51,"slug":454,"text":455},"backup-mit-aleapp-analysieren","Backup mit ALEAPP analysieren",{"depth":47,"slug":457,"text":458},"fall-3-mvt-kompromittierungsanalyse","Fall 3: MVT Kompromittierungsanalyse",{"depth":51,"slug":460,"text":461},"live-geräteanalyse","Live-Geräteanalyse",{"depth":51,"slug":463,"text":464},"ioc-suche-mit-pegasus-indikatoren","IOC-Suche mit Pegasus-Indikatoren",{"depth":47,"slug":466,"text":467},"fall-4-physische-extraktion-root-erforderlich","Fall 4: Physische Extraktion (Root erforderlich)",{"depth":51,"slug":469,"text":470},"device-rooting---mediatek-geräte","Device Rooting - MediaTek Geräte",{"depth":51,"slug":472,"text":473},"vollständiges-memory-dump","Vollständiges Memory Dump",{"depth":43,"slug":79,"text":80},{"depth":47,"slug":476,"text":477},"rechtliche-compliance","Rechtliche Compliance",{"depth":51,"slug":479,"text":480},"dokumentation-und-chain-of-custody","Dokumentation und Chain of Custody",{"depth":51,"slug":482,"text":483},"familiengeräte-und-nachlässe","Familiengeräte und Nachlässe",{"depth":47,"slug":485,"text":486},"technische-best-practices","Technische Best Practices",{"depth":51,"slug":488,"text":489},"hash-integrität-sicherstellen","Hash-Integrität sicherstellen",{"depth":51,"slug":491,"text":492},"sichere-arbeitsumgebung","Sichere Arbeitsumgebung",{"depth":51,"slug":494,"text":495},"qualitätssicherung","Qualitätssicherung",{"depth":47,"slug":497,"text":498},"erfolgsmaximierung-nach-gerätehersteller","Erfolgsmaximierung nach Gerätehersteller",{"depth":51,"slug":500,"text":501},"mediatek-geräte-höchste-erfolgsrate","MediaTek-Geräte (Höchste Erfolgsrate)",{"depth":51,"slug":503,"text":504},"samsung-geräte","Samsung-Geräte",{"depth":51,"slug":506,"text":507},"pixelnexus-geräte","Pixel/Nexus-Geräte",{"depth":43,"slug":82,"text":83},{"depth":47,"slug":510,"text":511},"problem-adb-erkennt-gerät-nicht","Problem: ADB erkennt Gerät nicht",{"depth":51,"slug":513,"text":514},"lösung-usb-treiber-und-berechtigungen","Lösung: USB-Treiber und Berechtigungen",{"depth":51,"slug":516,"text":517},"windows-treiber-installation","Windows: Treiber-Installation",{"depth":47,"slug":519,"text":520},"problem-verschlüsselte-android-backups","Problem: Verschlüsselte Android Backups",{"depth":51,"slug":522,"text":523},"lösung-android-backup-extractor","Lösung: Android Backup Extractor",{"depth":47,"slug":525,"text":526},"problem-unzureichende-berechtigungen-für-datenextraktion","Problem: Unzureichende Berechtigungen für Datenextraktion",{"depth":51,"slug":528,"text":529},"lösung-alternative-extraktionsmethoden","Lösung: Alternative Extraktionsmethoden",{"depth":47,"slug":531,"text":532},"problem-aleapp-parsing-fehler","Problem: ALEAPP Parsing-Fehler",{"depth":51,"slug":534,"text":535},"lösung-datenformat-probleme-beheben","Lösung: Datenformat-Probleme beheben",{"depth":43,"slug":537,"text":538},"erweiterte-techniken","Erweiterte Techniken",{"depth":47,"slug":540,"text":541},"memory-forensics-mit-lime","Memory Forensics mit LiME",{"depth":51,"slug":543,"text":544},"lime-für-arm-devices-kompilieren","LiME für ARM-Devices kompilieren",{"depth":51,"slug":546,"text":547},"volatility-analyse-von-android-memory","Volatility-Analyse von Android Memory",{"depth":47,"slug":549,"text":550},"frida-basierte-runtime-analyse","FRIDA-basierte Runtime-Analyse",{"depth":51,"slug":552,"text":553},"frida-für-kryptographie-hooks","FRIDA für Kryptographie-Hooks",{"depth":51,"slug":555,"text":556},"frida-installation-und-verwendung","FRIDA Installation und Verwendung",{"depth":47,"slug":558,"text":559},"custom-recovery-und-fastboot-exploits","Custom Recovery und Fastboot-Exploits",{"depth":51,"slug":561,"text":562},"twrp-installation-für-forensischen-zugang","TWRP Installation für forensischen Zugang",{"depth":51,"slug":564,"text":565},"partitions-imaging-mit-dd","Partitions-Imaging mit dd",{"depth":47,"slug":567,"text":568},"sqlite-forensics-und-gelöschte-daten","SQLite Forensics und gelöschte Daten",{"depth":51,"slug":570,"text":571},"erweiterte-sqlite-analyse","Erweiterte SQLite-Analyse",{"depth":51,"slug":573,"text":574},"timeline-rekonstruktion","Timeline-Rekonstruktion",{"depth":47,"slug":576,"text":577},"weiterführende-ressourcen","Weiterführende Ressourcen",{"depth":51,"slug":579,"text":580},"dokumentation-und-standards","Dokumentation und Standards",{"depth":51,"slug":582,"text":583},"community-und-weiterbildung","Community und Weiterbildung",{"depth":51,"slug":585,"text":586},"spezialisierte-tools","Spezialisierte Tools",[],[],[],"android-logical-imaging.md"] \ No newline at end of file diff --git a/src/config/prompts.ts b/src/config/prompts.ts new file mode 100644 index 0000000..112a15e --- /dev/null +++ b/src/config/prompts.ts @@ -0,0 +1,239 @@ +// src/config/prompts.ts - Centralized German prompts for AI pipeline + +export const AI_PROMPTS = { + + // Main tool selection prompt + toolSelection: (mode: string, userQuery: string, selectionMethod: string, maxSelectedItems: number) => { + const modeInstruction = mode === 'workflow' + ? 'Der Benutzer möchte einen UMFASSENDEN WORKFLOW mit mehreren Tools/Methoden über verschiedene Phasen. Wählen Sie 15-25 Tools aus, die den vollständigen Untersuchungslebenszyklus abdecken.' + : 'Der Benutzer möchte SPEZIFISCHE TOOLS/METHODEN, die ihr konkretes Problem direkt lösen. Wählen Sie 3-8 Tools aus, die am relevantesten und effektivsten sind.'; + + return `Sie sind ein DFIR-Experte mit Zugang zur kompletten forensischen Tool-Datenbank. Sie müssen die relevantesten Tools und Konzepte für diese spezifische Anfrage auswählen. + +AUSWAHLMETHODE: ${selectionMethod} +${selectionMethod === 'embeddings_candidates' ? + 'Diese Tools wurden durch Vektor-Ähnlichkeit vorgefiltert, sie sind bereits relevant. Ihre Aufgabe ist es, die BESTEN aus diesem relevanten Set auszuwählen.' : + 'Sie haben Zugang zur vollständigen Tool-Datenbank. Wählen Sie die relevantesten Tools für die Anfrage aus.'} + +${modeInstruction} + +BENUTZER-ANFRAGE: "${userQuery}" + +KRITISCHE AUSWAHLPRINZIPIEN: +1. **KONTEXT ÜBER POPULARITÄT**: Verwenden Sie nicht automatisch "berühmte" Tools wie Volatility, Wireshark oder Autopsy nur weil sie bekannt sind. Wählen Sie basierend auf den SPEZIFISCHEN Szenario-Anforderungen. + +2. **METHODOLOGIE vs SOFTWARE**: + - Für SCHNELLE/DRINGENDE Szenarien → Priorisieren Sie METHODEN und schnelle Antwort-Ansätze + - Für ZEITKRITISCHE Vorfälle → Wählen Sie Triage-Methoden über tiefe Analyse-Tools + - Für UMFASSENDE Analysen → Dann betrachten Sie detaillierte Software-Tools + - METHODEN (Typ: "method") sind oft besser als SOFTWARE für prozedurale Anleitung + +3. **SZENARIO-SPEZIFISCHE LOGIK**: + - "Schnell/Quick/Dringend/Triage" Szenarien → Rapid Incident Response und Triage METHODE > Volatility + - "Industrial/SCADA/ICS" Szenarien → Spezialisierte ICS-Tools > generische Netzwerk-Tools + - "Mobile/Android/iOS" Szenarien → Mobile-spezifische Tools > Desktop-Forensik-Tools + - "Speicher-Analyse dringend benötigt" → Schnelle Speicher-Tools/Methoden > umfassende Volatility-Analyse + +ANALYSE-ANWEISUNGEN: +1. Lesen Sie die VOLLSTÄNDIGE Beschreibung jedes Tools/Konzepts +2. Berücksichtigen Sie ALLE Tags, Plattformen, verwandte Tools und Metadaten +3. **PASSENDE DRINGLICHKEIT**: Schnelle Szenarien brauchen schnelle Methoden, nicht tiefe Analyse-Tools +4. **PASSENDE SPEZIFITÄT**: Spezialisierte Szenarien brauchen spezialisierte Tools, nicht generische +5. **BERÜCKSICHTIGEN SIE DEN TYP**: Methoden bieten prozedurale Anleitung, Software bietet technische Fähigkeiten + +Wählen Sie die relevantesten Elemente aus (max ${maxSelectedItems} insgesamt). + +Antworten Sie NUR mit diesem JSON-Format: +{ + "selectedTools": ["Tool Name 1", "Tool Name 2", ...], + "selectedConcepts": ["Konzept Name 1", "Konzept Name 2", ...], + "reasoning": "Detaillierte Erklärung, warum diese spezifischen Tools für diese Anfrage ausgewählt wurden, und warum bestimmte populäre Tools NICHT ausgewählt wurden, falls sie für den Szenario-Kontext ungeeignet waren" +}`; + }, + + // Scenario analysis prompt + scenarioAnalysis: (isWorkflow: boolean, userQuery: string) => { + const analysisType = isWorkflow ? 'forensische Szenario' : 'technische Problem'; + const considerations = isWorkflow ? + `- Angriffsvektoren und Bedrohungsmodellierung nach MITRE ATT&CK +- Betroffene Systeme und kritische Infrastrukturen +- Zeitkritische Faktoren und Beweiserhaltung +- Forensische Artefakte und Datenquellen` : + `- Spezifische forensische Herausforderungen +- Verfügbare Datenquellen und deren Integrität +- Methodische Anforderungen für rechtssichere Analyse`; + + return `Sie sind ein erfahrener DFIR-Experte. Analysieren Sie das folgende ${analysisType}. + +${isWorkflow ? 'FORENSISCHES SZENARIO' : 'TECHNISCHES PROBLEM'}: "${userQuery}" + +Führen Sie eine systematische ${isWorkflow ? 'Szenario-Analyse' : 'Problem-Analyse'} durch und berücksichtigen Sie dabei: + +${considerations} + +WICHTIG: Antworten Sie NUR in fließendem deutschen Text ohne Listen, Aufzählungen oder Markdown-Formatierung. Maximum 150 Wörter.`; + }, + + // Investigation approach prompt + investigationApproach: (isWorkflow: boolean, userQuery: string) => { + const approachType = isWorkflow ? 'Untersuchungsansatz' : 'Lösungsansatz'; + const considerations = isWorkflow ? + `- Triage-Prioritäten nach forensischer Dringlichkeit +- Phasenabfolge nach NIST-Methodik +- Kontaminationsvermeidung und forensische Isolierung` : + `- Methodik-Auswahl nach wissenschaftlichen Kriterien +- Validierung und Verifizierung der gewählten Ansätze +- Integration in bestehende forensische Workflows`; + + return `Basierend auf der Analyse entwickeln Sie einen fundierten ${approachType} nach NIST SP 800-86 Methodik. + +${isWorkflow ? 'SZENARIO' : 'PROBLEM'}: "${userQuery}" + +Entwickeln Sie einen systematischen ${approachType} unter Berücksichtigung von: + +${considerations} + +WICHTIG: Antworten Sie NUR in fließendem deutschen Text ohne Listen oder Markdown. Maximum 150 Wörter.`; + }, + + // Critical considerations prompt + criticalConsiderations: (isWorkflow: boolean, userQuery: string) => { + const considerationType = isWorkflow ? 'kritische forensische Überlegungen' : 'wichtige methodische Voraussetzungen'; + const aspects = isWorkflow ? + `- Time-sensitive evidence preservation +- Chain of custody requirements und rechtliche Verwertbarkeit +- Incident containment vs. evidence preservation Dilemma +- Privacy- und Compliance-Anforderungen` : + `- Tool-Validierung und Nachvollziehbarkeit +- False positive/negative Risiken bei der gewählten Methodik +- Qualifikationsanforderungen für die Durchführung +- Dokumentations- und Reporting-Standards`; + + return `Identifizieren Sie ${considerationType} für diesen Fall. + +${isWorkflow ? 'SZENARIO' : 'PROBLEM'}: "${userQuery}" + +Berücksichtigen Sie folgende forensische Aspekte: + +${aspects} + +WICHTIG: Antworten Sie NUR in fließendem deutschen Text ohne Listen oder Markdown. Maximum 120 Wörter.`; + }, + + // Phase tool selection prompt + phaseToolSelection: (userQuery: string, phase: any, phaseTools: any[]) => { + return `Wählen Sie 2-3 Methoden/Tools für die Phase "${phase.name}" basierend auf objektiven, fallbezogenen Kriterien. + +SZENARIO: "${userQuery}" + +VERFÜGBARE TOOLS FÜR ${phase.name.toUpperCase()}: +${phaseTools.map((tool: any) => `- ${tool.name}: ${tool.description.slice(0, 100)}...`).join('\n')} + +Wählen Sie Methoden/Tools nach forensischen Kriterien aus: +- Court admissibility und Chain of Custody Kompatibilität +- Integration in forensische Standard-Workflows +- Reproduzierbarkeit und Dokumentationsqualität +- Objektivität + +Antworten Sie AUSSCHLIESSLICH mit diesem JSON-Format (kein zusätzlicher Text): +[ + { + "toolName": "Exakter Methoden/Tool-Name", + "priority": "high|medium|low", + "justification": "Objektive Begründung warum diese Methode/Tool für das spezifische Szenario besser geeignet ist" + } +]`; + }, + + // Tool evaluation prompt + toolEvaluation: (userQuery: string, tool: any, rank: number) => { + return `Bewerten Sie diese Methode/Tool fallbezogen für das spezifische Problem nach forensischen Qualitätskriterien. + +PROBLEM: "${userQuery}" + +TOOL: ${tool.name} +BESCHREIBUNG: ${tool.description} +PLATTFORMEN: ${tool.platforms?.join(', ') || 'N/A'} +SKILL LEVEL: ${tool.skillLevel} + +Bewerten Sie nach forensischen Standards und antworten Sie AUSSCHLIESSLICH mit diesem JSON-Format: +{ + "suitability_score": "high|medium|low", + "detailed_explanation": "Detaillierte forensische Begründung warum diese Methode/Tool das Problem löst", + "implementation_approach": "Konkrete methodische Schritte zur korrekten Anwendung für dieses spezifische Problem", + "pros": ["Forensischer Vorteil 1", "Validierter Vorteil 2"], + "cons": ["Methodische Limitation 1", "Potenzielle Schwäche 2"], + "alternatives": "Alternative Ansätze falls diese Methode/Tool nicht optimal ist" +}`; + }, + + // Background knowledge selection prompt + backgroundKnowledgeSelection: (userQuery: string, mode: string, selectedToolNames: string[], availableConcepts: any[]) => { + return `Wählen Sie relevante forensische Konzepte für das Verständnis der empfohlenen Methodik. + +${mode === 'workflow' ? 'SZENARIO' : 'PROBLEM'}: "${userQuery}" +EMPFOHLENE TOOLS: ${selectedToolNames.join(', ')} + +VERFÜGBARE KONZEPTE: +${availableConcepts.slice(0, 15).map((concept: any) => `- ${concept.name}: ${concept.description.slice(0, 80)}...`).join('\n')} + +Wählen Sie 2-4 Konzepte aus, die für das Verständnis der forensischen Methodik essentiell sind. + +Antworten Sie AUSSCHLIESSLICH mit diesem JSON-Format: +[ + { + "conceptName": "Exakter Konzept-Name", + "relevance": "Forensische Relevanz: Warum dieses Konzept für das Verständnis der Methodik kritisch ist" + } +]`; + }, + + // Final recommendations prompt + finalRecommendations: (isWorkflow: boolean, userQuery: string, selectedToolNames: string[]) => { + const prompt = isWorkflow ? + `Erstellen Sie eine forensisch fundierte Workflow-Empfehlung basierend auf DFIR-Prinzipien. + +SZENARIO: "${userQuery}" +AUSGEWÄHLTE TOOLS: ${selectedToolNames.join(', ') || 'Keine Tools ausgewählt'} + +Erstellen Sie konkrete methodische Workflow-Schritte für dieses spezifische Szenario unter Berücksichtigung forensischer Best Practices, Objektivität und rechtlicher Verwertbarkeit. + +WICHTIG: Antworten Sie NUR in fließendem deutschen Text ohne Listen oder Markdown. Maximum 120 Wörter.` : + + `Erstellen Sie wichtige methodische Überlegungen für die korrekte Methoden-/Tool-Anwendung. + +PROBLEM: "${userQuery}" +EMPFOHLENE TOOLS: ${selectedToolNames.join(', ') || 'Keine Methoden/Tools ausgewählt'} + +Geben Sie kritische methodische Überlegungen, Validierungsanforderungen und Qualitätssicherungsmaßnahmen für die korrekte Anwendung der empfohlenen Methoden/Tools. + +WICHTIG: Antworten Sie NUR in fließendem deutschen Text ohne Listen oder Markdown. Maximum 100 Wörter.`; + + return prompt; + } +} as const; + +// Type-safe prompt function with proper overloads +export function getPrompt(key: 'toolSelection', mode: string, userQuery: string, selectionMethod: string, maxSelectedItems: number): string; +export function getPrompt(key: 'scenarioAnalysis', isWorkflow: boolean, userQuery: string): string; +export function getPrompt(key: 'investigationApproach', isWorkflow: boolean, userQuery: string): string; +export function getPrompt(key: 'criticalConsiderations', isWorkflow: boolean, userQuery: string): string; +export function getPrompt(key: 'phaseToolSelection', userQuery: string, phase: any, phaseTools: any[]): string; +export function getPrompt(key: 'toolEvaluation', userQuery: string, tool: any, rank: number): string; +export function getPrompt(key: 'backgroundKnowledgeSelection', userQuery: string, mode: string, selectedToolNames: string[], availableConcepts: any[]): string; +export function getPrompt(key: 'finalRecommendations', isWorkflow: boolean, userQuery: string, selectedToolNames: string[]): string; +export function getPrompt(promptKey: keyof typeof AI_PROMPTS, ...args: any[]): string { + try { + const promptFunction = AI_PROMPTS[promptKey]; + if (typeof promptFunction === 'function') { + // Use type assertion since we've validated the function exists + return (promptFunction as (...args: any[]) => string)(...args); + } else { + console.error(`[PROMPTS] Invalid prompt key: ${promptKey}`); + return 'Error: Invalid prompt configuration'; + } + } catch (error) { + console.error(`[PROMPTS] Error generating prompt ${promptKey}:`, error); + return 'Error: Failed to generate prompt'; + } +} \ No newline at end of file diff --git a/src/utils/aiPipeline.ts b/src/utils/aiPipeline.ts index f608077..a44512c 100644 --- a/src/utils/aiPipeline.ts +++ b/src/utils/aiPipeline.ts @@ -2,6 +2,7 @@ import { getCompressedToolsDataForAI } from './dataService.js'; import { embeddingsService, type EmbeddingData } from './embeddings.js'; +import { AI_PROMPTS, getPrompt } from '../config/prompts.js'; interface AIConfig { endpoint: string; @@ -329,10 +330,6 @@ class ImprovedMicroTaskAIPipeline { ) { const selectionStart = Date.now(); - const modeInstruction = mode === 'workflow' - ? 'The user wants a COMPREHENSIVE WORKFLOW with multiple tools/methods across different phases. Select 15-25 tools that cover the full investigation lifecycle.' - : 'The user wants SPECIFIC TOOLS/METHODS that directly solve their particular problem. Select 3-8 tools that are most relevant and effective.'; - const toolsWithFullData = candidateTools.map((tool: any) => ({ name: tool.name, type: tool.type, @@ -362,69 +359,15 @@ class ImprovedMicroTaskAIPipeline { related_software: concept.related_software || [] })); - const prompt = `You are a DFIR expert with access to the complete forensics tool database. You need to select the most relevant tools and concepts for this specific query. + // Generate the German prompt with tool data + const basePrompt = getPrompt('toolSelection', mode, userQuery, selectionMethod, this.maxSelectedItems); + const prompt = `${basePrompt} -SELECTION METHOD: ${selectionMethod} -${selectionMethod === 'embeddings_candidates' ? - 'These tools were pre-filtered by vector similarity, so they are already relevant. Your job is to select the BEST ones from this relevant set.' : - 'You have access to the full tool database. Select the most relevant tools for the query.'} - -${modeInstruction} - -USER QUERY: "${userQuery}" - -CRITICAL SELECTION PRINCIPLES: -1. **CONTEXT OVER POPULARITY**: Don't default to "famous" tools like Volatility, Wireshark, or Autopsy just because they're well-known. Choose based on SPECIFIC scenario needs. - -2. **METHODOLOGY vs SOFTWARE**: - - For RAPID/URGENT scenarios → Prioritize METHODS and rapid response approaches - - For TIME-CRITICAL incidents → Choose triage methods over deep analysis tools - - For COMPREHENSIVE analysis → Then consider detailed software tools - - METHODS (type: "method") are often better than SOFTWARE for procedural guidance - -3. **SCENARIO-SPECIFIC LOGIC**: - - "Rapid/Quick/Urgent/Triage" scenarios → Rapid Incident Response and Triage METHOD > Volatility - - "Industrial/SCADA/ICS" scenarios → Specialized ICS tools > generic network tools - - "Mobile/Android/iOS" scenarios → Mobile-specific tools > desktop forensics tools - - "Memory analysis needed urgently" → Quick memory tools/methods > comprehensive Volatility analysis - -4. **AVOID TOOL BIAS**: - - Volatility is NOT always the answer for memory analysis - - Wireshark is NOT always the answer for network analysis - - Autopsy is NOT always the answer for disk analysis - - Consider lighter, faster, more appropriate alternatives - -AVAILABLE TOOLS (with complete data): +VERFÜGBARE TOOLS (mit vollständigen Daten): ${JSON.stringify(toolsWithFullData.slice(0, 30), null, 2)} -AVAILABLE CONCEPTS (with complete data): -${JSON.stringify(conceptsWithFullData.slice(0, 10), null, 2)} - -ANALYSIS INSTRUCTIONS: -1. Read the FULL description of each tool/concept -2. Consider ALL tags, platforms, related tools, and metadata -3. **MATCH URGENCY LEVEL**: Rapid scenarios need rapid methods, not deep analysis tools -4. **MATCH SPECIFICITY**: Specialized scenarios need specialized tools, not generic ones -5. **CONSIDER TYPE**: Methods provide procedural guidance, software provides technical capability -6. For SCADA/ICS queries: prioritize specialized ICS tools over generic network tools -7. For mobile queries: prioritize mobile-specific tools over desktop tools -8. For rapid/urgent queries: prioritize methodology and triage approaches - -BIAS PREVENTION: -- If query mentions "rapid", "quick", "urgent", "triage" → Strongly favor METHODS over deep analysis SOFTWARE -- If query mentions specific technologies (SCADA, Android, etc.) → Strongly favor specialized tools -- Don't recommend Volatility unless deep memory analysis is specifically needed AND time allows -- Don't recommend generic tools when specialized ones are available -- Consider the SKILL LEVEL and TIME CONSTRAINTS implied by the query - -Select the most relevant items (max ${this.maxSelectedItems} total). - -Respond with ONLY this JSON format: -{ - "selectedTools": ["Tool Name 1", "Tool Name 2", ...], - "selectedConcepts": ["Concept Name 1", "Concept Name 2", ...], - "reasoning": "Detailed explanation of why these specific tools were selected for this query, addressing why certain popular tools were NOT selected if they were inappropriate for the scenario context" -}`; +VERFÜGBARE KONZEPTE (mit vollständigen Daten): +${JSON.stringify(conceptsWithFullData.slice(0, 10), null, 2)}`; try { const response = await this.callAI(prompt, 2500); @@ -613,24 +556,7 @@ Respond with ONLY this JSON format: private async analyzeScenario(context: AnalysisContext): Promise { const isWorkflow = context.mode === 'workflow'; - - const prompt = `Sie sind ein erfahrener DFIR-Experte. Analysieren Sie das folgende ${isWorkflow ? 'forensische Szenario' : 'technische Problem'}. - -${isWorkflow ? 'FORENSISCHES SZENARIO' : 'TECHNISCHES PROBLEM'}: "${context.userQuery}" - -Führen Sie eine systematische ${isWorkflow ? 'Szenario-Analyse' : 'Problem-Analyse'} durch und berücksichtigen Sie dabei: - -${isWorkflow ? - `- Angriffsvektoren und Bedrohungsmodellierung nach MITRE ATT&CK -- Betroffene Systeme und kritische Infrastrukturen -- Zeitkritische Faktoren und Beweiserhaltung -- Forensische Artefakte und Datenquellen` : - `- Spezifische forensische Herausforderungen -- Verfügbare Datenquellen und deren Integrität -- Methodische Anforderungen für rechtssichere Analyse` -} - -WICHTIG: Antworten Sie NUR in fließendem deutschen Text ohne Listen, Aufzählungen oder Markdown-Formatierung. Maximum 150 Wörter.`; + const prompt = getPrompt('scenarioAnalysis', isWorkflow, context.userQuery); const result = await this.callMicroTaskAI(prompt, context, 220); @@ -649,23 +575,7 @@ WICHTIG: Antworten Sie NUR in fließendem deutschen Text ohne Listen, Aufzählun private async generateApproach(context: AnalysisContext): Promise { const isWorkflow = context.mode === 'workflow'; - - const prompt = `Basierend auf der Analyse entwickeln Sie einen fundierten ${isWorkflow ? 'Untersuchungsansatz' : 'Lösungsansatz'} nach NIST SP 800-86 Methodik. - -${isWorkflow ? 'SZENARIO' : 'PROBLEM'}: "${context.userQuery}" - -Entwickeln Sie einen systematischen ${isWorkflow ? 'Untersuchungsansatz' : 'Lösungsansatz'} unter Berücksichtigung von: - -${isWorkflow ? - `- Triage-Prioritäten nach forensischer Dringlichkeit -- Phasenabfolge nach NIST-Methodik -- Kontaminationsvermeidung und forensische Isolierung` : - `- Methodik-Auswahl nach wissenschaftlichen Kriterien -- Validierung und Verifizierung der gewählten Ansätze -- Integration in bestehende forensische Workflows` -} - -WICHTIG: Antworten Sie NUR in fließendem deutschen Text ohne Listen oder Markdown. Maximum 150 Wörter.`; + const prompt = getPrompt('investigationApproach', isWorkflow, context.userQuery); const result = await this.callMicroTaskAI(prompt, context, 220); @@ -679,25 +589,7 @@ WICHTIG: Antworten Sie NUR in fließendem deutschen Text ohne Listen oder Markdo private async generateCriticalConsiderations(context: AnalysisContext): Promise { const isWorkflow = context.mode === 'workflow'; - - const prompt = `Identifizieren Sie ${isWorkflow ? 'kritische forensische Überlegungen' : 'wichtige methodische Voraussetzungen'} für diesen Fall. - -${isWorkflow ? 'SZENARIO' : 'PROBLEM'}: "${context.userQuery}" - -Berücksichtigen Sie folgende forensische Aspekte: - -${isWorkflow ? - `- Time-sensitive evidence preservation -- Chain of custody requirements und rechtliche Verwertbarkeit -- Incident containment vs. evidence preservation Dilemma -- Privacy- und Compliance-Anforderungen` : - `- Tool-Validierung und Nachvollziehbarkeit -- False positive/negative Risiken bei der gewählten Methodik -- Qualifikationsanforderungen für die Durchführung -- Dokumentations- und Reporting-Standards` -} - -WICHTIG: Antworten Sie NUR in fließendem deutschen Text ohne Listen oder Markdown. Maximum 120 Wörter.`; + const prompt = getPrompt('criticalConsiderations', isWorkflow, context.userQuery); const result = await this.callMicroTaskAI(prompt, context, 180); @@ -723,27 +615,7 @@ WICHTIG: Antworten Sie NUR in fließendem deutschen Text ohne Listen oder Markdo }; } - const prompt = `Wählen Sie 2-3 Methoden/Tools für die Phase "${phase.name}" basierend auf objektiven, fallbezogenen Kriterien. - -SZENARIO: "${context.userQuery}" - -VERFÜGBARE TOOLS FÜR ${phase.name.toUpperCase()}: -${phaseTools.map((tool: any) => `- ${tool.name}: ${tool.description.slice(0, 100)}...`).join('\n')} - -Wählen Sie Methoden/Tools nach forensischen Kriterien aus: -- Court admissibility und Chain of Custody Kompatibilität -- Integration in forensische Standard-Workflows -- Reproduzierbarkeit und Dokumentationsqualität -- Objektivität - -Antworten Sie AUSSCHLIESSLICH mit diesem JSON-Format (kein zusätzlicher Text): -[ - { - "toolName": "Exakter Methoden/Tool-Name", - "priority": "high|medium|low", - "justification": "Objektive Begründung warum diese Methode/Tool für das spezifische Szenario besser geeignet ist" - } -]`; + const prompt = getPrompt('phaseToolSelection', context.userQuery, phase, phaseTools); const result = await this.callMicroTaskAI(prompt, context, 450); @@ -777,24 +649,7 @@ Antworten Sie AUSSCHLIESSLICH mit diesem JSON-Format (kein zusätzlicher Text): } private async evaluateSpecificTool(context: AnalysisContext, tool: any, rank: number): Promise { - const prompt = `Bewerten Sie diese Methode/Tool fallbezogen für das spezifische Problem nach forensischen Qualitätskriterien. - -PROBLEM: "${context.userQuery}" - -TOOL: ${tool.name} -BESCHREIBUNG: ${tool.description} -PLATTFORMEN: ${tool.platforms?.join(', ') || 'N/A'} -SKILL LEVEL: ${tool.skillLevel} - -Bewerten Sie nach forensischen Standards und antworten Sie AUSSCHLIESSLICH mit diesem JSON-Format: -{ - "suitability_score": "high|medium|low", - "detailed_explanation": "Detaillierte forensische Begründung warum diese Methode/Tool das Problem löst", - "implementation_approach": "Konkrete methodische Schritte zur korrekten Anwendung für dieses spezifische Problem", - "pros": ["Forensischer Vorteil 1", "Validierter Vorteil 2"], - "cons": ["Methodische Limitation 1", "Potenzielle Schwäche 2"], - "alternatives": "Alternative Ansätze falls diese Methode/Tool nicht optimal ist" -}`; + const prompt = getPrompt('toolEvaluation', context.userQuery, tool, rank); const result = await this.callMicroTaskAI(prompt, context, 650); @@ -842,24 +697,7 @@ Bewerten Sie nach forensischen Standards und antworten Sie AUSSCHLIESSLICH mit d } const selectedToolNames = context.selectedTools?.map(st => st.tool.name) || []; - - const prompt = `Wählen Sie relevante forensische Konzepte für das Verständnis der empfohlenen Methodik. - -${context.mode === 'workflow' ? 'SZENARIO' : 'PROBLEM'}: "${context.userQuery}" -EMPFOHLENE TOOLS: ${selectedToolNames.join(', ')} - -VERFÜGBARE KONZEPTE: -${availableConcepts.slice(0, 15).map((concept: any) => `- ${concept.name}: ${concept.description.slice(0, 80)}...`).join('\n')} - -Wählen Sie 2-4 Konzepte aus, die für das Verständnis der forensischen Methodik essentiell sind. - -Antworten Sie AUSSCHLIESSLICH mit diesem JSON-Format: -[ - { - "conceptName": "Exakter Konzept-Name", - "relevance": "Forensische Relevanz: Warum dieses Konzept für das Verständnis der Methodik kritisch ist" - } -]`; + const prompt = getPrompt('backgroundKnowledgeSelection', context.userQuery, context.mode, selectedToolNames, availableConcepts); const result = await this.callMicroTaskAI(prompt, context, 400); @@ -889,26 +727,8 @@ Antworten Sie AUSSCHLIESSLICH mit diesem JSON-Format: } private async generateFinalRecommendations(context: AnalysisContext): Promise { - const isWorkflow = context.mode === 'workflow'; - - const prompt = isWorkflow ? - `Erstellen Sie eine forensisch fundierte Workflow-Empfehlung basierend auf DFIR-Prinzipien. - -SZENARIO: "${context.userQuery}" -AUSGEWÄHLTE TOOLS: ${context.selectedTools?.map(st => st.tool.name).join(', ') || 'Keine Tools ausgewählt'} - -Erstellen Sie konkrete methodische Workflow-Schritte für dieses spezifische Szenario unter Berücksichtigung forensischer Best Practices, Objektivität und rechtlicher Verwertbarkeit. - -WICHTIG: Antworten Sie NUR in fließendem deutschen Text ohne Listen oder Markdown. Maximum 120 Wörter.` : - - `Erstellen Sie wichtige methodische Überlegungen für die korrekte Methoden-/Tool-Anwendung. - -PROBLEM: "${context.userQuery}" -EMPFOHLENE TOOLS: ${context.selectedTools?.map(st => st.tool.name).join(', ') || 'Keine Methoden/Tools ausgewählt'} - -Geben Sie kritische methodische Überlegungen, Validierungsanforderungen und Qualitätssicherungsmaßnahmen für die korrekte Anwendung der empfohlenen Methoden/Tools. - -WICHTIG: Antworten Sie NUR in fließendem deutschen Text ohne Listen oder Markdown. Maximum 100 Wörter.`; + const selectedToolNames = context.selectedTools?.map(st => st.tool.name) || []; + const prompt = getPrompt('finalRecommendations', context.mode === 'workflow', context.userQuery, selectedToolNames); const result = await this.callMicroTaskAI(prompt, context, 180); return result; -- 2.39.5 From ec1969b2e248c2a6d80394fa4d4036d83e8d944d Mon Sep 17 00:00:00 2001 From: overcuriousity Date: Mon, 4 Aug 2025 15:11:30 +0200 Subject: [PATCH 04/19] bugfixing in embeddings api --- .env.example | 276 +++++++++++++++++++++++------- src/pages/api/ai/enhance-input.ts | 72 +++++--- src/utils/aiPipeline.ts | 138 ++++++++++----- src/utils/embeddings.ts | 52 +++++- 4 files changed, 400 insertions(+), 138 deletions(-) diff --git a/.env.example b/.env.example index db539be..b127600 100644 --- a/.env.example +++ b/.env.example @@ -1,17 +1,17 @@ # ============================================================================ -# ForensicPathways Environment Configuration +# ForensicPathways Environment Configuration - COMPLETE # ============================================================================ # Copy this file to .env and adjust the values below. -# Settings are ordered by likelihood of needing adjustment during setup. +# This file covers ALL environment variables used in the codebase. # ============================================================================ -# 1. CORE APPLICATION SETTINGS (REQUIRED - ADJUST FOR YOUR SETUP) +# 1. CORE APPLICATION SETTINGS (REQUIRED) # ============================================================================ # Your application's public URL (used for redirects and links) PUBLIC_BASE_URL=http://localhost:4321 -# Application environment (development, production, staging) +# Application environment NODE_ENV=development # Secret key for session encryption (CHANGE IN PRODUCTION!) @@ -22,19 +22,99 @@ AUTH_SECRET=your-secret-key-change-in-production-please # ============================================================================ # Main AI Analysis Service (for query processing and recommendations) -# Example uses Mistral AI - adjust endpoint/model as needed -AI_ANALYZER_ENDPOINT=https://api.mistral.ai/v1 -AI_ANALYZER_API_KEY=your-mistral-api-key-here -AI_ANALYZER_MODEL=mistral-small-latest +# Examples: http://localhost:11434 (Ollama), https://api.mistral.ai, https://api.openai.com +AI_ANALYZER_ENDPOINT=https://api.mistral.ai/v1/chat/completions +AI_ANALYZER_API_KEY= +AI_ANALYZER_MODEL=mistral/mistral-small-latest -# Vector Embeddings Service (for semantic search - can use same provider) +# Vector Embeddings Service (for semantic search) +# Leave API_KEY empty for Ollama, use actual key for cloud services AI_EMBEDDINGS_ENABLED=true AI_EMBEDDINGS_ENDPOINT=https://api.mistral.ai/v1/embeddings -AI_EMBEDDINGS_API_KEY=your-mistral-api-key-here +AI_EMBEDDINGS_API_KEY= AI_EMBEDDINGS_MODEL=mistral-embed # ============================================================================ -# 3. AUTHENTICATION (OPTIONAL - SET TO 'true' IF NEEDED) +# 3. AI PIPELINE CONFIGURATION (CONTEXT & PERFORMANCE TUNING) +# ============================================================================ + +# === SIMILARITY SEARCH STAGE === +# How many similar tools/concepts embeddings search returns as candidates +# 🔍 This is the FIRST filter - vector similarity matching +# Lower = faster, less comprehensive | Higher = slower, more comprehensive +AI_EMBEDDING_CANDIDATES=40 + +# Minimum similarity score threshold (0.0-1.0) +# Lower = more results but less relevant | Higher = fewer but more relevant +AI_SIMILARITY_THRESHOLD=0.3 + +# === AI SELECTION STAGE === +# Maximum tools the AI can select from embedding candidates +# 🤖 This is the SECOND filter - AI intelligent selection +# Should be ≤ AI_EMBEDDING_CANDIDATES +AI_MAX_SELECTED_ITEMS=25 + +# Maximum tools sent to AI for detailed analysis (micro-tasks) +# 📋 This is the FINAL context size sent to AI models +# Lower = less AI context, faster responses | Higher = more context, slower +AI_MAX_TOOLS_TO_ANALYZE=20 + +# Maximum concepts sent to AI for background knowledge selection +# 📚 Concepts are smaller than tools, so can be higher +AI_MAX_CONCEPTS_TO_ANALYZE=10 + +# === CONTEXT FLOW SUMMARY === +# 1. Vector Search: 111 total tools → AI_EMBEDDING_CANDIDATES (40) most similar +# 2. AI Selection: 40 candidates → AI_MAX_SELECTED_ITEMS (25) best matches +# 3. AI Analysis: 25 selected → AI_MAX_TOOLS_TO_ANALYZE (20) for micro-tasks +# 4. Final Output: Recommendations based on analyzed subset + +# ============================================================================ +# 4. AI PERFORMANCE & RATE LIMITING +# ============================================================================ + +# === USER RATE LIMITS (per minute) === +# Main queries per user per minute +AI_RATE_LIMIT_MAX_REQUESTS=4 + +# Total AI micro-task calls per user per minute (across all micro-tasks) +AI_MICRO_TASK_TOTAL_LIMIT=30 + +# === PIPELINE TIMING === +# Delay between micro-tasks within a single query (milliseconds) +# Higher = gentler on AI service | Lower = faster responses +AI_MICRO_TASK_DELAY_MS=500 + +# Delay between queued requests (milliseconds) +AI_RATE_LIMIT_DELAY_MS=2000 + +# === EMBEDDINGS BATCH PROCESSING === +# How many embeddings to generate per API call +AI_EMBEDDINGS_BATCH_SIZE=10 + +# Delay between embedding batches (milliseconds) +AI_EMBEDDINGS_BATCH_DELAY_MS=1000 + +# ============================================================================ +# 5. AI CONTEXT & TOKEN MANAGEMENT +# ============================================================================ + +# Maximum context tokens to maintain across micro-tasks +# Controls how much conversation history is preserved between AI calls +AI_MAX_CONTEXT_TOKENS=3000 + +# Maximum tokens per individual AI prompt +# Larger = more context per call | Smaller = faster responses +AI_MAX_PROMPT_TOKENS=1200 + +# Timeout for individual micro-tasks (milliseconds) +AI_MICRO_TASK_TIMEOUT_MS=25000 + +# Maximum size of the processing queue +AI_QUEUE_MAX_SIZE=50 + +# ============================================================================ +# 6. AUTHENTICATION & AUTHORIZATION (OPTIONAL) # ============================================================================ # Enable authentication for different features @@ -48,30 +128,47 @@ OIDC_CLIENT_ID=your-client-id OIDC_CLIENT_SECRET=your-client-secret # ============================================================================ -# 4. ADVANCED AI CONFIGURATION (FINE-TUNING - DEFAULT VALUES USUALLY WORK) +# 7. FILE UPLOADS - NEXTCLOUD INTEGRATION (OPTIONAL) # ============================================================================ -# Pipeline Performance Settings -AI_MAX_SELECTED_ITEMS=60 # Tools analyzed per micro-task -AI_EMBEDDING_CANDIDATES=60 # Vector search candidates -AI_MICRO_TASK_DELAY_MS=500 # Delay between AI micro-tasks +# Nextcloud server for file uploads (knowledgebase contributions) +# Leave empty to disable file upload functionality +NEXTCLOUD_ENDPOINT=https://your-nextcloud.com -# Rate Limiting (requests per minute) -AI_RATE_LIMIT_MAX_REQUESTS=6 # Main query rate limit -AI_MICRO_TASK_RATE_LIMIT=15 # Micro-task rate limit -AI_RATE_LIMIT_DELAY_MS=3000 # Delay between rate-limited calls +# Nextcloud credentials (app password recommended) +NEXTCLOUD_USERNAME=your-username +NEXTCLOUD_PASSWORD=your-app-password -# Embeddings Batch Processing -AI_EMBEDDINGS_BATCH_SIZE=20 # Embeddings processed per batch -AI_EMBEDDINGS_BATCH_DELAY_MS=1000 # Delay between embedding batches +# Upload directory on Nextcloud (will be created if doesn't exist) +NEXTCLOUD_UPLOAD_PATH=/kb-media -# Timeouts and Limits -AI_MICRO_TASK_TIMEOUT_MS=25000 # Max time per micro-task -AI_QUEUE_MAX_SIZE=50 # Max queued requests -AI_SIMILARITY_THRESHOLD=0.3 # Vector similarity threshold +# Public URL base for sharing uploaded files +# Usually your Nextcloud base URL + share path +NEXTCLOUD_PUBLIC_URL=https://your-nextcloud.com/s/ # ============================================================================ -# 5. FORENSIC AUDIT SYSTEM (OPTIONAL - FOR TRANSPARENCY AND DEBUGGING) +# 8. GIT CONTRIBUTIONS - ISSUE CREATION (OPTIONAL) +# ============================================================================ + +# Git provider: gitea, github, or gitlab +GIT_PROVIDER=gitea + +# Repository URL (used to extract owner/name) +# Example: https://git.example.com/owner/forensic-pathways.git +GIT_REPO_URL=https://git.example.com/owner/forensic-pathways.git + +# API endpoint for your git provider +# Gitea: https://git.example.com/api/v1 +# GitHub: https://api.github.com +# GitLab: https://gitlab.example.com/api/v4 +GIT_API_ENDPOINT=https://git.example.com/api/v1 + +# Personal access token or API token for creating issues +# Generate this in your git provider's settings +GIT_API_TOKEN=your-git-api-token + +# ============================================================================ +# 9. AUDIT & DEBUGGING (OPTIONAL) # ============================================================================ # Enable detailed audit trail of AI decision-making @@ -80,38 +177,49 @@ FORENSIC_AUDIT_ENABLED=false # Audit detail level: minimal, standard, verbose FORENSIC_AUDIT_DETAIL_LEVEL=standard -# Audit retention and limits -FORENSIC_AUDIT_RETENTION_HOURS=72 # Keep audit data for 3 days -FORENSIC_AUDIT_MAX_ENTRIES=50 # Max entries per request +# Audit retention time (hours) +FORENSIC_AUDIT_RETENTION_HOURS=24 + +# Maximum audit entries per request +FORENSIC_AUDIT_MAX_ENTRIES=50 + +# Enable detailed AI pipeline logging +AI_PIPELINE_DEBUG=false + +# Enable performance metrics collection +AI_PERFORMANCE_METRICS=false + +# Enable detailed micro-task debugging +AI_MICRO_TASK_DEBUG=false # ============================================================================ -# 6. QUALITY CONTROL AND BIAS DETECTION (OPTIONAL - ADVANCED FEATURES) +# 10. QUALITY CONTROL & BIAS DETECTION (ADVANCED) # ============================================================================ -# Confidence Scoring Weights (must sum to 1.0) +# Confidence scoring weights (must sum to 1.0) CONFIDENCE_EMBEDDINGS_WEIGHT=0.3 CONFIDENCE_CONSENSUS_WEIGHT=0.25 CONFIDENCE_DOMAIN_MATCH_WEIGHT=0.25 CONFIDENCE_FRESHNESS_WEIGHT=0.2 -# Confidence Thresholds (0-100) +# Confidence thresholds (0-100) CONFIDENCE_MINIMUM_THRESHOLD=40 CONFIDENCE_MEDIUM_THRESHOLD=60 CONFIDENCE_HIGH_THRESHOLD=80 -# Bias Detection Settings +# Bias detection settings BIAS_DETECTION_ENABLED=false -BIAS_POPULARITY_THRESHOLD=0.7 # Detect over-popular tools -BIAS_DIVERSITY_MINIMUM=0.6 # Require recommendation diversity -BIAS_CELEBRITY_TOOLS="Volatility 3,Wireshark,Autopsy,Maltego" +BIAS_POPULARITY_THRESHOLD=0.7 +BIAS_DIVERSITY_MINIMUM=0.6 +BIAS_CELEBRITY_TOOLS="" -# Quality Control Thresholds -QUALITY_MIN_RESPONSE_LENGTH=50 # Minimum AI response length -QUALITY_MIN_SELECTION_COUNT=1 # Minimum tools selected -QUALITY_MAX_PROCESSING_TIME_MS=30000 # Max processing time +# Quality control thresholds +QUALITY_MIN_RESPONSE_LENGTH=50 +QUALITY_MIN_SELECTION_COUNT=1 +QUALITY_MAX_PROCESSING_TIME_MS=30000 # ============================================================================ -# 7. USER INTERFACE PREFERENCES (OPTIONAL - UI DEFAULTS) +# 11. USER INTERFACE DEFAULTS (OPTIONAL) # ============================================================================ # Default UI behavior (users can override) @@ -121,34 +229,76 @@ UI_SHOW_BIAS_WARNINGS=true UI_AUDIT_TRAIL_COLLAPSIBLE=true # ============================================================================ -# 8. EXTERNAL INTEGRATIONS (OPTIONAL - ONLY IF USING THESE SERVICES) +# 12. CACHING & PERFORMANCE (OPTIONAL) # ============================================================================ -# Nextcloud Integration (for file uploads) -# NEXTCLOUD_ENDPOINT=https://your-nextcloud.com -# NEXTCLOUD_USERNAME=your-username -# NEXTCLOUD_PASSWORD=your-password -# NEXTCLOUD_UPLOAD_PATH=/kb-media -# NEXTCLOUD_PUBLIC_URL=https://your-nextcloud.com/s/ +# Cache AI responses (milliseconds) +AI_RESPONSE_CACHE_TTL_MS=3600000 + +# Queue cleanup interval (milliseconds) +AI_QUEUE_CLEANUP_INTERVAL_MS=300000 # ============================================================================ -# 9. PERFORMANCE AND MONITORING (OPTIONAL - FOR PRODUCTION OPTIMIZATION) +# PERFORMANCE TUNING PRESETS # ============================================================================ -# Caching and Queue Management -AI_RESPONSE_CACHE_TTL_MS=3600000 # Cache responses for 1 hour -AI_QUEUE_CLEANUP_INTERVAL_MS=300000 # Cleanup queue every 5 minutes +# 🚀 FOR FASTER RESPONSES (less comprehensive): +# AI_EMBEDDING_CANDIDATES=20 +# AI_MAX_SELECTED_ITEMS=15 +# AI_MAX_TOOLS_TO_ANALYZE=10 +# AI_MICRO_TASK_DELAY_MS=200 +# AI_MAX_CONTEXT_TOKENS=2000 -# Debug and Monitoring -AI_MICRO_TASK_DEBUG=false # Enable detailed micro-task logging -AI_PERFORMANCE_METRICS=false # Enable performance tracking +# 🎯 FOR BETTER QUALITY (more comprehensive): +# AI_EMBEDDING_CANDIDATES=60 +# AI_MAX_SELECTED_ITEMS=40 +# AI_MAX_TOOLS_TO_ANALYZE=30 +# AI_MICRO_TASK_DELAY_MS=800 +# AI_MAX_CONTEXT_TOKENS=4000 + +# 🔋 FOR LOW-POWER SYSTEMS (minimal resources): +# AI_EMBEDDING_CANDIDATES=15 +# AI_MAX_SELECTED_ITEMS=10 +# AI_MAX_TOOLS_TO_ANALYZE=8 +# AI_RATE_LIMIT_MAX_REQUESTS=2 +# AI_MICRO_TASK_DELAY_MS=1000 # ============================================================================ -# SETUP CHECKLIST: +# FEATURE COMBINATIONS GUIDE # ============================================================================ -# 1. Set PUBLIC_BASE_URL to your domain -# 2. Change AUTH_SECRET to a secure random string -# 3. Configure AI service endpoints and API keys -# 4. Set authentication options if needed -# 5. Test with default advanced settings before adjusting + +# 📝 BASIC SETUP (AI only): +# - Configure AI_ANALYZER_* and AI_EMBEDDINGS_* +# - Leave authentication, file uploads, and git disabled + +# 🔐 WITH AUTHENTICATION: +# - Set AUTHENTICATION_NECESSARY_* to true +# - Configure OIDC_* settings + +# 📁 WITH FILE UPLOADS: +# - Configure all NEXTCLOUD_* settings +# - Test connection before enabling in UI + +# 🔄 WITH CONTRIBUTIONS: +# - Configure all GIT_* settings +# - Test API token permissions for issue creation + +# 🔍 WITH FULL MONITORING: +# - Enable FORENSIC_AUDIT_ENABLED=true +# - Enable AI_PIPELINE_DEBUG=true +# - Configure audit retention and detail level + +# ============================================================================ +# SETUP CHECKLIST +# ============================================================================ +# ✅ 1. Set PUBLIC_BASE_URL to your domain +# ✅ 2. Change AUTH_SECRET to a secure random string +# ✅ 3. Configure AI endpoints (Ollama: leave API_KEY empty) +# ✅ 4. Start with default AI values, tune based on performance +# ✅ 5. Enable authentication if needed (configure OIDC) +# ✅ 6. Configure Nextcloud if file uploads needed +# ✅ 7. Configure Git provider if contributions needed +# ✅ 8. Test with a simple query to verify pipeline works +# ✅ 9. Enable audit trail for transparency if desired +# ✅ 10. Tune performance settings based on usage patterns # ============================================================================ \ No newline at end of file diff --git a/src/pages/api/ai/enhance-input.ts b/src/pages/api/ai/enhance-input.ts index 0d12a09..86086e2 100644 --- a/src/pages/api/ai/enhance-input.ts +++ b/src/pages/api/ai/enhance-input.ts @@ -1,4 +1,5 @@ -// src/pages/api/ai/enhance-input.ts - ENHANCED with forensics methodology +// src/pages/api/ai/enhance-input.ts - Enhanced AI service compatibility + import type { APIRoute } from 'astro'; import { withAPIAuth } from '../../../utils/auth.js'; import { apiError, apiServerError, createAuthErrorResponse } from '../../../utils/api.js'; @@ -20,7 +21,7 @@ const AI_ANALYZER_MODEL = getEnv('AI_ANALYZER_MODEL'); const rateLimitStore = new Map(); const RATE_LIMIT_WINDOW = 60 * 1000; // 1 minute -const RATE_LIMIT_MAX = 5; +const RATE_LIMIT_MAX = 5; function sanitizeInput(input: string): string { return input @@ -93,6 +94,45 @@ ${input} `.trim(); } +// Enhanced AI service call function +async function callAIService(prompt: string): Promise { + const endpoint = AI_ENDPOINT; + const apiKey = AI_ANALYZER_API_KEY; + const model = AI_ANALYZER_MODEL; + + // Simple headers - add auth only if API key exists + let headers: Record = { + 'Content-Type': 'application/json' + }; + + // Add authentication if API key is provided + if (apiKey) { + headers['Authorization'] = `Bearer ${apiKey}`; + console.log('[ENHANCE API] Using API key authentication'); + } else { + console.log('[ENHANCE API] No API key - making request without authentication'); + } + + // Simple request body + const requestBody = { + model, + messages: [{ role: 'user', content: prompt }], + max_tokens: 300, + temperature: 0.7, + top_p: 0.9, + frequency_penalty: 0.2, + presence_penalty: 0.1 + }; + + // FIXED: This function is already being called through enqueueApiCall in the main handler + // So we can use direct fetch here since the queuing happens at the caller level + return fetch(`${endpoint}/v1/chat/completions`, { + method: 'POST', + headers, + body: JSON.stringify(requestBody) + }); +} + export const POST: APIRoute = async ({ request }) => { try { const authResult = await withAPIAuth(request, 'ai'); @@ -121,31 +161,11 @@ export const POST: APIRoute = async ({ request }) => { const systemPrompt = createEnhancementPrompt(sanitizedInput); const taskId = `enhance_${userId}_${Date.now()}_${Math.random().toString(36).substr(2, 4)}`; - const aiResponse = await enqueueApiCall(() => - fetch(`${AI_ENDPOINT}/v1/chat/completions`, { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - 'Authorization': `Bearer ${AI_ANALYZER_API_KEY}` - }, - body: JSON.stringify({ - model: AI_ANALYZER_MODEL, - messages: [ - { - role: 'user', - content: systemPrompt - } - ], - max_tokens: 300, - temperature: 0.7, - top_p: 0.9, - frequency_penalty: 0.2, - presence_penalty: 0.1 - }) - }), taskId); + const aiResponse = await enqueueApiCall(() => callAIService(systemPrompt), taskId); if (!aiResponse.ok) { - console.error('AI enhancement error:', await aiResponse.text()); + const errorText = await aiResponse.text(); + console.error('[ENHANCE API] AI enhancement error:', errorText, 'Status:', aiResponse.status); return apiServerError.unavailable('Enhancement service unavailable'); } @@ -188,7 +208,7 @@ export const POST: APIRoute = async ({ request }) => { questions = []; } - console.log(`[AI Enhancement] User: ${userId}, Forensics Questions: ${questions.length}, Input length: ${sanitizedInput.length}`); + console.log(`[ENHANCE API] User: ${userId}, Forensics Questions: ${questions.length}, Input length: ${sanitizedInput.length}`); return new Response(JSON.stringify({ success: true, diff --git a/src/utils/aiPipeline.ts b/src/utils/aiPipeline.ts index a44512c..003523d 100644 --- a/src/utils/aiPipeline.ts +++ b/src/utils/aiPipeline.ts @@ -66,6 +66,11 @@ interface AnalysisContext { auditTrail: AuditEntry[]; } +interface SimilarityResult extends EmbeddingData { + similarity: number; +} + + class ImprovedMicroTaskAIPipeline { private config: AIConfig; private maxSelectedItems: number; @@ -267,39 +272,62 @@ class ImprovedMicroTaskAIPipeline { userQuery, this.embeddingCandidates, this.similarityThreshold - ); + ) as SimilarityResult[]; // Type assertion for similarity property - const toolNames = new Set(); - const conceptNames = new Set(); + console.log(`[IMPROVED PIPELINE] Embeddings found ${similarItems.length} similar items`); - similarItems.forEach(item => { - if (item.type === 'tool') toolNames.add(item.name); - if (item.type === 'concept') conceptNames.add(item.name); - }); + // FIXED: Create lookup maps for O(1) access while preserving original data + const toolsMap = new Map(toolsData.tools.map((tool: any) => [tool.name, tool])); + const conceptsMap = new Map(toolsData.concepts.map((concept: any) => [concept.name, concept])); - console.log(`[IMPROVED PIPELINE] Embeddings found: ${toolNames.size} tools, ${conceptNames.size} concepts`); + // FIXED: Process in similarity order, preserving the ranking + const similarTools = similarItems + .filter((item): item is SimilarityResult => item.type === 'tool') + .map(item => toolsMap.get(item.name)) + .filter((tool): tool is any => tool !== undefined); // Proper type guard - if (toolNames.size >= 15) { - candidateTools = toolsData.tools.filter((tool: any) => toolNames.has(tool.name)); - candidateConcepts = toolsData.concepts.filter((concept: any) => conceptNames.has(concept.name)); + const similarConcepts = similarItems + .filter((item): item is SimilarityResult => item.type === 'concept') + .map(item => conceptsMap.get(item.name)) + .filter((concept): concept is any => concept !== undefined); // Proper type guard + + console.log(`[IMPROVED PIPELINE] Similarity-ordered results: ${similarTools.length} tools, ${similarConcepts.length} concepts`); + + // Log the first few tools to verify ordering is preserved + if (similarTools.length > 0) { + console.log(`[IMPROVED PIPELINE] Top similar tools (in similarity order):`); + similarTools.slice(0, 5).forEach((tool, idx) => { + const originalSimilarItem = similarItems.find(item => item.name === tool.name); + console.log(` ${idx + 1}. ${tool.name} (similarity: ${originalSimilarItem?.similarity?.toFixed(4) || 'N/A'})`); + }); + } + + if (similarTools.length >= 15) { + candidateTools = similarTools; + candidateConcepts = similarConcepts; selectionMethod = 'embeddings_candidates'; - console.log(`[IMPROVED PIPELINE] Using embeddings candidates: ${candidateTools.length} tools`); + console.log(`[IMPROVED PIPELINE] Using embeddings candidates in similarity order: ${candidateTools.length} tools`); } else { - console.log(`[IMPROVED PIPELINE] Embeddings insufficient (${toolNames.size} < 15), using full dataset`); + console.log(`[IMPROVED PIPELINE] Embeddings insufficient (${similarTools.length} < 15), using full dataset`); candidateTools = toolsData.tools; candidateConcepts = toolsData.concepts; selectionMethod = 'full_dataset'; } - // NEW: Add Audit Entry for Embeddings Search + // NEW: Add Audit Entry for Embeddings Search with ordering verification if (this.auditConfig.enabled) { this.addAuditEntry(null, 'retrieval', 'embeddings-search', { query: userQuery, threshold: this.similarityThreshold, candidates: this.embeddingCandidates }, - { candidatesFound: similarItems.length, toolNames: Array.from(toolNames), conceptNames: Array.from(conceptNames) }, - similarItems.length >= 15 ? 85 : 60, // Confidence based on result quality + { + candidatesFound: similarItems.length, + toolsInOrder: similarTools.slice(0, 3).map((t: any) => t.name), + conceptsInOrder: similarConcepts.slice(0, 3).map((c: any) => c.name), + orderingPreserved: true + }, + similarTools.length >= 15 ? 85 : 60, embeddingsStart, - { selectionMethod, embeddingsEnabled: true } + { selectionMethod, embeddingsEnabled: true, orderingFixed: true } ); } } else { @@ -309,7 +337,7 @@ class ImprovedMicroTaskAIPipeline { selectionMethod = 'full_dataset'; } - console.log(`[IMPROVED PIPELINE] AI will analyze FULL DATA of ${candidateTools.length} candidate tools`); + console.log(`[IMPROVED PIPELINE] AI will analyze ${candidateTools.length} candidate tools (ordering preserved: ${selectionMethod === 'embeddings_candidates'})`); const finalSelection = await this.aiSelectionWithFullData(userQuery, candidateTools, candidateConcepts, mode, selectionMethod); return { @@ -735,33 +763,59 @@ ${JSON.stringify(conceptsWithFullData.slice(0, 10), null, 2)}`; } private async callAI(prompt: string, maxTokens: number = 1000): Promise { - const response = await fetch(`${this.config.endpoint}/v1/chat/completions`, { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - 'Authorization': `Bearer ${this.config.apiKey}` - }, - body: JSON.stringify({ - model: this.config.model, - messages: [{ role: 'user', content: prompt }], - max_tokens: maxTokens, - temperature: 0.3 - }) - }); - - if (!response.ok) { - const errorText = await response.text(); - throw new Error(`AI API error: ${response.status} - ${errorText}`); - } - - const data = await response.json(); - const content = data.choices?.[0]?.message?.content; + const endpoint = this.config.endpoint; + const apiKey = this.config.apiKey; + const model = this.config.model; - if (!content) { - throw new Error('No response from AI model'); + // Simple headers - add auth only if API key exists + let headers: Record = { + 'Content-Type': 'application/json' + }; + + // Add authentication if API key is provided + if (apiKey) { + headers['Authorization'] = `Bearer ${apiKey}`; + console.log('[AI PIPELINE] Using API key authentication'); + } else { + console.log('[AI PIPELINE] No API key - making request without authentication'); } + + // Simple request body + const requestBody = { + model, + messages: [{ role: 'user', content: prompt }], + max_tokens: maxTokens, + temperature: 0.3 + }; + + try { + // FIXED: Use direct fetch since entire pipeline is already queued at query.ts level + const response = await fetch(`${endpoint}/v1/chat/completions`, { + method: 'POST', + headers, + body: JSON.stringify(requestBody) + }); - return content; + if (!response.ok) { + const errorText = await response.text(); + console.error(`[AI PIPELINE] AI API Error ${response.status}:`, errorText); + throw new Error(`AI API error: ${response.status} - ${errorText}`); + } + + const data = await response.json(); + const content = data.choices?.[0]?.message?.content; + + if (!content) { + console.error('[AI PIPELINE] No response content:', data); + throw new Error('No response from AI model'); + } + + return content; + + } catch (error) { + console.error('[AI PIPELINE] AI service call failed:', error.message); + throw error; + } } async processQuery(userQuery: string, mode: string): Promise { diff --git a/src/utils/embeddings.ts b/src/utils/embeddings.ts index 369b95d..7c73228 100644 --- a/src/utils/embeddings.ts +++ b/src/utils/embeddings.ts @@ -24,6 +24,10 @@ interface EmbeddingsDatabase { embeddings: EmbeddingData[]; } +interface SimilarityResult extends EmbeddingData { + similarity: number; +} + class EmbeddingsService { private embeddings: EmbeddingData[] = []; private isInitialized = false; @@ -211,8 +215,9 @@ class EmbeddingsService { return dotProduct / (Math.sqrt(normA) * Math.sqrt(normB)); } - async findSimilar(query: string, maxResults: number = 30, threshold: number = 0.3): Promise { + async findSimilar(query: string, maxResults: number = 30, threshold: number = 0.3): Promise { if (!this.enabled || !this.isInitialized || this.embeddings.length === 0) { + console.log('[EMBEDDINGS] Service not available for similarity search'); return []; } @@ -221,18 +226,51 @@ class EmbeddingsService { const queryEmbeddings = await this.generateEmbeddingsBatch([query.toLowerCase()]); const queryEmbedding = queryEmbeddings[0]; - // Calculate similarities - const similarities = this.embeddings.map(item => ({ + console.log(`[EMBEDDINGS] Computing similarities for ${this.embeddings.length} items`); + + // Calculate similarities - properly typed + const similarities: SimilarityResult[] = this.embeddings.map(item => ({ ...item, similarity: this.cosineSimilarity(queryEmbedding, item.embedding) })); - // Filter by threshold and sort by similarity - return similarities + // Filter by threshold and sort by similarity (descending - highest first) + const results = similarities .filter(item => item.similarity >= threshold) - .sort((a, b) => b.similarity - a.similarity) + .sort((a, b) => b.similarity - a.similarity) // CRITICAL: Ensure descending order .slice(0, maxResults); + // ENHANCED: Verify ordering is correct + const orderingValid = results.every((item, index) => { + if (index === 0) return true; + return item.similarity <= results[index - 1].similarity; + }); + + if (!orderingValid) { + console.error('[EMBEDDINGS] CRITICAL: Similarity ordering is broken!'); + results.forEach((item, idx) => { + console.error(` ${idx}: ${item.name} = ${item.similarity.toFixed(4)}`); + }); + } + + // ENHANCED: Log top results for debugging + console.log(`[EMBEDDINGS] Found ${results.length} similar items (threshold: ${threshold})`); + if (results.length > 0) { + console.log('[EMBEDDINGS] Top 5 similarity matches:'); + results.slice(0, 5).forEach((item, idx) => { + console.log(` ${idx + 1}. ${item.name} (${item.type}) = ${item.similarity.toFixed(4)}`); + }); + + // Verify first result is indeed the highest + const topSimilarity = results[0].similarity; + const hasHigherSimilarity = results.some(item => item.similarity > topSimilarity); + if (hasHigherSimilarity) { + console.error('[EMBEDDINGS] CRITICAL: Top result is not actually the highest similarity!'); + } + } + + return results; + } catch (error) { console.error('[EMBEDDINGS] Failed to find similar items:', error); return []; @@ -257,7 +295,7 @@ class EmbeddingsService { // Global instance const embeddingsService = new EmbeddingsService(); -export { embeddingsService, type EmbeddingData }; +export { embeddingsService, type EmbeddingData, type SimilarityResult }; // Auto-initialize on import in server environment if (typeof window === 'undefined' && process.env.NODE_ENV !== 'test') { -- 2.39.5 From 3a5e8e88b2f769229bd2a5e2228b3477e5fc0adb Mon Sep 17 00:00:00 2001 From: overcuriousity Date: Mon, 4 Aug 2025 16:01:29 +0200 Subject: [PATCH 05/19] embeddings fix for ollama --- src/utils/embeddings.ts | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/src/utils/embeddings.ts b/src/utils/embeddings.ts index 7c73228..b7bbbaa 100644 --- a/src/utils/embeddings.ts +++ b/src/utils/embeddings.ts @@ -119,16 +119,22 @@ class EmbeddingsService { const apiKey = process.env.AI_EMBEDDINGS_API_KEY; const model = process.env.AI_EMBEDDINGS_MODEL; - if (!endpoint || !apiKey || !model) { + if (!endpoint || !model) { throw new Error('Missing embeddings API configuration'); } + const headers: Record = { + 'Content-Type': 'application/json' + }; + + // API key is optional for Ollama but required for Mistral/OpenAI + if (apiKey) { + headers['Authorization'] = `Bearer ${apiKey}`; + } + const response = await fetch(endpoint, { method: 'POST', - headers: { - 'Content-Type': 'application/json', - 'Authorization': `Bearer ${apiKey}` - }, + headers, body: JSON.stringify({ model, input: contents @@ -141,7 +147,18 @@ class EmbeddingsService { } const data = await response.json(); - return data.data.map((item: any) => item.embedding); + + // Detect Ollama format + if (Array.isArray(data.embeddings)) { + return data.embeddings; + } + + // Detect OpenAI/Mistral format + if (Array.isArray(data.data)) { + return data.data.map((item: any) => item.embedding); + } + + throw new Error('Unknown embeddings API response format'); } private async generateEmbeddings(toolsData: any, version: string): Promise { -- 2.39.5 From 7c3cc7ec9a29b6dcda6e763702aacd17f881ef92 Mon Sep 17 00:00:00 2001 From: overcuriousity Date: Mon, 4 Aug 2025 20:03:49 +0200 Subject: [PATCH 06/19] fix embeddings truncation --- .env.example | 73 +++--------- src/config/forensic.config.ts | 126 -------------------- src/utils/aiPipeline.ts | 209 +++++++++++++++++----------------- src/utils/dataService.ts | 138 +--------------------- src/utils/rateLimitedQueue.ts | 9 -- src/utils/toolHelpers.ts | 26 ----- 6 files changed, 121 insertions(+), 460 deletions(-) delete mode 100644 src/config/forensic.config.ts diff --git a/.env.example b/.env.example index b127600..8b45de2 100644 --- a/.env.example +++ b/.env.example @@ -42,32 +42,35 @@ AI_EMBEDDINGS_MODEL=mistral-embed # How many similar tools/concepts embeddings search returns as candidates # 🔍 This is the FIRST filter - vector similarity matching # Lower = faster, less comprehensive | Higher = slower, more comprehensive -AI_EMBEDDING_CANDIDATES=40 +AI_EMBEDDING_CANDIDATES=50 # Minimum similarity score threshold (0.0-1.0) # Lower = more results but less relevant | Higher = fewer but more relevant AI_SIMILARITY_THRESHOLD=0.3 +# === AI SELECTION FROM EMBEDDINGS === +# When embeddings are enabled, how many top tools to send with full context +# 🎯 This is the SECOND filter - take best N from embeddings results +AI_EMBEDDING_SELECTION_LIMIT=30 +AI_EMBEDDING_CONCEPTS_LIMIT=15 + # === AI SELECTION STAGE === # Maximum tools the AI can select from embedding candidates # 🤖 This is the SECOND filter - AI intelligent selection # Should be ≤ AI_EMBEDDING_CANDIDATES AI_MAX_SELECTED_ITEMS=25 -# Maximum tools sent to AI for detailed analysis (micro-tasks) -# 📋 This is the FINAL context size sent to AI models -# Lower = less AI context, faster responses | Higher = more context, slower -AI_MAX_TOOLS_TO_ANALYZE=20 +# === EMBEDDINGS EFFICIENCY THRESHOLDS === +# Minimum tools required for embeddings to be considered useful +AI_EMBEDDINGS_MIN_TOOLS=8 -# Maximum concepts sent to AI for background knowledge selection -# 📚 Concepts are smaller than tools, so can be higher -AI_MAX_CONCEPTS_TO_ANALYZE=10 +# Maximum percentage of total tools that embeddings can return to be considered "filtering" +AI_EMBEDDINGS_MAX_REDUCTION_RATIO=0.75 # === CONTEXT FLOW SUMMARY === # 1. Vector Search: 111 total tools → AI_EMBEDDING_CANDIDATES (40) most similar # 2. AI Selection: 40 candidates → AI_MAX_SELECTED_ITEMS (25) best matches -# 3. AI Analysis: 25 selected → AI_MAX_TOOLS_TO_ANALYZE (20) for micro-tasks -# 4. Final Output: Recommendations based on analyzed subset +# 3. Final Output: Recommendations based on analyzed subset # ============================================================================ # 4. AI PERFORMANCE & RATE LIMITING @@ -107,12 +110,6 @@ AI_MAX_CONTEXT_TOKENS=3000 # Larger = more context per call | Smaller = faster responses AI_MAX_PROMPT_TOKENS=1200 -# Timeout for individual micro-tasks (milliseconds) -AI_MICRO_TASK_TIMEOUT_MS=25000 - -# Maximum size of the processing queue -AI_QUEUE_MAX_SIZE=50 - # ============================================================================ # 6. AUTHENTICATION & AUTHORIZATION (OPTIONAL) # ============================================================================ @@ -183,15 +180,6 @@ FORENSIC_AUDIT_RETENTION_HOURS=24 # Maximum audit entries per request FORENSIC_AUDIT_MAX_ENTRIES=50 -# Enable detailed AI pipeline logging -AI_PIPELINE_DEBUG=false - -# Enable performance metrics collection -AI_PERFORMANCE_METRICS=false - -# Enable detailed micro-task debugging -AI_MICRO_TASK_DEBUG=false - # ============================================================================ # 10. QUALITY CONTROL & BIAS DETECTION (ADVANCED) # ============================================================================ @@ -207,37 +195,6 @@ CONFIDENCE_MINIMUM_THRESHOLD=40 CONFIDENCE_MEDIUM_THRESHOLD=60 CONFIDENCE_HIGH_THRESHOLD=80 -# Bias detection settings -BIAS_DETECTION_ENABLED=false -BIAS_POPULARITY_THRESHOLD=0.7 -BIAS_DIVERSITY_MINIMUM=0.6 -BIAS_CELEBRITY_TOOLS="" - -# Quality control thresholds -QUALITY_MIN_RESPONSE_LENGTH=50 -QUALITY_MIN_SELECTION_COUNT=1 -QUALITY_MAX_PROCESSING_TIME_MS=30000 - -# ============================================================================ -# 11. USER INTERFACE DEFAULTS (OPTIONAL) -# ============================================================================ - -# Default UI behavior (users can override) -UI_SHOW_AUDIT_TRAIL_DEFAULT=false -UI_SHOW_CONFIDENCE_SCORES=true -UI_SHOW_BIAS_WARNINGS=true -UI_AUDIT_TRAIL_COLLAPSIBLE=true - -# ============================================================================ -# 12. CACHING & PERFORMANCE (OPTIONAL) -# ============================================================================ - -# Cache AI responses (milliseconds) -AI_RESPONSE_CACHE_TTL_MS=3600000 - -# Queue cleanup interval (milliseconds) -AI_QUEUE_CLEANUP_INTERVAL_MS=300000 - # ============================================================================ # PERFORMANCE TUNING PRESETS # ============================================================================ @@ -245,21 +202,18 @@ AI_QUEUE_CLEANUP_INTERVAL_MS=300000 # 🚀 FOR FASTER RESPONSES (less comprehensive): # AI_EMBEDDING_CANDIDATES=20 # AI_MAX_SELECTED_ITEMS=15 -# AI_MAX_TOOLS_TO_ANALYZE=10 # AI_MICRO_TASK_DELAY_MS=200 # AI_MAX_CONTEXT_TOKENS=2000 # 🎯 FOR BETTER QUALITY (more comprehensive): # AI_EMBEDDING_CANDIDATES=60 # AI_MAX_SELECTED_ITEMS=40 -# AI_MAX_TOOLS_TO_ANALYZE=30 # AI_MICRO_TASK_DELAY_MS=800 # AI_MAX_CONTEXT_TOKENS=4000 # 🔋 FOR LOW-POWER SYSTEMS (minimal resources): # AI_EMBEDDING_CANDIDATES=15 # AI_MAX_SELECTED_ITEMS=10 -# AI_MAX_TOOLS_TO_ANALYZE=8 # AI_RATE_LIMIT_MAX_REQUESTS=2 # AI_MICRO_TASK_DELAY_MS=1000 @@ -285,7 +239,6 @@ AI_QUEUE_CLEANUP_INTERVAL_MS=300000 # 🔍 WITH FULL MONITORING: # - Enable FORENSIC_AUDIT_ENABLED=true -# - Enable AI_PIPELINE_DEBUG=true # - Configure audit retention and detail level # ============================================================================ diff --git a/src/config/forensic.config.ts b/src/config/forensic.config.ts deleted file mode 100644 index 5723854..0000000 --- a/src/config/forensic.config.ts +++ /dev/null @@ -1,126 +0,0 @@ -// src/config/forensic.config.ts -// Centralized configuration for forensic RAG enhancements - -export const FORENSIC_CONFIG = { - audit: { - enabled: process.env.FORENSIC_AUDIT_ENABLED === 'true', - detailLevel: (process.env.FORENSIC_AUDIT_DETAIL_LEVEL as 'minimal' | 'standard' | 'verbose') || 'standard', - retentionHours: parseInt(process.env.FORENSIC_AUDIT_RETENTION_HOURS || '72', 10), - maxEntriesPerRequest: parseInt(process.env.FORENSIC_AUDIT_MAX_ENTRIES || '50', 10) - }, - confidence: { - embeddingsWeight: parseFloat(process.env.CONFIDENCE_EMBEDDINGS_WEIGHT || '0.3'), - consensusWeight: parseFloat(process.env.CONFIDENCE_CONSENSUS_WEIGHT || '0.25'), - domainMatchWeight: parseFloat(process.env.CONFIDENCE_DOMAIN_MATCH_WEIGHT || '0.25'), - freshnessWeight: parseFloat(process.env.CONFIDENCE_FRESHNESS_WEIGHT || '0.2'), - minimumThreshold: parseInt(process.env.CONFIDENCE_MINIMUM_THRESHOLD || '40', 10), - highThreshold: parseInt(process.env.CONFIDENCE_HIGH_THRESHOLD || '80', 10), - mediumThreshold: parseInt(process.env.CONFIDENCE_MEDIUM_THRESHOLD || '60', 10) - }, - bias: { - enabled: process.env.BIAS_DETECTION_ENABLED === 'true', - popularityThreshold: parseFloat(process.env.BIAS_POPULARITY_THRESHOLD || '0.7'), - diversityMinimum: parseFloat(process.env.BIAS_DIVERSITY_MINIMUM || '0.6'), - domainMismatchThreshold: parseFloat(process.env.BIAS_DOMAIN_MISMATCH_THRESHOLD || '0.3'), - warningThreshold: parseInt(process.env.BIAS_WARNING_THRESHOLD || '3', 10), - celebrityTools: (process.env.BIAS_CELEBRITY_TOOLS || 'Volatility 3,Wireshark,Autopsy,Maltego').split(',').map(t => t.trim()) - }, - // Quality thresholds for various metrics - quality: { - minResponseLength: parseInt(process.env.QUALITY_MIN_RESPONSE_LENGTH || '50', 10), - minSelectionCount: parseInt(process.env.QUALITY_MIN_SELECTION_COUNT || '1', 10), - maxProcessingTime: parseInt(process.env.QUALITY_MAX_PROCESSING_TIME_MS || '30000', 10) - }, - // Display preferences - ui: { - showAuditTrailByDefault: process.env.UI_SHOW_AUDIT_TRAIL_DEFAULT === 'true', - showConfidenceScores: process.env.UI_SHOW_CONFIDENCE_SCORES !== 'false', - showBiasWarnings: process.env.UI_SHOW_BIAS_WARNINGS !== 'false', - auditTrailCollapsible: process.env.UI_AUDIT_TRAIL_COLLAPSIBLE !== 'false' - } -}; - -// Validation function to ensure configuration is valid -export function validateForensicConfig(): { valid: boolean; errors: string[] } { - const errors: string[] = []; - - // Validate audit configuration - if (FORENSIC_CONFIG.audit.retentionHours < 1 || FORENSIC_CONFIG.audit.retentionHours > 168) { - errors.push('FORENSIC_AUDIT_RETENTION_HOURS must be between 1 and 168 (1 week)'); - } - - if (!['minimal', 'standard', 'verbose'].includes(FORENSIC_CONFIG.audit.detailLevel)) { - errors.push('FORENSIC_AUDIT_DETAIL_LEVEL must be one of: minimal, standard, verbose'); - } - - // Validate confidence weights sum to approximately 1.0 - const weightSum = FORENSIC_CONFIG.confidence.embeddingsWeight + - FORENSIC_CONFIG.confidence.consensusWeight + - FORENSIC_CONFIG.confidence.domainMatchWeight + - FORENSIC_CONFIG.confidence.freshnessWeight; - - if (Math.abs(weightSum - 1.0) > 0.05) { - errors.push(`Confidence weights must sum to 1.0 (currently ${weightSum.toFixed(3)})`); - } - - // Validate threshold ranges - if (FORENSIC_CONFIG.confidence.minimumThreshold < 0 || FORENSIC_CONFIG.confidence.minimumThreshold > 100) { - errors.push('CONFIDENCE_MINIMUM_THRESHOLD must be between 0 and 100'); - } - - if (FORENSIC_CONFIG.confidence.highThreshold <= FORENSIC_CONFIG.confidence.mediumThreshold) { - errors.push('CONFIDENCE_HIGH_THRESHOLD must be greater than CONFIDENCE_MEDIUM_THRESHOLD'); - } - - // Validate bias thresholds - if (FORENSIC_CONFIG.bias.popularityThreshold < 0 || FORENSIC_CONFIG.bias.popularityThreshold > 1) { - errors.push('BIAS_POPULARITY_THRESHOLD must be between 0 and 1'); - } - - if (FORENSIC_CONFIG.bias.diversityMinimum < 0 || FORENSIC_CONFIG.bias.diversityMinimum > 1) { - errors.push('BIAS_DIVERSITY_MINIMUM must be between 0 and 1'); - } - - return { - valid: errors.length === 0, - errors - }; -} - -// Helper functions for configuration access -export function isAuditEnabled(): boolean { - return FORENSIC_CONFIG.audit.enabled; -} - -export function getAuditDetailLevel(): 'minimal' | 'standard' | 'verbose' { - return FORENSIC_CONFIG.audit.detailLevel; -} - -export function getConfidenceThresholds() { - return { - minimum: FORENSIC_CONFIG.confidence.minimumThreshold, - medium: FORENSIC_CONFIG.confidence.mediumThreshold, - high: FORENSIC_CONFIG.confidence.highThreshold - }; -} - -export function isBiasDetectionEnabled(): boolean { - return FORENSIC_CONFIG.bias.enabled; -} - -// Initialize and validate configuration on module load -const configValidation = validateForensicConfig(); -if (!configValidation.valid) { - console.warn('[FORENSIC CONFIG] Configuration validation failed:', configValidation.errors); - // In development, we might want to throw an error - if (process.env.NODE_ENV === 'development') { - throw new Error(`Forensic configuration invalid: ${configValidation.errors.join(', ')}`); - } -} - -console.log('[FORENSIC CONFIG] Configuration loaded:', { - auditEnabled: FORENSIC_CONFIG.audit.enabled, - confidenceEnabled: true, // Always enabled - biasDetectionEnabled: FORENSIC_CONFIG.bias.enabled, - detailLevel: FORENSIC_CONFIG.audit.detailLevel -}); \ No newline at end of file diff --git a/src/utils/aiPipeline.ts b/src/utils/aiPipeline.ts index 003523d..761ea4b 100644 --- a/src/utils/aiPipeline.ts +++ b/src/utils/aiPipeline.ts @@ -78,17 +78,25 @@ class ImprovedMicroTaskAIPipeline { private similarityThreshold: number; private microTaskDelay: number; + // NEW: Embedding selection limits (top N from pre-filtered candidates) + private embeddingSelectionLimit: number; + private embeddingConceptsLimit: number; + + // NEW: Embeddings efficiency thresholds + private embeddingsMinTools: number; + private embeddingsMaxReductionRatio: number; + private maxContextTokens: number; private maxPromptTokens: number; - // NEW: Audit Configuration + // Audit Configuration private auditConfig: { enabled: boolean; detailLevel: 'minimal' | 'standard' | 'verbose'; retentionHours: number; }; - // NEW: Temporary audit storage for pre-context operations + // Temporary audit storage for pre-context operations private tempAuditEntries: AuditEntry[] = []; constructor() { @@ -98,20 +106,38 @@ class ImprovedMicroTaskAIPipeline { model: this.getEnv('AI_ANALYZER_MODEL') }; - this.maxSelectedItems = parseInt(process.env.AI_MAX_SELECTED_ITEMS || '60', 10); - this.embeddingCandidates = parseInt(process.env.AI_EMBEDDING_CANDIDATES || '60', 10); - this.similarityThreshold = 0.3; + // Core pipeline configuration + this.maxSelectedItems = parseInt(process.env.AI_MAX_SELECTED_ITEMS || '25', 10); + this.embeddingCandidates = parseInt(process.env.AI_EMBEDDING_CANDIDATES || '50', 10); + this.similarityThreshold = parseFloat(process.env.AI_SIMILARITY_THRESHOLD || '0.3'); this.microTaskDelay = parseInt(process.env.AI_MICRO_TASK_DELAY_MS || '500', 10); + // NEW: Embedding selection limits (top N from pre-filtered candidates) + this.embeddingSelectionLimit = parseInt(process.env.AI_EMBEDDING_SELECTION_LIMIT || '30', 10); + this.embeddingConceptsLimit = parseInt(process.env.AI_EMBEDDING_CONCEPTS_LIMIT || '15', 10); + + // NEW: Embeddings efficiency thresholds + this.embeddingsMinTools = parseInt(process.env.AI_EMBEDDINGS_MIN_TOOLS || '8', 10); + this.embeddingsMaxReductionRatio = parseFloat(process.env.AI_EMBEDDINGS_MAX_REDUCTION_RATIO || '0.75'); + + // Context management this.maxContextTokens = parseInt(process.env.AI_MAX_CONTEXT_TOKENS || '4000', 10); this.maxPromptTokens = parseInt(process.env.AI_MAX_PROMPT_TOKENS || '1500', 10); - // NEW: Initialize Audit Configuration + // Audit configuration this.auditConfig = { enabled: process.env.FORENSIC_AUDIT_ENABLED === 'true', detailLevel: (process.env.FORENSIC_AUDIT_DETAIL_LEVEL as any) || 'standard', retentionHours: parseInt(process.env.FORENSIC_AUDIT_RETENTION_HOURS || '72', 10) }; + + // Log configuration for debugging + console.log('[AI PIPELINE] Configuration loaded:', { + embeddingCandidates: this.embeddingCandidates, + embeddingSelection: `${this.embeddingSelectionLimit} tools, ${this.embeddingConceptsLimit} concepts`, + embeddingsThresholds: `min ${this.embeddingsMinTools} tools, max ${this.embeddingsMaxReductionRatio * 100}% of total`, + auditEnabled: this.auditConfig.enabled + }); } private getEnv(key: string): string { @@ -272,50 +298,49 @@ class ImprovedMicroTaskAIPipeline { userQuery, this.embeddingCandidates, this.similarityThreshold - ) as SimilarityResult[]; // Type assertion for similarity property + ) as SimilarityResult[]; - console.log(`[IMPROVED PIPELINE] Embeddings found ${similarItems.length} similar items`); + console.log(`[AI PIPELINE] Embeddings found ${similarItems.length} similar items`); - // FIXED: Create lookup maps for O(1) access while preserving original data + // Create lookup maps for O(1) access while preserving original data const toolsMap = new Map(toolsData.tools.map((tool: any) => [tool.name, tool])); const conceptsMap = new Map(toolsData.concepts.map((concept: any) => [concept.name, concept])); - // FIXED: Process in similarity order, preserving the ranking + // Process in similarity order, preserving the ranking const similarTools = similarItems .filter((item): item is SimilarityResult => item.type === 'tool') .map(item => toolsMap.get(item.name)) - .filter((tool): tool is any => tool !== undefined); // Proper type guard + .filter((tool): tool is any => tool !== undefined); const similarConcepts = similarItems .filter((item): item is SimilarityResult => item.type === 'concept') .map(item => conceptsMap.get(item.name)) - .filter((concept): concept is any => concept !== undefined); // Proper type guard + .filter((concept): concept is any => concept !== undefined); - console.log(`[IMPROVED PIPELINE] Similarity-ordered results: ${similarTools.length} tools, ${similarConcepts.length} concepts`); + console.log(`[AI PIPELINE] Similarity-ordered results: ${similarTools.length} tools, ${similarConcepts.length} concepts`); - // Log the first few tools to verify ordering is preserved - if (similarTools.length > 0) { - console.log(`[IMPROVED PIPELINE] Top similar tools (in similarity order):`); - similarTools.slice(0, 5).forEach((tool, idx) => { - const originalSimilarItem = similarItems.find(item => item.name === tool.name); - console.log(` ${idx + 1}. ${tool.name} (similarity: ${originalSimilarItem?.similarity?.toFixed(4) || 'N/A'})`); - }); - } + // FIXED: Better threshold logic - only use embeddings if we get meaningful filtering + const totalAvailableTools = toolsData.tools.length; + const reductionRatio = similarTools.length / totalAvailableTools; - if (similarTools.length >= 15) { + if (similarTools.length >= this.embeddingsMinTools && reductionRatio <= this.embeddingsMaxReductionRatio) { candidateTools = similarTools; candidateConcepts = similarConcepts; selectionMethod = 'embeddings_candidates'; - console.log(`[IMPROVED PIPELINE] Using embeddings candidates in similarity order: ${candidateTools.length} tools`); + console.log(`[AI PIPELINE] Using embeddings filtering: ${totalAvailableTools} → ${similarTools.length} tools (${(reductionRatio * 100).toFixed(1)}% reduction)`); } else { - console.log(`[IMPROVED PIPELINE] Embeddings insufficient (${similarTools.length} < 15), using full dataset`); + if (similarTools.length < this.embeddingsMinTools) { + console.log(`[AI PIPELINE] Embeddings found too few tools (${similarTools.length} < ${this.embeddingsMinTools}), using full dataset`); + } else { + console.log(`[AI PIPELINE] Embeddings didn't filter enough (${(reductionRatio * 100).toFixed(1)}% > ${(this.embeddingsMaxReductionRatio * 100).toFixed(1)}%), using full dataset`); + } candidateTools = toolsData.tools; candidateConcepts = toolsData.concepts; selectionMethod = 'full_dataset'; } - // NEW: Add Audit Entry for Embeddings Search with ordering verification + // Enhanced audit entry with reduction statistics if (this.auditConfig.enabled) { this.addAuditEntry(null, 'retrieval', 'embeddings-search', { query: userQuery, threshold: this.similarityThreshold, candidates: this.embeddingCandidates }, @@ -323,21 +348,29 @@ class ImprovedMicroTaskAIPipeline { candidatesFound: similarItems.length, toolsInOrder: similarTools.slice(0, 3).map((t: any) => t.name), conceptsInOrder: similarConcepts.slice(0, 3).map((c: any) => c.name), - orderingPreserved: true + reductionRatio: reductionRatio, + usingEmbeddings: selectionMethod === 'embeddings_candidates', + totalAvailable: totalAvailableTools, + filtered: similarTools.length }, - similarTools.length >= 15 ? 85 : 60, + selectionMethod === 'embeddings_candidates' ? 85 : 60, embeddingsStart, - { selectionMethod, embeddingsEnabled: true, orderingFixed: true } + { + selectionMethod, + embeddingsEnabled: true, + reductionAchieved: selectionMethod === 'embeddings_candidates', + tokenSavingsExpected: selectionMethod === 'embeddings_candidates' + } ); } } else { - console.log(`[IMPROVED PIPELINE] Embeddings disabled, using full dataset`); + console.log(`[AI PIPELINE] Embeddings disabled, using full dataset`); candidateTools = toolsData.tools; candidateConcepts = toolsData.concepts; selectionMethod = 'full_dataset'; } - console.log(`[IMPROVED PIPELINE] AI will analyze ${candidateTools.length} candidate tools (ordering preserved: ${selectionMethod === 'embeddings_candidates'})`); + console.log(`[AI PIPELINE] AI will analyze ${candidateTools.length} candidate tools (method: ${selectionMethod})`); const finalSelection = await this.aiSelectionWithFullData(userQuery, candidateTools, candidateConcepts, mode, selectionMethod); return { @@ -387,15 +420,37 @@ class ImprovedMicroTaskAIPipeline { related_software: concept.related_software || [] })); - // Generate the German prompt with tool data + // CORRECTED LOGIC: + let toolsToSend: any[]; + let conceptsToSend: any[]; + + if (selectionMethod === 'embeddings_candidates') { + // WITH EMBEDDINGS: Take top N from pre-filtered candidates + toolsToSend = toolsWithFullData.slice(0, this.embeddingSelectionLimit); + conceptsToSend = conceptsWithFullData.slice(0, this.embeddingConceptsLimit); + + console.log(`[AI PIPELINE] Embeddings enabled: sending top ${toolsToSend.length} pre-filtered tools`); + } else { + // WITHOUT EMBEDDINGS: Send entire compressed database (original behavior) + toolsToSend = toolsWithFullData; // ALL tools from database + conceptsToSend = conceptsWithFullData; // ALL concepts from database + + console.log(`[AI PIPELINE] Embeddings disabled: sending entire database (${toolsToSend.length} tools, ${conceptsToSend.length} concepts)`); + } + + // Generate the German prompt with appropriately selected tool data const basePrompt = getPrompt('toolSelection', mode, userQuery, selectionMethod, this.maxSelectedItems); const prompt = `${basePrompt} VERFÜGBARE TOOLS (mit vollständigen Daten): -${JSON.stringify(toolsWithFullData.slice(0, 30), null, 2)} +${JSON.stringify(toolsToSend, null, 2)} VERFÜGBARE KONZEPTE (mit vollständigen Daten): -${JSON.stringify(conceptsWithFullData.slice(0, 10), null, 2)}`; +${JSON.stringify(conceptsToSend, null, 2)}`; + + // Log token usage for monitoring + const estimatedTokens = this.estimateTokens(prompt); + console.log(`[AI PIPELINE] Method: ${selectionMethod}, Tools: ${toolsToSend.length}, Tokens: ~${estimatedTokens}`); try { const response = await this.callAI(prompt, 2500); @@ -403,16 +458,15 @@ ${JSON.stringify(conceptsWithFullData.slice(0, 10), null, 2)}`; const result = this.safeParseJSON(response, null); if (!result || !Array.isArray(result.selectedTools) || !Array.isArray(result.selectedConcepts)) { - console.error('[IMPROVED PIPELINE] AI selection returned invalid structure:', response.slice(0, 200)); + console.error('[AI PIPELINE] AI selection returned invalid structure:', response.slice(0, 200)); - // NEW: Add Audit Entry for Failed Selection if (this.auditConfig.enabled) { this.addAuditEntry(null, 'selection', 'ai-tool-selection-failed', { candidateCount: candidateTools.length, mode, prompt: prompt.slice(0, 200) }, { error: 'Invalid JSON structure', response: response.slice(0, 200) }, - 10, // Very low confidence + 10, selectionStart, - { aiModel: this.config.model, selectionMethod } + { aiModel: this.config.model, selectionMethod, tokensSent: estimatedTokens, toolsSent: toolsToSend.length } ); } @@ -421,19 +475,15 @@ ${JSON.stringify(conceptsWithFullData.slice(0, 10), null, 2)}`; const totalSelected = result.selectedTools.length + result.selectedConcepts.length; if (totalSelected === 0) { - console.error('[IMPROVED PIPELINE] AI selection returned no tools'); + console.error('[AI PIPELINE] AI selection returned no tools'); throw new Error('AI selection returned empty selection'); } - console.log(`[IMPROVED PIPELINE] AI selected: ${result.selectedTools.length} tools, ${result.selectedConcepts.length} concepts`); - console.log(`[IMPROVED PIPELINE] AI reasoning: ${result.reasoning}`); + console.log(`[AI PIPELINE] AI selected: ${result.selectedTools.length} tools, ${result.selectedConcepts.length} concepts from ${toolsToSend.length} candidates`); const selectedTools = candidateTools.filter(tool => result.selectedTools.includes(tool.name)); const selectedConcepts = candidateConcepts.filter(concept => result.selectedConcepts.includes(concept.name)); - console.log(`[IMPROVED PIPELINE] Final selection: ${selectedTools.length} tools with bias prevention applied`); - - // NEW: Add Audit Entry for Successful Selection if (this.auditConfig.enabled) { const confidence = this.calculateSelectionConfidence(result, candidateTools.length); @@ -443,11 +493,12 @@ ${JSON.stringify(conceptsWithFullData.slice(0, 10), null, 2)}`; selectedToolCount: result.selectedTools.length, selectedConceptCount: result.selectedConcepts.length, reasoning: result.reasoning?.slice(0, 200) + '...', - finalToolNames: selectedTools.map(t => t.name) + finalToolNames: selectedTools.map(t => t.name), + selectionEfficiency: `${toolsToSend.length} → ${result.selectedTools.length}` }, confidence, selectionStart, - { aiModel: this.config.model, selectionMethod, promptTokens: this.estimateTokens(prompt) } + { aiModel: this.config.model, selectionMethod, promptTokens: estimatedTokens, toolsSent: toolsToSend.length } ); } @@ -457,69 +508,21 @@ ${JSON.stringify(conceptsWithFullData.slice(0, 10), null, 2)}`; }; } catch (error) { - console.error('[IMPROVED PIPELINE] AI selection failed:', error); + console.error('[AI PIPELINE] AI selection failed:', error); - // NEW: Add Audit Entry for Selection Error if (this.auditConfig.enabled) { this.addAuditEntry(null, 'selection', 'ai-tool-selection-error', { candidateCount: candidateTools.length, mode }, { error: error.message }, - 5, // Very low confidence + 5, selectionStart, - { aiModel: this.config.model, selectionMethod } + { aiModel: this.config.model, selectionMethod, tokensSent: estimatedTokens } ); } - - console.log('[IMPROVED PIPELINE] Using emergency keyword-based selection'); - return this.emergencyKeywordSelection(userQuery, candidateTools, candidateConcepts, mode); + throw error; } } - private emergencyKeywordSelection(userQuery: string, candidateTools: any[], candidateConcepts: any[], mode: string) { - const emergencyStart = Date.now(); - - const queryLower = userQuery.toLowerCase(); - const keywords = queryLower.split(/\s+/).filter(word => word.length > 3); - - const scoredTools = candidateTools.map(tool => { - const toolText = ( - tool.name + ' ' + - tool.description + ' ' + - (tool.tags || []).join(' ') + ' ' + - (tool.platforms || []).join(' ') + ' ' + - (tool.domains || []).join(' ') - ).toLowerCase(); - - const score = keywords.reduce((acc, keyword) => { - return acc + (toolText.includes(keyword) ? 1 : 0); - }, 0); - - return { tool, score }; - }).filter(item => item.score > 0) - .sort((a, b) => b.score - a.score); - - const maxTools = mode === 'workflow' ? 20 : 8; - const selectedTools = scoredTools.slice(0, maxTools).map(item => item.tool); - - console.log(`[IMPROVED PIPELINE] Emergency selection: ${selectedTools.length} tools, keywords: ${keywords.slice(0, 5).join(', ')}`); - - // NEW: Add Audit Entry for Emergency Selection - if (this.auditConfig.enabled) { - this.addAuditEntry(null, 'selection', 'emergency-keyword-selection', - { keywords: keywords.slice(0, 10), candidateCount: candidateTools.length }, - { selectedCount: selectedTools.length, topScores: scoredTools.slice(0, 5).map(s => ({ name: s.tool.name, score: s.score })) }, - 40, // Moderate confidence for emergency selection - emergencyStart, - { selectionMethod: 'emergency_keyword' } - ); - } - - return { - selectedTools, - selectedConcepts: candidateConcepts.slice(0, 3) - }; - } - private async delay(ms: number): Promise { return new Promise(resolve => setTimeout(resolve, ms)); } @@ -826,7 +829,7 @@ ${JSON.stringify(conceptsWithFullData.slice(0, 10), null, 2)}`; // NEW: Clear any previous temporary audit entries this.tempAuditEntries = []; - console.log(`[IMPROVED PIPELINE] Starting ${mode} query processing with context continuity and audit trail`); + console.log(`[AI PIPELINE] Starting ${mode} query processing with context continuity and audit trail`); try { // Stage 1: Get intelligent candidates (embeddings + AI selection) @@ -848,7 +851,7 @@ ${JSON.stringify(conceptsWithFullData.slice(0, 10), null, 2)}`; // NEW: Merge any temporary audit entries from pre-context operations this.mergeTemporaryAuditEntries(context); - console.log(`[IMPROVED PIPELINE] Starting micro-tasks with ${filteredData.tools.length} tools visible`); + console.log(`[AI PIPELINE] Starting micro-tasks with ${filteredData.tools.length} tools visible`); // NEW: Add initial audit entry this.addAuditEntry(context, 'initialization', 'pipeline-start', @@ -925,9 +928,9 @@ ${JSON.stringify(conceptsWithFullData.slice(0, 10), null, 2)}`; contextContinuityUsed: true }; - console.log(`[IMPROVED PIPELINE] Completed: ${completedTasks} tasks, Failed: ${failedTasks} tasks`); - console.log(`[IMPROVED PIPELINE] Unique tools selected: ${context.seenToolNames.size}`); - console.log(`[IMPROVED PIPELINE] Audit trail entries: ${context.auditTrail.length}`); + console.log(`[AI PIPELINE] Completed: ${completedTasks} tasks, Failed: ${failedTasks} tasks`); + console.log(`[AI PIPELINE] Unique tools selected: ${context.seenToolNames.size}`); + console.log(`[AI PIPELINE] Audit trail entries: ${context.auditTrail.length}`); return { recommendation: { @@ -939,7 +942,7 @@ ${JSON.stringify(conceptsWithFullData.slice(0, 10), null, 2)}`; }; } catch (error) { - console.error('[IMPROVED PIPELINE] Processing failed:', error); + console.error('[AI PIPELINE] Processing failed:', error); // NEW: Ensure temp audit entries are cleared even on error this.tempAuditEntries = []; diff --git a/src/utils/dataService.ts b/src/utils/dataService.ts index 7f6b6a0..8b80f33 100644 --- a/src/utils/dataService.ts +++ b/src/utils/dataService.ts @@ -77,33 +77,8 @@ interface EnhancedCompressedToolsData { domains: any[]; phases: any[]; 'domain-agnostic-software': any[]; - scenarios?: any[]; // Optional for AI processing + scenarios?: any[]; skill_levels: any; - // Enhanced context for micro-tasks - domain_relationships: DomainRelationship[]; - phase_dependencies: PhaseDependency[]; - tool_compatibility_matrix: CompatibilityMatrix[]; -} - -interface DomainRelationship { - domain_id: string; - tool_count: number; - common_tags: string[]; - skill_distribution: Record; -} - -interface PhaseDependency { - phase_id: string; - order: number; - depends_on: string | null; - enables: string | null; - is_parallel_capable: boolean; - typical_duration: string; -} - -interface CompatibilityMatrix { - type: string; - groups: Record; } let cachedData: ToolsData | null = null; @@ -146,104 +121,6 @@ function generateDataVersion(data: any): string { return Math.abs(hash).toString(36); } -// Enhanced: Generate domain relationships for better AI understanding -function generateDomainRelationships(domains: any[], tools: any[]): DomainRelationship[] { - const relationships: DomainRelationship[] = []; - - for (const domain of domains) { - const domainTools = tools.filter(tool => - tool.domains && tool.domains.includes(domain.id) - ); - - const commonTags = domainTools - .flatMap(tool => tool.tags || []) - .reduce((acc: any, tag: string) => { - acc[tag] = (acc[tag] || 0) + 1; - return acc; - }, {}); - - const topTags = Object.entries(commonTags) - .sort(([,a], [,b]) => (b as number) - (a as number)) - .slice(0, 5) - .map(([tag]) => tag); - - relationships.push({ - domain_id: domain.id, - tool_count: domainTools.length, - common_tags: topTags, - skill_distribution: domainTools.reduce((acc: any, tool: any) => { - acc[tool.skillLevel] = (acc[tool.skillLevel] || 0) + 1; - return acc; - }, {}) - }); - } - - return relationships; -} - -// Enhanced: Generate phase dependencies -function generatePhaseDependencies(phases: any[]): PhaseDependency[] { - const dependencies: PhaseDependency[] = []; - - for (let i = 0; i < phases.length; i++) { - const phase = phases[i]; - const nextPhase = phases[i + 1]; - const prevPhase = phases[i - 1]; - - dependencies.push({ - phase_id: phase.id, - order: i + 1, - depends_on: prevPhase?.id || null, - enables: nextPhase?.id || null, - is_parallel_capable: ['examination', 'analysis'].includes(phase.id), // Some phases can run in parallel - typical_duration: phase.id === 'data-collection' ? 'hours-days' : - phase.id === 'examination' ? 'hours-weeks' : - phase.id === 'analysis' ? 'days-weeks' : - 'hours-days' - }); - } - - return dependencies; -} - -// Enhanced: Generate tool compatibility matrix -function generateToolCompatibilityMatrix(tools: any[]): CompatibilityMatrix[] { - const matrix: CompatibilityMatrix[] = []; - - // Group tools by common characteristics - const platformGroups = tools.reduce((acc: any, tool: any) => { - if (tool.platforms) { - tool.platforms.forEach((platform: string) => { - if (!acc[platform]) acc[platform] = []; - acc[platform].push(tool.name); - }); - } - return acc; - }, {}); - - const phaseGroups = tools.reduce((acc: any, tool: any) => { - if (tool.phases) { - tool.phases.forEach((phase: string) => { - if (!acc[phase]) acc[phase] = []; - acc[phase].push(tool.name); - }); - } - return acc; - }, {}); - - matrix.push({ - type: 'platform_compatibility', - groups: platformGroups - }); - - matrix.push({ - type: 'phase_synergy', - groups: phaseGroups - }); - - return matrix; -} - async function loadRawData(): Promise { if (!cachedData) { const yamlPath = path.join(process.cwd(), 'src/data/tools.yaml'); @@ -337,27 +214,16 @@ export async function getCompressedToolsDataForAI(): Promise { if (this.isProcessing) { return; diff --git a/src/utils/toolHelpers.ts b/src/utils/toolHelpers.ts index 54431b3..47f572f 100644 --- a/src/utils/toolHelpers.ts +++ b/src/utils/toolHelpers.ts @@ -1,8 +1,3 @@ -/** - * CONSOLIDATED Tool utility functions for consistent tool operations across the app - * Works in both server (Node.js) and client (browser) environments - */ - export interface Tool { name: string; type?: 'software' | 'method' | 'concept'; @@ -18,10 +13,6 @@ export interface Tool { related_concepts?: string[]; } -/** - * Creates a URL-safe slug from a tool name - * Used for URLs, IDs, and file names consistently across the app - */ export function createToolSlug(toolName: string): string { if (!toolName || typeof toolName !== 'string') { console.warn('[toolHelpers] Invalid toolName provided to createToolSlug:', toolName); @@ -35,9 +26,6 @@ export function createToolSlug(toolName: string): string { .replace(/^-|-$/g, ''); // Remove leading/trailing hyphens } -/** - * Finds a tool by name or slug from tools array - */ export function findToolByIdentifier(tools: Tool[], identifier: string): Tool | undefined { if (!identifier || !Array.isArray(tools)) return undefined; @@ -47,23 +35,9 @@ export function findToolByIdentifier(tools: Tool[], identifier: string): Tool | ); } -/** - * Checks if tool has a valid project URL (hosted on CC24 server) - */ export function isToolHosted(tool: Tool): boolean { return tool.projectUrl !== undefined && tool.projectUrl !== null && tool.projectUrl !== "" && tool.projectUrl.trim() !== ""; -} - -/** - * Determines tool category for styling/logic - */ -export function getToolCategory(tool: Tool): 'concept' | 'method' | 'hosted' | 'oss' | 'proprietary' { - if (tool.type === 'concept') return 'concept'; - if (tool.type === 'method') return 'method'; - if (isToolHosted(tool)) return 'hosted'; - if (tool.license && tool.license !== 'Proprietary') return 'oss'; - return 'proprietary'; } \ No newline at end of file -- 2.39.5 From 4b0d208ef5d6265d7dbc1254d3e4b383d7021b9a Mon Sep 17 00:00:00 2001 From: overcuriousity Date: Mon, 4 Aug 2025 20:35:21 +0200 Subject: [PATCH 07/19] Context too long, using prompt only --- .env.example | 38 +++--- src/data/tools.yaml | 60 --------- src/pages/api/ai/enhance-input.ts | 8 +- src/utils/aiPipeline.ts | 204 ++++++++++++++++++------------ src/utils/dataService.ts | 5 - 5 files changed, 147 insertions(+), 168 deletions(-) diff --git a/.env.example b/.env.example index 8b45de2..00b00bc 100644 --- a/.env.example +++ b/.env.example @@ -54,6 +54,11 @@ AI_SIMILARITY_THRESHOLD=0.3 AI_EMBEDDING_SELECTION_LIMIT=30 AI_EMBEDDING_CONCEPTS_LIMIT=15 +# Maximum tools/concepts sent to AI when embeddings are DISABLED +# Set to 0 for no limit (WARNING: may cause token overflow with large datasets) +AI_NO_EMBEDDINGS_TOOL_LIMIT=0 +AI_NO_EMBEDDINGS_CONCEPT_LIMIT=0 + # === AI SELECTION STAGE === # Maximum tools the AI can select from embedding candidates # 🤖 This is the SECOND filter - AI intelligent selection @@ -98,17 +103,21 @@ AI_EMBEDDINGS_BATCH_SIZE=10 # Delay between embedding batches (milliseconds) AI_EMBEDDINGS_BATCH_DELAY_MS=1000 +# Maximum tools sent to AI for detailed analysis (micro-tasks) +AI_MAX_TOOLS_TO_ANALYZE=20 +AI_MAX_CONCEPTS_TO_ANALYZE=10 + # ============================================================================ # 5. AI CONTEXT & TOKEN MANAGEMENT # ============================================================================ # Maximum context tokens to maintain across micro-tasks # Controls how much conversation history is preserved between AI calls -AI_MAX_CONTEXT_TOKENS=3000 +AI_MAX_CONTEXT_TOKENS=4000 # Maximum tokens per individual AI prompt # Larger = more context per call | Smaller = faster responses -AI_MAX_PROMPT_TOKENS=1200 +AI_MAX_PROMPT_TOKENS=1500 # ============================================================================ # 6. AUTHENTICATION & AUTHORIZATION (OPTIONAL) @@ -169,7 +178,7 @@ GIT_API_TOKEN=your-git-api-token # ============================================================================ # Enable detailed audit trail of AI decision-making -FORENSIC_AUDIT_ENABLED=false +FORENSIC_AUDIT_ENABLED=true # Audit detail level: minimal, standard, verbose FORENSIC_AUDIT_DETAIL_LEVEL=standard @@ -199,23 +208,16 @@ CONFIDENCE_HIGH_THRESHOLD=80 # PERFORMANCE TUNING PRESETS # ============================================================================ -# 🚀 FOR FASTER RESPONSES (less comprehensive): -# AI_EMBEDDING_CANDIDATES=20 -# AI_MAX_SELECTED_ITEMS=15 -# AI_MICRO_TASK_DELAY_MS=200 -# AI_MAX_CONTEXT_TOKENS=2000 +# 🚀 FOR FASTER RESPONSES (prevent token overflow): +# AI_NO_EMBEDDINGS_TOOL_LIMIT=25 +# AI_NO_EMBEDDINGS_CONCEPT_LIMIT=10 -# 🎯 FOR BETTER QUALITY (more comprehensive): -# AI_EMBEDDING_CANDIDATES=60 -# AI_MAX_SELECTED_ITEMS=40 -# AI_MICRO_TASK_DELAY_MS=800 -# AI_MAX_CONTEXT_TOKENS=4000 +# 🎯 FOR FULL DATABASE ACCESS (risk of truncation): +# AI_NO_EMBEDDINGS_TOOL_LIMIT=0 +# AI_NO_EMBEDDINGS_CONCEPT_LIMIT=0 -# 🔋 FOR LOW-POWER SYSTEMS (minimal resources): -# AI_EMBEDDING_CANDIDATES=15 -# AI_MAX_SELECTED_ITEMS=10 -# AI_RATE_LIMIT_MAX_REQUESTS=2 -# AI_MICRO_TASK_DELAY_MS=1000 +# 🔋 FOR LOW-POWER SYSTEMS: +# AI_NO_EMBEDDINGS_TOOL_LIMIT=15 # ============================================================================ # FEATURE COMBINATIONS GUIDE diff --git a/src/data/tools.yaml b/src/data/tools.yaml index fae358a..f3862bd 100644 --- a/src/data/tools.yaml +++ b/src/data/tools.yaml @@ -113,64 +113,6 @@ tools: accessType: download license: VSL knowledgebase: false - - name: TheHive 5 - icon: 🐝 - type: software - description: >- - Die zentrale Incident-Response-Plattform orchestriert komplexe - Sicherheitsvorfälle vom ersten Alert bis zum Abschlussbericht. Jeder Case - wird strukturiert durch Observables (IOCs), Tasks und Zeitleisten - abgebildet. Die Cortex-Integration automatisiert Analysen durch Dutzende - Analyzer - von VirusTotal-Checks bis Sandbox-Detonation. - MISP-Synchronisation reichert Cases mit Threat-Intelligence an. Das - ausgeklügelte Rollen- und Rechtesystem ermöglicht sichere Zusammenarbeit - zwischen SOC-Analysten, Forensikern und Management. Templates - standardisieren Response-Prozesse nach Incident-Typ. Die RESTful API - integriert nahtlos mit SIEM, SOAR und Ticketing-Systemen. Metrics und - KPIs messen die Team-Performance. Die Community Edition bleibt kostenlos - für kleinere Teams, während Gold/Platinum-Lizenzen Enterprise-Features - bieten. - domains: - - incident-response - - static-investigations - - malware-analysis - - network-forensics - - fraud-investigation - phases: - - data-collection - - examination - - analysis - - reporting - platforms: - - Web - related_software: - - MISP - - Cortex - - Elasticsearch - domain-agnostic-software: - - collaboration-general - skillLevel: intermediate - accessType: server-based - url: https://strangebee.com/thehive/ - projectUrl: '' - license: Community Edition (Discontinued) / Commercial - knowledgebase: false - statusUrl: https://uptime.example.lab/api/badge/1/status - tags: - - web-interface - - case-management - - collaboration - - api - - workflow - - multi-user-support - - cortex-analyzer - - misp-integration - - playbooks - - metrics - - rbac - - template-driven - related_concepts: - - Digital Evidence Chain of Custody - name: MISP icon: 🌐 type: software @@ -223,7 +165,6 @@ tools: related_concepts: - Hash Functions & Digital Signatures related_software: - - TheHive 5 - Cortex - OpenCTI - name: DFIR-IRIS @@ -260,7 +201,6 @@ tools: platforms: - Web related_software: - - TheHive 5 - MISP - OpenCTI domain-agnostic-software: diff --git a/src/pages/api/ai/enhance-input.ts b/src/pages/api/ai/enhance-input.ts index 86086e2..1ebb2a8 100644 --- a/src/pages/api/ai/enhance-input.ts +++ b/src/pages/api/ai/enhance-input.ts @@ -94,18 +94,15 @@ ${input} `.trim(); } -// Enhanced AI service call function async function callAIService(prompt: string): Promise { const endpoint = AI_ENDPOINT; const apiKey = AI_ANALYZER_API_KEY; const model = AI_ANALYZER_MODEL; - // Simple headers - add auth only if API key exists let headers: Record = { 'Content-Type': 'application/json' }; - // Add authentication if API key is provided if (apiKey) { headers['Authorization'] = `Bearer ${apiKey}`; console.log('[ENHANCE API] Using API key authentication'); @@ -113,7 +110,6 @@ async function callAIService(prompt: string): Promise { console.log('[ENHANCE API] No API key - making request without authentication'); } - // Simple request body const requestBody = { model, messages: [{ role: 'user', content: prompt }], @@ -124,8 +120,6 @@ async function callAIService(prompt: string): Promise { presence_penalty: 0.1 }; - // FIXED: This function is already being called through enqueueApiCall in the main handler - // So we can use direct fetch here since the queuing happens at the caller level return fetch(`${endpoint}/v1/chat/completions`, { method: 'POST', headers, @@ -214,7 +208,7 @@ export const POST: APIRoute = async ({ request }) => { success: true, questions, taskId, - inputComplete: questions.length === 0 // Flag to indicate if input seems complete + inputComplete: questions.length === 0 }), { status: 200, headers: { 'Content-Type': 'application/json' } diff --git a/src/utils/aiPipeline.ts b/src/utils/aiPipeline.ts index 761ea4b..34dd1ee 100644 --- a/src/utils/aiPipeline.ts +++ b/src/utils/aiPipeline.ts @@ -31,7 +31,6 @@ interface AnalysisResult { }; } -// NEW: Audit Trail Types interface AuditEntry { timestamp: number; phase: string; // 'retrieval', 'selection', 'micro-task-N' @@ -40,10 +39,9 @@ interface AuditEntry { output: any; // What came out of this step confidence: number; // 0-100: How confident we are in this step processingTimeMs: number; - metadata: Record; // Additional context + metadata: Record; } -// Enhanced AnalysisContext with Audit Trail interface AnalysisContext { userQuery: string; mode: string; @@ -62,7 +60,6 @@ interface AnalysisContext { seenToolNames: Set; - // NEW: Audit Trail auditTrail: AuditEntry[]; } @@ -78,25 +75,24 @@ class ImprovedMicroTaskAIPipeline { private similarityThreshold: number; private microTaskDelay: number; - // NEW: Embedding selection limits (top N from pre-filtered candidates) private embeddingSelectionLimit: number; private embeddingConceptsLimit: number; + + private noEmbeddingsToolLimit: number; + private noEmbeddingsConceptLimit: number; - // NEW: Embeddings efficiency thresholds private embeddingsMinTools: number; private embeddingsMaxReductionRatio: number; private maxContextTokens: number; private maxPromptTokens: number; - // Audit Configuration private auditConfig: { enabled: boolean; detailLevel: 'minimal' | 'standard' | 'verbose'; retentionHours: number; }; - // Temporary audit storage for pre-context operations private tempAuditEntries: AuditEntry[] = []; constructor() { @@ -106,36 +102,33 @@ class ImprovedMicroTaskAIPipeline { model: this.getEnv('AI_ANALYZER_MODEL') }; - // Core pipeline configuration this.maxSelectedItems = parseInt(process.env.AI_MAX_SELECTED_ITEMS || '25', 10); this.embeddingCandidates = parseInt(process.env.AI_EMBEDDING_CANDIDATES || '50', 10); this.similarityThreshold = parseFloat(process.env.AI_SIMILARITY_THRESHOLD || '0.3'); this.microTaskDelay = parseInt(process.env.AI_MICRO_TASK_DELAY_MS || '500', 10); - // NEW: Embedding selection limits (top N from pre-filtered candidates) this.embeddingSelectionLimit = parseInt(process.env.AI_EMBEDDING_SELECTION_LIMIT || '30', 10); this.embeddingConceptsLimit = parseInt(process.env.AI_EMBEDDING_CONCEPTS_LIMIT || '15', 10); + + this.noEmbeddingsToolLimit = parseInt(process.env.AI_NO_EMBEDDINGS_TOOL_LIMIT || '0', 10); + this.noEmbeddingsConceptLimit = parseInt(process.env.AI_NO_EMBEDDINGS_CONCEPT_LIMIT || '0', 10); - // NEW: Embeddings efficiency thresholds this.embeddingsMinTools = parseInt(process.env.AI_EMBEDDINGS_MIN_TOOLS || '8', 10); this.embeddingsMaxReductionRatio = parseFloat(process.env.AI_EMBEDDINGS_MAX_REDUCTION_RATIO || '0.75'); - // Context management this.maxContextTokens = parseInt(process.env.AI_MAX_CONTEXT_TOKENS || '4000', 10); this.maxPromptTokens = parseInt(process.env.AI_MAX_PROMPT_TOKENS || '1500', 10); - // Audit configuration this.auditConfig = { enabled: process.env.FORENSIC_AUDIT_ENABLED === 'true', detailLevel: (process.env.FORENSIC_AUDIT_DETAIL_LEVEL as any) || 'standard', retentionHours: parseInt(process.env.FORENSIC_AUDIT_RETENTION_HOURS || '72', 10) }; - // Log configuration for debugging console.log('[AI PIPELINE] Configuration loaded:', { embeddingCandidates: this.embeddingCandidates, embeddingSelection: `${this.embeddingSelectionLimit} tools, ${this.embeddingConceptsLimit} concepts`, - embeddingsThresholds: `min ${this.embeddingsMinTools} tools, max ${this.embeddingsMaxReductionRatio * 100}% of total`, + noEmbeddingsLimits: `${this.noEmbeddingsToolLimit || 'unlimited'} tools, ${this.noEmbeddingsConceptLimit || 'unlimited'} concepts`, auditEnabled: this.auditConfig.enabled }); } @@ -148,7 +141,6 @@ class ImprovedMicroTaskAIPipeline { return value; } - // NEW: Audit Trail Utility Functions private addAuditEntry( context: AnalysisContext | null, phase: string, @@ -175,22 +167,18 @@ class ImprovedMicroTaskAIPipeline { if (context) { context.auditTrail.push(auditEntry); } else { - // Store in temporary array for later merging this.tempAuditEntries.push(auditEntry); } - // Log for debugging when audit is enabled console.log(`[AUDIT] ${phase}/${action}: ${confidence}% confidence, ${Date.now() - startTime}ms`); } - // NEW: Merge temporary audit entries into context private mergeTemporaryAuditEntries(context: AnalysisContext): void { if (!this.auditConfig.enabled || this.tempAuditEntries.length === 0) return; const entryCount = this.tempAuditEntries.length; - // Add temp entries to the beginning of the context audit trail context.auditTrail.unshift(...this.tempAuditEntries); - this.tempAuditEntries = []; // Clear temp storage + this.tempAuditEntries = []; console.log(`[AUDIT] Merged ${entryCount} temporary audit entries into context`); } @@ -222,15 +210,12 @@ class ImprovedMicroTaskAIPipeline { let confidence = 60; // Base confidence - // Good selection ratio (not too many, not too few) if (selectionRatio > 0.05 && selectionRatio < 0.3) confidence += 20; else if (selectionRatio <= 0.05) confidence -= 10; // Too few else confidence -= 15; // Too many - // Has detailed reasoning if (hasReasoning) confidence += 15; - // Selected tools have good distribution if (result.selectedConcepts && result.selectedConcepts.length > 0) confidence += 5; return Math.min(95, Math.max(25, confidence)); @@ -254,26 +239,106 @@ class ImprovedMicroTaskAIPipeline { private safeParseJSON(jsonString: string, fallback: any = null): any { try { - const cleaned = jsonString + let cleaned = jsonString .replace(/^```json\s*/i, '') .replace(/\s*```\s*$/g, '') .trim(); + if (!cleaned.endsWith('}') && !cleaned.endsWith(']')) { + console.warn('[AI PIPELINE] JSON appears truncated, attempting recovery...'); + + let lastCompleteStructure = ''; + let braceCount = 0; + let bracketCount = 0; + let inString = false; + let escaped = false; + + for (let i = 0; i < cleaned.length; i++) { + const char = cleaned[i]; + + if (escaped) { + escaped = false; + continue; + } + + if (char === '\\') { + escaped = true; + continue; + } + + if (char === '"' && !escaped) { + inString = !inString; + continue; + } + + if (!inString) { + if (char === '{') braceCount++; + if (char === '}') braceCount--; + if (char === '[') bracketCount++; + if (char === ']') bracketCount--; + + if (braceCount === 0 && bracketCount === 0 && (char === '}' || char === ']')) { + lastCompleteStructure = cleaned.substring(0, i + 1); + } + } + } + + if (lastCompleteStructure) { + console.log('[AI PIPELINE] Attempting to parse recovered JSON structure...'); + cleaned = lastCompleteStructure; + } else { + if (braceCount > 0) { + cleaned += '}'; + console.log('[AI PIPELINE] Added closing brace to truncated JSON'); + } + if (bracketCount > 0) { + cleaned += ']'; + console.log('[AI PIPELINE] Added closing bracket to truncated JSON'); + } + } + } + const parsed = JSON.parse(cleaned); + + if (parsed && typeof parsed === 'object') { + if (parsed.selectedTools === undefined) parsed.selectedTools = []; + if (parsed.selectedConcepts === undefined) parsed.selectedConcepts = []; + + if (!Array.isArray(parsed.selectedTools)) parsed.selectedTools = []; + if (!Array.isArray(parsed.selectedConcepts)) parsed.selectedConcepts = []; + } + return parsed; } catch (error) { console.warn('[AI PIPELINE] JSON parsing failed:', error.message); - console.warn('[AI PIPELINE] Raw content:', jsonString.slice(0, 200)); + console.warn('[AI PIPELINE] Raw content (first 300 chars):', jsonString.slice(0, 300)); + console.warn('[AI PIPELINE] Raw content (last 300 chars):', jsonString.slice(-300)); + + if (jsonString.includes('selectedTools')) { + const toolMatches = jsonString.match(/"([^"]+)"/g); + if (toolMatches && toolMatches.length > 0) { + console.log('[AI PIPELINE] Attempting partial recovery from broken JSON...'); + const possibleTools = toolMatches + .map(match => match.replace(/"/g, '')) + .filter(name => name.length > 2 && !['selectedTools', 'selectedConcepts', 'reasoning'].includes(name)) + .slice(0, 15); // Reasonable limit + + if (possibleTools.length > 0) { + console.log(`[AI PIPELINE] Recovered ${possibleTools.length} possible tool names from broken JSON`); + return { + selectedTools: possibleTools, + selectedConcepts: [], + reasoning: 'Recovered from truncated response' + }; + } + } + } + return fallback; } } - private addToolToSelection(context: AnalysisContext, tool: any, phase: string, priority: string, justification?: string): boolean { - if (context.seenToolNames.has(tool.name)) { - console.log(`[AI PIPELINE] Skipping duplicate tool: ${tool.name}`); - return false; - } - + private addToolToSelection(context: AnalysisContext, tool: any, phase: string, priority: string, justification?: string): boolean { context.seenToolNames.add(tool.name); if (!context.selectedTools) context.selectedTools = []; @@ -302,11 +367,9 @@ class ImprovedMicroTaskAIPipeline { console.log(`[AI PIPELINE] Embeddings found ${similarItems.length} similar items`); - // Create lookup maps for O(1) access while preserving original data const toolsMap = new Map(toolsData.tools.map((tool: any) => [tool.name, tool])); const conceptsMap = new Map(toolsData.concepts.map((concept: any) => [concept.name, concept])); - // Process in similarity order, preserving the ranking const similarTools = similarItems .filter((item): item is SimilarityResult => item.type === 'tool') .map(item => toolsMap.get(item.name)) @@ -319,7 +382,6 @@ class ImprovedMicroTaskAIPipeline { console.log(`[AI PIPELINE] Similarity-ordered results: ${similarTools.length} tools, ${similarConcepts.length} concepts`); - // FIXED: Better threshold logic - only use embeddings if we get meaningful filtering const totalAvailableTools = toolsData.tools.length; const reductionRatio = similarTools.length / totalAvailableTools; @@ -340,7 +402,6 @@ class ImprovedMicroTaskAIPipeline { selectionMethod = 'full_dataset'; } - // Enhanced audit entry with reduction statistics if (this.auditConfig.enabled) { this.addAuditEntry(null, 'retrieval', 'embeddings-search', { query: userQuery, threshold: this.similarityThreshold, candidates: this.embeddingCandidates }, @@ -420,25 +481,29 @@ class ImprovedMicroTaskAIPipeline { related_software: concept.related_software || [] })); - // CORRECTED LOGIC: let toolsToSend: any[]; let conceptsToSend: any[]; if (selectionMethod === 'embeddings_candidates') { - // WITH EMBEDDINGS: Take top N from pre-filtered candidates toolsToSend = toolsWithFullData.slice(0, this.embeddingSelectionLimit); conceptsToSend = conceptsWithFullData.slice(0, this.embeddingConceptsLimit); - console.log(`[AI PIPELINE] Embeddings enabled: sending top ${toolsToSend.length} pre-filtered tools`); + console.log(`[AI PIPELINE] Embeddings enabled: sending top ${toolsToSend.length} similarity-ordered tools`); } else { - // WITHOUT EMBEDDINGS: Send entire compressed database (original behavior) - toolsToSend = toolsWithFullData; // ALL tools from database - conceptsToSend = conceptsWithFullData; // ALL concepts from database + const maxTools = this.noEmbeddingsToolLimit > 0 ? + Math.min(this.noEmbeddingsToolLimit, candidateTools.length) : + candidateTools.length; - console.log(`[AI PIPELINE] Embeddings disabled: sending entire database (${toolsToSend.length} tools, ${conceptsToSend.length} concepts)`); + const maxConcepts = this.noEmbeddingsConceptLimit > 0 ? + Math.min(this.noEmbeddingsConceptLimit, candidateConcepts.length) : + candidateConcepts.length; + + toolsToSend = toolsWithFullData.slice(0, maxTools); + conceptsToSend = conceptsWithFullData.slice(0, maxConcepts); + + console.log(`[AI PIPELINE] Embeddings disabled: sending ${toolsToSend.length}/${candidateTools.length} tools (limit: ${this.noEmbeddingsToolLimit || 'none'})`); } - // Generate the German prompt with appropriately selected tool data const basePrompt = getPrompt('toolSelection', mode, userQuery, selectionMethod, this.maxSelectedItems); const prompt = `${basePrompt} @@ -448,9 +513,12 @@ ${JSON.stringify(toolsToSend, null, 2)} VERFÜGBARE KONZEPTE (mit vollständigen Daten): ${JSON.stringify(conceptsToSend, null, 2)}`; - // Log token usage for monitoring const estimatedTokens = this.estimateTokens(prompt); - console.log(`[AI PIPELINE] Method: ${selectionMethod}, Tools: ${toolsToSend.length}, Tokens: ~${estimatedTokens}`); + console.log(`[AI PIPELINE] Method: ${selectionMethod}, Tools: ${toolsToSend.length}, Estimated tokens: ~${estimatedTokens}`); + + if (estimatedTokens > 35000) { + console.warn(`[AI PIPELINE] WARNING: Prompt tokens (${estimatedTokens}) may exceed model limits`); + } try { const response = await this.callAI(prompt, 2500); @@ -527,7 +595,7 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; return new Promise(resolve => setTimeout(resolve, ms)); } - private async callMicroTaskAI(prompt: string, context: AnalysisContext, maxTokens: number = 300): Promise { + private async callMicroTaskAI(prompt: string, context: AnalysisContext, maxTokens: number = 500): Promise { const startTime = Date.now(); let contextPrompt = prompt; @@ -552,11 +620,10 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; success: true }; - // NEW: Add Audit Entry for Successful Micro-Task this.addAuditEntry(context, 'micro-task', 'ai-analysis', { promptLength: contextPrompt.length, maxTokens }, { responseLength: response.length, contentPreview: response.slice(0, 100) }, - response.length > 50 ? 80 : 60, // Confidence based on response quality + response.length > 50 ? 80 : 60, startTime, { aiModel: this.config.model, contextUsed: context.contextHistory.length > 0 } ); @@ -572,11 +639,10 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; error: error.message }; - // NEW: Add Audit Entry for Failed Micro-Task this.addAuditEntry(context, 'micro-task', 'ai-analysis-failed', { promptLength: contextPrompt.length, maxTokens }, { error: error.message }, - 5, // Very low confidence + 5, startTime, { aiModel: this.config.model, contextUsed: context.contextHistory.length > 0 } ); @@ -589,7 +655,7 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; const isWorkflow = context.mode === 'workflow'; const prompt = getPrompt('scenarioAnalysis', isWorkflow, context.userQuery); - const result = await this.callMicroTaskAI(prompt, context, 220); + const result = await this.callMicroTaskAI(prompt, context, 400); if (result.success) { if (isWorkflow) { @@ -608,7 +674,7 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; const isWorkflow = context.mode === 'workflow'; const prompt = getPrompt('investigationApproach', isWorkflow, context.userQuery); - const result = await this.callMicroTaskAI(prompt, context, 220); + const result = await this.callMicroTaskAI(prompt, context, 400); if (result.success) { context.investigationApproach = result.content; @@ -622,7 +688,7 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; const isWorkflow = context.mode === 'workflow'; const prompt = getPrompt('criticalConsiderations', isWorkflow, context.userQuery); - const result = await this.callMicroTaskAI(prompt, context, 180); + const result = await this.callMicroTaskAI(prompt, context, 350); if (result.success) { context.criticalConsiderations = result.content; @@ -648,7 +714,7 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; const prompt = getPrompt('phaseToolSelection', context.userQuery, phase, phaseTools); - const result = await this.callMicroTaskAI(prompt, context, 450); + const result = await this.callMicroTaskAI(prompt, context, 800); if (result.success) { const selections = this.safeParseJSON(result.content, []); @@ -665,7 +731,6 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; } }); - // NEW: Add audit entry for tool selection this.addAuditEntry(context, 'micro-task', 'phase-tool-selection', { phase: phase.id, availableTools: phaseTools.length }, { validSelections: validSelections.length, selectedTools: validSelections.map(s => s.toolName) }, @@ -682,7 +747,7 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; private async evaluateSpecificTool(context: AnalysisContext, tool: any, rank: number): Promise { const prompt = getPrompt('toolEvaluation', context.userQuery, tool, rank); - const result = await this.callMicroTaskAI(prompt, context, 650); + const result = await this.callMicroTaskAI(prompt, context, 1200); if (result.success) { const evaluation = this.safeParseJSON(result.content, { @@ -702,7 +767,6 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; } }, 'evaluation', evaluation.suitability_score); - // NEW: Add audit entry for tool evaluation this.addAuditEntry(context, 'micro-task', 'tool-evaluation', { toolName: tool.name, rank }, { suitabilityScore: evaluation.suitability_score, hasExplanation: !!evaluation.detailed_explanation }, @@ -730,7 +794,7 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; const selectedToolNames = context.selectedTools?.map(st => st.tool.name) || []; const prompt = getPrompt('backgroundKnowledgeSelection', context.userQuery, context.mode, selectedToolNames, availableConcepts); - const result = await this.callMicroTaskAI(prompt, context, 400); + const result = await this.callMicroTaskAI(prompt, context, 700); if (result.success) { const selections = this.safeParseJSON(result.content, []); @@ -743,7 +807,6 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; relevance: sel.relevance })); - // NEW: Add audit entry for background knowledge selection this.addAuditEntry(context, 'micro-task', 'background-knowledge-selection', { availableConcepts: availableConcepts.length }, { selectedConcepts: context.backgroundKnowledge?.length || 0 }, @@ -761,21 +824,19 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; const selectedToolNames = context.selectedTools?.map(st => st.tool.name) || []; const prompt = getPrompt('finalRecommendations', context.mode === 'workflow', context.userQuery, selectedToolNames); - const result = await this.callMicroTaskAI(prompt, context, 180); + const result = await this.callMicroTaskAI(prompt, context, 350); return result; } - private async callAI(prompt: string, maxTokens: number = 1000): Promise { + private async callAI(prompt: string, maxTokens: number = 1500): Promise { const endpoint = this.config.endpoint; const apiKey = this.config.apiKey; const model = this.config.model; - // Simple headers - add auth only if API key exists let headers: Record = { 'Content-Type': 'application/json' }; - // Add authentication if API key is provided if (apiKey) { headers['Authorization'] = `Bearer ${apiKey}`; console.log('[AI PIPELINE] Using API key authentication'); @@ -783,7 +844,6 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; console.log('[AI PIPELINE] No API key - making request without authentication'); } - // Simple request body const requestBody = { model, messages: [{ role: 'user', content: prompt }], @@ -792,7 +852,6 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; }; try { - // FIXED: Use direct fetch since entire pipeline is already queued at query.ts level const response = await fetch(`${endpoint}/v1/chat/completions`, { method: 'POST', headers, @@ -826,13 +885,11 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; let completedTasks = 0; let failedTasks = 0; - // NEW: Clear any previous temporary audit entries this.tempAuditEntries = []; console.log(`[AI PIPELINE] Starting ${mode} query processing with context continuity and audit trail`); try { - // Stage 1: Get intelligent candidates (embeddings + AI selection) const toolsData = await getCompressedToolsDataForAI(); const filteredData = await this.getIntelligentCandidates(userQuery, toolsData, mode); @@ -844,20 +901,17 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; maxContextLength: this.maxContextTokens, currentContextLength: 0, seenToolNames: new Set(), - // NEW: Initialize audit trail auditTrail: [] }; - // NEW: Merge any temporary audit entries from pre-context operations this.mergeTemporaryAuditEntries(context); console.log(`[AI PIPELINE] Starting micro-tasks with ${filteredData.tools.length} tools visible`); - // NEW: Add initial audit entry this.addAuditEntry(context, 'initialization', 'pipeline-start', { userQuery, mode, toolsDataLoaded: !!toolsData }, { candidateTools: filteredData.tools.length, candidateConcepts: filteredData.concepts.length }, - 90, // High confidence for initialization + 90, startTime, { auditEnabled: this.auditConfig.enabled } ); @@ -896,19 +950,15 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; } } - // Task 5: Background Knowledge Selection const knowledgeResult = await this.selectBackgroundKnowledge(context); if (knowledgeResult.success) completedTasks++; else failedTasks++; await this.delay(this.microTaskDelay); - // Task 6: Final Recommendations const finalResult = await this.generateFinalRecommendations(context); if (finalResult.success) completedTasks++; else failedTasks++; - // Build final recommendation const recommendation = this.buildRecommendation(context, mode, finalResult.content); - // NEW: Add final audit entry this.addAuditEntry(context, 'completion', 'pipeline-end', { completedTasks, failedTasks }, { finalRecommendation: !!recommendation, auditEntriesGenerated: context.auditTrail.length }, @@ -935,7 +985,6 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; return { recommendation: { ...recommendation, - // NEW: Include audit trail in response auditTrail: this.auditConfig.enabled ? context.auditTrail : undefined }, processingStats @@ -944,7 +993,6 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; } catch (error) { console.error('[AI PIPELINE] Processing failed:', error); - // NEW: Ensure temp audit entries are cleared even on error this.tempAuditEntries = []; throw error; diff --git a/src/utils/dataService.ts b/src/utils/dataService.ts index 8b80f33..c0f8b1d 100644 --- a/src/utils/dataService.ts +++ b/src/utils/dataService.ts @@ -130,7 +130,6 @@ async function loadRawData(): Promise { try { cachedData = ToolsDataSchema.parse(rawData); - // Enhanced: Add default skill level descriptions if not provided if (!cachedData.skill_levels || Object.keys(cachedData.skill_levels).length === 0) { cachedData.skill_levels = { novice: "Minimal technical background required, guided interfaces", @@ -178,21 +177,18 @@ export async function getCompressedToolsDataForAI(): Promise tool.type !== 'concept') .map(tool => { const { projectUrl, statusUrl, ...compressedTool } = tool; return { ...compressedTool, - // Enhanced: Add computed fields for AI is_hosted: projectUrl !== undefined && projectUrl !== null && projectUrl !== "" && projectUrl.trim() !== "", is_open_source: tool.license && tool.license !== 'Proprietary', complexity_score: tool.skillLevel === 'expert' ? 5 : tool.skillLevel === 'advanced' ? 4 : tool.skillLevel === 'intermediate' ? 3 : tool.skillLevel === 'beginner' ? 2 : 1, - // Enhanced: Phase-specific suitability hints phase_suitability: tool.phases?.map(phase => ({ phase, primary_use: tool.tags?.find(tag => tag.includes(phase)) ? 'primary' : 'secondary' @@ -206,7 +202,6 @@ export async function getCompressedToolsDataForAI(): Promise Date: Mon, 4 Aug 2025 21:05:15 +0200 Subject: [PATCH 08/19] Progress --- src/components/AIQueryInterface.astro | 24 +++++------ src/styles/global.css | 1 + src/utils/aiPipeline.ts | 13 +++++- src/utils/embeddings.ts | 57 ++++++++++++++++++++------- 4 files changed, 67 insertions(+), 28 deletions(-) diff --git a/src/components/AIQueryInterface.astro b/src/components/AIQueryInterface.astro index 0c8d86e..9b80036 100644 --- a/src/components/AIQueryInterface.astro +++ b/src/components/AIQueryInterface.astro @@ -15,7 +15,7 @@ const domainAgnosticSoftware = data['domain-agnostic-software'] || []; - KI-gestützte Workflow-Empfehlungen + Forensic AI

Beschreiben Sie Ihr forensisches Szenario und erhalten Sie maßgeschneiderte Workflow-Empfehlungen @@ -169,16 +169,16 @@ const domainAgnosticSoftware = data['domain-agnostic-software'] || [];

@@ -292,13 +292,13 @@ class AIQueryInterface { return { workflow: { placeholder: "Beschreiben Sie Ihr forensisches Szenario... z.B. 'Verdacht auf Ransomware-Angriff auf Windows-Domänencontroller'", - description: "Beschreiben Sie Ihr forensisches Szenario und erhalten Sie maßgeschneiderte Workflow-Empfehlungen.", + description: "Beschreiben Sie Ihre Untersuchungssituation und erhalten Empfehlungen für alle Phasen der Untersuchung.", submitText: "Empfehlungen generieren", loadingText: "Analysiere Szenario und generiere Empfehlungen..." }, tool: { placeholder: "Beschreiben Sie Ihr Problem... z.B. 'Analyse von Android-Backups mit WhatsApp-Nachrichten'", - description: "Beschreiben Sie Ihr Problem und erhalten Sie 1-3 gezielt passende Empfehlungen.", + description: "Beschreiben Sie Ihre Untersuchungssituation und erhalten Empfehlungen für eine spezifische Aufgabenstellung.", submitText: "Empfehlungen finden", loadingText: "Analysiere Anforderungen und suche passende Methode..." } @@ -706,7 +706,7 @@ class AIQueryInterface { const html = `
- ${this.renderHeader('Empfohlener DFIR-Workflow', originalQuery)} + ${this.renderHeader('Untersuchungsansatz', originalQuery)} ${this.renderContextualAnalysis(recommendation, 'workflow')} ${this.renderBackgroundKnowledge(recommendation.background_knowledge)} ${this.renderWorkflowPhases(toolsByPhase, phaseOrder, phaseNames)} @@ -721,7 +721,7 @@ class AIQueryInterface { displayToolResults(recommendation, originalQuery) { const html = `
- ${this.renderHeader('Passende Empfehlungen', originalQuery)} + ${this.renderHeader('Handlungsempfehlung', originalQuery)} ${this.renderContextualAnalysis(recommendation, 'tool')} ${this.renderBackgroundKnowledge(recommendation.background_knowledge)} ${this.renderToolRecommendations(recommendation.recommended_tools)} diff --git a/src/styles/global.css b/src/styles/global.css index ca7ceee..79d1dce 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -2015,6 +2015,7 @@ input[type="checkbox"] { gap: 1rem; max-width: 1200px; margin: 0 auto; + margin-top: 1rem; } .phase-header { diff --git a/src/utils/aiPipeline.ts b/src/utils/aiPipeline.ts index 34dd1ee..5b14b4d 100644 --- a/src/utils/aiPipeline.ts +++ b/src/utils/aiPipeline.ts @@ -357,6 +357,17 @@ class ImprovedMicroTaskAIPipeline { let candidateConcepts: any[] = []; let selectionMethod = 'unknown'; + // WAIT for embeddings initialization if embeddings are enabled + if (process.env.AI_EMBEDDINGS_ENABLED === 'true') { + try { + console.log('[AI PIPELINE] Waiting for embeddings initialization...'); + await embeddingsService.waitForInitialization(); + console.log('[AI PIPELINE] Embeddings ready, proceeding with similarity search'); + } catch (error) { + console.error('[AI PIPELINE] Embeddings initialization failed, falling back to full dataset:', error); + } + } + if (embeddingsService.isEnabled()) { const embeddingsStart = Date.now(); const similarItems = await embeddingsService.findSimilar( @@ -425,7 +436,7 @@ class ImprovedMicroTaskAIPipeline { ); } } else { - console.log(`[AI PIPELINE] Embeddings disabled, using full dataset`); + console.log(`[AI PIPELINE] Embeddings disabled or not ready, using full dataset`); candidateTools = toolsData.tools; candidateConcepts = toolsData.concepts; selectionMethod = 'full_dataset'; diff --git a/src/utils/embeddings.ts b/src/utils/embeddings.ts index b7bbbaa..d70d0ca 100644 --- a/src/utils/embeddings.ts +++ b/src/utils/embeddings.ts @@ -31,6 +31,7 @@ interface SimilarityResult extends EmbeddingData { class EmbeddingsService { private embeddings: EmbeddingData[] = []; private isInitialized = false; + private initializationPromise: Promise | null = null; // ADD THIS LINE private readonly embeddingsPath = path.join(process.cwd(), 'data', 'embeddings.json'); private readonly batchSize: number; private readonly batchDelay: number; @@ -42,7 +43,25 @@ class EmbeddingsService { this.batchDelay = parseInt(process.env.AI_EMBEDDINGS_BATCH_DELAY_MS || '1000', 10); } + // REPLACE the existing initialize method with this: async initialize(): Promise { + // If initialization is already in progress, wait for it + if (this.initializationPromise) { + return this.initializationPromise; + } + + // If already initialized, return immediately + if (this.isInitialized) { + return Promise.resolve(); + } + + // Start initialization and store the promise + this.initializationPromise = this.performInitialization(); + return this.initializationPromise; + } + + // ADD THIS NEW METHOD: + private async performInitialization(): Promise { if (!this.enabled) { console.log('[EMBEDDINGS] Embeddings disabled, skipping initialization'); return; @@ -74,9 +93,29 @@ class EmbeddingsService { } catch (error) { console.error('[EMBEDDINGS] Failed to initialize:', error); this.isInitialized = false; + throw error; + } finally { + this.initializationPromise = null; } } + async waitForInitialization(): Promise { + if (!this.enabled) { + return Promise.resolve(); + } + + if (this.isInitialized) { + return Promise.resolve(); + } + + if (this.initializationPromise) { + await this.initializationPromise; + return; + } + + return this.initialize(); + } + private hashData(data: any): string { return Buffer.from(JSON.stringify(data)).toString('base64').slice(0, 32); } @@ -127,7 +166,6 @@ class EmbeddingsService { 'Content-Type': 'application/json' }; - // API key is optional for Ollama but required for Mistral/OpenAI if (apiKey) { headers['Authorization'] = `Bearer ${apiKey}`; } @@ -148,12 +186,10 @@ class EmbeddingsService { const data = await response.json(); - // Detect Ollama format if (Array.isArray(data.embeddings)) { return data.embeddings; } - // Detect OpenAI/Mistral format if (Array.isArray(data.data)) { return data.data.map((item: any) => item.embedding); } @@ -170,7 +206,6 @@ class EmbeddingsService { const contents = allItems.map(item => this.createContentString(item)); this.embeddings = []; - // Process in batches to respect rate limits for (let i = 0; i < contents.length; i += this.batchSize) { const batch = contents.slice(i, i + this.batchSize); const batchItems = allItems.slice(i, i + this.batchSize); @@ -198,7 +233,6 @@ class EmbeddingsService { }); }); - // Rate limiting delay between batches if (i + this.batchSize < contents.length) { await new Promise(resolve => setTimeout(resolve, this.batchDelay)); } @@ -213,7 +247,6 @@ class EmbeddingsService { } public async embedText(text: string): Promise { - // Re‑use the private batch helper to avoid auth duplication const [embedding] = await this.generateEmbeddingsBatch([text.toLowerCase()]); return embedding; } @@ -239,25 +272,21 @@ class EmbeddingsService { } try { - // Generate embedding for query const queryEmbeddings = await this.generateEmbeddingsBatch([query.toLowerCase()]); const queryEmbedding = queryEmbeddings[0]; console.log(`[EMBEDDINGS] Computing similarities for ${this.embeddings.length} items`); - // Calculate similarities - properly typed const similarities: SimilarityResult[] = this.embeddings.map(item => ({ ...item, similarity: this.cosineSimilarity(queryEmbedding, item.embedding) })); - // Filter by threshold and sort by similarity (descending - highest first) const results = similarities .filter(item => item.similarity >= threshold) - .sort((a, b) => b.similarity - a.similarity) // CRITICAL: Ensure descending order + .sort((a, b) => b.similarity - a.similarity) .slice(0, maxResults); - // ENHANCED: Verify ordering is correct const orderingValid = results.every((item, index) => { if (index === 0) return true; return item.similarity <= results[index - 1].similarity; @@ -270,15 +299,13 @@ class EmbeddingsService { }); } - // ENHANCED: Log top results for debugging console.log(`[EMBEDDINGS] Found ${results.length} similar items (threshold: ${threshold})`); if (results.length > 0) { - console.log('[EMBEDDINGS] Top 5 similarity matches:'); - results.slice(0, 5).forEach((item, idx) => { + console.log('[EMBEDDINGS] Top 10 similarity matches:'); + results.slice(0, 10).forEach((item, idx) => { console.log(` ${idx + 1}. ${item.name} (${item.type}) = ${item.similarity.toFixed(4)}`); }); - // Verify first result is indeed the highest const topSimilarity = results[0].similarity; const hasHigherSimilarity = results.some(item => item.similarity > topSimilarity); if (hasHigherSimilarity) { -- 2.39.5 From f00e2d3cfda065053a733ddc8a783dbf0f9a4ec1 Mon Sep 17 00:00:00 2001 From: overcuriousity Date: Mon, 4 Aug 2025 21:38:31 +0200 Subject: [PATCH 09/19] content --- src/data/tools.yaml | 238 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 238 insertions(+) diff --git a/src/data/tools.yaml b/src/data/tools.yaml index f3862bd..0c3a185 100644 --- a/src/data/tools.yaml +++ b/src/data/tools.yaml @@ -3367,6 +3367,244 @@ tools: accessType: download license: "MPL\_/ AGPL" knowledgebase: false + - name: ShadowExplorer + icon: 🗂️ + type: software + description: >- + Das schlanke Windows-Tool macht Volume-Shadow-Copy-Snapshots auch in Home-Editionen sichtbar und erlaubt das komfortable Durchstöbern sowie Wiederherstellen früherer Datei-Versionen. Damit lassen sich versehentlich gelöschte oder überschriebene Dateien in Sekunden zurückholen – geeignet für schnelle Triage und klassische Datenträgerforensik. + domains: + - static-investigations + - incident-response + phases: + - examination + - analysis + platforms: + - Windows + related_software: + - OSFMount + - PhotoRec + domain-agnostic-software: null + skillLevel: novice + accessType: download + url: https://www.shadowexplorer.com/ + license: Freeware + knowledgebase: false + tags: + - gui + - shadow-copy + - snapshot-browsing + - file-recovery + - previous-versions + - scenario:file_recovery + - point-in-time-restore + related_concepts: + - Digital Evidence Chain of Custody + + + - name: Sonic Visualiser + icon: 🎵 + type: software + description: >- + Die Open-Source-Audio-Analyse-Suite wird in der Forensik eingesetzt, + um Wave- und Kompressionsformate bis auf Sample-Ebene zu untersuchen. + Spektrogramm-Visualisierung, Zeit-/Frequenz-Annotationen und + Transkriptions-Plugins (Vamp) helfen, Manipulationen wie + Bandpass-Filter, Time-Stretching oder Insert-Edits nachzuweisen. + FFT- und Mel-Spectral-Views decken versteckte Audio-Watermarks oder + Steganografie auf. Export-Funktionen in CSV/JSON erlauben die + Weiterverarbeitung in Python-Notebooks oder SIEM-Pipelines. + Ideal für Voice-Authentication-Checks, Deep-Fake-Erkennung + und Beweisaufbereitung vor Gericht. + skillLevel: intermediate + url: https://www.sonicvisualiser.org/ + domains: + - static-investigations + - fraud-investigation + phases: + - examination + - analysis + - reporting + platforms: + - Windows + - Linux + - macOS + accessType: download + license: GPL-2.0 + knowledgebase: false + tags: + - gui + - audio-forensics + - spectrogram + - plugin-support + - annotation + - csv-export + related_concepts: [] + related_software: + - Audacity + + - name: Dissect + icon: 🧩 + type: software + description: >- + Fox-ITs Python-Framework abstrahiert Windows- und Linux-Speicherabbilder + in virtuelle Objekte (Prozesse, Dateien, Registry, Kernel-Strukturen), + ohne zuvor ein Profil definieren zu müssen. Modularer + Hypervisor-Layer erlaubt das Mounten und gleichzeitige Analysieren + mehrerer Memory-Dumps – perfekt für großflächige Incident-Response. + Plugins dekodieren PTEs, handle tables, APC-Queues und liefern + YARA-kompatible Scans. Die Zero-Copy-Architektur beschleunigt Queries auf + Multi-GB-Images signifikant. Unterstützt Windows 11 24H2-Kernel sowie + Linux 6.x-schichten ab Juli 2025. + skillLevel: advanced + url: https://github.com/fox-it/dissect + domains: + - incident-response + - malware-analysis + - static-investigations + phases: + - examination + - analysis + platforms: + - Windows + - Linux + - macOS + accessType: download + license: Apache 2.0 + knowledgebase: false + tags: + - command-line + - memory-analysis + - plugin-support + - python-library + - zero-copy + - profile-less + related_concepts: + - Regular Expressions (Regex) + related_software: + - Volatility 3 + - Rekall + + - name: Docker Explorer + icon: 🐳 + type: software + description: >- + Googles Forensik-Toolkit zerlegt Offline-Docker-Volumes und + Overlay-Dateisysteme ohne laufenden Daemon. Es extrahiert + Container-Config, Image-Layer, ENV-Variablen, Mounted-Secrets + und schreibt Timeline-fähige Metadata-JSONs. Unterstützt btrfs, + overlay2 und zfs Storage-Driver sowie Docker Desktop (macOS/Windows). + Perfekt, um bösartige Images nach Supply-Chain-Attacken zu enttarnen + oder flüchtige Container nach einem Incident nachträglich zu analysieren. + skillLevel: intermediate + url: https://github.com/google/docker-explorer + domains: + - cloud-forensics + - incident-response + - static-investigations + phases: + - data-collection + - examination + - analysis + platforms: + - Linux + - macOS + - Windows + accessType: download + license: Apache 2.0 + knowledgebase: false + tags: + - command-line + - container-forensics + - docker + - timeline + - json-export + - supply-chain + related_concepts: [] + related_software: + - Velociraptor + - osquery + + - name: Ghiro + icon: 🖼️ + type: software + description: >- + Die Web-basierte Bild­forensik-Plattform automatisiert EXIF-Analyse, + Hash-Matching, Error-Level-Evaluation (ELA) und + Steganografie-Erkennung für große Dateibatches. Unterstützt + Gesichts- und NSFW-Detection sowie GPS-Reverse-Geocoding für + Bewegungsprofile. Reports sind gerichtsfest + versioniert, REST-API und Celery-Worker skalieren auf + Millionen Bilder – ideal für CSAM-Ermittlungen oder Fake-News-Prüfung. + skillLevel: intermediate + url: https://getghiro.org/ + domains: + - static-investigations + - fraud-investigation + - mobile-forensics + phases: + - examination + - analysis + - reporting + platforms: + - Web + - Linux + accessType: server-based + license: GPL-2.0 + knowledgebase: false + tags: + - web-interface + - image-forensics + - exif-analysis + - steganography + - nsfw-detection + - batch-processing + related_concepts: + - Hash Functions & Digital Signatures + related_software: + - ExifTool + - PhotoRec + + - name: Sherloq + icon: 🔍 + type: software + description: >- + Das Python-GUI-Toolkit für visuelle Datei-Analyse kombiniert + klassische Reverse-Steganografie-Techniken (LSB, Palette-Tweaking, + DCT-Coefficient-Scanning) mit modernen CV-Algorithmen. + Heatmaps und Histogramm-Diffs zeigen Manipulations-Hotspots, + während eine „Carve-All-Layers“-Funktion versteckte Daten in PNG, + JPEG, BMP, GIF und Audio-Spectra aufspürt. Plugins für zsteg, + binwalk und exiftool erweitern die Pipeline. + Eine Must-have-Ergänzung zu Ghidra & friends, wenn + Malware Dateien als Dead-Drop nutzt. + skillLevel: intermediate + url: https://github.com/GuidoBartoli/sherloq + domains: + - malware-analysis + - static-investigations + phases: + - examination + - analysis + platforms: + - Windows + - Linux + - macOS + accessType: download + license: MIT + knowledgebase: false + tags: + - gui + - image-forensics + - steganography + - lsb-extraction + - histogram-analysis + - plugin-support + related_concepts: + - Regular Expressions (Regex) + related_software: + - Ghiro + - CyberChef + - name: Cortex type: software description: >- -- 2.39.5 From 1eb49315fae046e9f7b86334abc8b745d08e077c Mon Sep 17 00:00:00 2001 From: overcuriousity Date: Tue, 5 Aug 2025 11:58:09 +0200 Subject: [PATCH 10/19] UI Layout improvements --- .astro/data-store.json | 2 +- src/pages/index.astro | 139 +- src/styles/global copy.css | 2920 ------------------------------------ src/styles/global.css | 158 +- 4 files changed, 226 insertions(+), 2993 deletions(-) delete mode 100644 src/styles/global copy.css diff --git a/.astro/data-store.json b/.astro/data-store.json index e8d169a..c4d4215 100644 --- a/.astro/data-store.json +++ b/.astro/data-store.json @@ -1 +1 @@ -[["Map",1,2,7,8],"meta::meta",["Map",3,4,5,6],"astro-version","5.12.8","astro-config-digest","{\"root\":{},\"srcDir\":{},\"publicDir\":{},\"outDir\":{},\"cacheDir\":{},\"compressHTML\":true,\"base\":\"/\",\"trailingSlash\":\"ignore\",\"output\":\"server\",\"scopedStyleStrategy\":\"attribute\",\"build\":{\"format\":\"directory\",\"client\":{},\"server\":{},\"assets\":\"_astro\",\"serverEntry\":\"entry.mjs\",\"redirects\":true,\"inlineStylesheets\":\"auto\",\"concurrency\":1},\"server\":{\"open\":false,\"host\":true,\"port\":4321,\"streaming\":true,\"allowedHosts\":[]},\"redirects\":{},\"image\":{\"endpoint\":{\"route\":\"/_image\",\"entrypoint\":\"astro/assets/endpoint/node\"},\"service\":{\"entrypoint\":\"astro/assets/services/sharp\",\"config\":{}},\"domains\":[],\"remotePatterns\":[],\"responsiveStyles\":false},\"devToolbar\":{\"enabled\":true},\"markdown\":{\"syntaxHighlight\":{\"type\":\"shiki\",\"excludeLangs\":[\"math\"]},\"shikiConfig\":{\"langs\":[],\"langAlias\":{},\"theme\":\"github-dark\",\"themes\":{},\"wrap\":false,\"transformers\":[]},\"remarkPlugins\":[],\"rehypePlugins\":[],\"remarkRehype\":{},\"gfm\":true,\"smartypants\":true},\"security\":{\"checkOrigin\":true},\"env\":{\"schema\":{},\"validateSecrets\":false},\"experimental\":{\"clientPrerender\":false,\"contentIntellisense\":false,\"headingIdCompat\":false,\"preserveScriptOrder\":false,\"liveContentCollections\":false,\"csp\":false,\"rawEnvValues\":false},\"legacy\":{\"collections\":false},\"session\":{\"driver\":\"fs-lite\",\"options\":{\"base\":\"/var/home/user01/Projekte/forensic-pathways/node_modules/.astro/sessions\"}}}","knowledgebase",["Map",9,10,100,101,149,150,223,224,288,289,344,345],"misp",{"id":9,"data":11,"body":35,"filePath":36,"digest":37,"rendered":38,"legacyId":99},{"title":12,"tool_name":13,"description":14,"last_updated":15,"author":16,"difficulty":17,"categories":18,"tags":24,"sections":31,"review_status":34},"MISP - Plattform für Threat Intelligence Sharing","MISP","Das Rückgrat des modernen Threat-Intelligence-Sharings mit über 40.000 aktiven Instanzen weltweit.",["Date","2025-07-20T00:00:00.000Z"],"Claude 4 Sonnet","intermediate",[19,20,21,22,23],"incident-response","static-investigations","malware-analysis","network-forensics","cloud-forensics",[25,26,27,28,29,30],"web-based","threat-intelligence","api","correlation","ioc-sharing","automation",{"overview":32,"installation":32,"configuration":32,"usage_examples":32,"best_practices":32,"troubleshooting":32,"advanced_topics":33},true,false,"published","> **⚠️ Hinweis**: Dies ist ein vorläufiger, KI-generierter Knowledgebase-Eintrag. Wir freuen uns über Verbesserungen und Ergänzungen durch die Community!\n\n\n# Übersicht\n\n**MISP (Malware Information Sharing Platform & Threat Sharing)** ist eine freie Open-Source-Plattform zur strukturierten Erfassung, Speicherung, Analyse und gemeinsamen Nutzung von Cyber-Bedrohungsdaten. Mit über 40.000 Instanzen weltweit ist MISP der De-facto-Standard für den Austausch von Indicators of Compromise (IoCs) und Threat Intelligence zwischen CERTs, SOCs, Strafverfolgungsbehörden und anderen sicherheitsrelevanten Organisationen.\n\nDie föderierte Architektur ermöglicht einen kontrollierten, dezentralen Austausch von Informationen über vertrauenswürdige Partner hinweg. Durch Taxonomien, Tags und integrierte APIs ist eine automatische Anreicherung, Korrelation und Verarbeitung von Informationen in SIEMs, Firewalls oder Endpoint-Lösungen möglich.\n\n## Installation\n\n### Voraussetzungen\n\n- **Server-Betriebssystem:** Linux (empfohlen: Debian/Ubuntu)\n- **Abhängigkeiten:** MariaDB/MySQL, PHP, Apache/Nginx, Redis\n- **Ressourcen:** Mindestens 4 GB RAM, SSD empfohlen\n\n### Installationsschritte\n\n```bash\n# Beispiel für Debian/Ubuntu:\nsudo apt update && sudo apt install -y curl gnupg git python3 python3-pip redis-server mariadb-server apache2 php libapache2-mod-php\n\n# MISP klonen\ngit clone https://github.com/MISP/MISP.git /var/www/MISP\n\n# Setup-Skript nutzen\ncd /var/www/MISP && bash INSTALL/INSTALL.debian.sh\n````\n\nWeitere Details: [Offizielle Installationsanleitung](https://misp.github.io/MISP/INSTALL.debian/)\n\n## Konfiguration\n\n### Webserver\n\n* HTTPS aktivieren (Let's Encrypt oder Reverse Proxy)\n* PHP-Konfiguration anpassen (`upload_max_filesize`, `memory_limit`, `post_max_size`)\n\n### Benutzerrollen\n\n* Administrator, Org-Admin, Analyst etc.\n* Zugriffsbeschränkungen nach Organisation/Feed definierbar\n\n### Feeds und Galaxies\n\n* Aktivierung von Feeds (z. B. CIRCL, Abuse.ch, OpenCTI)\n* Nutzung von Galaxies zur Klassifizierung (APT-Gruppen, Malware-Familien)\n\n## Verwendungsbeispiele\n\n### Beispiel 1: Import von IoCs aus externem Feed\n\n1. Feed aktivieren unter **Administration → List Feeds**\n2. Feed synchronisieren\n3. Ereignisse durchsuchen, analysieren, ggf. mit eigenen Daten korrelieren\n\n### Beispiel 2: Automatisierte Anbindung an SIEM\n\n* REST-API-Token erstellen\n* API-Calls zur Abfrage neuer Events (z. B. mit Python, Logstash oder MISP Workbench)\n* Integration in Security-Systeme über JSON/STIX export\n\n## Best Practices\n\n* Regelmäßige Backups der Datenbank\n* Taxonomien konsistent verwenden\n* Nutzung der Sighting-Funktion zur Validierung von IoCs\n* Vertrauensstufen (TLP, PAP) korrekt setzen\n* Nicht nur konsumieren – auch teilen!\n\n## Troubleshooting\n\n### Problem: MISP-Feeds laden nicht\n\n**Lösung:**\n\n* Internetverbindung prüfen\n* Cronjobs aktiv?\n* Logs prüfen: `/var/www/MISP/app/tmp/logs/error.log`\n\n### Problem: API gibt 403 zurück\n\n**Lösung:**\n\n* Ist der API-Key korrekt und aktiv?\n* Rechte des Benutzers überprüfen\n* IP-Filter im MISP-Backend beachten\n\n### Problem: Hohe Datenbanklast\n\n**Lösung:**\n\n* Indizes optimieren\n* Redis aktivieren\n* Alte Events regelmäßig archivieren oder löschen\n\n## Weiterführende Themen\n\n* STIX2-Import/Export\n* Erweiterungen mit MISP Modules (z. B. für Virustotal, YARA)\n* Föderierte Netzwerke und Community-Portale\n* Integration mit OpenCTI oder TheHive\n\n---\n\n**Links:**\n\n* 🌐 [Offizielle Projektseite](https://misp-project.org/)\n* 📦 [CC24-MISP-Instanz](https://misp.cc24.dev)\n* 📊 [Status-Monitoring](https://status.mikoshi.de/api/badge/34/status)\n\nLizenz: **AGPL-3.0**","src/content/knowledgebase/misp.md","35930fa919a46964",{"html":39,"metadata":40},"\u003Cblockquote>\n\u003Cp>\u003Cstrong>⚠️ Hinweis\u003C/strong>: Dies ist ein vorläufiger, KI-generierter Knowledgebase-Eintrag. Wir freuen uns über Verbesserungen und Ergänzungen durch die Community!\u003C/p>\n\u003C/blockquote>\n\u003Ch1 id=\"übersicht\">Übersicht\u003C/h1>\n\u003Cp>\u003Cstrong>MISP (Malware Information Sharing Platform & Threat Sharing)\u003C/strong> ist eine freie Open-Source-Plattform zur strukturierten Erfassung, Speicherung, Analyse und gemeinsamen Nutzung von Cyber-Bedrohungsdaten. Mit über 40.000 Instanzen weltweit ist MISP der De-facto-Standard für den Austausch von Indicators of Compromise (IoCs) und Threat Intelligence zwischen CERTs, SOCs, Strafverfolgungsbehörden und anderen sicherheitsrelevanten Organisationen.\u003C/p>\n\u003Cp>Die föderierte Architektur ermöglicht einen kontrollierten, dezentralen Austausch von Informationen über vertrauenswürdige Partner hinweg. Durch Taxonomien, Tags und integrierte APIs ist eine automatische Anreicherung, Korrelation und Verarbeitung von Informationen in SIEMs, Firewalls oder Endpoint-Lösungen möglich.\u003C/p>\n\u003Ch2 id=\"installation\">Installation\u003C/h2>\n\u003Ch3 id=\"voraussetzungen\">Voraussetzungen\u003C/h3>\n\u003Cul>\n\u003Cli>\u003Cstrong>Server-Betriebssystem:\u003C/strong> Linux (empfohlen: Debian/Ubuntu)\u003C/li>\n\u003Cli>\u003Cstrong>Abhängigkeiten:\u003C/strong> MariaDB/MySQL, PHP, Apache/Nginx, Redis\u003C/li>\n\u003Cli>\u003Cstrong>Ressourcen:\u003C/strong> Mindestens 4 GB RAM, SSD empfohlen\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"installationsschritte\">Installationsschritte\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Beispiel für Debian/Ubuntu:\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apt\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> update\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> && \u003C/span>\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apt\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> install\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -y\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> curl\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> gnupg\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> git\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> python3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> python3-pip\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> redis-server\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> mariadb-server\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apache2\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> php\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> libapache2-mod-php\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># MISP klonen\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">git\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> clone\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> https://github.com/MISP/MISP.git\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /var/www/MISP\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Setup-Skript nutzen\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">cd\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /var/www/MISP\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> && \u003C/span>\u003Cspan style=\"color:#B392F0\">bash\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> INSTALL/INSTALL.debian.sh\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Cp>Weitere Details: \u003Ca href=\"https://misp.github.io/MISP/INSTALL.debian/\">Offizielle Installationsanleitung\u003C/a>\u003C/p>\n\u003Ch2 id=\"konfiguration\">Konfiguration\u003C/h2>\n\u003Ch3 id=\"webserver\">Webserver\u003C/h3>\n\u003Cul>\n\u003Cli>HTTPS aktivieren (Let’s Encrypt oder Reverse Proxy)\u003C/li>\n\u003Cli>PHP-Konfiguration anpassen (\u003Ccode>upload_max_filesize\u003C/code>, \u003Ccode>memory_limit\u003C/code>, \u003Ccode>post_max_size\u003C/code>)\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"benutzerrollen\">Benutzerrollen\u003C/h3>\n\u003Cul>\n\u003Cli>Administrator, Org-Admin, Analyst etc.\u003C/li>\n\u003Cli>Zugriffsbeschränkungen nach Organisation/Feed definierbar\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"feeds-und-galaxies\">Feeds und Galaxies\u003C/h3>\n\u003Cul>\n\u003Cli>Aktivierung von Feeds (z. B. CIRCL, Abuse.ch, OpenCTI)\u003C/li>\n\u003Cli>Nutzung von Galaxies zur Klassifizierung (APT-Gruppen, Malware-Familien)\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"verwendungsbeispiele\">Verwendungsbeispiele\u003C/h2>\n\u003Ch3 id=\"beispiel-1-import-von-iocs-aus-externem-feed\">Beispiel 1: Import von IoCs aus externem Feed\u003C/h3>\n\u003Col>\n\u003Cli>Feed aktivieren unter \u003Cstrong>Administration → List Feeds\u003C/strong>\u003C/li>\n\u003Cli>Feed synchronisieren\u003C/li>\n\u003Cli>Ereignisse durchsuchen, analysieren, ggf. mit eigenen Daten korrelieren\u003C/li>\n\u003C/ol>\n\u003Ch3 id=\"beispiel-2-automatisierte-anbindung-an-siem\">Beispiel 2: Automatisierte Anbindung an SIEM\u003C/h3>\n\u003Cul>\n\u003Cli>REST-API-Token erstellen\u003C/li>\n\u003Cli>API-Calls zur Abfrage neuer Events (z. B. mit Python, Logstash oder MISP Workbench)\u003C/li>\n\u003Cli>Integration in Security-Systeme über JSON/STIX export\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"best-practices\">Best Practices\u003C/h2>\n\u003Cul>\n\u003Cli>Regelmäßige Backups der Datenbank\u003C/li>\n\u003Cli>Taxonomien konsistent verwenden\u003C/li>\n\u003Cli>Nutzung der Sighting-Funktion zur Validierung von IoCs\u003C/li>\n\u003Cli>Vertrauensstufen (TLP, PAP) korrekt setzen\u003C/li>\n\u003Cli>Nicht nur konsumieren – auch teilen!\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"troubleshooting\">Troubleshooting\u003C/h2>\n\u003Ch3 id=\"problem-misp-feeds-laden-nicht\">Problem: MISP-Feeds laden nicht\u003C/h3>\n\u003Cp>\u003Cstrong>Lösung:\u003C/strong>\u003C/p>\n\u003Cul>\n\u003Cli>Internetverbindung prüfen\u003C/li>\n\u003Cli>Cronjobs aktiv?\u003C/li>\n\u003Cli>Logs prüfen: \u003Ccode>/var/www/MISP/app/tmp/logs/error.log\u003C/code>\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"problem-api-gibt-403-zurück\">Problem: API gibt 403 zurück\u003C/h3>\n\u003Cp>\u003Cstrong>Lösung:\u003C/strong>\u003C/p>\n\u003Cul>\n\u003Cli>Ist der API-Key korrekt und aktiv?\u003C/li>\n\u003Cli>Rechte des Benutzers überprüfen\u003C/li>\n\u003Cli>IP-Filter im MISP-Backend beachten\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"problem-hohe-datenbanklast\">Problem: Hohe Datenbanklast\u003C/h3>\n\u003Cp>\u003Cstrong>Lösung:\u003C/strong>\u003C/p>\n\u003Cul>\n\u003Cli>Indizes optimieren\u003C/li>\n\u003Cli>Redis aktivieren\u003C/li>\n\u003Cli>Alte Events regelmäßig archivieren oder löschen\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"weiterführende-themen\">Weiterführende Themen\u003C/h2>\n\u003Cul>\n\u003Cli>STIX2-Import/Export\u003C/li>\n\u003Cli>Erweiterungen mit MISP Modules (z. B. für Virustotal, YARA)\u003C/li>\n\u003Cli>Föderierte Netzwerke und Community-Portale\u003C/li>\n\u003Cli>Integration mit OpenCTI oder TheHive\u003C/li>\n\u003C/ul>\n\u003Chr>\n\u003Cp>\u003Cstrong>Links:\u003C/strong>\u003C/p>\n\u003Cul>\n\u003Cli>🌐 \u003Ca href=\"https://misp-project.org/\">Offizielle Projektseite\u003C/a>\u003C/li>\n\u003Cli>📦 \u003Ca href=\"https://misp.cc24.dev\">CC24-MISP-Instanz\u003C/a>\u003C/li>\n\u003Cli>📊 \u003Ca href=\"https://status.mikoshi.de/api/badge/34/status\">Status-Monitoring\u003C/a>\u003C/li>\n\u003C/ul>\n\u003Cp>Lizenz: \u003Cstrong>AGPL-3.0\u003C/strong>\u003C/p>",{"headings":41,"localImagePaths":96,"remoteImagePaths":97,"frontmatter":11,"imagePaths":98},[42,46,50,54,57,60,63,66,69,72,75,78,81,84,87,90,93],{"depth":43,"slug":44,"text":45},1,"übersicht","Übersicht",{"depth":47,"slug":48,"text":49},2,"installation","Installation",{"depth":51,"slug":52,"text":53},3,"voraussetzungen","Voraussetzungen",{"depth":51,"slug":55,"text":56},"installationsschritte","Installationsschritte",{"depth":47,"slug":58,"text":59},"konfiguration","Konfiguration",{"depth":51,"slug":61,"text":62},"webserver","Webserver",{"depth":51,"slug":64,"text":65},"benutzerrollen","Benutzerrollen",{"depth":51,"slug":67,"text":68},"feeds-und-galaxies","Feeds und Galaxies",{"depth":47,"slug":70,"text":71},"verwendungsbeispiele","Verwendungsbeispiele",{"depth":51,"slug":73,"text":74},"beispiel-1-import-von-iocs-aus-externem-feed","Beispiel 1: Import von IoCs aus externem Feed",{"depth":51,"slug":76,"text":77},"beispiel-2-automatisierte-anbindung-an-siem","Beispiel 2: Automatisierte Anbindung an SIEM",{"depth":47,"slug":79,"text":80},"best-practices","Best Practices",{"depth":47,"slug":82,"text":83},"troubleshooting","Troubleshooting",{"depth":51,"slug":85,"text":86},"problem-misp-feeds-laden-nicht","Problem: MISP-Feeds laden nicht",{"depth":51,"slug":88,"text":89},"problem-api-gibt-403-zurück","Problem: API gibt 403 zurück",{"depth":51,"slug":91,"text":92},"problem-hohe-datenbanklast","Problem: Hohe Datenbanklast",{"depth":47,"slug":94,"text":95},"weiterführende-themen","Weiterführende Themen",[],[],[],"misp.md","regular-expressions-regex",{"id":100,"data":102,"body":116,"filePath":117,"digest":118,"rendered":119,"legacyId":148},{"title":103,"tool_name":104,"description":105,"last_updated":106,"author":16,"difficulty":17,"categories":107,"tags":109,"sections":115,"review_status":34},"Regular Expressions (Regex) – Musterbasierte Textanalyse","Regular Expressions (Regex)","Pattern matching language für Suche, Extraktion und Manipulation von Text in forensischen Analysen.",["Date","2025-07-20T00:00:00.000Z"],[19,21,22,108],"fraud-investigation",[110,111,112,113,114],"pattern-matching","text-processing","log-analysis","string-manipulation","search-algorithms",{"overview":32,"installation":33,"configuration":33,"usage_examples":32,"best_practices":32,"troubleshooting":33,"advanced_topics":32},"> **⚠️ Hinweis**: Dies ist ein vorläufiger, KI-generierter Knowledgebase-Eintrag. Wir freuen uns über Verbesserungen und Ergänzungen durch die Community!\n\n\n# Übersicht\n\n**Regular Expressions (Regex)** sind ein leistungsfähiges Werkzeug zur Erkennung, Extraktion und Transformation von Zeichenfolgen anhand vordefinierter Muster. In der digitalen Forensik sind Regex-Ausdrücke unverzichtbar: Sie helfen beim Auffinden von IP-Adressen, Hash-Werten, Dateipfaden, Malware-Signaturen oder Kreditkartennummern in großen Mengen unstrukturierter Daten wie Logdateien, Netzwerktraces oder Memory Dumps.\n\nRegex ist nicht auf eine bestimmte Plattform oder Software beschränkt – es wird in nahezu allen gängigen Programmiersprachen, Texteditoren und forensischen Tools unterstützt.\n\n## Verwendungsbeispiele\n\n### 1. IP-Adressen extrahieren\n\n```regex\n\\b(?:\\d{1,3}\\.){3}\\d{1,3}\\b\n````\n\nVerwendung:\n\n* Finden von IP-Adressen in Firewall-Logs oder Packet Captures.\n* Beispiel-Zeile:\n\n ```\n Connection from 192.168.1.101 to port 443 established\n ```\n\n### 2. E-Mail-Adressen identifizieren\n\n```regex\n[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}\n```\n\nVerwendung:\n\n* Erkennung von kompromittierten Accounts in Phishing-E-Mails.\n* Analyse von Useraktivitäten oder Kommunikationsverläufen.\n\n### 3. Hash-Werte erkennen (z. B. SHA-256)\n\n```regex\n\\b[A-Fa-f0-9]{64}\\b\n```\n\nVerwendung:\n\n* Extraktion von Malware-Hashes aus Memory Dumps oder YARA-Logs.\n\n### 4. Zeitstempel in Logdateien extrahieren\n\n```regex\n\\d{4}-\\d{2}-\\d{2}[ T]\\d{2}:\\d{2}:\\d{2}\n```\n\nVerwendung:\n\n* Zeitsensitive Korrelationsanalysen (z. B. bei Intrusion Detection oder Timeline-Rekonstruktionen).\n\n## Best Practices\n\n* **Regex testen**: Nutze Plattformen wie [regexr.com](https://regexr.com/) oder [regex101.com](https://regex101.com/) zur Validierung.\n* **Performance beachten**: Komplexe Ausdrücke können ineffizient sein und Systeme verlangsamen – verwende Lazy Quantifiers (`*?`, `+?`) bei Bedarf.\n* **Escape-Zeichen korrekt anwenden**: Spezielle Zeichen wie `.` oder `\\` müssen bei Bedarf mit `\\\\` oder `\\.` maskiert werden.\n* **Portabilität prüfen**: Unterschiedliche Regex-Engines (z. B. Python `re`, PCRE, JavaScript) interpretieren manche Syntax leicht unterschiedlich.\n* **Lesbarkeit fördern**: Verwende benannte Gruppen (`(?P\u003Cname>...)`) und Kommentare (`(?x)`), um reguläre Ausdrücke besser wartbar zu machen.\n\n## Weiterführende Themen\n\n### Lookaheads und Lookbehinds\n\nMit **Lookaheads** (`(?=...)`) und **Lookbehinds** (`(?\u003C=...)`) können Bedingungen formuliert werden, ohne dass der Text Teil des Matchs wird.\n\nBeispiel: Alle `.exe`-Dateinamen **ohne** das Wort `safe` davor matchen:\n\n```regex\n(?\u003C!safe\\s)[\\w-]+\\.exe\n```\n\n### Regex in Forensik-Tools\n\n* **YARA**: Unterstützt Regex zur Erstellung von Malware-Signaturen.\n* **Wireshark**: Filtert Payloads anhand von Regex-ähnlicher Syntax.\n* **Splunk & ELK**: Verwenden Regex für Logparsing und Visualisierung.\n* **Volatility Plugins**: Extrahieren Artefakte mit Regex-basierten Scans.\n\n---\n\n> 🔤 **Regex ist ein universelles Werkzeug für Analysten, Ermittler und Entwickler, um versteckte Informationen schnell und flexibel aufzuspüren.**\n>\n> Nutze es überall dort, wo Textdaten eine Rolle spielen.","src/content/knowledgebase/regular-expressions-regex.md","247bcf48ebdc9ba0",{"html":120,"metadata":121},"\u003Cblockquote>\n\u003Cp>\u003Cstrong>⚠️ Hinweis\u003C/strong>: Dies ist ein vorläufiger, KI-generierter Knowledgebase-Eintrag. Wir freuen uns über Verbesserungen und Ergänzungen durch die Community!\u003C/p>\n\u003C/blockquote>\n\u003Ch1 id=\"übersicht\">Übersicht\u003C/h1>\n\u003Cp>\u003Cstrong>Regular Expressions (Regex)\u003C/strong> sind ein leistungsfähiges Werkzeug zur Erkennung, Extraktion und Transformation von Zeichenfolgen anhand vordefinierter Muster. In der digitalen Forensik sind Regex-Ausdrücke unverzichtbar: Sie helfen beim Auffinden von IP-Adressen, Hash-Werten, Dateipfaden, Malware-Signaturen oder Kreditkartennummern in großen Mengen unstrukturierter Daten wie Logdateien, Netzwerktraces oder Memory Dumps.\u003C/p>\n\u003Cp>Regex ist nicht auf eine bestimmte Plattform oder Software beschränkt – es wird in nahezu allen gängigen Programmiersprachen, Texteditoren und forensischen Tools unterstützt.\u003C/p>\n\u003Ch2 id=\"verwendungsbeispiele\">Verwendungsbeispiele\u003C/h2>\n\u003Ch3 id=\"1-ip-adressen-extrahieren\">1. IP-Adressen extrahieren\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"regex\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">\\b(?:\\d\u003C/span>\u003Cspan style=\"color:#F97583\">{1,3}\u003C/span>\u003Cspan style=\"color:#79B8FF\">\\.)\u003C/span>\u003Cspan style=\"color:#F97583\">{3}\u003C/span>\u003Cspan style=\"color:#79B8FF\">\\d\u003C/span>\u003Cspan style=\"color:#F97583\">{1,3}\u003C/span>\u003Cspan style=\"color:#79B8FF\">\\b\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Cp>Verwendung:\u003C/p>\n\u003Cul>\n\u003Cli>\n\u003Cp>Finden von IP-Adressen in Firewall-Logs oder Packet Captures.\u003C/p>\n\u003C/li>\n\u003Cli>\n\u003Cp>Beispiel-Zeile:\u003C/p>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"plaintext\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan>Connection from 192.168.1.101 to port 443 established\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"2-e-mail-adressen-identifizieren\">2. E-Mail-Adressen identifizieren\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"regex\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">[a-zA-Z0-9._%+-]\u003C/span>\u003Cspan style=\"color:#F97583\">+\u003C/span>\u003Cspan style=\"color:#DBEDFF\">@\u003C/span>\u003Cspan style=\"color:#79B8FF\">[a-zA-Z0-9.-]\u003C/span>\u003Cspan style=\"color:#F97583\">+\u003C/span>\u003Cspan style=\"color:#79B8FF\">\\.[a-zA-Z]\u003C/span>\u003Cspan style=\"color:#F97583\">{2,}\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Cp>Verwendung:\u003C/p>\n\u003Cul>\n\u003Cli>Erkennung von kompromittierten Accounts in Phishing-E-Mails.\u003C/li>\n\u003Cli>Analyse von Useraktivitäten oder Kommunikationsverläufen.\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"3-hash-werte-erkennen-zb-sha-256\">3. Hash-Werte erkennen (z. B. SHA-256)\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"regex\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">\\b[A-Fa-f0-9]\u003C/span>\u003Cspan style=\"color:#F97583\">{64}\u003C/span>\u003Cspan style=\"color:#79B8FF\">\\b\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Cp>Verwendung:\u003C/p>\n\u003Cul>\n\u003Cli>Extraktion von Malware-Hashes aus Memory Dumps oder YARA-Logs.\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"4-zeitstempel-in-logdateien-extrahieren\">4. Zeitstempel in Logdateien extrahieren\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"regex\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">\\d\u003C/span>\u003Cspan style=\"color:#F97583\">{4}\u003C/span>\u003Cspan style=\"color:#DBEDFF\">-\u003C/span>\u003Cspan style=\"color:#79B8FF\">\\d\u003C/span>\u003Cspan style=\"color:#F97583\">{2}\u003C/span>\u003Cspan style=\"color:#DBEDFF\">-\u003C/span>\u003Cspan style=\"color:#79B8FF\">\\d\u003C/span>\u003Cspan style=\"color:#F97583\">{2}\u003C/span>\u003Cspan style=\"color:#79B8FF\">[ T]\\d\u003C/span>\u003Cspan style=\"color:#F97583\">{2}\u003C/span>\u003Cspan style=\"color:#DBEDFF\">:\u003C/span>\u003Cspan style=\"color:#79B8FF\">\\d\u003C/span>\u003Cspan style=\"color:#F97583\">{2}\u003C/span>\u003Cspan style=\"color:#DBEDFF\">:\u003C/span>\u003Cspan style=\"color:#79B8FF\">\\d\u003C/span>\u003Cspan style=\"color:#F97583\">{2}\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Cp>Verwendung:\u003C/p>\n\u003Cul>\n\u003Cli>Zeitsensitive Korrelationsanalysen (z. B. bei Intrusion Detection oder Timeline-Rekonstruktionen).\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"best-practices\">Best Practices\u003C/h2>\n\u003Cul>\n\u003Cli>\u003Cstrong>Regex testen\u003C/strong>: Nutze Plattformen wie \u003Ca href=\"https://regexr.com/\">regexr.com\u003C/a> oder \u003Ca href=\"https://regex101.com/\">regex101.com\u003C/a> zur Validierung.\u003C/li>\n\u003Cli>\u003Cstrong>Performance beachten\u003C/strong>: Komplexe Ausdrücke können ineffizient sein und Systeme verlangsamen – verwende Lazy Quantifiers (\u003Ccode>*?\u003C/code>, \u003Ccode>+?\u003C/code>) bei Bedarf.\u003C/li>\n\u003Cli>\u003Cstrong>Escape-Zeichen korrekt anwenden\u003C/strong>: Spezielle Zeichen wie \u003Ccode>.\u003C/code> oder \u003Ccode>\\\u003C/code> müssen bei Bedarf mit \u003Ccode>\\\\\u003C/code> oder \u003Ccode>\\.\u003C/code> maskiert werden.\u003C/li>\n\u003Cli>\u003Cstrong>Portabilität prüfen\u003C/strong>: Unterschiedliche Regex-Engines (z. B. Python \u003Ccode>re\u003C/code>, PCRE, JavaScript) interpretieren manche Syntax leicht unterschiedlich.\u003C/li>\n\u003Cli>\u003Cstrong>Lesbarkeit fördern\u003C/strong>: Verwende benannte Gruppen (\u003Ccode>(?P<name>...)\u003C/code>) und Kommentare (\u003Ccode>(?x)\u003C/code>), um reguläre Ausdrücke besser wartbar zu machen.\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"weiterführende-themen\">Weiterführende Themen\u003C/h2>\n\u003Ch3 id=\"lookaheads-und-lookbehinds\">Lookaheads und Lookbehinds\u003C/h3>\n\u003Cp>Mit \u003Cstrong>Lookaheads\u003C/strong> (\u003Ccode>(?=...)\u003C/code>) und \u003Cstrong>Lookbehinds\u003C/strong> (\u003Ccode>(?<=...)\u003C/code>) können Bedingungen formuliert werden, ohne dass der Text Teil des Matchs wird.\u003C/p>\n\u003Cp>Beispiel: Alle \u003Ccode>.exe\u003C/code>-Dateinamen \u003Cstrong>ohne\u003C/strong> das Wort \u003Ccode>safe\u003C/code> davor matchen:\u003C/p>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"regex\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">(?<!\u003C/span>\u003Cspan style=\"color:#DBEDFF\">safe\u003C/span>\u003Cspan style=\"color:#79B8FF\">\\s\u003C/span>\u003Cspan style=\"color:#F97583\">)\u003C/span>\u003Cspan style=\"color:#79B8FF\">[\\w-]\u003C/span>\u003Cspan style=\"color:#F97583\">+\u003C/span>\u003Cspan style=\"color:#79B8FF\">\\.\u003C/span>\u003Cspan style=\"color:#DBEDFF\">exe\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"regex-in-forensik-tools\">Regex in Forensik-Tools\u003C/h3>\n\u003Cul>\n\u003Cli>\u003Cstrong>YARA\u003C/strong>: Unterstützt Regex zur Erstellung von Malware-Signaturen.\u003C/li>\n\u003Cli>\u003Cstrong>Wireshark\u003C/strong>: Filtert Payloads anhand von Regex-ähnlicher Syntax.\u003C/li>\n\u003Cli>\u003Cstrong>Splunk & ELK\u003C/strong>: Verwenden Regex für Logparsing und Visualisierung.\u003C/li>\n\u003Cli>\u003Cstrong>Volatility Plugins\u003C/strong>: Extrahieren Artefakte mit Regex-basierten Scans.\u003C/li>\n\u003C/ul>\n\u003Chr>\n\u003Cblockquote>\n\u003Cp>🔤 \u003Cstrong>Regex ist ein universelles Werkzeug für Analysten, Ermittler und Entwickler, um versteckte Informationen schnell und flexibel aufzuspüren.\u003C/strong>\u003C/p>\n\u003Cp>Nutze es überall dort, wo Textdaten eine Rolle spielen.\u003C/p>\n\u003C/blockquote>",{"headings":122,"localImagePaths":145,"remoteImagePaths":146,"frontmatter":102,"imagePaths":147},[123,124,125,128,131,134,137,138,139,142],{"depth":43,"slug":44,"text":45},{"depth":47,"slug":70,"text":71},{"depth":51,"slug":126,"text":127},"1-ip-adressen-extrahieren","1. IP-Adressen extrahieren",{"depth":51,"slug":129,"text":130},"2-e-mail-adressen-identifizieren","2. E-Mail-Adressen identifizieren",{"depth":51,"slug":132,"text":133},"3-hash-werte-erkennen-zb-sha-256","3. Hash-Werte erkennen (z. B. SHA-256)",{"depth":51,"slug":135,"text":136},"4-zeitstempel-in-logdateien-extrahieren","4. Zeitstempel in Logdateien extrahieren",{"depth":47,"slug":79,"text":80},{"depth":47,"slug":94,"text":95},{"depth":51,"slug":140,"text":141},"lookaheads-und-lookbehinds","Lookaheads und Lookbehinds",{"depth":51,"slug":143,"text":144},"regex-in-forensik-tools","Regex in Forensik-Tools",[],[],[],"regular-expressions-regex.md","kali-linux",{"id":149,"data":151,"body":166,"filePath":167,"digest":168,"rendered":169,"legacyId":222},{"title":152,"tool_name":153,"description":154,"last_updated":155,"author":16,"difficulty":17,"categories":156,"tags":159,"sections":165,"review_status":34},"Kali Linux - Die Hacker-Distribution für Forensik & Penetration Testing","Kali Linux","Leitfaden zur Installation, Nutzung und Best Practices für Kali Linux – die All-in-One-Plattform für Security-Profis.",["Date","2025-07-20T00:00:00.000Z"],[19,157,158],"forensics","penetration-testing",[160,161,158,162,163,164],"live-boot","tool-collection","forensics-suite","virtualization","arm-support",{"overview":32,"installation":32,"configuration":32,"usage_examples":32,"best_practices":32,"troubleshooting":32,"advanced_topics":32},"> **⚠️ Hinweis**: Dies ist ein vorläufiger, KI-generierter Knowledgebase-Eintrag. Wir freuen uns über Verbesserungen und Ergänzungen durch die Community!\n\n\n# Übersicht\n\nKali Linux ist eine auf Debian basierende Linux-Distribution, die speziell für Penetration Testing, digitale Forensik, Reverse Engineering und Incident Response entwickelt wurde. Mit über 600 vorinstallierten Tools ist sie ein unverzichtbares Werkzeug für Security-Experten, Ermittler und forensische Analysten. Die Live-Boot-Funktion erlaubt es, Systeme ohne Spuren zu hinterlassen zu analysieren – ideal für forensische Untersuchungen.\n\n## Installation\n\n### Option 1: Live-System (USB/DVD)\n\n1. ISO-Image von [kali.org](https://www.kali.org/get-kali/) herunterladen.\n2. Mit **Rufus** oder **balenaEtcher** auf einen USB-Stick schreiben.\n3. Vom USB-Stick booten (ggf. Boot-Reihenfolge im BIOS anpassen).\n4. Kali kann direkt ohne Installation im Live-Modus verwendet werden.\n\n### Option 2: Installation auf Festplatte\n\n1. ISO-Image booten und **Graphical Install** wählen.\n2. Schritt-für-Schritt durch den Installationsassistenten navigieren:\n - Sprache, Zeitzone und Tastaturlayout auswählen\n - Partitionierung konfigurieren (automatisch oder manuell)\n - Benutzerkonten erstellen\n3. Nach Installation Neustart durchführen.\n\n### Option 3: Virtuelle Maschine (VM)\n\n- Offizielle VM-Images für VirtualBox und VMware von der [Kali-Website](https://www.kali.org/get-kali/#kali-virtual-machines)\n- Importieren, ggf. Netzwerkbrücke und Shared Folders aktivieren\n\n## Konfiguration\n\n### Netzwerkeinstellungen\n\n- Konfiguration über `nmtui` oder `/etc/network/interfaces`\n- VPN und Proxy-Integration über GUI oder Terminal\n\n### Updates & Paketquellen\n\n```bash\nsudo apt update && sudo apt full-upgrade\n````\n\n> Hinweis: `kali-rolling` ist die Standard-Distribution für kontinuierliche Updates.\n\n### Sprache & Lokalisierung\n\n```bash\nsudo dpkg-reconfigure locales\nsudo dpkg-reconfigure keyboard-configuration\n```\n\n## Verwendungsbeispiele\n\n### 1. Netzwerkscan mit Nmap\n\n```bash\nnmap -sS -T4 -A 192.168.1.0/24\n```\n\n### 2. Passwort-Cracking mit John the Ripper\n\n```bash\njohn --wordlist=/usr/share/wordlists/rockyou.txt hashes.txt\n```\n\n### 3. Forensik mit Autopsy\n\n```bash\nautopsy &\n```\n\n### 4. Android-Analyse mit MobSF (in Docker)\n\n```bash\ndocker pull opensecurity/mobile-security-framework-mobsf\ndocker run -it -p 8000:8000 mobsf\n```\n\n## Best Practices\n\n* Nutze immer **aktuelle Snapshots** oder VM-Clones vor gefährlichen Tests\n* Verwende separate Netzwerke (z. B. Host-only oder NAT) für Tests\n* Deaktiviere automatisches WLAN bei forensischen Analysen\n* Prüfe und aktualisiere regelmäßig Toolsets (`apt`, `git`, `pip`)\n* Halte deine ISO-Images versioniert für forensische Reproduzierbarkeit\n\n## Troubleshooting\n\n### Problem: Keine Internetverbindung nach Installation\n\n**Lösung:** Netzwerkadapter prüfen, ggf. mit `ifconfig` oder `ip a` überprüfen, DHCP aktivieren.\n\n### Problem: Tools fehlen nach Update\n\n**Lösung:** Tool-Gruppen wie `kali-linux-default` manuell nachinstallieren:\n\n```bash\nsudo apt install kali-linux-default\n```\n\n### Problem: „Permission Denied“ bei Tools\n\n**Lösung:** Root-Rechte nutzen oder mit `sudo` ausführen.\n\n## Weiterführende Themen\n\n* **Kustomisierung von Kali ISOs** mit `live-build`\n* **NetHunter**: Kali für mobile Geräte (Android)\n* **Kali Purple**: Defensive Security Suite\n* Integration mit **Cloud-Infrastrukturen** via WSL oder Azure\n\n---\n\n**Links & Ressourcen:**\n\n* Offizielle Website: [https://kali.org](https://kali.org/)\n* Dokumentation: [https://docs.kali.org/](https://docs.kali.org/)\n* GitLab Repo: [https://gitlab.com/kalilinux](https://gitlab.com/kalilinux)\n* Discord-Community: [https://discord.com/invite/kali-linux](https://discord.com/invite/kali-linux)","src/content/knowledgebase/kali-linux.md","09243ebc79d75dbc",{"html":170,"metadata":171},"\u003Cblockquote>\n\u003Cp>\u003Cstrong>⚠️ Hinweis\u003C/strong>: Dies ist ein vorläufiger, KI-generierter Knowledgebase-Eintrag. Wir freuen uns über Verbesserungen und Ergänzungen durch die Community!\u003C/p>\n\u003C/blockquote>\n\u003Ch1 id=\"übersicht\">Übersicht\u003C/h1>\n\u003Cp>Kali Linux ist eine auf Debian basierende Linux-Distribution, die speziell für Penetration Testing, digitale Forensik, Reverse Engineering und Incident Response entwickelt wurde. Mit über 600 vorinstallierten Tools ist sie ein unverzichtbares Werkzeug für Security-Experten, Ermittler und forensische Analysten. Die Live-Boot-Funktion erlaubt es, Systeme ohne Spuren zu hinterlassen zu analysieren – ideal für forensische Untersuchungen.\u003C/p>\n\u003Ch2 id=\"installation\">Installation\u003C/h2>\n\u003Ch3 id=\"option-1-live-system-usbdvd\">Option 1: Live-System (USB/DVD)\u003C/h3>\n\u003Col>\n\u003Cli>ISO-Image von \u003Ca href=\"https://www.kali.org/get-kali/\">kali.org\u003C/a> herunterladen.\u003C/li>\n\u003Cli>Mit \u003Cstrong>Rufus\u003C/strong> oder \u003Cstrong>balenaEtcher\u003C/strong> auf einen USB-Stick schreiben.\u003C/li>\n\u003Cli>Vom USB-Stick booten (ggf. Boot-Reihenfolge im BIOS anpassen).\u003C/li>\n\u003Cli>Kali kann direkt ohne Installation im Live-Modus verwendet werden.\u003C/li>\n\u003C/ol>\n\u003Ch3 id=\"option-2-installation-auf-festplatte\">Option 2: Installation auf Festplatte\u003C/h3>\n\u003Col>\n\u003Cli>ISO-Image booten und \u003Cstrong>Graphical Install\u003C/strong> wählen.\u003C/li>\n\u003Cli>Schritt-für-Schritt durch den Installationsassistenten navigieren:\n\u003Cul>\n\u003Cli>Sprache, Zeitzone und Tastaturlayout auswählen\u003C/li>\n\u003Cli>Partitionierung konfigurieren (automatisch oder manuell)\u003C/li>\n\u003Cli>Benutzerkonten erstellen\u003C/li>\n\u003C/ul>\n\u003C/li>\n\u003Cli>Nach Installation Neustart durchführen.\u003C/li>\n\u003C/ol>\n\u003Ch3 id=\"option-3-virtuelle-maschine-vm\">Option 3: Virtuelle Maschine (VM)\u003C/h3>\n\u003Cul>\n\u003Cli>Offizielle VM-Images für VirtualBox und VMware von der \u003Ca href=\"https://www.kali.org/get-kali/#kali-virtual-machines\">Kali-Website\u003C/a>\u003C/li>\n\u003Cli>Importieren, ggf. Netzwerkbrücke und Shared Folders aktivieren\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"konfiguration\">Konfiguration\u003C/h2>\n\u003Ch3 id=\"netzwerkeinstellungen\">Netzwerkeinstellungen\u003C/h3>\n\u003Cul>\n\u003Cli>Konfiguration über \u003Ccode>nmtui\u003C/code> oder \u003Ccode>/etc/network/interfaces\u003C/code>\u003C/li>\n\u003Cli>VPN und Proxy-Integration über GUI oder Terminal\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"updates--paketquellen\">Updates & Paketquellen\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apt\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> update\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> && \u003C/span>\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apt\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> full-upgrade\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Cblockquote>\n\u003Cp>Hinweis: \u003Ccode>kali-rolling\u003C/code> ist die Standard-Distribution für kontinuierliche Updates.\u003C/p>\n\u003C/blockquote>\n\u003Ch3 id=\"sprache--lokalisierung\">Sprache & Lokalisierung\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> dpkg-reconfigure\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> locales\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> dpkg-reconfigure\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> keyboard-configuration\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"verwendungsbeispiele\">Verwendungsbeispiele\u003C/h2>\n\u003Ch3 id=\"1-netzwerkscan-mit-nmap\">1. Netzwerkscan mit Nmap\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">nmap\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -sS\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -T4\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -A\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> 192.168.1.0/24\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"2-passwort-cracking-mit-john-the-ripper\">2. Passwort-Cracking mit John the Ripper\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">john\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --wordlist=/usr/share/wordlists/rockyou.txt\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> hashes.txt\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"3-forensik-mit-autopsy\">3. Forensik mit Autopsy\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">autopsy\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> &\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"4-android-analyse-mit-mobsf-in-docker\">4. Android-Analyse mit MobSF (in Docker)\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">docker\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> pull\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> opensecurity/mobile-security-framework-mobsf\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">docker\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> run\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -it\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -p\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> 8000:8000\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> mobsf\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"best-practices\">Best Practices\u003C/h2>\n\u003Cul>\n\u003Cli>Nutze immer \u003Cstrong>aktuelle Snapshots\u003C/strong> oder VM-Clones vor gefährlichen Tests\u003C/li>\n\u003Cli>Verwende separate Netzwerke (z. B. Host-only oder NAT) für Tests\u003C/li>\n\u003Cli>Deaktiviere automatisches WLAN bei forensischen Analysen\u003C/li>\n\u003Cli>Prüfe und aktualisiere regelmäßig Toolsets (\u003Ccode>apt\u003C/code>, \u003Ccode>git\u003C/code>, \u003Ccode>pip\u003C/code>)\u003C/li>\n\u003Cli>Halte deine ISO-Images versioniert für forensische Reproduzierbarkeit\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"troubleshooting\">Troubleshooting\u003C/h2>\n\u003Ch3 id=\"problem-keine-internetverbindung-nach-installation\">Problem: Keine Internetverbindung nach Installation\u003C/h3>\n\u003Cp>\u003Cstrong>Lösung:\u003C/strong> Netzwerkadapter prüfen, ggf. mit \u003Ccode>ifconfig\u003C/code> oder \u003Ccode>ip a\u003C/code> überprüfen, DHCP aktivieren.\u003C/p>\n\u003Ch3 id=\"problem-tools-fehlen-nach-update\">Problem: Tools fehlen nach Update\u003C/h3>\n\u003Cp>\u003Cstrong>Lösung:\u003C/strong> Tool-Gruppen wie \u003Ccode>kali-linux-default\u003C/code> manuell nachinstallieren:\u003C/p>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apt\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> install\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> kali-linux-default\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"problem-permission-denied-bei-tools\">Problem: „Permission Denied“ bei Tools\u003C/h3>\n\u003Cp>\u003Cstrong>Lösung:\u003C/strong> Root-Rechte nutzen oder mit \u003Ccode>sudo\u003C/code> ausführen.\u003C/p>\n\u003Ch2 id=\"weiterführende-themen\">Weiterführende Themen\u003C/h2>\n\u003Cul>\n\u003Cli>\u003Cstrong>Kustomisierung von Kali ISOs\u003C/strong> mit \u003Ccode>live-build\u003C/code>\u003C/li>\n\u003Cli>\u003Cstrong>NetHunter\u003C/strong>: Kali für mobile Geräte (Android)\u003C/li>\n\u003Cli>\u003Cstrong>Kali Purple\u003C/strong>: Defensive Security Suite\u003C/li>\n\u003Cli>Integration mit \u003Cstrong>Cloud-Infrastrukturen\u003C/strong> via WSL oder Azure\u003C/li>\n\u003C/ul>\n\u003Chr>\n\u003Cp>\u003Cstrong>Links & Ressourcen:\u003C/strong>\u003C/p>\n\u003Cul>\n\u003Cli>Offizielle Website: \u003Ca href=\"https://kali.org/\">https://kali.org\u003C/a>\u003C/li>\n\u003Cli>Dokumentation: \u003Ca href=\"https://docs.kali.org/\">https://docs.kali.org/\u003C/a>\u003C/li>\n\u003Cli>GitLab Repo: \u003Ca href=\"https://gitlab.com/kalilinux\">https://gitlab.com/kalilinux\u003C/a>\u003C/li>\n\u003Cli>Discord-Community: \u003Ca href=\"https://discord.com/invite/kali-linux\">https://discord.com/invite/kali-linux\u003C/a>\u003C/li>\n\u003C/ul>",{"headings":172,"localImagePaths":219,"remoteImagePaths":220,"frontmatter":151,"imagePaths":221},[173,174,175,178,181,184,185,188,191,194,195,198,201,204,207,208,209,212,215,218],{"depth":43,"slug":44,"text":45},{"depth":47,"slug":48,"text":49},{"depth":51,"slug":176,"text":177},"option-1-live-system-usbdvd","Option 1: Live-System (USB/DVD)",{"depth":51,"slug":179,"text":180},"option-2-installation-auf-festplatte","Option 2: Installation auf Festplatte",{"depth":51,"slug":182,"text":183},"option-3-virtuelle-maschine-vm","Option 3: Virtuelle Maschine (VM)",{"depth":47,"slug":58,"text":59},{"depth":51,"slug":186,"text":187},"netzwerkeinstellungen","Netzwerkeinstellungen",{"depth":51,"slug":189,"text":190},"updates--paketquellen","Updates & Paketquellen",{"depth":51,"slug":192,"text":193},"sprache--lokalisierung","Sprache & Lokalisierung",{"depth":47,"slug":70,"text":71},{"depth":51,"slug":196,"text":197},"1-netzwerkscan-mit-nmap","1. Netzwerkscan mit Nmap",{"depth":51,"slug":199,"text":200},"2-passwort-cracking-mit-john-the-ripper","2. Passwort-Cracking mit John the Ripper",{"depth":51,"slug":202,"text":203},"3-forensik-mit-autopsy","3. Forensik mit Autopsy",{"depth":51,"slug":205,"text":206},"4-android-analyse-mit-mobsf-in-docker","4. Android-Analyse mit MobSF (in Docker)",{"depth":47,"slug":79,"text":80},{"depth":47,"slug":82,"text":83},{"depth":51,"slug":210,"text":211},"problem-keine-internetverbindung-nach-installation","Problem: Keine Internetverbindung nach Installation",{"depth":51,"slug":213,"text":214},"problem-tools-fehlen-nach-update","Problem: Tools fehlen nach Update",{"depth":51,"slug":216,"text":217},"problem-permission-denied-bei-tools","Problem: „Permission Denied“ bei Tools",{"depth":47,"slug":94,"text":95},[],[],[],"kali-linux.md","velociraptor",{"id":223,"data":225,"body":239,"filePath":240,"digest":241,"rendered":242,"legacyId":287},{"title":226,"tool_name":227,"description":228,"last_updated":229,"author":16,"difficulty":230,"categories":231,"tags":232,"sections":238,"review_status":34},"Velociraptor – Skalierbare Endpoint-Forensik mit VQL","Velociraptor","Detaillierte Anleitung und Best Practices für Velociraptor – Remote-Forensik der nächsten Generation",["Date","2025-07-20T00:00:00.000Z"],"advanced",[19,21,22],[25,233,234,235,236,237],"endpoint-monitoring","artifact-extraction","scripting","live-forensics","hunting",{"overview":32,"installation":32,"configuration":32,"usage_examples":32,"best_practices":32,"troubleshooting":32,"advanced_topics":32},"> **⚠️ Hinweis**: Dies ist ein vorläufiger, KI-generierter Knowledgebase-Eintrag. Wir freuen uns über Verbesserungen und Ergänzungen durch die Community!\n\n\n# Übersicht\n\nVelociraptor ist ein Open-Source-Tool zur Endpoint-Forensik mit Fokus auf Skalierbarkeit, Präzision und Geschwindigkeit. Es ermöglicht die zielgerichtete Erfassung und Analyse digitaler Artefakte über eine eigene Query Language – VQL (Velociraptor Query Language). Die Architektur erlaubt remote Zugriff auf tausende Endpoints gleichzeitig, ohne dass vollständige Disk-Images erforderlich sind.\n\n## Hauptmerkmale\n\n- 🌐 Web-basierte Benutzeroberfläche\n- 💡 VQL – mächtige, SQL-ähnliche Abfragesprache\n- 🚀 Hochskalierbare Hunt-Funktionalität\n- 🔍 Artefaktbasierte Sammlung (ohne Full-Image)\n- 🖥️ Plattformunterstützung für Windows, macOS, Linux\n- 📦 Apache 2.0 Lizenz – Open Source\n\nWeitere Infos: [velociraptor.app](https://www.velociraptor.app/) \nProjektspiegel: [raptor.cc24.dev](https://raptor.cc24.dev) \nStatus: ![Status](https://status.mikoshi.de/api/badge/33/status)\n\n---\n\n## Installation\n\n### Voraussetzungen\n\n- Python ≥ 3.9\n- Adminrechte auf dem System\n- Firewall-Freigaben für Webport (Standard: 8000)\n\n### Installation unter Linux/macOS\n\n```bash\nwget https://github.com/Velocidex/velociraptor/releases/latest/download/velociraptor\nchmod +x velociraptor\nsudo mv velociraptor /usr/local/bin/\n````\n\n### Installation unter Windows\n\n1. Download der `.exe` von der [Release-Seite](https://github.com/Velocidex/velociraptor/releases)\n2. Ausführung in PowerShell mit Adminrechten:\n\n ```powershell\n .\\velociraptor.exe config generate > server.config.yaml\n ```\n\n---\n\n## Konfiguration\n\n### Server Setup\n\n1. Generiere die Konfigurationsdatei:\n\n ```bash\n velociraptor config generate > server.config.yaml\n ```\n2. Starte den Server:\n\n ```bash\n velociraptor --config server.config.yaml frontend\n ```\n3. Zugriff über Browser via `https://\u003Chostname>:8000`\n\n### Client Deployment\n\n* MSI/EXE für Windows, oder `deb/rpm` für Linux\n* Unterstützt automatische Registrierung am Server\n* Deployment über GPO, Puppet, Ansible etc. möglich\n\n---\n\n## Verwendungsbeispiele\n\n### 1. Live-Memory-Artefakte sammeln\n\n```vql\nSELECT * FROM Artifact.MemoryInfo()\n```\n\n### 2. Hunt starten auf verdächtige Prozesse\n\n```vql\nSELECT * FROM pslist()\nWHERE Name =~ \"mimikatz|cobaltstrike\"\n```\n\n### 3. Dateiinhalt extrahieren\n\n```vql\nSELECT * FROM glob(globs=\"C:\\\\Users\\\\*\\\\AppData\\\\*.dat\")\n```\n\n---\n\n## Best Practices\n\n* Erstelle eigene Artefakte für unternehmensspezifische Bedrohungsmodelle\n* Verwende \"Notebook\"-Funktion für strukturierte Analysen\n* Nutze \"Labels\", um Endpoints zu organisieren (z. B. `location:Berlin`)\n* Kombiniere Velociraptor mit SIEM/EDR-Systemen über REST API\n\n---\n\n## Troubleshooting\n\n### Problem: Keine Verbindung vom Client zum Server\n\n**Lösung:**\n\n* Ports freigegeben? (Default: 8000/tcp)\n* TLS-Zertifikate korrekt generiert?\n* `server.config.yaml` auf korrekte `public_ip` prüfen\n\n### Problem: Hunt hängt in Warteschleife\n\n**Lösung:**\n\n* Genügend Worker-Prozesse aktiv?\n* Endpoint online?\n* `log_level` auf `debug` setzen und Log analysieren\n\n---\n\n## Weiterführende Themen\n\n* Eigene Artefakte schreiben mit VQL\n* Integration mit ELK Stack\n* Automatisiertes Incident Response Playbook\n* Velociraptor als IR-as-a-Service einsetzen\n\n---\n\n🧠 **Tipp:** Die Lernkurve bei VQL ist steil – aber mit hohem ROI. Testumgebung aufsetzen und mit Community-Artefakten starten.\n\n📚 Weitere Ressourcen:\n\n* [Offizielle Doku](https://docs.velociraptor.app/)\n* [YouTube Channel](https://www.youtube.com/c/VelociraptorDFIR)\n* [Community auf Discord](https://www.velociraptor.app/community/)","src/content/knowledgebase/velociraptor.md","05636b9b97e61d17",{"html":243,"metadata":244},"\u003Cblockquote>\n\u003Cp>\u003Cstrong>⚠️ Hinweis\u003C/strong>: Dies ist ein vorläufiger, KI-generierter Knowledgebase-Eintrag. Wir freuen uns über Verbesserungen und Ergänzungen durch die Community!\u003C/p>\n\u003C/blockquote>\n\u003Ch1 id=\"übersicht\">Übersicht\u003C/h1>\n\u003Cp>Velociraptor ist ein Open-Source-Tool zur Endpoint-Forensik mit Fokus auf Skalierbarkeit, Präzision und Geschwindigkeit. Es ermöglicht die zielgerichtete Erfassung und Analyse digitaler Artefakte über eine eigene Query Language – VQL (Velociraptor Query Language). Die Architektur erlaubt remote Zugriff auf tausende Endpoints gleichzeitig, ohne dass vollständige Disk-Images erforderlich sind.\u003C/p>\n\u003Ch2 id=\"hauptmerkmale\">Hauptmerkmale\u003C/h2>\n\u003Cul>\n\u003Cli>🌐 Web-basierte Benutzeroberfläche\u003C/li>\n\u003Cli>💡 VQL – mächtige, SQL-ähnliche Abfragesprache\u003C/li>\n\u003Cli>🚀 Hochskalierbare Hunt-Funktionalität\u003C/li>\n\u003Cli>🔍 Artefaktbasierte Sammlung (ohne Full-Image)\u003C/li>\n\u003Cli>🖥️ Plattformunterstützung für Windows, macOS, Linux\u003C/li>\n\u003Cli>📦 Apache 2.0 Lizenz – Open Source\u003C/li>\n\u003C/ul>\n\u003Cp>Weitere Infos: \u003Ca href=\"https://www.velociraptor.app/\">velociraptor.app\u003C/a>\u003Cbr>\nProjektspiegel: \u003Ca href=\"https://raptor.cc24.dev\">raptor.cc24.dev\u003C/a>\u003Cbr>\nStatus: \u003Cimg src=\"https://status.mikoshi.de/api/badge/33/status\" alt=\"Status\">\u003C/p>\n\u003Chr>\n\u003Ch2 id=\"installation\">Installation\u003C/h2>\n\u003Ch3 id=\"voraussetzungen\">Voraussetzungen\u003C/h3>\n\u003Cul>\n\u003Cli>Python ≥ 3.9\u003C/li>\n\u003Cli>Adminrechte auf dem System\u003C/li>\n\u003Cli>Firewall-Freigaben für Webport (Standard: 8000)\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"installation-unter-linuxmacos\">Installation unter Linux/macOS\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">wget\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> https://github.com/Velocidex/velociraptor/releases/latest/download/velociraptor\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">chmod\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> +x\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> velociraptor\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> mv\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> velociraptor\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /usr/local/bin/\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"installation-unter-windows\">Installation unter Windows\u003C/h3>\n\u003Col>\n\u003Cli>\n\u003Cp>Download der \u003Ccode>.exe\u003C/code> von der \u003Ca href=\"https://github.com/Velocidex/velociraptor/releases\">Release-Seite\u003C/a>\u003C/p>\n\u003C/li>\n\u003Cli>\n\u003Cp>Ausführung in PowerShell mit Adminrechten:\u003C/p>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"powershell\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">.\\\u003C/span>\u003Cspan style=\"color:#79B8FF\">velociraptor.exe\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> config generate \u003C/span>\u003Cspan style=\"color:#F97583\">>\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> server.config.yaml\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003C/li>\n\u003C/ol>\n\u003Chr>\n\u003Ch2 id=\"konfiguration\">Konfiguration\u003C/h2>\n\u003Ch3 id=\"server-setup\">Server Setup\u003C/h3>\n\u003Col>\n\u003Cli>\n\u003Cp>Generiere die Konfigurationsdatei:\u003C/p>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">velociraptor\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> config\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> generate\u003C/span>\u003Cspan style=\"color:#F97583\"> >\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> server.config.yaml\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003C/li>\n\u003Cli>\n\u003Cp>Starte den Server:\u003C/p>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">velociraptor\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --config\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> server.config.yaml\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> frontend\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003C/li>\n\u003Cli>\n\u003Cp>Zugriff über Browser via \u003Ccode>https://<hostname>:8000\u003C/code>\u003C/p>\n\u003C/li>\n\u003C/ol>\n\u003Ch3 id=\"client-deployment\">Client Deployment\u003C/h3>\n\u003Cul>\n\u003Cli>MSI/EXE für Windows, oder \u003Ccode>deb/rpm\u003C/code> für Linux\u003C/li>\n\u003Cli>Unterstützt automatische Registrierung am Server\u003C/li>\n\u003Cli>Deployment über GPO, Puppet, Ansible etc. möglich\u003C/li>\n\u003C/ul>\n\u003Chr>\n\u003Ch2 id=\"verwendungsbeispiele\">Verwendungsbeispiele\u003C/h2>\n\u003Ch3 id=\"1-live-memory-artefakte-sammeln\">1. Live-Memory-Artefakte sammeln\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"plaintext\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan>SELECT * FROM Artifact.MemoryInfo()\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"2-hunt-starten-auf-verdächtige-prozesse\">2. Hunt starten auf verdächtige Prozesse\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"plaintext\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan>SELECT * FROM pslist()\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan>WHERE Name =~ \"mimikatz|cobaltstrike\"\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"3-dateiinhalt-extrahieren\">3. Dateiinhalt extrahieren\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"plaintext\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan>SELECT * FROM glob(globs=\"C:\\\\Users\\\\*\\\\AppData\\\\*.dat\")\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Chr>\n\u003Ch2 id=\"best-practices\">Best Practices\u003C/h2>\n\u003Cul>\n\u003Cli>Erstelle eigene Artefakte für unternehmensspezifische Bedrohungsmodelle\u003C/li>\n\u003Cli>Verwende “Notebook”-Funktion für strukturierte Analysen\u003C/li>\n\u003Cli>Nutze “Labels”, um Endpoints zu organisieren (z. B. \u003Ccode>location:Berlin\u003C/code>)\u003C/li>\n\u003Cli>Kombiniere Velociraptor mit SIEM/EDR-Systemen über REST API\u003C/li>\n\u003C/ul>\n\u003Chr>\n\u003Ch2 id=\"troubleshooting\">Troubleshooting\u003C/h2>\n\u003Ch3 id=\"problem-keine-verbindung-vom-client-zum-server\">Problem: Keine Verbindung vom Client zum Server\u003C/h3>\n\u003Cp>\u003Cstrong>Lösung:\u003C/strong>\u003C/p>\n\u003Cul>\n\u003Cli>Ports freigegeben? (Default: 8000/tcp)\u003C/li>\n\u003Cli>TLS-Zertifikate korrekt generiert?\u003C/li>\n\u003Cli>\u003Ccode>server.config.yaml\u003C/code> auf korrekte \u003Ccode>public_ip\u003C/code> prüfen\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"problem-hunt-hängt-in-warteschleife\">Problem: Hunt hängt in Warteschleife\u003C/h3>\n\u003Cp>\u003Cstrong>Lösung:\u003C/strong>\u003C/p>\n\u003Cul>\n\u003Cli>Genügend Worker-Prozesse aktiv?\u003C/li>\n\u003Cli>Endpoint online?\u003C/li>\n\u003Cli>\u003Ccode>log_level\u003C/code> auf \u003Ccode>debug\u003C/code> setzen und Log analysieren\u003C/li>\n\u003C/ul>\n\u003Chr>\n\u003Ch2 id=\"weiterführende-themen\">Weiterführende Themen\u003C/h2>\n\u003Cul>\n\u003Cli>Eigene Artefakte schreiben mit VQL\u003C/li>\n\u003Cli>Integration mit ELK Stack\u003C/li>\n\u003Cli>Automatisiertes Incident Response Playbook\u003C/li>\n\u003Cli>Velociraptor als IR-as-a-Service einsetzen\u003C/li>\n\u003C/ul>\n\u003Chr>\n\u003Cp>🧠 \u003Cstrong>Tipp:\u003C/strong> Die Lernkurve bei VQL ist steil – aber mit hohem ROI. Testumgebung aufsetzen und mit Community-Artefakten starten.\u003C/p>\n\u003Cp>📚 Weitere Ressourcen:\u003C/p>\n\u003Cul>\n\u003Cli>\u003Ca href=\"https://docs.velociraptor.app/\">Offizielle Doku\u003C/a>\u003C/li>\n\u003Cli>\u003Ca href=\"https://www.youtube.com/c/VelociraptorDFIR\">YouTube Channel\u003C/a>\u003C/li>\n\u003Cli>\u003Ca href=\"https://www.velociraptor.app/community/\">Community auf Discord\u003C/a>\u003C/li>\n\u003C/ul>",{"headings":245,"localImagePaths":284,"remoteImagePaths":285,"frontmatter":225,"imagePaths":286},[246,247,250,251,252,255,258,259,262,265,266,269,272,275,276,277,280,283],{"depth":43,"slug":44,"text":45},{"depth":47,"slug":248,"text":249},"hauptmerkmale","Hauptmerkmale",{"depth":47,"slug":48,"text":49},{"depth":51,"slug":52,"text":53},{"depth":51,"slug":253,"text":254},"installation-unter-linuxmacos","Installation unter Linux/macOS",{"depth":51,"slug":256,"text":257},"installation-unter-windows","Installation unter Windows",{"depth":47,"slug":58,"text":59},{"depth":51,"slug":260,"text":261},"server-setup","Server Setup",{"depth":51,"slug":263,"text":264},"client-deployment","Client Deployment",{"depth":47,"slug":70,"text":71},{"depth":51,"slug":267,"text":268},"1-live-memory-artefakte-sammeln","1. Live-Memory-Artefakte sammeln",{"depth":51,"slug":270,"text":271},"2-hunt-starten-auf-verdächtige-prozesse","2. Hunt starten auf verdächtige Prozesse",{"depth":51,"slug":273,"text":274},"3-dateiinhalt-extrahieren","3. Dateiinhalt extrahieren",{"depth":47,"slug":79,"text":80},{"depth":47,"slug":82,"text":83},{"depth":51,"slug":278,"text":279},"problem-keine-verbindung-vom-client-zum-server","Problem: Keine Verbindung vom Client zum Server",{"depth":51,"slug":281,"text":282},"problem-hunt-hängt-in-warteschleife","Problem: Hunt hängt in Warteschleife",{"depth":47,"slug":94,"text":95},[],[],[],"velociraptor.md","nextcloud",{"id":288,"data":290,"body":304,"filePath":305,"digest":306,"rendered":307,"legacyId":343},{"title":291,"tool_name":292,"description":293,"last_updated":294,"author":16,"difficulty":295,"categories":296,"tags":298,"sections":303,"review_status":34},"Nextcloud - Sichere Kollaborationsplattform","Nextcloud","Detaillierte Anleitung und Best Practices für Nextcloud in forensischen Einsatzszenarien",["Date","2025-07-20T00:00:00.000Z"],"novice",[297],"collaboration-general",[25,299,300,27,301,302],"collaboration","file-sharing","encryption","document-management",{"overview":32,"installation":32,"configuration":32,"usage_examples":32,"best_practices":32,"troubleshooting":32,"advanced_topics":33},"> **⚠️ Hinweis**: Dies ist ein vorläufiger, KI-generierter Knowledgebase-Eintrag. Wir freuen uns über Verbesserungen und Ergänzungen durch die Community!\n\n\n# Übersicht\n\nNextcloud ist eine Open-Source-Cloud-Suite, die speziell für die sichere Zusammenarbeit entwickelt wurde. Sie eignet sich ideal für forensische Teams, da sie eine DSGVO-konforme Umgebung mit verschlüsselter Dateiablage, Office-Integration und Videokonferenzen bereitstellt. Zusätzlich bietet Nextcloud einen integrierten SSO-Provider, der das Identitätsmanagement für andere forensische Tools stark vereinfacht.\n\nSkalierbar von kleinen Raspberry-Pi-Installationen bis hin zu hochverfügbaren Multi-Node-Setups.\n\n- **Website:** [nextcloud.com](https://nextcloud.com/)\n- **Demo/Projektinstanz:** [cloud.cc24.dev](https://cloud.cc24.dev)\n- **Statusseite:** [Mikoshi Status](https://status.mikoshi.de/api/badge/11/status)\n- **Lizenz:** AGPL-3.0\n\n---\n\n## Installation\n\n### Voraussetzungen\n\n- Linux-Server oder Raspberry Pi\n- PHP 8.1 oder höher\n- MariaDB/PostgreSQL\n- Webserver (Apache/Nginx)\n- SSL-Zertifikat (empfohlen: Let's Encrypt)\n\n### Installationsschritte (Ubuntu Beispiel)\n\n```bash\nsudo apt update && sudo apt upgrade\nsudo apt install apache2 mariadb-server libapache2-mod-php php php-mysql \\\n php-gd php-xml php-mbstring php-curl php-zip php-intl php-bcmath unzip\n\nwget https://download.nextcloud.com/server/releases/latest.zip\nunzip latest.zip -d /var/www/\nchown -R www-data:www-data /var/www/nextcloud\n````\n\nDanach den Web-Installer im Browser aufrufen (`https://\u003Cyour-domain>/nextcloud`) und Setup abschließen.\n\n## Konfiguration\n\n* **Trusted Domains** in `config.php` definieren\n* SSO mit OpenID Connect aktivieren\n* Dateiverschlüsselung aktivieren (`Settings → Security`)\n* Benutzer und Gruppen über LDAP oder SAML integrieren\n\n## Verwendungsbeispiele\n\n### Gemeinsame Fallbearbeitung\n\n1. Ermittlungsordner als geteiltes Gruppenverzeichnis anlegen\n2. Versionierung und Kommentare zu forensischen Berichten aktivieren\n3. Vorschau für Office-Dateien, PDFs und Bilder direkt im Browser nutzen\n\n### Videokonferenzen mit \"Nextcloud Talk\"\n\n* Sichere Kommunikation zwischen Ermittlern und Sachverständigen\n* Ende-zu-Ende-verschlüsselt\n* Bildschirmfreigabe möglich\n\n### Automatischer Dateiimport per API\n\n* REST-Schnittstelle nutzen, um z. B. automatisch Logdateien oder Exportdaten hochzuladen\n* Ideal für Anbindung an SIEM, DLP oder Analyse-Pipelines\n\n## Best Practices\n\n* Zwei-Faktor-Authentifizierung aktivieren\n* Tägliche Backups der Datenbank und Datenstruktur\n* Nutzung von OnlyOffice oder Collabora für revisionssichere Dokumentenbearbeitung\n* Zugriff regelmäßig überprüfen, insbesondere bei externen Partnern\n\n## Troubleshooting\n\n### Problem: Langsame Performance\n\n**Lösung:** APCu aktivieren und Caching optimieren (`config.php → 'memcache.local'`).\n\n### Problem: Dateien erscheinen nicht im Sync\n\n**Lösung:** Cronjob für `files:scan` konfigurieren oder manuell ausführen:\n\n```bash\nsudo -u www-data php /var/www/nextcloud/occ files:scan --all\n```\n\n### Problem: Fehlermeldung \"Trusted domain not set\"\n\n**Lösung:** In `config/config.php` Eintrag `trusted_domains` korrekt konfigurieren:\n\n```php\n'trusted_domains' =>\n array (\n 0 => 'yourdomain.tld',\n 1 => 'cloud.cc24.dev',\n ),\n```\n\n## Weiterführende Themen\n\n* **Integration mit Forensik-Plattformen** (über WebDAV, API oder SSO)\n* **Custom Apps entwickeln** für spezielle Ermittlungs-Workflows\n* **Auditing aktivieren**: Nutzung und Änderungen nachvollziehen mit Protokollierungsfunktionen","src/content/knowledgebase/nextcloud.md","9294074e6083e37b",{"html":308,"metadata":309},"\u003Cblockquote>\n\u003Cp>\u003Cstrong>⚠️ Hinweis\u003C/strong>: Dies ist ein vorläufiger, KI-generierter Knowledgebase-Eintrag. Wir freuen uns über Verbesserungen und Ergänzungen durch die Community!\u003C/p>\n\u003C/blockquote>\n\u003Ch1 id=\"übersicht\">Übersicht\u003C/h1>\n\u003Cp>Nextcloud ist eine Open-Source-Cloud-Suite, die speziell für die sichere Zusammenarbeit entwickelt wurde. Sie eignet sich ideal für forensische Teams, da sie eine DSGVO-konforme Umgebung mit verschlüsselter Dateiablage, Office-Integration und Videokonferenzen bereitstellt. Zusätzlich bietet Nextcloud einen integrierten SSO-Provider, der das Identitätsmanagement für andere forensische Tools stark vereinfacht.\u003C/p>\n\u003Cp>Skalierbar von kleinen Raspberry-Pi-Installationen bis hin zu hochverfügbaren Multi-Node-Setups.\u003C/p>\n\u003Cul>\n\u003Cli>\u003Cstrong>Website:\u003C/strong> \u003Ca href=\"https://nextcloud.com/\">nextcloud.com\u003C/a>\u003C/li>\n\u003Cli>\u003Cstrong>Demo/Projektinstanz:\u003C/strong> \u003Ca href=\"https://cloud.cc24.dev\">cloud.cc24.dev\u003C/a>\u003C/li>\n\u003Cli>\u003Cstrong>Statusseite:\u003C/strong> \u003Ca href=\"https://status.mikoshi.de/api/badge/11/status\">Mikoshi Status\u003C/a>\u003C/li>\n\u003Cli>\u003Cstrong>Lizenz:\u003C/strong> AGPL-3.0\u003C/li>\n\u003C/ul>\n\u003Chr>\n\u003Ch2 id=\"installation\">Installation\u003C/h2>\n\u003Ch3 id=\"voraussetzungen\">Voraussetzungen\u003C/h3>\n\u003Cul>\n\u003Cli>Linux-Server oder Raspberry Pi\u003C/li>\n\u003Cli>PHP 8.1 oder höher\u003C/li>\n\u003Cli>MariaDB/PostgreSQL\u003C/li>\n\u003Cli>Webserver (Apache/Nginx)\u003C/li>\n\u003Cli>SSL-Zertifikat (empfohlen: Let’s Encrypt)\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"installationsschritte-ubuntu-beispiel\">Installationsschritte (Ubuntu Beispiel)\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apt\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> update\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> && \u003C/span>\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apt\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> upgrade\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apt\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> install\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apache2\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> mariadb-server\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> libapache2-mod-php\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> php\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> php-mysql\u003C/span>\u003Cspan style=\"color:#79B8FF\"> \\\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#9ECBFF\"> php-gd\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> php-xml\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> php-mbstring\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> php-curl\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> php-zip\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> php-intl\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> php-bcmath\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> unzip\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">wget\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> https://download.nextcloud.com/server/releases/latest.zip\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">unzip\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> latest.zip\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -d\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /var/www/\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">chown\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -R\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> www-data:www-data\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /var/www/nextcloud\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Cp>Danach den Web-Installer im Browser aufrufen (\u003Ccode>https://<your-domain>/nextcloud\u003C/code>) und Setup abschließen.\u003C/p>\n\u003Ch2 id=\"konfiguration\">Konfiguration\u003C/h2>\n\u003Cul>\n\u003Cli>\u003Cstrong>Trusted Domains\u003C/strong> in \u003Ccode>config.php\u003C/code> definieren\u003C/li>\n\u003Cli>SSO mit OpenID Connect aktivieren\u003C/li>\n\u003Cli>Dateiverschlüsselung aktivieren (\u003Ccode>Settings → Security\u003C/code>)\u003C/li>\n\u003Cli>Benutzer und Gruppen über LDAP oder SAML integrieren\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"verwendungsbeispiele\">Verwendungsbeispiele\u003C/h2>\n\u003Ch3 id=\"gemeinsame-fallbearbeitung\">Gemeinsame Fallbearbeitung\u003C/h3>\n\u003Col>\n\u003Cli>Ermittlungsordner als geteiltes Gruppenverzeichnis anlegen\u003C/li>\n\u003Cli>Versionierung und Kommentare zu forensischen Berichten aktivieren\u003C/li>\n\u003Cli>Vorschau für Office-Dateien, PDFs und Bilder direkt im Browser nutzen\u003C/li>\n\u003C/ol>\n\u003Ch3 id=\"videokonferenzen-mit-nextcloud-talk\">Videokonferenzen mit “Nextcloud Talk”\u003C/h3>\n\u003Cul>\n\u003Cli>Sichere Kommunikation zwischen Ermittlern und Sachverständigen\u003C/li>\n\u003Cli>Ende-zu-Ende-verschlüsselt\u003C/li>\n\u003Cli>Bildschirmfreigabe möglich\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"automatischer-dateiimport-per-api\">Automatischer Dateiimport per API\u003C/h3>\n\u003Cul>\n\u003Cli>REST-Schnittstelle nutzen, um z. B. automatisch Logdateien oder Exportdaten hochzuladen\u003C/li>\n\u003Cli>Ideal für Anbindung an SIEM, DLP oder Analyse-Pipelines\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"best-practices\">Best Practices\u003C/h2>\n\u003Cul>\n\u003Cli>Zwei-Faktor-Authentifizierung aktivieren\u003C/li>\n\u003Cli>Tägliche Backups der Datenbank und Datenstruktur\u003C/li>\n\u003Cli>Nutzung von OnlyOffice oder Collabora für revisionssichere Dokumentenbearbeitung\u003C/li>\n\u003Cli>Zugriff regelmäßig überprüfen, insbesondere bei externen Partnern\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"troubleshooting\">Troubleshooting\u003C/h2>\n\u003Ch3 id=\"problem-langsame-performance\">Problem: Langsame Performance\u003C/h3>\n\u003Cp>\u003Cstrong>Lösung:\u003C/strong> APCu aktivieren und Caching optimieren (\u003Ccode>config.php → 'memcache.local'\u003C/code>).\u003C/p>\n\u003Ch3 id=\"problem-dateien-erscheinen-nicht-im-sync\">Problem: Dateien erscheinen nicht im Sync\u003C/h3>\n\u003Cp>\u003Cstrong>Lösung:\u003C/strong> Cronjob für \u003Ccode>files:scan\u003C/code> konfigurieren oder manuell ausführen:\u003C/p>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -u\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> www-data\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> php\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /var/www/nextcloud/occ\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> files:scan\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --all\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"problem-fehlermeldung-trusted-domain-not-set\">Problem: Fehlermeldung “Trusted domain not set”\u003C/h3>\n\u003Cp>\u003Cstrong>Lösung:\u003C/strong> In \u003Ccode>config/config.php\u003C/code> Eintrag \u003Ccode>trusted_domains\u003C/code> korrekt konfigurieren:\u003C/p>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"php\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#9ECBFF\">'trusted_domains'\u003C/span>\u003Cspan style=\"color:#F97583\"> =>\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\"> array\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> (\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\"> 0\u003C/span>\u003Cspan style=\"color:#F97583\"> =>\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> 'yourdomain.tld'\u003C/span>\u003Cspan style=\"color:#E1E4E8\">,\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\"> 1\u003C/span>\u003Cspan style=\"color:#F97583\"> =>\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> 'cloud.cc24.dev'\u003C/span>\u003Cspan style=\"color:#E1E4E8\">,\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\"> ),\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"weiterführende-themen\">Weiterführende Themen\u003C/h2>\n\u003Cul>\n\u003Cli>\u003Cstrong>Integration mit Forensik-Plattformen\u003C/strong> (über WebDAV, API oder SSO)\u003C/li>\n\u003Cli>\u003Cstrong>Custom Apps entwickeln\u003C/strong> für spezielle Ermittlungs-Workflows\u003C/li>\n\u003Cli>\u003Cstrong>Auditing aktivieren\u003C/strong>: Nutzung und Änderungen nachvollziehen mit Protokollierungsfunktionen\u003C/li>\n\u003C/ul>",{"headings":310,"localImagePaths":340,"remoteImagePaths":341,"frontmatter":290,"imagePaths":342},[311,312,313,314,317,318,319,322,325,328,329,330,333,336,339],{"depth":43,"slug":44,"text":45},{"depth":47,"slug":48,"text":49},{"depth":51,"slug":52,"text":53},{"depth":51,"slug":315,"text":316},"installationsschritte-ubuntu-beispiel","Installationsschritte (Ubuntu Beispiel)",{"depth":47,"slug":58,"text":59},{"depth":47,"slug":70,"text":71},{"depth":51,"slug":320,"text":321},"gemeinsame-fallbearbeitung","Gemeinsame Fallbearbeitung",{"depth":51,"slug":323,"text":324},"videokonferenzen-mit-nextcloud-talk","Videokonferenzen mit “Nextcloud Talk”",{"depth":51,"slug":326,"text":327},"automatischer-dateiimport-per-api","Automatischer Dateiimport per API",{"depth":47,"slug":79,"text":80},{"depth":47,"slug":82,"text":83},{"depth":51,"slug":331,"text":332},"problem-langsame-performance","Problem: Langsame Performance",{"depth":51,"slug":334,"text":335},"problem-dateien-erscheinen-nicht-im-sync","Problem: Dateien erscheinen nicht im Sync",{"depth":51,"slug":337,"text":338},"problem-fehlermeldung-trusted-domain-not-set","Problem: Fehlermeldung “Trusted domain not set”",{"depth":47,"slug":94,"text":95},[],[],[],"nextcloud.md","android-logical-imaging",{"id":344,"data":346,"body":359,"filePath":360,"digest":361,"rendered":362,"legacyId":590},{"title":347,"tool_name":348,"description":349,"last_updated":350,"author":351,"difficulty":230,"categories":352,"tags":354,"sections":358,"review_status":34},"Extraktion logischer Dateisysteme alter Android-Smartphones - eine KI-Recherche","Android Logical Imaging","Wie man alte Android-Handys aufbekommen könnte - eine Recherche von Claude",["Date","2025-07-21T00:00:00.000Z"],"Claude 4 Sonnet (Research)",[353],"data-collection",[355,356,357],"imaging","filesystem","hardware-interface",{"overview":32,"installation":32,"configuration":32,"usage_examples":32,"best_practices":32,"troubleshooting":32,"advanced_topics":32},"# Übersicht\n\nOpen-Source Android Forensik bietet robuste Alternativen zu kommerziellen Lösungen wie Cellebrite UFED und Magnet AXIOM. Besonders für ältere Android-Geräte (5+ Jahre) existieren bewährte Methoden zur Datenextraktion und -analyse.\n\n## Kernkomponenten des Open-Source Forensik-Stacks\n\n**Autopsy Digital Forensics Platform** bildet das Fundament mit GUI-basierter Analyse und integrierten Android-Parsing-Fähigkeiten. Die Plattform unterstützt **ALEAPP (Android Logs Events And Protobuf Parser)**, das über 100 Artefakt-Kategorien aus Android-Extraktionen parst.\n\n**Mobile Verification Toolkit (MVT)** von Amnesty International bietet spezialisierte Command-Line-Tools für Android-Analyse mit Fokus auf Kompromittierungserkennung.\n\n**SIFT Workstation** stellt eine komplette Ubuntu-basierte forensische Umgebung mit 125+ vorinstallierten Tools bereit.\n\n## Erfolgsraten nach Gerätealter\n\n- **Pre-2017 Geräte**: 85-98% logische Extraktion, 30-70% physische Extraktion\n- **2017-2019 Geräte**: 80-95% logische Extraktion, 15-35% physische Extraktion \n- **2020+ Geräte**: 70-85% logische Extraktion, 5-15% physische Extraktion\n\n# Installation\n\n## SIFT Workstation Setup\n\n### Systemanforderungen\n- Quad-Core CPU 2.5GHz+\n- 16GB+ RAM\n- 500GB+ SSD Speicher\n- USB 3.0+ Anschlüsse\n\n### Installation\n1. Download von [SANS SIFT Workstation](https://www.sans.org/tools/sift-workstation/)\n2. VMware/VirtualBox Import der OVA-Datei\n3. VM-Konfiguration: 8GB+ RAM, 4+ CPU-Kerne\n\n```bash\n# Update nach Installation\nsudo apt update && sudo apt upgrade -y\nsudo sift update\n```\n\n## Autopsy Installation\n\n### Windows Installation\n1. Download von [autopsy.com](https://www.autopsy.com/)\n2. Java 8+ Installation erforderlich\n3. Installation mit Administratorrechten\n\n### Linux Installation\n```bash\n# Ubuntu/Debian\nsudo apt install autopsy sleuthkit\n# Oder manueller Download und Installation\nwget https://github.com/sleuthkit/autopsy/releases/latest\n```\n\n## Essential Tools Installation\n\n### Android Debug Bridge (ADB)\n```bash\n# Ubuntu/Debian\nsudo apt install android-tools-adb android-tools-fastboot\n\n# Windows - Download Android Platform Tools\n# https://developer.android.com/studio/releases/platform-tools\n```\n\n### ALEAPP Installation\n```bash\ngit clone https://github.com/abrignoni/ALEAPP.git\ncd ALEAPP\npip3 install -r requirements.txt\n```\n\n### Mobile Verification Toolkit (MVT)\n```bash\npip3 install mvt\n# Oder via GitHub für neueste Version\ngit clone https://github.com/mvt-project/mvt.git\ncd mvt && pip3 install .\n```\n\n### Andriller Installation\n```bash\ngit clone https://github.com/den4uk/andriller.git\ncd andriller\npip3 install -r requirements.txt\n```\n\n# Konfiguration\n\n## ADB Setup und Gerätevorbereitung\n\n### USB-Debugging aktivieren\n1. Entwickleroptionen freischalten (7x Build-Nummer antippen)\n2. USB-Debugging aktivieren\n3. Gerät via USB verbinden\n4. RSA-Fingerprint akzeptieren\n\n### ADB Verbindung testen\n```bash\nadb devices\n# Sollte Gerät mit \"device\" Status zeigen\nadb shell getprop ro.build.version.release # Android Version\nadb shell getprop ro.product.model # Gerätemodell\n```\n\n## Autopsy Projektkonfiguration\n\n### Case-Setup\n1. Neuen Fall erstellen\n2. Ermittler-Informationen eingeben\n3. Case-Verzeichnis festlegen (ausreichend Speicherplatz)\n\n### Android Analyzer Module aktivieren\n- Tools → Options → Modules\n- Android Analyzer aktivieren\n- ALEAPP Integration konfigurieren\n\n### Hash-Algorithmen konfigurieren\n- MD5, SHA-1, SHA-256 für Integritätsprüfung\n- Automatische Hash-Berechnung bei Import aktivieren\n\n## MVT Konfiguration\n\n### Konfigurationsdatei erstellen\n```yaml\n# ~/.mvt/config.yaml\nadb_path: \"/usr/bin/adb\"\noutput_folder: \"/home/user/mvt_output\"\n```\n\n# Verwendungsbeispiele\n\n## Fall 1: Logische Datenextraktion mit ADB\n\n### Geräteinformationen sammeln\n```bash\n# Systeminfo\nadb shell getprop > device_properties.txt\nadb shell cat /proc/version > kernel_info.txt\nadb shell mount > mount_info.txt\n\n# Installierte Apps\nadb shell pm list packages -f > installed_packages.txt\n```\n\n### Datenbank-Extraktion\n```bash\n# SMS/MMS Datenbank\nadb pull /data/data/com.android.providers.telephony/databases/mmssms.db\n\n# Kontakte\nadb pull /data/data/com.android.providers.contacts/databases/contacts2.db\n\n# Anrufliste \nadb pull /data/data/com.android.providers.contacts/databases/calllog.db\n```\n\n### WhatsApp Datenextraktion\n```bash\n# WhatsApp Datenbanken (Root erforderlich)\nadb shell su -c \"cp -r /data/data/com.whatsapp/ /sdcard/whatsapp_backup/\"\nadb pull /sdcard/whatsapp_backup/\n```\n\n## Fall 2: Android Backup-Analyse\n\n### Vollständiges Backup erstellen\n```bash\n# Umfassendes Backup (ohne Root)\nadb backup -all -system -apk -shared -f backup.ab\n\n# Backup entschlüsseln (falls verschlüsselt)\njava -jar abe.jar unpack backup.ab backup.tar\ntar -xf backup.tar\n```\n\n### Backup mit ALEAPP analysieren\n```bash\npython3 aleappGUI.py\n# Oder Command-Line\npython3 aleapp.py -t tar -i backup.tar -o output_folder\n```\n\n## Fall 3: MVT Kompromittierungsanalyse\n\n### Live-Geräteanalyse\n```bash\n# ADB-basierte Analyse\nmvt-android check-adb --output /path/to/output/\n\n# Backup-Analyse\nmvt-android check-backup --output /path/to/output/ backup.ab\n```\n\n### IOC-Suche mit Pegasus-Indikatoren\n```bash\n# Mit vorgefertigten IOCs\nmvt-android check-adb --iocs /path/to/pegasus.stix2 --output results/\n```\n\n## Fall 4: Physische Extraktion (Root erforderlich)\n\n### Device Rooting - MediaTek Geräte\n```bash\n# MTKClient für MediaTek-Chipsets\ngit clone https://github.com/bkerler/mtkclient.git\ncd mtkclient\npython3 mtk payload\n\n# Nach erfolgreichem Root\nadb shell su\n```\n\n### Vollständiges Memory Dump\n```bash\n# Partitionslayout ermitteln\nadb shell su -c \"cat /proc/partitions\"\nadb shell su -c \"ls -la /dev/block/\"\n\n# Vollständiges Device Image (Root erforderlich)\nadb shell su -c \"dd if=/dev/block/mmcblk0 of=/sdcard/full_device.img bs=4096\"\nadb pull /sdcard/full_device.img\n```\n\n# Best Practices\n\n## Rechtliche Compliance\n\n### Dokumentation und Chain of Custody\n- **Vollständige Dokumentation**: Wer, Was, Wann, Wo, Warum\n- **Hash-Verifikation**: MD5/SHA-256 für alle extrahierten Daten\n- **Nur forensische Kopien analysieren**, niemals Originaldaten\n- **Schriftliche Genehmigung** für Geräteanalyse einholen\n\n### Familiengeräte und Nachlässe\n- Genehmigung durch Nachlassverwalter erforderlich\n- Gerichtsbeschlüsse für Cloud-Zugang eventuell nötig\n- Drittpartei-Kommunikation kann weiterhin geschützt sein\n\n## Technische Best Practices\n\n### Hash-Integrität sicherstellen\n```bash\n# Hash vor und nach Transfer prüfen\nmd5sum original_file.db\nsha256sum original_file.db\n\n# Hash-Verifikation dokumentieren\necho \"$(date): MD5: $(md5sum file.db)\" >> chain_of_custody.log\n```\n\n### Sichere Arbeitsumgebung\n- Isolierte VM für Forensik-Arbeit\n- Netzwerk-Isolation während Analyse\n- Verschlüsselte Speicherung aller Evidenz\n- Regelmäßige Backups der Case-Datenbanken\n\n### Qualitätssicherung\n- Peer-Review kritischer Analysen\n- Standardisierte Arbeitsabläufe (SOPs)\n- Regelmäßige Tool-Validierung\n- Kontinuierliche Weiterbildung\n\n## Erfolgsmaximierung nach Gerätehersteller\n\n### MediaTek-Geräte (Höchste Erfolgsrate)\n- BootROM-Exploits für MT6735, MT6737, MT6750, MT6753, MT6797\n- MTKClient für Hardware-Level-Zugang\n- Erfolgsrate: 80%+ für Geräte 2015-2019\n\n### Samsung-Geräte\n- Ältere Knox-Implementierungen umgehbar\n- Emergency Dialer Exploits für Android 4.x\n- Erfolgsrate: 40-70% je nach Knox-Version\n\n### Pixel/Nexus-Geräte\n- Bootloader-Unlocking oft möglich\n- Fastboot-basierte Recovery-Installation\n- Erfolgsrate: 60-80% bei freigeschaltetem Bootloader\n\n# Troubleshooting\n\n## Problem: ADB erkennt Gerät nicht\n\n### Lösung: USB-Treiber und Berechtigungen\n```bash\n# Linux: USB-Berechtigungen prüfen\nlsusb | grep -i android\nsudo chmod 666 /dev/bus/usb/XXX/XXX\n\n# udev-Regeln erstellen\necho 'SUBSYSTEM==\"usb\", ATTR{idVendor}==\"18d1\", MODE=\"0666\", GROUP=\"plugdev\"' | sudo tee /etc/udev/rules.d/51-android.rules\nsudo udevadm control --reload-rules\n```\n\n### Windows: Treiber-Installation\n1. Geräte-Manager öffnen\n2. Android-Gerät mit Warnsymbol finden\n3. Treiber manuell installieren (Android USB Driver)\n\n## Problem: Verschlüsselte Android Backups\n\n### Lösung: Android Backup Extractor\n```bash\n# ADB Backup Extractor installieren\ngit clone https://github.com/nelenkov/android-backup-extractor.git\ncd android-backup-extractor\ngradle build\n\n# Backup entschlüsseln\njava -jar abe.jar unpack backup.ab backup.tar [password]\n```\n\n## Problem: Unzureichende Berechtigungen für Datenextraktion\n\n### Lösung: Alternative Extraktionsmethoden\n```bash\n# AFLogical OSE für begrenzte Extraktion ohne Root\n# WhatsApp Key/DB Extractor für spezifische Apps\n# Backup-basierte Extraktion als Fallback\n\n# Custom Recovery für erweiterten Zugang\nfastboot flash recovery twrp-device.img\n```\n\n## Problem: ALEAPP Parsing-Fehler\n\n### Lösung: Datenformat-Probleme beheben\n```bash\n# Log-Dateien prüfen\npython3 aleapp.py -t dir -i /path/to/data -o output --debug\n\n# Spezifische Parser deaktivieren\n# Manuelle SQLite-Analyse bei Parser-Fehlern\nsqlite3 database.db \".tables\"\nsqlite3 database.db \".schema table_name\"\n```\n\n# Erweiterte Techniken\n\n## Memory Forensics mit LiME\n\n### LiME für ARM-Devices kompilieren\n```bash\n# Cross-Compilation Setup\nexport ARCH=arm\nexport CROSS_COMPILE=arm-linux-gnueabi-\nexport KERNEL_DIR=/path/to/kernel/source\n\n# LiME Module kompilieren\ngit clone https://github.com/504ensicsLabs/LiME.git\ncd LiME/src\nmake\n\n# Memory Dump erstellen (Root erforderlich)\nadb push lime.ko /data/local/tmp/\nadb shell su -c \"insmod /data/local/tmp/lime.ko 'path=/sdcard/memory.lime format=lime'\"\n```\n\n### Volatility-Analyse von Android Memory\n```bash\n# Memory Dump analysieren\npython vol.py -f memory.lime --profile=Linux \u003Cprofile> linux.pslist\npython vol.py -f memory.lime --profile=Linux \u003Cprofile> linux.bash\npython vol.py -f memory.lime --profile=Linux \u003Cprofile> linux.netstat\n```\n\n## FRIDA-basierte Runtime-Analyse\n\n### FRIDA für Kryptographie-Hooks\n```javascript\n// crypto_hooks.js - SSL/TLS Traffic abfangen\nJava.perform(function() {\n var SSLContext = Java.use(\"javax.net.ssl.SSLContext\");\n SSLContext.init.overload('[Ljavax.net.ssl.KeyManager;', '[Ljavax.net.ssl.TrustManager;', 'java.security.SecureRandom').implementation = function(keyManagers, trustManagers, secureRandom) {\n console.log(\"[+] SSLContext.init() called\");\n this.init(keyManagers, trustManagers, secureRandom);\n };\n});\n```\n\n### FRIDA Installation und Verwendung\n```bash\n# FRIDA Server auf Android-Gerät installieren\nadb push frida-server /data/local/tmp/\nadb shell su -c \"chmod 755 /data/local/tmp/frida-server\"\nadb shell su -c \"/data/local/tmp/frida-server &\"\n\n# Script ausführen\nfrida -U -l crypto_hooks.js com.target.package\n```\n\n## Custom Recovery und Fastboot-Exploits\n\n### TWRP Installation für forensischen Zugang\n```bash\n# Bootloader entsperren (Herstellerabhängig)\nfastboot oem unlock\n# Oder\nfastboot flashing unlock\n\n# TWRP flashen\nfastboot flash recovery twrp-device.img\nfastboot boot twrp-device.img # Temporäre Installation\n\n# In TWRP: ADB-Zugang mit Root-Berechtigungen\nadb shell mount /system\nadb shell mount /data\n```\n\n### Partitions-Imaging mit dd\n```bash\n# Vollständige Partition-Liste\nadb shell cat /proc/partitions\n\n# Kritische Partitionen extrahieren\nadb shell dd if=/dev/block/bootdevice/by-name/system of=/external_sd/system.img\nadb shell dd if=/dev/block/bootdevice/by-name/userdata of=/external_sd/userdata.img\nadb shell dd if=/dev/block/bootdevice/by-name/boot of=/external_sd/boot.img\n```\n\n## SQLite Forensics und gelöschte Daten\n\n### Erweiterte SQLite-Analyse\n```bash\n# Freelist-Analyse für gelöschte Einträge\nsqlite3 database.db \"PRAGMA freelist_count;\"\nsqlite3 database.db \"PRAGMA page_size;\"\n\n# WAL-Datei Analyse\nsqlite3 database.db \"PRAGMA wal_checkpoint;\"\nstrings database.db-wal | grep -i \"search_term\"\n\n# Undark für Deleted Record Recovery\nundark database.db --freelist --export-csv\n```\n\n### Timeline-Rekonstruktion\n```bash\n# Autopsy Timeline-Generierung\n# Tools → Generate Timeline\n# Analyse von MAC-Times (Modified, Accessed, Created)\n\n# Plaso Timeline-Tools\nlog2timeline.py timeline.plaso /path/to/android/data/\npsort.py -o dynamic timeline.plaso\n```\n\n## Weiterführende Ressourcen\n\n### Dokumentation und Standards\n- [NIST SP 800-101 Rev. 1 - Mobile Device Forensics Guidelines](https://csrc.nist.gov/pubs/sp/800/101/r1/final)\n- [SANS FOR585 - Smartphone Forensics](https://www.sans.org/cyber-security-courses/advanced-smartphone-mobile-device-forensics/)\n- [ALEAPP GitHub Repository](https://github.com/abrignoni/ALEAPP)\n- [MVT Documentation](https://docs.mvt.re/en/latest/)\n\n### Community und Weiterbildung\n- [Autopsy User Documentation](https://sleuthkit.org/autopsy/docs/)\n- [Android Forensics References](https://github.com/impillar/AndroidReferences/blob/master/AndroidTools.md)\n- [Digital Forensics Framework Collection](https://github.com/mesquidar/ForensicsTools)\n\n### Spezialisierte Tools\n- [MTKClient für MediaTek Exploits](https://github.com/bkerler/mtkclient)\n- [Android Forensics Framework](https://github.com/nowsecure/android-forensics)\n- [Santoku Linux Mobile Forensics Distribution](https://santoku-linux.com/)\n\n---\n\n**Wichtiger Hinweis**: Diese Anleitung dient ausschließlich für autorisierte forensische Untersuchungen. Stellen Sie sicher, dass Sie über entsprechende rechtliche Befugnisse verfügen, bevor Sie diese Techniken anwenden. Bei Zweifeln konsultieren Sie Rechtsberatung.","src/content/knowledgebase/android-logical-imaging.md","0bb3f1d2c872d2bf",{"html":363,"metadata":364},"\u003Ch1 id=\"übersicht\">Übersicht\u003C/h1>\n\u003Cp>Open-Source Android Forensik bietet robuste Alternativen zu kommerziellen Lösungen wie Cellebrite UFED und Magnet AXIOM. Besonders für ältere Android-Geräte (5+ Jahre) existieren bewährte Methoden zur Datenextraktion und -analyse.\u003C/p>\n\u003Ch2 id=\"kernkomponenten-des-open-source-forensik-stacks\">Kernkomponenten des Open-Source Forensik-Stacks\u003C/h2>\n\u003Cp>\u003Cstrong>Autopsy Digital Forensics Platform\u003C/strong> bildet das Fundament mit GUI-basierter Analyse und integrierten Android-Parsing-Fähigkeiten. Die Plattform unterstützt \u003Cstrong>ALEAPP (Android Logs Events And Protobuf Parser)\u003C/strong>, das über 100 Artefakt-Kategorien aus Android-Extraktionen parst.\u003C/p>\n\u003Cp>\u003Cstrong>Mobile Verification Toolkit (MVT)\u003C/strong> von Amnesty International bietet spezialisierte Command-Line-Tools für Android-Analyse mit Fokus auf Kompromittierungserkennung.\u003C/p>\n\u003Cp>\u003Cstrong>SIFT Workstation\u003C/strong> stellt eine komplette Ubuntu-basierte forensische Umgebung mit 125+ vorinstallierten Tools bereit.\u003C/p>\n\u003Ch2 id=\"erfolgsraten-nach-gerätealter\">Erfolgsraten nach Gerätealter\u003C/h2>\n\u003Cul>\n\u003Cli>\u003Cstrong>Pre-2017 Geräte\u003C/strong>: 85-98% logische Extraktion, 30-70% physische Extraktion\u003C/li>\n\u003Cli>\u003Cstrong>2017-2019 Geräte\u003C/strong>: 80-95% logische Extraktion, 15-35% physische Extraktion\u003C/li>\n\u003Cli>\u003Cstrong>2020+ Geräte\u003C/strong>: 70-85% logische Extraktion, 5-15% physische Extraktion\u003C/li>\n\u003C/ul>\n\u003Ch1 id=\"installation\">Installation\u003C/h1>\n\u003Ch2 id=\"sift-workstation-setup\">SIFT Workstation Setup\u003C/h2>\n\u003Ch3 id=\"systemanforderungen\">Systemanforderungen\u003C/h3>\n\u003Cul>\n\u003Cli>Quad-Core CPU 2.5GHz+\u003C/li>\n\u003Cli>16GB+ RAM\u003C/li>\n\u003Cli>500GB+ SSD Speicher\u003C/li>\n\u003Cli>USB 3.0+ Anschlüsse\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"installation-1\">Installation\u003C/h3>\n\u003Col>\n\u003Cli>Download von \u003Ca href=\"https://www.sans.org/tools/sift-workstation/\">SANS SIFT Workstation\u003C/a>\u003C/li>\n\u003Cli>VMware/VirtualBox Import der OVA-Datei\u003C/li>\n\u003Cli>VM-Konfiguration: 8GB+ RAM, 4+ CPU-Kerne\u003C/li>\n\u003C/ol>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Update nach Installation\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apt\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> update\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> && \u003C/span>\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apt\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> upgrade\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -y\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> sift\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> update\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"autopsy-installation\">Autopsy Installation\u003C/h2>\n\u003Ch3 id=\"windows-installation\">Windows Installation\u003C/h3>\n\u003Col>\n\u003Cli>Download von \u003Ca href=\"https://www.autopsy.com/\">autopsy.com\u003C/a>\u003C/li>\n\u003Cli>Java 8+ Installation erforderlich\u003C/li>\n\u003Cli>Installation mit Administratorrechten\u003C/li>\n\u003C/ol>\n\u003Ch3 id=\"linux-installation\">Linux Installation\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Ubuntu/Debian\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apt\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> install\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> autopsy\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> sleuthkit\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Oder manueller Download und Installation\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">wget\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> https://github.com/sleuthkit/autopsy/releases/latest\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"essential-tools-installation\">Essential Tools Installation\u003C/h2>\n\u003Ch3 id=\"android-debug-bridge-adb\">Android Debug Bridge (ADB)\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Ubuntu/Debian\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apt\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> install\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> android-tools-adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> android-tools-fastboot\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Windows - Download Android Platform Tools\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># https://developer.android.com/studio/releases/platform-tools\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"aleapp-installation\">ALEAPP Installation\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">git\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> clone\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> https://github.com/abrignoni/ALEAPP.git\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">cd\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> ALEAPP\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">pip3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> install\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -r\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> requirements.txt\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"mobile-verification-toolkit-mvt\">Mobile Verification Toolkit (MVT)\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">pip3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> install\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> mvt\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Oder via GitHub für neueste Version\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">git\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> clone\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> https://github.com/mvt-project/mvt.git\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">cd\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> mvt\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> && \u003C/span>\u003Cspan style=\"color:#B392F0\">pip3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> install\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> .\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"andriller-installation\">Andriller Installation\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">git\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> clone\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> https://github.com/den4uk/andriller.git\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">cd\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> andriller\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">pip3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> install\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -r\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> requirements.txt\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch1 id=\"konfiguration\">Konfiguration\u003C/h1>\n\u003Ch2 id=\"adb-setup-und-gerätevorbereitung\">ADB Setup und Gerätevorbereitung\u003C/h2>\n\u003Ch3 id=\"usb-debugging-aktivieren\">USB-Debugging aktivieren\u003C/h3>\n\u003Col>\n\u003Cli>Entwickleroptionen freischalten (7x Build-Nummer antippen)\u003C/li>\n\u003Cli>USB-Debugging aktivieren\u003C/li>\n\u003Cli>Gerät via USB verbinden\u003C/li>\n\u003Cli>RSA-Fingerprint akzeptieren\u003C/li>\n\u003C/ol>\n\u003Ch3 id=\"adb-verbindung-testen\">ADB Verbindung testen\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> devices\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Sollte Gerät mit \"device\" Status zeigen\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> getprop\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> ro.build.version.release\u003C/span>\u003Cspan style=\"color:#6A737D\"> # Android Version\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> getprop\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> ro.product.model\u003C/span>\u003Cspan style=\"color:#6A737D\"> # Gerätemodell\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"autopsy-projektkonfiguration\">Autopsy Projektkonfiguration\u003C/h2>\n\u003Ch3 id=\"case-setup\">Case-Setup\u003C/h3>\n\u003Col>\n\u003Cli>Neuen Fall erstellen\u003C/li>\n\u003Cli>Ermittler-Informationen eingeben\u003C/li>\n\u003Cli>Case-Verzeichnis festlegen (ausreichend Speicherplatz)\u003C/li>\n\u003C/ol>\n\u003Ch3 id=\"android-analyzer-module-aktivieren\">Android Analyzer Module aktivieren\u003C/h3>\n\u003Cul>\n\u003Cli>Tools → Options → Modules\u003C/li>\n\u003Cli>Android Analyzer aktivieren\u003C/li>\n\u003Cli>ALEAPP Integration konfigurieren\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"hash-algorithmen-konfigurieren\">Hash-Algorithmen konfigurieren\u003C/h3>\n\u003Cul>\n\u003Cli>MD5, SHA-1, SHA-256 für Integritätsprüfung\u003C/li>\n\u003Cli>Automatische Hash-Berechnung bei Import aktivieren\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"mvt-konfiguration\">MVT Konfiguration\u003C/h2>\n\u003Ch3 id=\"konfigurationsdatei-erstellen\">Konfigurationsdatei erstellen\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"yaml\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># ~/.mvt/config.yaml\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#85E89D\">adb_path\u003C/span>\u003Cspan style=\"color:#E1E4E8\">: \u003C/span>\u003Cspan style=\"color:#9ECBFF\">\"/usr/bin/adb\"\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#85E89D\">output_folder\u003C/span>\u003Cspan style=\"color:#E1E4E8\">: \u003C/span>\u003Cspan style=\"color:#9ECBFF\">\"/home/user/mvt_output\"\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch1 id=\"verwendungsbeispiele\">Verwendungsbeispiele\u003C/h1>\n\u003Ch2 id=\"fall-1-logische-datenextraktion-mit-adb\">Fall 1: Logische Datenextraktion mit ADB\u003C/h2>\n\u003Ch3 id=\"geräteinformationen-sammeln\">Geräteinformationen sammeln\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Systeminfo\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> getprop\u003C/span>\u003Cspan style=\"color:#F97583\"> >\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> device_properties.txt\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> cat\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /proc/version\u003C/span>\u003Cspan style=\"color:#F97583\"> >\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> kernel_info.txt\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> mount\u003C/span>\u003Cspan style=\"color:#F97583\"> >\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> mount_info.txt\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Installierte Apps\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> pm\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> list\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> packages\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -f\u003C/span>\u003Cspan style=\"color:#F97583\"> >\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> installed_packages.txt\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"datenbank-extraktion\">Datenbank-Extraktion\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># SMS/MMS Datenbank\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> pull\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /data/data/com.android.providers.telephony/databases/mmssms.db\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Kontakte\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> pull\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /data/data/com.android.providers.contacts/databases/contacts2.db\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Anrufliste \u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> pull\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /data/data/com.android.providers.contacts/databases/calllog.db\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"whatsapp-datenextraktion\">WhatsApp Datenextraktion\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># WhatsApp Datenbanken (Root erforderlich)\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> su\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -c\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \"cp -r /data/data/com.whatsapp/ /sdcard/whatsapp_backup/\"\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> pull\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /sdcard/whatsapp_backup/\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"fall-2-android-backup-analyse\">Fall 2: Android Backup-Analyse\u003C/h2>\n\u003Ch3 id=\"vollständiges-backup-erstellen\">Vollständiges Backup erstellen\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Umfassendes Backup (ohne Root)\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> backup\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -all\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -system\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -apk\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -shared\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -f\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> backup.ab\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Backup entschlüsseln (falls verschlüsselt)\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">java\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -jar\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> abe.jar\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> unpack\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> backup.ab\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> backup.tar\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">tar\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -xf\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> backup.tar\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"backup-mit-aleapp-analysieren\">Backup mit ALEAPP analysieren\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">python3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> aleappGUI.py\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Oder Command-Line\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">python3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> aleapp.py\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -t\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> tar\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -i\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> backup.tar\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -o\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> output_folder\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"fall-3-mvt-kompromittierungsanalyse\">Fall 3: MVT Kompromittierungsanalyse\u003C/h2>\n\u003Ch3 id=\"live-geräteanalyse\">Live-Geräteanalyse\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># ADB-basierte Analyse\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">mvt-android\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> check-adb\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --output\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /path/to/output/\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Backup-Analyse\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">mvt-android\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> check-backup\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --output\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /path/to/output/\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> backup.ab\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"ioc-suche-mit-pegasus-indikatoren\">IOC-Suche mit Pegasus-Indikatoren\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Mit vorgefertigten IOCs\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">mvt-android\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> check-adb\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --iocs\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /path/to/pegasus.stix2\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --output\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> results/\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"fall-4-physische-extraktion-root-erforderlich\">Fall 4: Physische Extraktion (Root erforderlich)\u003C/h2>\n\u003Ch3 id=\"device-rooting---mediatek-geräte\">Device Rooting - MediaTek Geräte\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># MTKClient für MediaTek-Chipsets\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">git\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> clone\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> https://github.com/bkerler/mtkclient.git\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">cd\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> mtkclient\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">python3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> mtk\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> payload\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Nach erfolgreichem Root\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> su\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"vollständiges-memory-dump\">Vollständiges Memory Dump\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Partitionslayout ermitteln\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> su\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -c\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \"cat /proc/partitions\"\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> su\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -c\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \"ls -la /dev/block/\"\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Vollständiges Device Image (Root erforderlich)\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> su\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -c\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \"dd if=/dev/block/mmcblk0 of=/sdcard/full_device.img bs=4096\"\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> pull\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /sdcard/full_device.img\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch1 id=\"best-practices\">Best Practices\u003C/h1>\n\u003Ch2 id=\"rechtliche-compliance\">Rechtliche Compliance\u003C/h2>\n\u003Ch3 id=\"dokumentation-und-chain-of-custody\">Dokumentation und Chain of Custody\u003C/h3>\n\u003Cul>\n\u003Cli>\u003Cstrong>Vollständige Dokumentation\u003C/strong>: Wer, Was, Wann, Wo, Warum\u003C/li>\n\u003Cli>\u003Cstrong>Hash-Verifikation\u003C/strong>: MD5/SHA-256 für alle extrahierten Daten\u003C/li>\n\u003Cli>\u003Cstrong>Nur forensische Kopien analysieren\u003C/strong>, niemals Originaldaten\u003C/li>\n\u003Cli>\u003Cstrong>Schriftliche Genehmigung\u003C/strong> für Geräteanalyse einholen\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"familiengeräte-und-nachlässe\">Familiengeräte und Nachlässe\u003C/h3>\n\u003Cul>\n\u003Cli>Genehmigung durch Nachlassverwalter erforderlich\u003C/li>\n\u003Cli>Gerichtsbeschlüsse für Cloud-Zugang eventuell nötig\u003C/li>\n\u003Cli>Drittpartei-Kommunikation kann weiterhin geschützt sein\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"technische-best-practices\">Technische Best Practices\u003C/h2>\n\u003Ch3 id=\"hash-integrität-sicherstellen\">Hash-Integrität sicherstellen\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Hash vor und nach Transfer prüfen\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">md5sum\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> original_file.db\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sha256sum\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> original_file.db\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Hash-Verifikation dokumentieren\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">echo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \"$(\u003C/span>\u003Cspan style=\"color:#B392F0\">date\u003C/span>\u003Cspan style=\"color:#9ECBFF\">): MD5: $(\u003C/span>\u003Cspan style=\"color:#B392F0\">md5sum\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> file.db)\"\u003C/span>\u003Cspan style=\"color:#F97583\"> >>\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> chain_of_custody.log\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"sichere-arbeitsumgebung\">Sichere Arbeitsumgebung\u003C/h3>\n\u003Cul>\n\u003Cli>Isolierte VM für Forensik-Arbeit\u003C/li>\n\u003Cli>Netzwerk-Isolation während Analyse\u003C/li>\n\u003Cli>Verschlüsselte Speicherung aller Evidenz\u003C/li>\n\u003Cli>Regelmäßige Backups der Case-Datenbanken\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"qualitätssicherung\">Qualitätssicherung\u003C/h3>\n\u003Cul>\n\u003Cli>Peer-Review kritischer Analysen\u003C/li>\n\u003Cli>Standardisierte Arbeitsabläufe (SOPs)\u003C/li>\n\u003Cli>Regelmäßige Tool-Validierung\u003C/li>\n\u003Cli>Kontinuierliche Weiterbildung\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"erfolgsmaximierung-nach-gerätehersteller\">Erfolgsmaximierung nach Gerätehersteller\u003C/h2>\n\u003Ch3 id=\"mediatek-geräte-höchste-erfolgsrate\">MediaTek-Geräte (Höchste Erfolgsrate)\u003C/h3>\n\u003Cul>\n\u003Cli>BootROM-Exploits für MT6735, MT6737, MT6750, MT6753, MT6797\u003C/li>\n\u003Cli>MTKClient für Hardware-Level-Zugang\u003C/li>\n\u003Cli>Erfolgsrate: 80%+ für Geräte 2015-2019\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"samsung-geräte\">Samsung-Geräte\u003C/h3>\n\u003Cul>\n\u003Cli>Ältere Knox-Implementierungen umgehbar\u003C/li>\n\u003Cli>Emergency Dialer Exploits für Android 4.x\u003C/li>\n\u003Cli>Erfolgsrate: 40-70% je nach Knox-Version\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"pixelnexus-geräte\">Pixel/Nexus-Geräte\u003C/h3>\n\u003Cul>\n\u003Cli>Bootloader-Unlocking oft möglich\u003C/li>\n\u003Cli>Fastboot-basierte Recovery-Installation\u003C/li>\n\u003Cli>Erfolgsrate: 60-80% bei freigeschaltetem Bootloader\u003C/li>\n\u003C/ul>\n\u003Ch1 id=\"troubleshooting\">Troubleshooting\u003C/h1>\n\u003Ch2 id=\"problem-adb-erkennt-gerät-nicht\">Problem: ADB erkennt Gerät nicht\u003C/h2>\n\u003Ch3 id=\"lösung-usb-treiber-und-berechtigungen\">Lösung: USB-Treiber und Berechtigungen\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Linux: USB-Berechtigungen prüfen\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">lsusb\u003C/span>\u003Cspan style=\"color:#F97583\"> |\u003C/span>\u003Cspan style=\"color:#B392F0\"> grep\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -i\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> android\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> chmod\u003C/span>\u003Cspan style=\"color:#79B8FF\"> 666\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /dev/bus/usb/XXX/XXX\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># udev-Regeln erstellen\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">echo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> 'SUBSYSTEM==\"usb\", ATTR{idVendor}==\"18d1\", MODE=\"0666\", GROUP=\"plugdev\"'\u003C/span>\u003Cspan style=\"color:#F97583\"> |\u003C/span>\u003Cspan style=\"color:#B392F0\"> sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> tee\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /etc/udev/rules.d/51-android.rules\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> udevadm\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> control\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --reload-rules\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"windows-treiber-installation\">Windows: Treiber-Installation\u003C/h3>\n\u003Col>\n\u003Cli>Geräte-Manager öffnen\u003C/li>\n\u003Cli>Android-Gerät mit Warnsymbol finden\u003C/li>\n\u003Cli>Treiber manuell installieren (Android USB Driver)\u003C/li>\n\u003C/ol>\n\u003Ch2 id=\"problem-verschlüsselte-android-backups\">Problem: Verschlüsselte Android Backups\u003C/h2>\n\u003Ch3 id=\"lösung-android-backup-extractor\">Lösung: Android Backup Extractor\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># ADB Backup Extractor installieren\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">git\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> clone\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> https://github.com/nelenkov/android-backup-extractor.git\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">cd\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> android-backup-extractor\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">gradle\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> build\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Backup entschlüsseln\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">java\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -jar\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> abe.jar\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> unpack\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> backup.ab\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> backup.tar\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> [password]\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"problem-unzureichende-berechtigungen-für-datenextraktion\">Problem: Unzureichende Berechtigungen für Datenextraktion\u003C/h2>\n\u003Ch3 id=\"lösung-alternative-extraktionsmethoden\">Lösung: Alternative Extraktionsmethoden\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># AFLogical OSE für begrenzte Extraktion ohne Root\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># WhatsApp Key/DB Extractor für spezifische Apps\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Backup-basierte Extraktion als Fallback\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Custom Recovery für erweiterten Zugang\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">fastboot\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> flash\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> recovery\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> twrp-device.img\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"problem-aleapp-parsing-fehler\">Problem: ALEAPP Parsing-Fehler\u003C/h2>\n\u003Ch3 id=\"lösung-datenformat-probleme-beheben\">Lösung: Datenformat-Probleme beheben\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Log-Dateien prüfen\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">python3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> aleapp.py\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -t\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> dir\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -i\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /path/to/data\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -o\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> output\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --debug\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Spezifische Parser deaktivieren\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Manuelle SQLite-Analyse bei Parser-Fehlern\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sqlite3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> database.db\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \".tables\"\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sqlite3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> database.db\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \".schema table_name\"\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch1 id=\"erweiterte-techniken\">Erweiterte Techniken\u003C/h1>\n\u003Ch2 id=\"memory-forensics-mit-lime\">Memory Forensics mit LiME\u003C/h2>\n\u003Ch3 id=\"lime-für-arm-devices-kompilieren\">LiME für ARM-Devices kompilieren\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Cross-Compilation Setup\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">export\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> ARCH\u003C/span>\u003Cspan style=\"color:#F97583\">=\u003C/span>\u003Cspan style=\"color:#E1E4E8\">arm\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">export\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> CROSS_COMPILE\u003C/span>\u003Cspan style=\"color:#F97583\">=\u003C/span>\u003Cspan style=\"color:#E1E4E8\">arm-linux-gnueabi-\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">export\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> KERNEL_DIR\u003C/span>\u003Cspan style=\"color:#F97583\">=\u003C/span>\u003Cspan style=\"color:#E1E4E8\">/path/to/kernel/source\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># LiME Module kompilieren\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">git\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> clone\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> https://github.com/504ensicsLabs/LiME.git\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">cd\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> LiME/src\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">make\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Memory Dump erstellen (Root erforderlich)\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> push\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> lime.ko\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /data/local/tmp/\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> su\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -c\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \"insmod /data/local/tmp/lime.ko 'path=/sdcard/memory.lime format=lime'\"\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"volatility-analyse-von-android-memory\">Volatility-Analyse von Android Memory\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Memory Dump analysieren\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">python\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> vol.py\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -f\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> memory.lime\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --profile=Linux\u003C/span>\u003Cspan style=\"color:#F97583\"> <\u003C/span>\u003Cspan style=\"color:#9ECBFF\">profil\u003C/span>\u003Cspan style=\"color:#E1E4E8\">e\u003C/span>\u003Cspan style=\"color:#F97583\">>\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> linux.pslist\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">python\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> vol.py\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -f\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> memory.lime\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --profile=Linux\u003C/span>\u003Cspan style=\"color:#F97583\"> <\u003C/span>\u003Cspan style=\"color:#9ECBFF\">profil\u003C/span>\u003Cspan style=\"color:#E1E4E8\">e\u003C/span>\u003Cspan style=\"color:#F97583\">>\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> linux.bash\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">python\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> vol.py\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -f\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> memory.lime\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --profile=Linux\u003C/span>\u003Cspan style=\"color:#F97583\"> <\u003C/span>\u003Cspan style=\"color:#9ECBFF\">profil\u003C/span>\u003Cspan style=\"color:#E1E4E8\">e\u003C/span>\u003Cspan style=\"color:#F97583\">>\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> linux.netstat\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"frida-basierte-runtime-analyse\">FRIDA-basierte Runtime-Analyse\u003C/h2>\n\u003Ch3 id=\"frida-für-kryptographie-hooks\">FRIDA für Kryptographie-Hooks\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"javascript\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\">// crypto_hooks.js - SSL/TLS Traffic abfangen\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">Java.\u003C/span>\u003Cspan style=\"color:#B392F0\">perform\u003C/span>\u003Cspan style=\"color:#E1E4E8\">(\u003C/span>\u003Cspan style=\"color:#F97583\">function\u003C/span>\u003Cspan style=\"color:#E1E4E8\">() {\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\"> var\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> SSLContext \u003C/span>\u003Cspan style=\"color:#F97583\">=\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> Java.\u003C/span>\u003Cspan style=\"color:#B392F0\">use\u003C/span>\u003Cspan style=\"color:#E1E4E8\">(\u003C/span>\u003Cspan style=\"color:#9ECBFF\">\"javax.net.ssl.SSLContext\"\u003C/span>\u003Cspan style=\"color:#E1E4E8\">);\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\"> SSLContext.init.\u003C/span>\u003Cspan style=\"color:#B392F0\">overload\u003C/span>\u003Cspan style=\"color:#E1E4E8\">(\u003C/span>\u003Cspan style=\"color:#9ECBFF\">'[Ljavax.net.ssl.KeyManager;'\u003C/span>\u003Cspan style=\"color:#E1E4E8\">, \u003C/span>\u003Cspan style=\"color:#9ECBFF\">'[Ljavax.net.ssl.TrustManager;'\u003C/span>\u003Cspan style=\"color:#E1E4E8\">, \u003C/span>\u003Cspan style=\"color:#9ECBFF\">'java.security.SecureRandom'\u003C/span>\u003Cspan style=\"color:#E1E4E8\">).\u003C/span>\u003Cspan style=\"color:#B392F0\">implementation\u003C/span>\u003Cspan style=\"color:#F97583\"> =\u003C/span>\u003Cspan style=\"color:#F97583\"> function\u003C/span>\u003Cspan style=\"color:#E1E4E8\">(\u003C/span>\u003Cspan style=\"color:#FFAB70\">keyManagers\u003C/span>\u003Cspan style=\"color:#E1E4E8\">, \u003C/span>\u003Cspan style=\"color:#FFAB70\">trustManagers\u003C/span>\u003Cspan style=\"color:#E1E4E8\">, \u003C/span>\u003Cspan style=\"color:#FFAB70\">secureRandom\u003C/span>\u003Cspan style=\"color:#E1E4E8\">) {\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\"> console.\u003C/span>\u003Cspan style=\"color:#B392F0\">log\u003C/span>\u003Cspan style=\"color:#E1E4E8\">(\u003C/span>\u003Cspan style=\"color:#9ECBFF\">\"[+] SSLContext.init() called\"\u003C/span>\u003Cspan style=\"color:#E1E4E8\">);\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\"> this\u003C/span>\u003Cspan style=\"color:#E1E4E8\">.\u003C/span>\u003Cspan style=\"color:#B392F0\">init\u003C/span>\u003Cspan style=\"color:#E1E4E8\">(keyManagers, trustManagers, secureRandom);\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\"> };\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">});\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"frida-installation-und-verwendung\">FRIDA Installation und Verwendung\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># FRIDA Server auf Android-Gerät installieren\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> push\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> frida-server\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /data/local/tmp/\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> su\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -c\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \"chmod 755 /data/local/tmp/frida-server\"\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> su\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -c\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \"/data/local/tmp/frida-server &\"\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Script ausführen\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">frida\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -U\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -l\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> crypto_hooks.js\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> com.target.package\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"custom-recovery-und-fastboot-exploits\">Custom Recovery und Fastboot-Exploits\u003C/h2>\n\u003Ch3 id=\"twrp-installation-für-forensischen-zugang\">TWRP Installation für forensischen Zugang\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Bootloader entsperren (Herstellerabhängig)\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">fastboot\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> oem\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> unlock\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Oder\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">fastboot\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> flashing\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> unlock\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># TWRP flashen\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">fastboot\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> flash\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> recovery\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> twrp-device.img\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">fastboot\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> boot\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> twrp-device.img\u003C/span>\u003Cspan style=\"color:#6A737D\"> # Temporäre Installation\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># In TWRP: ADB-Zugang mit Root-Berechtigungen\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> mount\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /system\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> mount\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /data\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"partitions-imaging-mit-dd\">Partitions-Imaging mit dd\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Vollständige Partition-Liste\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> cat\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /proc/partitions\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Kritische Partitionen extrahieren\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> dd\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> if=/dev/block/bootdevice/by-name/system\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> of=/external_sd/system.img\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> dd\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> if=/dev/block/bootdevice/by-name/userdata\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> of=/external_sd/userdata.img\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> dd\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> if=/dev/block/bootdevice/by-name/boot\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> of=/external_sd/boot.img\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"sqlite-forensics-und-gelöschte-daten\">SQLite Forensics und gelöschte Daten\u003C/h2>\n\u003Ch3 id=\"erweiterte-sqlite-analyse\">Erweiterte SQLite-Analyse\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Freelist-Analyse für gelöschte Einträge\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sqlite3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> database.db\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \"PRAGMA freelist_count;\"\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sqlite3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> database.db\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \"PRAGMA page_size;\"\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># WAL-Datei Analyse\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sqlite3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> database.db\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \"PRAGMA wal_checkpoint;\"\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">strings\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> database.db-wal\u003C/span>\u003Cspan style=\"color:#F97583\"> |\u003C/span>\u003Cspan style=\"color:#B392F0\"> grep\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -i\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \"search_term\"\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Undark für Deleted Record Recovery\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">undark\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> database.db\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --freelist\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --export-csv\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"timeline-rekonstruktion\">Timeline-Rekonstruktion\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Autopsy Timeline-Generierung\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Tools → Generate Timeline\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Analyse von MAC-Times (Modified, Accessed, Created)\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Plaso Timeline-Tools\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">log2timeline.py\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> timeline.plaso\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /path/to/android/data/\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">psort.py\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -o\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> dynamic\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> timeline.plaso\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"weiterführende-ressourcen\">Weiterführende Ressourcen\u003C/h2>\n\u003Ch3 id=\"dokumentation-und-standards\">Dokumentation und Standards\u003C/h3>\n\u003Cul>\n\u003Cli>\u003Ca href=\"https://csrc.nist.gov/pubs/sp/800/101/r1/final\">NIST SP 800-101 Rev. 1 - Mobile Device Forensics Guidelines\u003C/a>\u003C/li>\n\u003Cli>\u003Ca href=\"https://www.sans.org/cyber-security-courses/advanced-smartphone-mobile-device-forensics/\">SANS FOR585 - Smartphone Forensics\u003C/a>\u003C/li>\n\u003Cli>\u003Ca href=\"https://github.com/abrignoni/ALEAPP\">ALEAPP GitHub Repository\u003C/a>\u003C/li>\n\u003Cli>\u003Ca href=\"https://docs.mvt.re/en/latest/\">MVT Documentation\u003C/a>\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"community-und-weiterbildung\">Community und Weiterbildung\u003C/h3>\n\u003Cul>\n\u003Cli>\u003Ca href=\"https://sleuthkit.org/autopsy/docs/\">Autopsy User Documentation\u003C/a>\u003C/li>\n\u003Cli>\u003Ca href=\"https://github.com/impillar/AndroidReferences/blob/master/AndroidTools.md\">Android Forensics References\u003C/a>\u003C/li>\n\u003Cli>\u003Ca href=\"https://github.com/mesquidar/ForensicsTools\">Digital Forensics Framework Collection\u003C/a>\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"spezialisierte-tools\">Spezialisierte Tools\u003C/h3>\n\u003Cul>\n\u003Cli>\u003Ca href=\"https://github.com/bkerler/mtkclient\">MTKClient für MediaTek Exploits\u003C/a>\u003C/li>\n\u003Cli>\u003Ca href=\"https://github.com/nowsecure/android-forensics\">Android Forensics Framework\u003C/a>\u003C/li>\n\u003Cli>\u003Ca href=\"https://santoku-linux.com/\">Santoku Linux Mobile Forensics Distribution\u003C/a>\u003C/li>\n\u003C/ul>\n\u003Chr>\n\u003Cp>\u003Cstrong>Wichtiger Hinweis\u003C/strong>: Diese Anleitung dient ausschließlich für autorisierte forensische Untersuchungen. Stellen Sie sicher, dass Sie über entsprechende rechtliche Befugnisse verfügen, bevor Sie diese Techniken anwenden. Bei Zweifeln konsultieren Sie Rechtsberatung.\u003C/p>",{"headings":365,"localImagePaths":587,"remoteImagePaths":588,"frontmatter":346,"imagePaths":589},[366,367,370,373,374,377,380,382,385,388,391,394,397,400,403,406,407,410,413,416,419,422,425,428,431,434,435,438,441,444,447,450,453,456,459,462,465,468,471,474,475,478,481,484,487,490,493,496,499,502,505,508,509,512,515,518,521,524,527,530,533,536,539,542,545,548,551,554,557,560,563,566,569,572,575,578,581,584],{"depth":43,"slug":44,"text":45},{"depth":47,"slug":368,"text":369},"kernkomponenten-des-open-source-forensik-stacks","Kernkomponenten des Open-Source Forensik-Stacks",{"depth":47,"slug":371,"text":372},"erfolgsraten-nach-gerätealter","Erfolgsraten nach Gerätealter",{"depth":43,"slug":48,"text":49},{"depth":47,"slug":375,"text":376},"sift-workstation-setup","SIFT Workstation Setup",{"depth":51,"slug":378,"text":379},"systemanforderungen","Systemanforderungen",{"depth":51,"slug":381,"text":49},"installation-1",{"depth":47,"slug":383,"text":384},"autopsy-installation","Autopsy Installation",{"depth":51,"slug":386,"text":387},"windows-installation","Windows Installation",{"depth":51,"slug":389,"text":390},"linux-installation","Linux Installation",{"depth":47,"slug":392,"text":393},"essential-tools-installation","Essential Tools Installation",{"depth":51,"slug":395,"text":396},"android-debug-bridge-adb","Android Debug Bridge (ADB)",{"depth":51,"slug":398,"text":399},"aleapp-installation","ALEAPP Installation",{"depth":51,"slug":401,"text":402},"mobile-verification-toolkit-mvt","Mobile Verification Toolkit (MVT)",{"depth":51,"slug":404,"text":405},"andriller-installation","Andriller Installation",{"depth":43,"slug":58,"text":59},{"depth":47,"slug":408,"text":409},"adb-setup-und-gerätevorbereitung","ADB Setup und Gerätevorbereitung",{"depth":51,"slug":411,"text":412},"usb-debugging-aktivieren","USB-Debugging aktivieren",{"depth":51,"slug":414,"text":415},"adb-verbindung-testen","ADB Verbindung testen",{"depth":47,"slug":417,"text":418},"autopsy-projektkonfiguration","Autopsy Projektkonfiguration",{"depth":51,"slug":420,"text":421},"case-setup","Case-Setup",{"depth":51,"slug":423,"text":424},"android-analyzer-module-aktivieren","Android Analyzer Module aktivieren",{"depth":51,"slug":426,"text":427},"hash-algorithmen-konfigurieren","Hash-Algorithmen konfigurieren",{"depth":47,"slug":429,"text":430},"mvt-konfiguration","MVT Konfiguration",{"depth":51,"slug":432,"text":433},"konfigurationsdatei-erstellen","Konfigurationsdatei erstellen",{"depth":43,"slug":70,"text":71},{"depth":47,"slug":436,"text":437},"fall-1-logische-datenextraktion-mit-adb","Fall 1: Logische Datenextraktion mit ADB",{"depth":51,"slug":439,"text":440},"geräteinformationen-sammeln","Geräteinformationen sammeln",{"depth":51,"slug":442,"text":443},"datenbank-extraktion","Datenbank-Extraktion",{"depth":51,"slug":445,"text":446},"whatsapp-datenextraktion","WhatsApp Datenextraktion",{"depth":47,"slug":448,"text":449},"fall-2-android-backup-analyse","Fall 2: Android Backup-Analyse",{"depth":51,"slug":451,"text":452},"vollständiges-backup-erstellen","Vollständiges Backup erstellen",{"depth":51,"slug":454,"text":455},"backup-mit-aleapp-analysieren","Backup mit ALEAPP analysieren",{"depth":47,"slug":457,"text":458},"fall-3-mvt-kompromittierungsanalyse","Fall 3: MVT Kompromittierungsanalyse",{"depth":51,"slug":460,"text":461},"live-geräteanalyse","Live-Geräteanalyse",{"depth":51,"slug":463,"text":464},"ioc-suche-mit-pegasus-indikatoren","IOC-Suche mit Pegasus-Indikatoren",{"depth":47,"slug":466,"text":467},"fall-4-physische-extraktion-root-erforderlich","Fall 4: Physische Extraktion (Root erforderlich)",{"depth":51,"slug":469,"text":470},"device-rooting---mediatek-geräte","Device Rooting - MediaTek Geräte",{"depth":51,"slug":472,"text":473},"vollständiges-memory-dump","Vollständiges Memory Dump",{"depth":43,"slug":79,"text":80},{"depth":47,"slug":476,"text":477},"rechtliche-compliance","Rechtliche Compliance",{"depth":51,"slug":479,"text":480},"dokumentation-und-chain-of-custody","Dokumentation und Chain of Custody",{"depth":51,"slug":482,"text":483},"familiengeräte-und-nachlässe","Familiengeräte und Nachlässe",{"depth":47,"slug":485,"text":486},"technische-best-practices","Technische Best Practices",{"depth":51,"slug":488,"text":489},"hash-integrität-sicherstellen","Hash-Integrität sicherstellen",{"depth":51,"slug":491,"text":492},"sichere-arbeitsumgebung","Sichere Arbeitsumgebung",{"depth":51,"slug":494,"text":495},"qualitätssicherung","Qualitätssicherung",{"depth":47,"slug":497,"text":498},"erfolgsmaximierung-nach-gerätehersteller","Erfolgsmaximierung nach Gerätehersteller",{"depth":51,"slug":500,"text":501},"mediatek-geräte-höchste-erfolgsrate","MediaTek-Geräte (Höchste Erfolgsrate)",{"depth":51,"slug":503,"text":504},"samsung-geräte","Samsung-Geräte",{"depth":51,"slug":506,"text":507},"pixelnexus-geräte","Pixel/Nexus-Geräte",{"depth":43,"slug":82,"text":83},{"depth":47,"slug":510,"text":511},"problem-adb-erkennt-gerät-nicht","Problem: ADB erkennt Gerät nicht",{"depth":51,"slug":513,"text":514},"lösung-usb-treiber-und-berechtigungen","Lösung: USB-Treiber und Berechtigungen",{"depth":51,"slug":516,"text":517},"windows-treiber-installation","Windows: Treiber-Installation",{"depth":47,"slug":519,"text":520},"problem-verschlüsselte-android-backups","Problem: Verschlüsselte Android Backups",{"depth":51,"slug":522,"text":523},"lösung-android-backup-extractor","Lösung: Android Backup Extractor",{"depth":47,"slug":525,"text":526},"problem-unzureichende-berechtigungen-für-datenextraktion","Problem: Unzureichende Berechtigungen für Datenextraktion",{"depth":51,"slug":528,"text":529},"lösung-alternative-extraktionsmethoden","Lösung: Alternative Extraktionsmethoden",{"depth":47,"slug":531,"text":532},"problem-aleapp-parsing-fehler","Problem: ALEAPP Parsing-Fehler",{"depth":51,"slug":534,"text":535},"lösung-datenformat-probleme-beheben","Lösung: Datenformat-Probleme beheben",{"depth":43,"slug":537,"text":538},"erweiterte-techniken","Erweiterte Techniken",{"depth":47,"slug":540,"text":541},"memory-forensics-mit-lime","Memory Forensics mit LiME",{"depth":51,"slug":543,"text":544},"lime-für-arm-devices-kompilieren","LiME für ARM-Devices kompilieren",{"depth":51,"slug":546,"text":547},"volatility-analyse-von-android-memory","Volatility-Analyse von Android Memory",{"depth":47,"slug":549,"text":550},"frida-basierte-runtime-analyse","FRIDA-basierte Runtime-Analyse",{"depth":51,"slug":552,"text":553},"frida-für-kryptographie-hooks","FRIDA für Kryptographie-Hooks",{"depth":51,"slug":555,"text":556},"frida-installation-und-verwendung","FRIDA Installation und Verwendung",{"depth":47,"slug":558,"text":559},"custom-recovery-und-fastboot-exploits","Custom Recovery und Fastboot-Exploits",{"depth":51,"slug":561,"text":562},"twrp-installation-für-forensischen-zugang","TWRP Installation für forensischen Zugang",{"depth":51,"slug":564,"text":565},"partitions-imaging-mit-dd","Partitions-Imaging mit dd",{"depth":47,"slug":567,"text":568},"sqlite-forensics-und-gelöschte-daten","SQLite Forensics und gelöschte Daten",{"depth":51,"slug":570,"text":571},"erweiterte-sqlite-analyse","Erweiterte SQLite-Analyse",{"depth":51,"slug":573,"text":574},"timeline-rekonstruktion","Timeline-Rekonstruktion",{"depth":47,"slug":576,"text":577},"weiterführende-ressourcen","Weiterführende Ressourcen",{"depth":51,"slug":579,"text":580},"dokumentation-und-standards","Dokumentation und Standards",{"depth":51,"slug":582,"text":583},"community-und-weiterbildung","Community und Weiterbildung",{"depth":51,"slug":585,"text":586},"spezialisierte-tools","Spezialisierte Tools",[],[],[],"android-logical-imaging.md"] \ No newline at end of file +[["Map",1,2,7,8],"meta::meta",["Map",3,4,5,6],"astro-version","5.12.6","astro-config-digest","{\"root\":{},\"srcDir\":{},\"publicDir\":{},\"outDir\":{},\"cacheDir\":{},\"compressHTML\":true,\"base\":\"/\",\"trailingSlash\":\"ignore\",\"output\":\"server\",\"scopedStyleStrategy\":\"attribute\",\"build\":{\"format\":\"directory\",\"client\":{},\"server\":{},\"assets\":\"_astro\",\"serverEntry\":\"entry.mjs\",\"redirects\":true,\"inlineStylesheets\":\"auto\",\"concurrency\":1},\"server\":{\"open\":false,\"host\":true,\"port\":4321,\"streaming\":true,\"allowedHosts\":[]},\"redirects\":{},\"image\":{\"endpoint\":{\"route\":\"/_image\",\"entrypoint\":\"astro/assets/endpoint/node\"},\"service\":{\"entrypoint\":\"astro/assets/services/sharp\",\"config\":{}},\"domains\":[],\"remotePatterns\":[],\"responsiveStyles\":false},\"devToolbar\":{\"enabled\":true},\"markdown\":{\"syntaxHighlight\":{\"type\":\"shiki\",\"excludeLangs\":[\"math\"]},\"shikiConfig\":{\"langs\":[],\"langAlias\":{},\"theme\":\"github-dark\",\"themes\":{},\"wrap\":false,\"transformers\":[]},\"remarkPlugins\":[],\"rehypePlugins\":[],\"remarkRehype\":{},\"gfm\":true,\"smartypants\":true},\"security\":{\"checkOrigin\":true},\"env\":{\"schema\":{},\"validateSecrets\":false},\"experimental\":{\"clientPrerender\":false,\"contentIntellisense\":false,\"headingIdCompat\":false,\"preserveScriptOrder\":false,\"liveContentCollections\":false,\"csp\":false,\"rawEnvValues\":false},\"legacy\":{\"collections\":false},\"session\":{\"driver\":\"fs-lite\",\"options\":{\"base\":\"/var/home/user01/Projekte/forensic-pathways/node_modules/.astro/sessions\"}}}","knowledgebase",["Map",9,10,100,101,174,175,223,224,288,289,535,536],"misp",{"id":9,"data":11,"body":35,"filePath":36,"digest":37,"rendered":38,"legacyId":99},{"title":12,"tool_name":13,"description":14,"last_updated":15,"author":16,"difficulty":17,"categories":18,"tags":24,"sections":31,"review_status":34},"MISP - Plattform für Threat Intelligence Sharing","MISP","Das Rückgrat des modernen Threat-Intelligence-Sharings mit über 40.000 aktiven Instanzen weltweit.",["Date","2025-07-20T00:00:00.000Z"],"Claude 4 Sonnet","intermediate",[19,20,21,22,23],"incident-response","static-investigations","malware-analysis","network-forensics","cloud-forensics",[25,26,27,28,29,30],"web-based","threat-intelligence","api","correlation","ioc-sharing","automation",{"overview":32,"installation":32,"configuration":32,"usage_examples":32,"best_practices":32,"troubleshooting":32,"advanced_topics":33},true,false,"published","> **⚠️ Hinweis**: Dies ist ein vorläufiger, KI-generierter Knowledgebase-Eintrag. Wir freuen uns über Verbesserungen und Ergänzungen durch die Community!\n\n\n# Übersicht\n\n**MISP (Malware Information Sharing Platform & Threat Sharing)** ist eine freie Open-Source-Plattform zur strukturierten Erfassung, Speicherung, Analyse und gemeinsamen Nutzung von Cyber-Bedrohungsdaten. Mit über 40.000 Instanzen weltweit ist MISP der De-facto-Standard für den Austausch von Indicators of Compromise (IoCs) und Threat Intelligence zwischen CERTs, SOCs, Strafverfolgungsbehörden und anderen sicherheitsrelevanten Organisationen.\n\nDie föderierte Architektur ermöglicht einen kontrollierten, dezentralen Austausch von Informationen über vertrauenswürdige Partner hinweg. Durch Taxonomien, Tags und integrierte APIs ist eine automatische Anreicherung, Korrelation und Verarbeitung von Informationen in SIEMs, Firewalls oder Endpoint-Lösungen möglich.\n\n## Installation\n\n### Voraussetzungen\n\n- **Server-Betriebssystem:** Linux (empfohlen: Debian/Ubuntu)\n- **Abhängigkeiten:** MariaDB/MySQL, PHP, Apache/Nginx, Redis\n- **Ressourcen:** Mindestens 4 GB RAM, SSD empfohlen\n\n### Installationsschritte\n\n```bash\n# Beispiel für Debian/Ubuntu:\nsudo apt update && sudo apt install -y curl gnupg git python3 python3-pip redis-server mariadb-server apache2 php libapache2-mod-php\n\n# MISP klonen\ngit clone https://github.com/MISP/MISP.git /var/www/MISP\n\n# Setup-Skript nutzen\ncd /var/www/MISP && bash INSTALL/INSTALL.debian.sh\n````\n\nWeitere Details: [Offizielle Installationsanleitung](https://misp.github.io/MISP/INSTALL.debian/)\n\n## Konfiguration\n\n### Webserver\n\n* HTTPS aktivieren (Let's Encrypt oder Reverse Proxy)\n* PHP-Konfiguration anpassen (`upload_max_filesize`, `memory_limit`, `post_max_size`)\n\n### Benutzerrollen\n\n* Administrator, Org-Admin, Analyst etc.\n* Zugriffsbeschränkungen nach Organisation/Feed definierbar\n\n### Feeds und Galaxies\n\n* Aktivierung von Feeds (z. B. CIRCL, Abuse.ch, OpenCTI)\n* Nutzung von Galaxies zur Klassifizierung (APT-Gruppen, Malware-Familien)\n\n## Verwendungsbeispiele\n\n### Beispiel 1: Import von IoCs aus externem Feed\n\n1. Feed aktivieren unter **Administration → List Feeds**\n2. Feed synchronisieren\n3. Ereignisse durchsuchen, analysieren, ggf. mit eigenen Daten korrelieren\n\n### Beispiel 2: Automatisierte Anbindung an SIEM\n\n* REST-API-Token erstellen\n* API-Calls zur Abfrage neuer Events (z. B. mit Python, Logstash oder MISP Workbench)\n* Integration in Security-Systeme über JSON/STIX export\n\n## Best Practices\n\n* Regelmäßige Backups der Datenbank\n* Taxonomien konsistent verwenden\n* Nutzung der Sighting-Funktion zur Validierung von IoCs\n* Vertrauensstufen (TLP, PAP) korrekt setzen\n* Nicht nur konsumieren – auch teilen!\n\n## Troubleshooting\n\n### Problem: MISP-Feeds laden nicht\n\n**Lösung:**\n\n* Internetverbindung prüfen\n* Cronjobs aktiv?\n* Logs prüfen: `/var/www/MISP/app/tmp/logs/error.log`\n\n### Problem: API gibt 403 zurück\n\n**Lösung:**\n\n* Ist der API-Key korrekt und aktiv?\n* Rechte des Benutzers überprüfen\n* IP-Filter im MISP-Backend beachten\n\n### Problem: Hohe Datenbanklast\n\n**Lösung:**\n\n* Indizes optimieren\n* Redis aktivieren\n* Alte Events regelmäßig archivieren oder löschen\n\n## Weiterführende Themen\n\n* STIX2-Import/Export\n* Erweiterungen mit MISP Modules (z. B. für Virustotal, YARA)\n* Föderierte Netzwerke und Community-Portale\n* Integration mit OpenCTI oder TheHive\n\n---\n\n**Links:**\n\n* 🌐 [Offizielle Projektseite](https://misp-project.org/)\n* 📦 [CC24-MISP-Instanz](https://misp.cc24.dev)\n* 📊 [Status-Monitoring](https://status.mikoshi.de/api/badge/34/status)\n\nLizenz: **AGPL-3.0**","src/content/knowledgebase/misp.md","35930fa919a46964",{"html":39,"metadata":40},"\u003Cblockquote>\n\u003Cp>\u003Cstrong>⚠️ Hinweis\u003C/strong>: Dies ist ein vorläufiger, KI-generierter Knowledgebase-Eintrag. Wir freuen uns über Verbesserungen und Ergänzungen durch die Community!\u003C/p>\n\u003C/blockquote>\n\u003Ch1 id=\"übersicht\">Übersicht\u003C/h1>\n\u003Cp>\u003Cstrong>MISP (Malware Information Sharing Platform & Threat Sharing)\u003C/strong> ist eine freie Open-Source-Plattform zur strukturierten Erfassung, Speicherung, Analyse und gemeinsamen Nutzung von Cyber-Bedrohungsdaten. Mit über 40.000 Instanzen weltweit ist MISP der De-facto-Standard für den Austausch von Indicators of Compromise (IoCs) und Threat Intelligence zwischen CERTs, SOCs, Strafverfolgungsbehörden und anderen sicherheitsrelevanten Organisationen.\u003C/p>\n\u003Cp>Die föderierte Architektur ermöglicht einen kontrollierten, dezentralen Austausch von Informationen über vertrauenswürdige Partner hinweg. Durch Taxonomien, Tags und integrierte APIs ist eine automatische Anreicherung, Korrelation und Verarbeitung von Informationen in SIEMs, Firewalls oder Endpoint-Lösungen möglich.\u003C/p>\n\u003Ch2 id=\"installation\">Installation\u003C/h2>\n\u003Ch3 id=\"voraussetzungen\">Voraussetzungen\u003C/h3>\n\u003Cul>\n\u003Cli>\u003Cstrong>Server-Betriebssystem:\u003C/strong> Linux (empfohlen: Debian/Ubuntu)\u003C/li>\n\u003Cli>\u003Cstrong>Abhängigkeiten:\u003C/strong> MariaDB/MySQL, PHP, Apache/Nginx, Redis\u003C/li>\n\u003Cli>\u003Cstrong>Ressourcen:\u003C/strong> Mindestens 4 GB RAM, SSD empfohlen\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"installationsschritte\">Installationsschritte\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Beispiel für Debian/Ubuntu:\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apt\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> update\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> && \u003C/span>\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apt\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> install\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -y\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> curl\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> gnupg\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> git\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> python3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> python3-pip\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> redis-server\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> mariadb-server\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apache2\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> php\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> libapache2-mod-php\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># MISP klonen\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">git\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> clone\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> https://github.com/MISP/MISP.git\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /var/www/MISP\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Setup-Skript nutzen\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">cd\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /var/www/MISP\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> && \u003C/span>\u003Cspan style=\"color:#B392F0\">bash\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> INSTALL/INSTALL.debian.sh\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Cp>Weitere Details: \u003Ca href=\"https://misp.github.io/MISP/INSTALL.debian/\">Offizielle Installationsanleitung\u003C/a>\u003C/p>\n\u003Ch2 id=\"konfiguration\">Konfiguration\u003C/h2>\n\u003Ch3 id=\"webserver\">Webserver\u003C/h3>\n\u003Cul>\n\u003Cli>HTTPS aktivieren (Let’s Encrypt oder Reverse Proxy)\u003C/li>\n\u003Cli>PHP-Konfiguration anpassen (\u003Ccode>upload_max_filesize\u003C/code>, \u003Ccode>memory_limit\u003C/code>, \u003Ccode>post_max_size\u003C/code>)\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"benutzerrollen\">Benutzerrollen\u003C/h3>\n\u003Cul>\n\u003Cli>Administrator, Org-Admin, Analyst etc.\u003C/li>\n\u003Cli>Zugriffsbeschränkungen nach Organisation/Feed definierbar\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"feeds-und-galaxies\">Feeds und Galaxies\u003C/h3>\n\u003Cul>\n\u003Cli>Aktivierung von Feeds (z. B. CIRCL, Abuse.ch, OpenCTI)\u003C/li>\n\u003Cli>Nutzung von Galaxies zur Klassifizierung (APT-Gruppen, Malware-Familien)\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"verwendungsbeispiele\">Verwendungsbeispiele\u003C/h2>\n\u003Ch3 id=\"beispiel-1-import-von-iocs-aus-externem-feed\">Beispiel 1: Import von IoCs aus externem Feed\u003C/h3>\n\u003Col>\n\u003Cli>Feed aktivieren unter \u003Cstrong>Administration → List Feeds\u003C/strong>\u003C/li>\n\u003Cli>Feed synchronisieren\u003C/li>\n\u003Cli>Ereignisse durchsuchen, analysieren, ggf. mit eigenen Daten korrelieren\u003C/li>\n\u003C/ol>\n\u003Ch3 id=\"beispiel-2-automatisierte-anbindung-an-siem\">Beispiel 2: Automatisierte Anbindung an SIEM\u003C/h3>\n\u003Cul>\n\u003Cli>REST-API-Token erstellen\u003C/li>\n\u003Cli>API-Calls zur Abfrage neuer Events (z. B. mit Python, Logstash oder MISP Workbench)\u003C/li>\n\u003Cli>Integration in Security-Systeme über JSON/STIX export\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"best-practices\">Best Practices\u003C/h2>\n\u003Cul>\n\u003Cli>Regelmäßige Backups der Datenbank\u003C/li>\n\u003Cli>Taxonomien konsistent verwenden\u003C/li>\n\u003Cli>Nutzung der Sighting-Funktion zur Validierung von IoCs\u003C/li>\n\u003Cli>Vertrauensstufen (TLP, PAP) korrekt setzen\u003C/li>\n\u003Cli>Nicht nur konsumieren – auch teilen!\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"troubleshooting\">Troubleshooting\u003C/h2>\n\u003Ch3 id=\"problem-misp-feeds-laden-nicht\">Problem: MISP-Feeds laden nicht\u003C/h3>\n\u003Cp>\u003Cstrong>Lösung:\u003C/strong>\u003C/p>\n\u003Cul>\n\u003Cli>Internetverbindung prüfen\u003C/li>\n\u003Cli>Cronjobs aktiv?\u003C/li>\n\u003Cli>Logs prüfen: \u003Ccode>/var/www/MISP/app/tmp/logs/error.log\u003C/code>\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"problem-api-gibt-403-zurück\">Problem: API gibt 403 zurück\u003C/h3>\n\u003Cp>\u003Cstrong>Lösung:\u003C/strong>\u003C/p>\n\u003Cul>\n\u003Cli>Ist der API-Key korrekt und aktiv?\u003C/li>\n\u003Cli>Rechte des Benutzers überprüfen\u003C/li>\n\u003Cli>IP-Filter im MISP-Backend beachten\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"problem-hohe-datenbanklast\">Problem: Hohe Datenbanklast\u003C/h3>\n\u003Cp>\u003Cstrong>Lösung:\u003C/strong>\u003C/p>\n\u003Cul>\n\u003Cli>Indizes optimieren\u003C/li>\n\u003Cli>Redis aktivieren\u003C/li>\n\u003Cli>Alte Events regelmäßig archivieren oder löschen\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"weiterführende-themen\">Weiterführende Themen\u003C/h2>\n\u003Cul>\n\u003Cli>STIX2-Import/Export\u003C/li>\n\u003Cli>Erweiterungen mit MISP Modules (z. B. für Virustotal, YARA)\u003C/li>\n\u003Cli>Föderierte Netzwerke und Community-Portale\u003C/li>\n\u003Cli>Integration mit OpenCTI oder TheHive\u003C/li>\n\u003C/ul>\n\u003Chr>\n\u003Cp>\u003Cstrong>Links:\u003C/strong>\u003C/p>\n\u003Cul>\n\u003Cli>🌐 \u003Ca href=\"https://misp-project.org/\">Offizielle Projektseite\u003C/a>\u003C/li>\n\u003Cli>📦 \u003Ca href=\"https://misp.cc24.dev\">CC24-MISP-Instanz\u003C/a>\u003C/li>\n\u003Cli>📊 \u003Ca href=\"https://status.mikoshi.de/api/badge/34/status\">Status-Monitoring\u003C/a>\u003C/li>\n\u003C/ul>\n\u003Cp>Lizenz: \u003Cstrong>AGPL-3.0\u003C/strong>\u003C/p>",{"headings":41,"localImagePaths":96,"remoteImagePaths":97,"frontmatter":11,"imagePaths":98},[42,46,50,54,57,60,63,66,69,72,75,78,81,84,87,90,93],{"depth":43,"slug":44,"text":45},1,"übersicht","Übersicht",{"depth":47,"slug":48,"text":49},2,"installation","Installation",{"depth":51,"slug":52,"text":53},3,"voraussetzungen","Voraussetzungen",{"depth":51,"slug":55,"text":56},"installationsschritte","Installationsschritte",{"depth":47,"slug":58,"text":59},"konfiguration","Konfiguration",{"depth":51,"slug":61,"text":62},"webserver","Webserver",{"depth":51,"slug":64,"text":65},"benutzerrollen","Benutzerrollen",{"depth":51,"slug":67,"text":68},"feeds-und-galaxies","Feeds und Galaxies",{"depth":47,"slug":70,"text":71},"verwendungsbeispiele","Verwendungsbeispiele",{"depth":51,"slug":73,"text":74},"beispiel-1-import-von-iocs-aus-externem-feed","Beispiel 1: Import von IoCs aus externem Feed",{"depth":51,"slug":76,"text":77},"beispiel-2-automatisierte-anbindung-an-siem","Beispiel 2: Automatisierte Anbindung an SIEM",{"depth":47,"slug":79,"text":80},"best-practices","Best Practices",{"depth":47,"slug":82,"text":83},"troubleshooting","Troubleshooting",{"depth":51,"slug":85,"text":86},"problem-misp-feeds-laden-nicht","Problem: MISP-Feeds laden nicht",{"depth":51,"slug":88,"text":89},"problem-api-gibt-403-zurück","Problem: API gibt 403 zurück",{"depth":51,"slug":91,"text":92},"problem-hohe-datenbanklast","Problem: Hohe Datenbanklast",{"depth":47,"slug":94,"text":95},"weiterführende-themen","Weiterführende Themen",[],[],[],"misp.md","kali-linux",{"id":100,"data":102,"body":117,"filePath":118,"digest":119,"rendered":120,"legacyId":173},{"title":103,"tool_name":104,"description":105,"last_updated":106,"author":16,"difficulty":17,"categories":107,"tags":110,"sections":116,"review_status":34},"Kali Linux - Die Hacker-Distribution für Forensik & Penetration Testing","Kali Linux","Leitfaden zur Installation, Nutzung und Best Practices für Kali Linux – die All-in-One-Plattform für Security-Profis.",["Date","2025-07-20T00:00:00.000Z"],[19,108,109],"forensics","penetration-testing",[111,112,109,113,114,115],"live-boot","tool-collection","forensics-suite","virtualization","arm-support",{"overview":32,"installation":32,"configuration":32,"usage_examples":32,"best_practices":32,"troubleshooting":32,"advanced_topics":32},"> **⚠️ Hinweis**: Dies ist ein vorläufiger, KI-generierter Knowledgebase-Eintrag. Wir freuen uns über Verbesserungen und Ergänzungen durch die Community!\n\n\n# Übersicht\n\nKali Linux ist eine auf Debian basierende Linux-Distribution, die speziell für Penetration Testing, digitale Forensik, Reverse Engineering und Incident Response entwickelt wurde. Mit über 600 vorinstallierten Tools ist sie ein unverzichtbares Werkzeug für Security-Experten, Ermittler und forensische Analysten. Die Live-Boot-Funktion erlaubt es, Systeme ohne Spuren zu hinterlassen zu analysieren – ideal für forensische Untersuchungen.\n\n## Installation\n\n### Option 1: Live-System (USB/DVD)\n\n1. ISO-Image von [kali.org](https://www.kali.org/get-kali/) herunterladen.\n2. Mit **Rufus** oder **balenaEtcher** auf einen USB-Stick schreiben.\n3. Vom USB-Stick booten (ggf. Boot-Reihenfolge im BIOS anpassen).\n4. Kali kann direkt ohne Installation im Live-Modus verwendet werden.\n\n### Option 2: Installation auf Festplatte\n\n1. ISO-Image booten und **Graphical Install** wählen.\n2. Schritt-für-Schritt durch den Installationsassistenten navigieren:\n - Sprache, Zeitzone und Tastaturlayout auswählen\n - Partitionierung konfigurieren (automatisch oder manuell)\n - Benutzerkonten erstellen\n3. Nach Installation Neustart durchführen.\n\n### Option 3: Virtuelle Maschine (VM)\n\n- Offizielle VM-Images für VirtualBox und VMware von der [Kali-Website](https://www.kali.org/get-kali/#kali-virtual-machines)\n- Importieren, ggf. Netzwerkbrücke und Shared Folders aktivieren\n\n## Konfiguration\n\n### Netzwerkeinstellungen\n\n- Konfiguration über `nmtui` oder `/etc/network/interfaces`\n- VPN und Proxy-Integration über GUI oder Terminal\n\n### Updates & Paketquellen\n\n```bash\nsudo apt update && sudo apt full-upgrade\n````\n\n> Hinweis: `kali-rolling` ist die Standard-Distribution für kontinuierliche Updates.\n\n### Sprache & Lokalisierung\n\n```bash\nsudo dpkg-reconfigure locales\nsudo dpkg-reconfigure keyboard-configuration\n```\n\n## Verwendungsbeispiele\n\n### 1. Netzwerkscan mit Nmap\n\n```bash\nnmap -sS -T4 -A 192.168.1.0/24\n```\n\n### 2. Passwort-Cracking mit John the Ripper\n\n```bash\njohn --wordlist=/usr/share/wordlists/rockyou.txt hashes.txt\n```\n\n### 3. Forensik mit Autopsy\n\n```bash\nautopsy &\n```\n\n### 4. Android-Analyse mit MobSF (in Docker)\n\n```bash\ndocker pull opensecurity/mobile-security-framework-mobsf\ndocker run -it -p 8000:8000 mobsf\n```\n\n## Best Practices\n\n* Nutze immer **aktuelle Snapshots** oder VM-Clones vor gefährlichen Tests\n* Verwende separate Netzwerke (z. B. Host-only oder NAT) für Tests\n* Deaktiviere automatisches WLAN bei forensischen Analysen\n* Prüfe und aktualisiere regelmäßig Toolsets (`apt`, `git`, `pip`)\n* Halte deine ISO-Images versioniert für forensische Reproduzierbarkeit\n\n## Troubleshooting\n\n### Problem: Keine Internetverbindung nach Installation\n\n**Lösung:** Netzwerkadapter prüfen, ggf. mit `ifconfig` oder `ip a` überprüfen, DHCP aktivieren.\n\n### Problem: Tools fehlen nach Update\n\n**Lösung:** Tool-Gruppen wie `kali-linux-default` manuell nachinstallieren:\n\n```bash\nsudo apt install kali-linux-default\n```\n\n### Problem: „Permission Denied“ bei Tools\n\n**Lösung:** Root-Rechte nutzen oder mit `sudo` ausführen.\n\n## Weiterführende Themen\n\n* **Kustomisierung von Kali ISOs** mit `live-build`\n* **NetHunter**: Kali für mobile Geräte (Android)\n* **Kali Purple**: Defensive Security Suite\n* Integration mit **Cloud-Infrastrukturen** via WSL oder Azure\n\n---\n\n**Links & Ressourcen:**\n\n* Offizielle Website: [https://kali.org](https://kali.org/)\n* Dokumentation: [https://docs.kali.org/](https://docs.kali.org/)\n* GitLab Repo: [https://gitlab.com/kalilinux](https://gitlab.com/kalilinux)\n* Discord-Community: [https://discord.com/invite/kali-linux](https://discord.com/invite/kali-linux)","src/content/knowledgebase/kali-linux.md","09243ebc79d75dbc",{"html":121,"metadata":122},"\u003Cblockquote>\n\u003Cp>\u003Cstrong>⚠️ Hinweis\u003C/strong>: Dies ist ein vorläufiger, KI-generierter Knowledgebase-Eintrag. Wir freuen uns über Verbesserungen und Ergänzungen durch die Community!\u003C/p>\n\u003C/blockquote>\n\u003Ch1 id=\"übersicht\">Übersicht\u003C/h1>\n\u003Cp>Kali Linux ist eine auf Debian basierende Linux-Distribution, die speziell für Penetration Testing, digitale Forensik, Reverse Engineering und Incident Response entwickelt wurde. Mit über 600 vorinstallierten Tools ist sie ein unverzichtbares Werkzeug für Security-Experten, Ermittler und forensische Analysten. Die Live-Boot-Funktion erlaubt es, Systeme ohne Spuren zu hinterlassen zu analysieren – ideal für forensische Untersuchungen.\u003C/p>\n\u003Ch2 id=\"installation\">Installation\u003C/h2>\n\u003Ch3 id=\"option-1-live-system-usbdvd\">Option 1: Live-System (USB/DVD)\u003C/h3>\n\u003Col>\n\u003Cli>ISO-Image von \u003Ca href=\"https://www.kali.org/get-kali/\">kali.org\u003C/a> herunterladen.\u003C/li>\n\u003Cli>Mit \u003Cstrong>Rufus\u003C/strong> oder \u003Cstrong>balenaEtcher\u003C/strong> auf einen USB-Stick schreiben.\u003C/li>\n\u003Cli>Vom USB-Stick booten (ggf. Boot-Reihenfolge im BIOS anpassen).\u003C/li>\n\u003Cli>Kali kann direkt ohne Installation im Live-Modus verwendet werden.\u003C/li>\n\u003C/ol>\n\u003Ch3 id=\"option-2-installation-auf-festplatte\">Option 2: Installation auf Festplatte\u003C/h3>\n\u003Col>\n\u003Cli>ISO-Image booten und \u003Cstrong>Graphical Install\u003C/strong> wählen.\u003C/li>\n\u003Cli>Schritt-für-Schritt durch den Installationsassistenten navigieren:\n\u003Cul>\n\u003Cli>Sprache, Zeitzone und Tastaturlayout auswählen\u003C/li>\n\u003Cli>Partitionierung konfigurieren (automatisch oder manuell)\u003C/li>\n\u003Cli>Benutzerkonten erstellen\u003C/li>\n\u003C/ul>\n\u003C/li>\n\u003Cli>Nach Installation Neustart durchführen.\u003C/li>\n\u003C/ol>\n\u003Ch3 id=\"option-3-virtuelle-maschine-vm\">Option 3: Virtuelle Maschine (VM)\u003C/h3>\n\u003Cul>\n\u003Cli>Offizielle VM-Images für VirtualBox und VMware von der \u003Ca href=\"https://www.kali.org/get-kali/#kali-virtual-machines\">Kali-Website\u003C/a>\u003C/li>\n\u003Cli>Importieren, ggf. Netzwerkbrücke und Shared Folders aktivieren\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"konfiguration\">Konfiguration\u003C/h2>\n\u003Ch3 id=\"netzwerkeinstellungen\">Netzwerkeinstellungen\u003C/h3>\n\u003Cul>\n\u003Cli>Konfiguration über \u003Ccode>nmtui\u003C/code> oder \u003Ccode>/etc/network/interfaces\u003C/code>\u003C/li>\n\u003Cli>VPN und Proxy-Integration über GUI oder Terminal\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"updates--paketquellen\">Updates & Paketquellen\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apt\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> update\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> && \u003C/span>\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apt\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> full-upgrade\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Cblockquote>\n\u003Cp>Hinweis: \u003Ccode>kali-rolling\u003C/code> ist die Standard-Distribution für kontinuierliche Updates.\u003C/p>\n\u003C/blockquote>\n\u003Ch3 id=\"sprache--lokalisierung\">Sprache & Lokalisierung\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> dpkg-reconfigure\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> locales\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> dpkg-reconfigure\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> keyboard-configuration\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"verwendungsbeispiele\">Verwendungsbeispiele\u003C/h2>\n\u003Ch3 id=\"1-netzwerkscan-mit-nmap\">1. Netzwerkscan mit Nmap\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">nmap\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -sS\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -T4\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -A\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> 192.168.1.0/24\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"2-passwort-cracking-mit-john-the-ripper\">2. Passwort-Cracking mit John the Ripper\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">john\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --wordlist=/usr/share/wordlists/rockyou.txt\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> hashes.txt\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"3-forensik-mit-autopsy\">3. Forensik mit Autopsy\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">autopsy\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> &\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"4-android-analyse-mit-mobsf-in-docker\">4. Android-Analyse mit MobSF (in Docker)\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">docker\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> pull\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> opensecurity/mobile-security-framework-mobsf\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">docker\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> run\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -it\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -p\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> 8000:8000\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> mobsf\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"best-practices\">Best Practices\u003C/h2>\n\u003Cul>\n\u003Cli>Nutze immer \u003Cstrong>aktuelle Snapshots\u003C/strong> oder VM-Clones vor gefährlichen Tests\u003C/li>\n\u003Cli>Verwende separate Netzwerke (z. B. Host-only oder NAT) für Tests\u003C/li>\n\u003Cli>Deaktiviere automatisches WLAN bei forensischen Analysen\u003C/li>\n\u003Cli>Prüfe und aktualisiere regelmäßig Toolsets (\u003Ccode>apt\u003C/code>, \u003Ccode>git\u003C/code>, \u003Ccode>pip\u003C/code>)\u003C/li>\n\u003Cli>Halte deine ISO-Images versioniert für forensische Reproduzierbarkeit\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"troubleshooting\">Troubleshooting\u003C/h2>\n\u003Ch3 id=\"problem-keine-internetverbindung-nach-installation\">Problem: Keine Internetverbindung nach Installation\u003C/h3>\n\u003Cp>\u003Cstrong>Lösung:\u003C/strong> Netzwerkadapter prüfen, ggf. mit \u003Ccode>ifconfig\u003C/code> oder \u003Ccode>ip a\u003C/code> überprüfen, DHCP aktivieren.\u003C/p>\n\u003Ch3 id=\"problem-tools-fehlen-nach-update\">Problem: Tools fehlen nach Update\u003C/h3>\n\u003Cp>\u003Cstrong>Lösung:\u003C/strong> Tool-Gruppen wie \u003Ccode>kali-linux-default\u003C/code> manuell nachinstallieren:\u003C/p>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apt\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> install\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> kali-linux-default\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"problem-permission-denied-bei-tools\">Problem: „Permission Denied“ bei Tools\u003C/h3>\n\u003Cp>\u003Cstrong>Lösung:\u003C/strong> Root-Rechte nutzen oder mit \u003Ccode>sudo\u003C/code> ausführen.\u003C/p>\n\u003Ch2 id=\"weiterführende-themen\">Weiterführende Themen\u003C/h2>\n\u003Cul>\n\u003Cli>\u003Cstrong>Kustomisierung von Kali ISOs\u003C/strong> mit \u003Ccode>live-build\u003C/code>\u003C/li>\n\u003Cli>\u003Cstrong>NetHunter\u003C/strong>: Kali für mobile Geräte (Android)\u003C/li>\n\u003Cli>\u003Cstrong>Kali Purple\u003C/strong>: Defensive Security Suite\u003C/li>\n\u003Cli>Integration mit \u003Cstrong>Cloud-Infrastrukturen\u003C/strong> via WSL oder Azure\u003C/li>\n\u003C/ul>\n\u003Chr>\n\u003Cp>\u003Cstrong>Links & Ressourcen:\u003C/strong>\u003C/p>\n\u003Cul>\n\u003Cli>Offizielle Website: \u003Ca href=\"https://kali.org/\">https://kali.org\u003C/a>\u003C/li>\n\u003Cli>Dokumentation: \u003Ca href=\"https://docs.kali.org/\">https://docs.kali.org/\u003C/a>\u003C/li>\n\u003Cli>GitLab Repo: \u003Ca href=\"https://gitlab.com/kalilinux\">https://gitlab.com/kalilinux\u003C/a>\u003C/li>\n\u003Cli>Discord-Community: \u003Ca href=\"https://discord.com/invite/kali-linux\">https://discord.com/invite/kali-linux\u003C/a>\u003C/li>\n\u003C/ul>",{"headings":123,"localImagePaths":170,"remoteImagePaths":171,"frontmatter":102,"imagePaths":172},[124,125,126,129,132,135,136,139,142,145,146,149,152,155,158,159,160,163,166,169],{"depth":43,"slug":44,"text":45},{"depth":47,"slug":48,"text":49},{"depth":51,"slug":127,"text":128},"option-1-live-system-usbdvd","Option 1: Live-System (USB/DVD)",{"depth":51,"slug":130,"text":131},"option-2-installation-auf-festplatte","Option 2: Installation auf Festplatte",{"depth":51,"slug":133,"text":134},"option-3-virtuelle-maschine-vm","Option 3: Virtuelle Maschine (VM)",{"depth":47,"slug":58,"text":59},{"depth":51,"slug":137,"text":138},"netzwerkeinstellungen","Netzwerkeinstellungen",{"depth":51,"slug":140,"text":141},"updates--paketquellen","Updates & Paketquellen",{"depth":51,"slug":143,"text":144},"sprache--lokalisierung","Sprache & Lokalisierung",{"depth":47,"slug":70,"text":71},{"depth":51,"slug":147,"text":148},"1-netzwerkscan-mit-nmap","1. Netzwerkscan mit Nmap",{"depth":51,"slug":150,"text":151},"2-passwort-cracking-mit-john-the-ripper","2. Passwort-Cracking mit John the Ripper",{"depth":51,"slug":153,"text":154},"3-forensik-mit-autopsy","3. Forensik mit Autopsy",{"depth":51,"slug":156,"text":157},"4-android-analyse-mit-mobsf-in-docker","4. Android-Analyse mit MobSF (in Docker)",{"depth":47,"slug":79,"text":80},{"depth":47,"slug":82,"text":83},{"depth":51,"slug":161,"text":162},"problem-keine-internetverbindung-nach-installation","Problem: Keine Internetverbindung nach Installation",{"depth":51,"slug":164,"text":165},"problem-tools-fehlen-nach-update","Problem: Tools fehlen nach Update",{"depth":51,"slug":167,"text":168},"problem-permission-denied-bei-tools","Problem: „Permission Denied“ bei Tools",{"depth":47,"slug":94,"text":95},[],[],[],"kali-linux.md","regular-expressions-regex",{"id":174,"data":176,"body":190,"filePath":191,"digest":192,"rendered":193,"legacyId":222},{"title":177,"tool_name":178,"description":179,"last_updated":180,"author":16,"difficulty":17,"categories":181,"tags":183,"sections":189,"review_status":34},"Regular Expressions (Regex) – Musterbasierte Textanalyse","Regular Expressions (Regex)","Pattern matching language für Suche, Extraktion und Manipulation von Text in forensischen Analysen.",["Date","2025-07-20T00:00:00.000Z"],[19,21,22,182],"fraud-investigation",[184,185,186,187,188],"pattern-matching","text-processing","log-analysis","string-manipulation","search-algorithms",{"overview":32,"installation":33,"configuration":33,"usage_examples":32,"best_practices":32,"troubleshooting":33,"advanced_topics":32},"> **⚠️ Hinweis**: Dies ist ein vorläufiger, KI-generierter Knowledgebase-Eintrag. Wir freuen uns über Verbesserungen und Ergänzungen durch die Community!\n\n\n# Übersicht\n\n**Regular Expressions (Regex)** sind ein leistungsfähiges Werkzeug zur Erkennung, Extraktion und Transformation von Zeichenfolgen anhand vordefinierter Muster. In der digitalen Forensik sind Regex-Ausdrücke unverzichtbar: Sie helfen beim Auffinden von IP-Adressen, Hash-Werten, Dateipfaden, Malware-Signaturen oder Kreditkartennummern in großen Mengen unstrukturierter Daten wie Logdateien, Netzwerktraces oder Memory Dumps.\n\nRegex ist nicht auf eine bestimmte Plattform oder Software beschränkt – es wird in nahezu allen gängigen Programmiersprachen, Texteditoren und forensischen Tools unterstützt.\n\n## Verwendungsbeispiele\n\n### 1. IP-Adressen extrahieren\n\n```regex\n\\b(?:\\d{1,3}\\.){3}\\d{1,3}\\b\n````\n\nVerwendung:\n\n* Finden von IP-Adressen in Firewall-Logs oder Packet Captures.\n* Beispiel-Zeile:\n\n ```\n Connection from 192.168.1.101 to port 443 established\n ```\n\n### 2. E-Mail-Adressen identifizieren\n\n```regex\n[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}\n```\n\nVerwendung:\n\n* Erkennung von kompromittierten Accounts in Phishing-E-Mails.\n* Analyse von Useraktivitäten oder Kommunikationsverläufen.\n\n### 3. Hash-Werte erkennen (z. B. SHA-256)\n\n```regex\n\\b[A-Fa-f0-9]{64}\\b\n```\n\nVerwendung:\n\n* Extraktion von Malware-Hashes aus Memory Dumps oder YARA-Logs.\n\n### 4. Zeitstempel in Logdateien extrahieren\n\n```regex\n\\d{4}-\\d{2}-\\d{2}[ T]\\d{2}:\\d{2}:\\d{2}\n```\n\nVerwendung:\n\n* Zeitsensitive Korrelationsanalysen (z. B. bei Intrusion Detection oder Timeline-Rekonstruktionen).\n\n## Best Practices\n\n* **Regex testen**: Nutze Plattformen wie [regexr.com](https://regexr.com/) oder [regex101.com](https://regex101.com/) zur Validierung.\n* **Performance beachten**: Komplexe Ausdrücke können ineffizient sein und Systeme verlangsamen – verwende Lazy Quantifiers (`*?`, `+?`) bei Bedarf.\n* **Escape-Zeichen korrekt anwenden**: Spezielle Zeichen wie `.` oder `\\` müssen bei Bedarf mit `\\\\` oder `\\.` maskiert werden.\n* **Portabilität prüfen**: Unterschiedliche Regex-Engines (z. B. Python `re`, PCRE, JavaScript) interpretieren manche Syntax leicht unterschiedlich.\n* **Lesbarkeit fördern**: Verwende benannte Gruppen (`(?P\u003Cname>...)`) und Kommentare (`(?x)`), um reguläre Ausdrücke besser wartbar zu machen.\n\n## Weiterführende Themen\n\n### Lookaheads und Lookbehinds\n\nMit **Lookaheads** (`(?=...)`) und **Lookbehinds** (`(?\u003C=...)`) können Bedingungen formuliert werden, ohne dass der Text Teil des Matchs wird.\n\nBeispiel: Alle `.exe`-Dateinamen **ohne** das Wort `safe` davor matchen:\n\n```regex\n(?\u003C!safe\\s)[\\w-]+\\.exe\n```\n\n### Regex in Forensik-Tools\n\n* **YARA**: Unterstützt Regex zur Erstellung von Malware-Signaturen.\n* **Wireshark**: Filtert Payloads anhand von Regex-ähnlicher Syntax.\n* **Splunk & ELK**: Verwenden Regex für Logparsing und Visualisierung.\n* **Volatility Plugins**: Extrahieren Artefakte mit Regex-basierten Scans.\n\n---\n\n> 🔤 **Regex ist ein universelles Werkzeug für Analysten, Ermittler und Entwickler, um versteckte Informationen schnell und flexibel aufzuspüren.**\n>\n> Nutze es überall dort, wo Textdaten eine Rolle spielen.","src/content/knowledgebase/regular-expressions-regex.md","247bcf48ebdc9ba0",{"html":194,"metadata":195},"\u003Cblockquote>\n\u003Cp>\u003Cstrong>⚠️ Hinweis\u003C/strong>: Dies ist ein vorläufiger, KI-generierter Knowledgebase-Eintrag. Wir freuen uns über Verbesserungen und Ergänzungen durch die Community!\u003C/p>\n\u003C/blockquote>\n\u003Ch1 id=\"übersicht\">Übersicht\u003C/h1>\n\u003Cp>\u003Cstrong>Regular Expressions (Regex)\u003C/strong> sind ein leistungsfähiges Werkzeug zur Erkennung, Extraktion und Transformation von Zeichenfolgen anhand vordefinierter Muster. In der digitalen Forensik sind Regex-Ausdrücke unverzichtbar: Sie helfen beim Auffinden von IP-Adressen, Hash-Werten, Dateipfaden, Malware-Signaturen oder Kreditkartennummern in großen Mengen unstrukturierter Daten wie Logdateien, Netzwerktraces oder Memory Dumps.\u003C/p>\n\u003Cp>Regex ist nicht auf eine bestimmte Plattform oder Software beschränkt – es wird in nahezu allen gängigen Programmiersprachen, Texteditoren und forensischen Tools unterstützt.\u003C/p>\n\u003Ch2 id=\"verwendungsbeispiele\">Verwendungsbeispiele\u003C/h2>\n\u003Ch3 id=\"1-ip-adressen-extrahieren\">1. IP-Adressen extrahieren\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"regex\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">\\b(?:\\d\u003C/span>\u003Cspan style=\"color:#F97583\">{1,3}\u003C/span>\u003Cspan style=\"color:#79B8FF\">\\.)\u003C/span>\u003Cspan style=\"color:#F97583\">{3}\u003C/span>\u003Cspan style=\"color:#79B8FF\">\\d\u003C/span>\u003Cspan style=\"color:#F97583\">{1,3}\u003C/span>\u003Cspan style=\"color:#79B8FF\">\\b\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Cp>Verwendung:\u003C/p>\n\u003Cul>\n\u003Cli>\n\u003Cp>Finden von IP-Adressen in Firewall-Logs oder Packet Captures.\u003C/p>\n\u003C/li>\n\u003Cli>\n\u003Cp>Beispiel-Zeile:\u003C/p>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"plaintext\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan>Connection from 192.168.1.101 to port 443 established\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"2-e-mail-adressen-identifizieren\">2. E-Mail-Adressen identifizieren\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"regex\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">[a-zA-Z0-9._%+-]\u003C/span>\u003Cspan style=\"color:#F97583\">+\u003C/span>\u003Cspan style=\"color:#DBEDFF\">@\u003C/span>\u003Cspan style=\"color:#79B8FF\">[a-zA-Z0-9.-]\u003C/span>\u003Cspan style=\"color:#F97583\">+\u003C/span>\u003Cspan style=\"color:#79B8FF\">\\.[a-zA-Z]\u003C/span>\u003Cspan style=\"color:#F97583\">{2,}\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Cp>Verwendung:\u003C/p>\n\u003Cul>\n\u003Cli>Erkennung von kompromittierten Accounts in Phishing-E-Mails.\u003C/li>\n\u003Cli>Analyse von Useraktivitäten oder Kommunikationsverläufen.\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"3-hash-werte-erkennen-zb-sha-256\">3. Hash-Werte erkennen (z. B. SHA-256)\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"regex\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">\\b[A-Fa-f0-9]\u003C/span>\u003Cspan style=\"color:#F97583\">{64}\u003C/span>\u003Cspan style=\"color:#79B8FF\">\\b\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Cp>Verwendung:\u003C/p>\n\u003Cul>\n\u003Cli>Extraktion von Malware-Hashes aus Memory Dumps oder YARA-Logs.\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"4-zeitstempel-in-logdateien-extrahieren\">4. Zeitstempel in Logdateien extrahieren\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"regex\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">\\d\u003C/span>\u003Cspan style=\"color:#F97583\">{4}\u003C/span>\u003Cspan style=\"color:#DBEDFF\">-\u003C/span>\u003Cspan style=\"color:#79B8FF\">\\d\u003C/span>\u003Cspan style=\"color:#F97583\">{2}\u003C/span>\u003Cspan style=\"color:#DBEDFF\">-\u003C/span>\u003Cspan style=\"color:#79B8FF\">\\d\u003C/span>\u003Cspan style=\"color:#F97583\">{2}\u003C/span>\u003Cspan style=\"color:#79B8FF\">[ T]\\d\u003C/span>\u003Cspan style=\"color:#F97583\">{2}\u003C/span>\u003Cspan style=\"color:#DBEDFF\">:\u003C/span>\u003Cspan style=\"color:#79B8FF\">\\d\u003C/span>\u003Cspan style=\"color:#F97583\">{2}\u003C/span>\u003Cspan style=\"color:#DBEDFF\">:\u003C/span>\u003Cspan style=\"color:#79B8FF\">\\d\u003C/span>\u003Cspan style=\"color:#F97583\">{2}\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Cp>Verwendung:\u003C/p>\n\u003Cul>\n\u003Cli>Zeitsensitive Korrelationsanalysen (z. B. bei Intrusion Detection oder Timeline-Rekonstruktionen).\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"best-practices\">Best Practices\u003C/h2>\n\u003Cul>\n\u003Cli>\u003Cstrong>Regex testen\u003C/strong>: Nutze Plattformen wie \u003Ca href=\"https://regexr.com/\">regexr.com\u003C/a> oder \u003Ca href=\"https://regex101.com/\">regex101.com\u003C/a> zur Validierung.\u003C/li>\n\u003Cli>\u003Cstrong>Performance beachten\u003C/strong>: Komplexe Ausdrücke können ineffizient sein und Systeme verlangsamen – verwende Lazy Quantifiers (\u003Ccode>*?\u003C/code>, \u003Ccode>+?\u003C/code>) bei Bedarf.\u003C/li>\n\u003Cli>\u003Cstrong>Escape-Zeichen korrekt anwenden\u003C/strong>: Spezielle Zeichen wie \u003Ccode>.\u003C/code> oder \u003Ccode>\\\u003C/code> müssen bei Bedarf mit \u003Ccode>\\\\\u003C/code> oder \u003Ccode>\\.\u003C/code> maskiert werden.\u003C/li>\n\u003Cli>\u003Cstrong>Portabilität prüfen\u003C/strong>: Unterschiedliche Regex-Engines (z. B. Python \u003Ccode>re\u003C/code>, PCRE, JavaScript) interpretieren manche Syntax leicht unterschiedlich.\u003C/li>\n\u003Cli>\u003Cstrong>Lesbarkeit fördern\u003C/strong>: Verwende benannte Gruppen (\u003Ccode>(?P<name>...)\u003C/code>) und Kommentare (\u003Ccode>(?x)\u003C/code>), um reguläre Ausdrücke besser wartbar zu machen.\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"weiterführende-themen\">Weiterführende Themen\u003C/h2>\n\u003Ch3 id=\"lookaheads-und-lookbehinds\">Lookaheads und Lookbehinds\u003C/h3>\n\u003Cp>Mit \u003Cstrong>Lookaheads\u003C/strong> (\u003Ccode>(?=...)\u003C/code>) und \u003Cstrong>Lookbehinds\u003C/strong> (\u003Ccode>(?<=...)\u003C/code>) können Bedingungen formuliert werden, ohne dass der Text Teil des Matchs wird.\u003C/p>\n\u003Cp>Beispiel: Alle \u003Ccode>.exe\u003C/code>-Dateinamen \u003Cstrong>ohne\u003C/strong> das Wort \u003Ccode>safe\u003C/code> davor matchen:\u003C/p>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"regex\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">(?<!\u003C/span>\u003Cspan style=\"color:#DBEDFF\">safe\u003C/span>\u003Cspan style=\"color:#79B8FF\">\\s\u003C/span>\u003Cspan style=\"color:#F97583\">)\u003C/span>\u003Cspan style=\"color:#79B8FF\">[\\w-]\u003C/span>\u003Cspan style=\"color:#F97583\">+\u003C/span>\u003Cspan style=\"color:#79B8FF\">\\.\u003C/span>\u003Cspan style=\"color:#DBEDFF\">exe\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"regex-in-forensik-tools\">Regex in Forensik-Tools\u003C/h3>\n\u003Cul>\n\u003Cli>\u003Cstrong>YARA\u003C/strong>: Unterstützt Regex zur Erstellung von Malware-Signaturen.\u003C/li>\n\u003Cli>\u003Cstrong>Wireshark\u003C/strong>: Filtert Payloads anhand von Regex-ähnlicher Syntax.\u003C/li>\n\u003Cli>\u003Cstrong>Splunk & ELK\u003C/strong>: Verwenden Regex für Logparsing und Visualisierung.\u003C/li>\n\u003Cli>\u003Cstrong>Volatility Plugins\u003C/strong>: Extrahieren Artefakte mit Regex-basierten Scans.\u003C/li>\n\u003C/ul>\n\u003Chr>\n\u003Cblockquote>\n\u003Cp>🔤 \u003Cstrong>Regex ist ein universelles Werkzeug für Analysten, Ermittler und Entwickler, um versteckte Informationen schnell und flexibel aufzuspüren.\u003C/strong>\u003C/p>\n\u003Cp>Nutze es überall dort, wo Textdaten eine Rolle spielen.\u003C/p>\n\u003C/blockquote>",{"headings":196,"localImagePaths":219,"remoteImagePaths":220,"frontmatter":176,"imagePaths":221},[197,198,199,202,205,208,211,212,213,216],{"depth":43,"slug":44,"text":45},{"depth":47,"slug":70,"text":71},{"depth":51,"slug":200,"text":201},"1-ip-adressen-extrahieren","1. IP-Adressen extrahieren",{"depth":51,"slug":203,"text":204},"2-e-mail-adressen-identifizieren","2. E-Mail-Adressen identifizieren",{"depth":51,"slug":206,"text":207},"3-hash-werte-erkennen-zb-sha-256","3. Hash-Werte erkennen (z. B. SHA-256)",{"depth":51,"slug":209,"text":210},"4-zeitstempel-in-logdateien-extrahieren","4. Zeitstempel in Logdateien extrahieren",{"depth":47,"slug":79,"text":80},{"depth":47,"slug":94,"text":95},{"depth":51,"slug":214,"text":215},"lookaheads-und-lookbehinds","Lookaheads und Lookbehinds",{"depth":51,"slug":217,"text":218},"regex-in-forensik-tools","Regex in Forensik-Tools",[],[],[],"regular-expressions-regex.md","velociraptor",{"id":223,"data":225,"body":239,"filePath":240,"digest":241,"rendered":242,"legacyId":287},{"title":226,"tool_name":227,"description":228,"last_updated":229,"author":16,"difficulty":230,"categories":231,"tags":232,"sections":238,"review_status":34},"Velociraptor – Skalierbare Endpoint-Forensik mit VQL","Velociraptor","Detaillierte Anleitung und Best Practices für Velociraptor – Remote-Forensik der nächsten Generation",["Date","2025-07-20T00:00:00.000Z"],"advanced",[19,21,22],[25,233,234,235,236,237],"endpoint-monitoring","artifact-extraction","scripting","live-forensics","hunting",{"overview":32,"installation":32,"configuration":32,"usage_examples":32,"best_practices":32,"troubleshooting":32,"advanced_topics":32},"> **⚠️ Hinweis**: Dies ist ein vorläufiger, KI-generierter Knowledgebase-Eintrag. Wir freuen uns über Verbesserungen und Ergänzungen durch die Community!\n\n\n# Übersicht\n\nVelociraptor ist ein Open-Source-Tool zur Endpoint-Forensik mit Fokus auf Skalierbarkeit, Präzision und Geschwindigkeit. Es ermöglicht die zielgerichtete Erfassung und Analyse digitaler Artefakte über eine eigene Query Language – VQL (Velociraptor Query Language). Die Architektur erlaubt remote Zugriff auf tausende Endpoints gleichzeitig, ohne dass vollständige Disk-Images erforderlich sind.\n\n## Hauptmerkmale\n\n- 🌐 Web-basierte Benutzeroberfläche\n- 💡 VQL – mächtige, SQL-ähnliche Abfragesprache\n- 🚀 Hochskalierbare Hunt-Funktionalität\n- 🔍 Artefaktbasierte Sammlung (ohne Full-Image)\n- 🖥️ Plattformunterstützung für Windows, macOS, Linux\n- 📦 Apache 2.0 Lizenz – Open Source\n\nWeitere Infos: [velociraptor.app](https://www.velociraptor.app/) \nProjektspiegel: [raptor.cc24.dev](https://raptor.cc24.dev) \nStatus: ![Status](https://status.mikoshi.de/api/badge/33/status)\n\n---\n\n## Installation\n\n### Voraussetzungen\n\n- Python ≥ 3.9\n- Adminrechte auf dem System\n- Firewall-Freigaben für Webport (Standard: 8000)\n\n### Installation unter Linux/macOS\n\n```bash\nwget https://github.com/Velocidex/velociraptor/releases/latest/download/velociraptor\nchmod +x velociraptor\nsudo mv velociraptor /usr/local/bin/\n````\n\n### Installation unter Windows\n\n1. Download der `.exe` von der [Release-Seite](https://github.com/Velocidex/velociraptor/releases)\n2. Ausführung in PowerShell mit Adminrechten:\n\n ```powershell\n .\\velociraptor.exe config generate > server.config.yaml\n ```\n\n---\n\n## Konfiguration\n\n### Server Setup\n\n1. Generiere die Konfigurationsdatei:\n\n ```bash\n velociraptor config generate > server.config.yaml\n ```\n2. Starte den Server:\n\n ```bash\n velociraptor --config server.config.yaml frontend\n ```\n3. Zugriff über Browser via `https://\u003Chostname>:8000`\n\n### Client Deployment\n\n* MSI/EXE für Windows, oder `deb/rpm` für Linux\n* Unterstützt automatische Registrierung am Server\n* Deployment über GPO, Puppet, Ansible etc. möglich\n\n---\n\n## Verwendungsbeispiele\n\n### 1. Live-Memory-Artefakte sammeln\n\n```vql\nSELECT * FROM Artifact.MemoryInfo()\n```\n\n### 2. Hunt starten auf verdächtige Prozesse\n\n```vql\nSELECT * FROM pslist()\nWHERE Name =~ \"mimikatz|cobaltstrike\"\n```\n\n### 3. Dateiinhalt extrahieren\n\n```vql\nSELECT * FROM glob(globs=\"C:\\\\Users\\\\*\\\\AppData\\\\*.dat\")\n```\n\n---\n\n## Best Practices\n\n* Erstelle eigene Artefakte für unternehmensspezifische Bedrohungsmodelle\n* Verwende \"Notebook\"-Funktion für strukturierte Analysen\n* Nutze \"Labels\", um Endpoints zu organisieren (z. B. `location:Berlin`)\n* Kombiniere Velociraptor mit SIEM/EDR-Systemen über REST API\n\n---\n\n## Troubleshooting\n\n### Problem: Keine Verbindung vom Client zum Server\n\n**Lösung:**\n\n* Ports freigegeben? (Default: 8000/tcp)\n* TLS-Zertifikate korrekt generiert?\n* `server.config.yaml` auf korrekte `public_ip` prüfen\n\n### Problem: Hunt hängt in Warteschleife\n\n**Lösung:**\n\n* Genügend Worker-Prozesse aktiv?\n* Endpoint online?\n* `log_level` auf `debug` setzen und Log analysieren\n\n---\n\n## Weiterführende Themen\n\n* Eigene Artefakte schreiben mit VQL\n* Integration mit ELK Stack\n* Automatisiertes Incident Response Playbook\n* Velociraptor als IR-as-a-Service einsetzen\n\n---\n\n🧠 **Tipp:** Die Lernkurve bei VQL ist steil – aber mit hohem ROI. Testumgebung aufsetzen und mit Community-Artefakten starten.\n\n📚 Weitere Ressourcen:\n\n* [Offizielle Doku](https://docs.velociraptor.app/)\n* [YouTube Channel](https://www.youtube.com/c/VelociraptorDFIR)\n* [Community auf Discord](https://www.velociraptor.app/community/)","src/content/knowledgebase/velociraptor.md","05636b9b97e61d17",{"html":243,"metadata":244},"\u003Cblockquote>\n\u003Cp>\u003Cstrong>⚠️ Hinweis\u003C/strong>: Dies ist ein vorläufiger, KI-generierter Knowledgebase-Eintrag. Wir freuen uns über Verbesserungen und Ergänzungen durch die Community!\u003C/p>\n\u003C/blockquote>\n\u003Ch1 id=\"übersicht\">Übersicht\u003C/h1>\n\u003Cp>Velociraptor ist ein Open-Source-Tool zur Endpoint-Forensik mit Fokus auf Skalierbarkeit, Präzision und Geschwindigkeit. Es ermöglicht die zielgerichtete Erfassung und Analyse digitaler Artefakte über eine eigene Query Language – VQL (Velociraptor Query Language). Die Architektur erlaubt remote Zugriff auf tausende Endpoints gleichzeitig, ohne dass vollständige Disk-Images erforderlich sind.\u003C/p>\n\u003Ch2 id=\"hauptmerkmale\">Hauptmerkmale\u003C/h2>\n\u003Cul>\n\u003Cli>🌐 Web-basierte Benutzeroberfläche\u003C/li>\n\u003Cli>💡 VQL – mächtige, SQL-ähnliche Abfragesprache\u003C/li>\n\u003Cli>🚀 Hochskalierbare Hunt-Funktionalität\u003C/li>\n\u003Cli>🔍 Artefaktbasierte Sammlung (ohne Full-Image)\u003C/li>\n\u003Cli>🖥️ Plattformunterstützung für Windows, macOS, Linux\u003C/li>\n\u003Cli>📦 Apache 2.0 Lizenz – Open Source\u003C/li>\n\u003C/ul>\n\u003Cp>Weitere Infos: \u003Ca href=\"https://www.velociraptor.app/\">velociraptor.app\u003C/a>\u003Cbr>\nProjektspiegel: \u003Ca href=\"https://raptor.cc24.dev\">raptor.cc24.dev\u003C/a>\u003Cbr>\nStatus: \u003Cimg src=\"https://status.mikoshi.de/api/badge/33/status\" alt=\"Status\">\u003C/p>\n\u003Chr>\n\u003Ch2 id=\"installation\">Installation\u003C/h2>\n\u003Ch3 id=\"voraussetzungen\">Voraussetzungen\u003C/h3>\n\u003Cul>\n\u003Cli>Python ≥ 3.9\u003C/li>\n\u003Cli>Adminrechte auf dem System\u003C/li>\n\u003Cli>Firewall-Freigaben für Webport (Standard: 8000)\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"installation-unter-linuxmacos\">Installation unter Linux/macOS\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">wget\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> https://github.com/Velocidex/velociraptor/releases/latest/download/velociraptor\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">chmod\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> +x\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> velociraptor\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> mv\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> velociraptor\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /usr/local/bin/\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"installation-unter-windows\">Installation unter Windows\u003C/h3>\n\u003Col>\n\u003Cli>\n\u003Cp>Download der \u003Ccode>.exe\u003C/code> von der \u003Ca href=\"https://github.com/Velocidex/velociraptor/releases\">Release-Seite\u003C/a>\u003C/p>\n\u003C/li>\n\u003Cli>\n\u003Cp>Ausführung in PowerShell mit Adminrechten:\u003C/p>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"powershell\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">.\\\u003C/span>\u003Cspan style=\"color:#79B8FF\">velociraptor.exe\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> config generate \u003C/span>\u003Cspan style=\"color:#F97583\">>\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> server.config.yaml\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003C/li>\n\u003C/ol>\n\u003Chr>\n\u003Ch2 id=\"konfiguration\">Konfiguration\u003C/h2>\n\u003Ch3 id=\"server-setup\">Server Setup\u003C/h3>\n\u003Col>\n\u003Cli>\n\u003Cp>Generiere die Konfigurationsdatei:\u003C/p>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">velociraptor\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> config\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> generate\u003C/span>\u003Cspan style=\"color:#F97583\"> >\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> server.config.yaml\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003C/li>\n\u003Cli>\n\u003Cp>Starte den Server:\u003C/p>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">velociraptor\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --config\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> server.config.yaml\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> frontend\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003C/li>\n\u003Cli>\n\u003Cp>Zugriff über Browser via \u003Ccode>https://<hostname>:8000\u003C/code>\u003C/p>\n\u003C/li>\n\u003C/ol>\n\u003Ch3 id=\"client-deployment\">Client Deployment\u003C/h3>\n\u003Cul>\n\u003Cli>MSI/EXE für Windows, oder \u003Ccode>deb/rpm\u003C/code> für Linux\u003C/li>\n\u003Cli>Unterstützt automatische Registrierung am Server\u003C/li>\n\u003Cli>Deployment über GPO, Puppet, Ansible etc. möglich\u003C/li>\n\u003C/ul>\n\u003Chr>\n\u003Ch2 id=\"verwendungsbeispiele\">Verwendungsbeispiele\u003C/h2>\n\u003Ch3 id=\"1-live-memory-artefakte-sammeln\">1. Live-Memory-Artefakte sammeln\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"plaintext\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan>SELECT * FROM Artifact.MemoryInfo()\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"2-hunt-starten-auf-verdächtige-prozesse\">2. Hunt starten auf verdächtige Prozesse\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"plaintext\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan>SELECT * FROM pslist()\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan>WHERE Name =~ \"mimikatz|cobaltstrike\"\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"3-dateiinhalt-extrahieren\">3. Dateiinhalt extrahieren\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"plaintext\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan>SELECT * FROM glob(globs=\"C:\\\\Users\\\\*\\\\AppData\\\\*.dat\")\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Chr>\n\u003Ch2 id=\"best-practices\">Best Practices\u003C/h2>\n\u003Cul>\n\u003Cli>Erstelle eigene Artefakte für unternehmensspezifische Bedrohungsmodelle\u003C/li>\n\u003Cli>Verwende “Notebook”-Funktion für strukturierte Analysen\u003C/li>\n\u003Cli>Nutze “Labels”, um Endpoints zu organisieren (z. B. \u003Ccode>location:Berlin\u003C/code>)\u003C/li>\n\u003Cli>Kombiniere Velociraptor mit SIEM/EDR-Systemen über REST API\u003C/li>\n\u003C/ul>\n\u003Chr>\n\u003Ch2 id=\"troubleshooting\">Troubleshooting\u003C/h2>\n\u003Ch3 id=\"problem-keine-verbindung-vom-client-zum-server\">Problem: Keine Verbindung vom Client zum Server\u003C/h3>\n\u003Cp>\u003Cstrong>Lösung:\u003C/strong>\u003C/p>\n\u003Cul>\n\u003Cli>Ports freigegeben? (Default: 8000/tcp)\u003C/li>\n\u003Cli>TLS-Zertifikate korrekt generiert?\u003C/li>\n\u003Cli>\u003Ccode>server.config.yaml\u003C/code> auf korrekte \u003Ccode>public_ip\u003C/code> prüfen\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"problem-hunt-hängt-in-warteschleife\">Problem: Hunt hängt in Warteschleife\u003C/h3>\n\u003Cp>\u003Cstrong>Lösung:\u003C/strong>\u003C/p>\n\u003Cul>\n\u003Cli>Genügend Worker-Prozesse aktiv?\u003C/li>\n\u003Cli>Endpoint online?\u003C/li>\n\u003Cli>\u003Ccode>log_level\u003C/code> auf \u003Ccode>debug\u003C/code> setzen und Log analysieren\u003C/li>\n\u003C/ul>\n\u003Chr>\n\u003Ch2 id=\"weiterführende-themen\">Weiterführende Themen\u003C/h2>\n\u003Cul>\n\u003Cli>Eigene Artefakte schreiben mit VQL\u003C/li>\n\u003Cli>Integration mit ELK Stack\u003C/li>\n\u003Cli>Automatisiertes Incident Response Playbook\u003C/li>\n\u003Cli>Velociraptor als IR-as-a-Service einsetzen\u003C/li>\n\u003C/ul>\n\u003Chr>\n\u003Cp>🧠 \u003Cstrong>Tipp:\u003C/strong> Die Lernkurve bei VQL ist steil – aber mit hohem ROI. Testumgebung aufsetzen und mit Community-Artefakten starten.\u003C/p>\n\u003Cp>📚 Weitere Ressourcen:\u003C/p>\n\u003Cul>\n\u003Cli>\u003Ca href=\"https://docs.velociraptor.app/\">Offizielle Doku\u003C/a>\u003C/li>\n\u003Cli>\u003Ca href=\"https://www.youtube.com/c/VelociraptorDFIR\">YouTube Channel\u003C/a>\u003C/li>\n\u003Cli>\u003Ca href=\"https://www.velociraptor.app/community/\">Community auf Discord\u003C/a>\u003C/li>\n\u003C/ul>",{"headings":245,"localImagePaths":284,"remoteImagePaths":285,"frontmatter":225,"imagePaths":286},[246,247,250,251,252,255,258,259,262,265,266,269,272,275,276,277,280,283],{"depth":43,"slug":44,"text":45},{"depth":47,"slug":248,"text":249},"hauptmerkmale","Hauptmerkmale",{"depth":47,"slug":48,"text":49},{"depth":51,"slug":52,"text":53},{"depth":51,"slug":253,"text":254},"installation-unter-linuxmacos","Installation unter Linux/macOS",{"depth":51,"slug":256,"text":257},"installation-unter-windows","Installation unter Windows",{"depth":47,"slug":58,"text":59},{"depth":51,"slug":260,"text":261},"server-setup","Server Setup",{"depth":51,"slug":263,"text":264},"client-deployment","Client Deployment",{"depth":47,"slug":70,"text":71},{"depth":51,"slug":267,"text":268},"1-live-memory-artefakte-sammeln","1. Live-Memory-Artefakte sammeln",{"depth":51,"slug":270,"text":271},"2-hunt-starten-auf-verdächtige-prozesse","2. Hunt starten auf verdächtige Prozesse",{"depth":51,"slug":273,"text":274},"3-dateiinhalt-extrahieren","3. Dateiinhalt extrahieren",{"depth":47,"slug":79,"text":80},{"depth":47,"slug":82,"text":83},{"depth":51,"slug":278,"text":279},"problem-keine-verbindung-vom-client-zum-server","Problem: Keine Verbindung vom Client zum Server",{"depth":51,"slug":281,"text":282},"problem-hunt-hängt-in-warteschleife","Problem: Hunt hängt in Warteschleife",{"depth":47,"slug":94,"text":95},[],[],[],"velociraptor.md","android-logical-imaging",{"id":288,"data":290,"body":303,"filePath":304,"digest":305,"rendered":306,"legacyId":534},{"title":291,"tool_name":292,"description":293,"last_updated":294,"author":295,"difficulty":230,"categories":296,"tags":298,"sections":302,"review_status":34},"Extraktion logischer Dateisysteme alter Android-Smartphones - eine KI-Recherche","Android Logical Imaging","Wie man alte Android-Handys aufbekommen könnte - eine Recherche von Claude",["Date","2025-07-21T00:00:00.000Z"],"Claude 4 Sonnet (Research)",[297],"data-collection",[299,300,301],"imaging","filesystem","hardware-interface",{"overview":32,"installation":32,"configuration":32,"usage_examples":32,"best_practices":32,"troubleshooting":32,"advanced_topics":32},"# Übersicht\n\nOpen-Source Android Forensik bietet robuste Alternativen zu kommerziellen Lösungen wie Cellebrite UFED und Magnet AXIOM. Besonders für ältere Android-Geräte (5+ Jahre) existieren bewährte Methoden zur Datenextraktion und -analyse.\n\n## Kernkomponenten des Open-Source Forensik-Stacks\n\n**Autopsy Digital Forensics Platform** bildet das Fundament mit GUI-basierter Analyse und integrierten Android-Parsing-Fähigkeiten. Die Plattform unterstützt **ALEAPP (Android Logs Events And Protobuf Parser)**, das über 100 Artefakt-Kategorien aus Android-Extraktionen parst.\n\n**Mobile Verification Toolkit (MVT)** von Amnesty International bietet spezialisierte Command-Line-Tools für Android-Analyse mit Fokus auf Kompromittierungserkennung.\n\n**SIFT Workstation** stellt eine komplette Ubuntu-basierte forensische Umgebung mit 125+ vorinstallierten Tools bereit.\n\n## Erfolgsraten nach Gerätealter\n\n- **Pre-2017 Geräte**: 85-98% logische Extraktion, 30-70% physische Extraktion\n- **2017-2019 Geräte**: 80-95% logische Extraktion, 15-35% physische Extraktion \n- **2020+ Geräte**: 70-85% logische Extraktion, 5-15% physische Extraktion\n\n# Installation\n\n## SIFT Workstation Setup\n\n### Systemanforderungen\n- Quad-Core CPU 2.5GHz+\n- 16GB+ RAM\n- 500GB+ SSD Speicher\n- USB 3.0+ Anschlüsse\n\n### Installation\n1. Download von [SANS SIFT Workstation](https://www.sans.org/tools/sift-workstation/)\n2. VMware/VirtualBox Import der OVA-Datei\n3. VM-Konfiguration: 8GB+ RAM, 4+ CPU-Kerne\n\n```bash\n# Update nach Installation\nsudo apt update && sudo apt upgrade -y\nsudo sift update\n```\n\n## Autopsy Installation\n\n### Windows Installation\n1. Download von [autopsy.com](https://www.autopsy.com/)\n2. Java 8+ Installation erforderlich\n3. Installation mit Administratorrechten\n\n### Linux Installation\n```bash\n# Ubuntu/Debian\nsudo apt install autopsy sleuthkit\n# Oder manueller Download und Installation\nwget https://github.com/sleuthkit/autopsy/releases/latest\n```\n\n## Essential Tools Installation\n\n### Android Debug Bridge (ADB)\n```bash\n# Ubuntu/Debian\nsudo apt install android-tools-adb android-tools-fastboot\n\n# Windows - Download Android Platform Tools\n# https://developer.android.com/studio/releases/platform-tools\n```\n\n### ALEAPP Installation\n```bash\ngit clone https://github.com/abrignoni/ALEAPP.git\ncd ALEAPP\npip3 install -r requirements.txt\n```\n\n### Mobile Verification Toolkit (MVT)\n```bash\npip3 install mvt\n# Oder via GitHub für neueste Version\ngit clone https://github.com/mvt-project/mvt.git\ncd mvt && pip3 install .\n```\n\n### Andriller Installation\n```bash\ngit clone https://github.com/den4uk/andriller.git\ncd andriller\npip3 install -r requirements.txt\n```\n\n# Konfiguration\n\n## ADB Setup und Gerätevorbereitung\n\n### USB-Debugging aktivieren\n1. Entwickleroptionen freischalten (7x Build-Nummer antippen)\n2. USB-Debugging aktivieren\n3. Gerät via USB verbinden\n4. RSA-Fingerprint akzeptieren\n\n### ADB Verbindung testen\n```bash\nadb devices\n# Sollte Gerät mit \"device\" Status zeigen\nadb shell getprop ro.build.version.release # Android Version\nadb shell getprop ro.product.model # Gerätemodell\n```\n\n## Autopsy Projektkonfiguration\n\n### Case-Setup\n1. Neuen Fall erstellen\n2. Ermittler-Informationen eingeben\n3. Case-Verzeichnis festlegen (ausreichend Speicherplatz)\n\n### Android Analyzer Module aktivieren\n- Tools → Options → Modules\n- Android Analyzer aktivieren\n- ALEAPP Integration konfigurieren\n\n### Hash-Algorithmen konfigurieren\n- MD5, SHA-1, SHA-256 für Integritätsprüfung\n- Automatische Hash-Berechnung bei Import aktivieren\n\n## MVT Konfiguration\n\n### Konfigurationsdatei erstellen\n```yaml\n# ~/.mvt/config.yaml\nadb_path: \"/usr/bin/adb\"\noutput_folder: \"/home/user/mvt_output\"\n```\n\n# Verwendungsbeispiele\n\n## Fall 1: Logische Datenextraktion mit ADB\n\n### Geräteinformationen sammeln\n```bash\n# Systeminfo\nadb shell getprop > device_properties.txt\nadb shell cat /proc/version > kernel_info.txt\nadb shell mount > mount_info.txt\n\n# Installierte Apps\nadb shell pm list packages -f > installed_packages.txt\n```\n\n### Datenbank-Extraktion\n```bash\n# SMS/MMS Datenbank\nadb pull /data/data/com.android.providers.telephony/databases/mmssms.db\n\n# Kontakte\nadb pull /data/data/com.android.providers.contacts/databases/contacts2.db\n\n# Anrufliste \nadb pull /data/data/com.android.providers.contacts/databases/calllog.db\n```\n\n### WhatsApp Datenextraktion\n```bash\n# WhatsApp Datenbanken (Root erforderlich)\nadb shell su -c \"cp -r /data/data/com.whatsapp/ /sdcard/whatsapp_backup/\"\nadb pull /sdcard/whatsapp_backup/\n```\n\n## Fall 2: Android Backup-Analyse\n\n### Vollständiges Backup erstellen\n```bash\n# Umfassendes Backup (ohne Root)\nadb backup -all -system -apk -shared -f backup.ab\n\n# Backup entschlüsseln (falls verschlüsselt)\njava -jar abe.jar unpack backup.ab backup.tar\ntar -xf backup.tar\n```\n\n### Backup mit ALEAPP analysieren\n```bash\npython3 aleappGUI.py\n# Oder Command-Line\npython3 aleapp.py -t tar -i backup.tar -o output_folder\n```\n\n## Fall 3: MVT Kompromittierungsanalyse\n\n### Live-Geräteanalyse\n```bash\n# ADB-basierte Analyse\nmvt-android check-adb --output /path/to/output/\n\n# Backup-Analyse\nmvt-android check-backup --output /path/to/output/ backup.ab\n```\n\n### IOC-Suche mit Pegasus-Indikatoren\n```bash\n# Mit vorgefertigten IOCs\nmvt-android check-adb --iocs /path/to/pegasus.stix2 --output results/\n```\n\n## Fall 4: Physische Extraktion (Root erforderlich)\n\n### Device Rooting - MediaTek Geräte\n```bash\n# MTKClient für MediaTek-Chipsets\ngit clone https://github.com/bkerler/mtkclient.git\ncd mtkclient\npython3 mtk payload\n\n# Nach erfolgreichem Root\nadb shell su\n```\n\n### Vollständiges Memory Dump\n```bash\n# Partitionslayout ermitteln\nadb shell su -c \"cat /proc/partitions\"\nadb shell su -c \"ls -la /dev/block/\"\n\n# Vollständiges Device Image (Root erforderlich)\nadb shell su -c \"dd if=/dev/block/mmcblk0 of=/sdcard/full_device.img bs=4096\"\nadb pull /sdcard/full_device.img\n```\n\n# Best Practices\n\n## Rechtliche Compliance\n\n### Dokumentation und Chain of Custody\n- **Vollständige Dokumentation**: Wer, Was, Wann, Wo, Warum\n- **Hash-Verifikation**: MD5/SHA-256 für alle extrahierten Daten\n- **Nur forensische Kopien analysieren**, niemals Originaldaten\n- **Schriftliche Genehmigung** für Geräteanalyse einholen\n\n### Familiengeräte und Nachlässe\n- Genehmigung durch Nachlassverwalter erforderlich\n- Gerichtsbeschlüsse für Cloud-Zugang eventuell nötig\n- Drittpartei-Kommunikation kann weiterhin geschützt sein\n\n## Technische Best Practices\n\n### Hash-Integrität sicherstellen\n```bash\n# Hash vor und nach Transfer prüfen\nmd5sum original_file.db\nsha256sum original_file.db\n\n# Hash-Verifikation dokumentieren\necho \"$(date): MD5: $(md5sum file.db)\" >> chain_of_custody.log\n```\n\n### Sichere Arbeitsumgebung\n- Isolierte VM für Forensik-Arbeit\n- Netzwerk-Isolation während Analyse\n- Verschlüsselte Speicherung aller Evidenz\n- Regelmäßige Backups der Case-Datenbanken\n\n### Qualitätssicherung\n- Peer-Review kritischer Analysen\n- Standardisierte Arbeitsabläufe (SOPs)\n- Regelmäßige Tool-Validierung\n- Kontinuierliche Weiterbildung\n\n## Erfolgsmaximierung nach Gerätehersteller\n\n### MediaTek-Geräte (Höchste Erfolgsrate)\n- BootROM-Exploits für MT6735, MT6737, MT6750, MT6753, MT6797\n- MTKClient für Hardware-Level-Zugang\n- Erfolgsrate: 80%+ für Geräte 2015-2019\n\n### Samsung-Geräte\n- Ältere Knox-Implementierungen umgehbar\n- Emergency Dialer Exploits für Android 4.x\n- Erfolgsrate: 40-70% je nach Knox-Version\n\n### Pixel/Nexus-Geräte\n- Bootloader-Unlocking oft möglich\n- Fastboot-basierte Recovery-Installation\n- Erfolgsrate: 60-80% bei freigeschaltetem Bootloader\n\n# Troubleshooting\n\n## Problem: ADB erkennt Gerät nicht\n\n### Lösung: USB-Treiber und Berechtigungen\n```bash\n# Linux: USB-Berechtigungen prüfen\nlsusb | grep -i android\nsudo chmod 666 /dev/bus/usb/XXX/XXX\n\n# udev-Regeln erstellen\necho 'SUBSYSTEM==\"usb\", ATTR{idVendor}==\"18d1\", MODE=\"0666\", GROUP=\"plugdev\"' | sudo tee /etc/udev/rules.d/51-android.rules\nsudo udevadm control --reload-rules\n```\n\n### Windows: Treiber-Installation\n1. Geräte-Manager öffnen\n2. Android-Gerät mit Warnsymbol finden\n3. Treiber manuell installieren (Android USB Driver)\n\n## Problem: Verschlüsselte Android Backups\n\n### Lösung: Android Backup Extractor\n```bash\n# ADB Backup Extractor installieren\ngit clone https://github.com/nelenkov/android-backup-extractor.git\ncd android-backup-extractor\ngradle build\n\n# Backup entschlüsseln\njava -jar abe.jar unpack backup.ab backup.tar [password]\n```\n\n## Problem: Unzureichende Berechtigungen für Datenextraktion\n\n### Lösung: Alternative Extraktionsmethoden\n```bash\n# AFLogical OSE für begrenzte Extraktion ohne Root\n# WhatsApp Key/DB Extractor für spezifische Apps\n# Backup-basierte Extraktion als Fallback\n\n# Custom Recovery für erweiterten Zugang\nfastboot flash recovery twrp-device.img\n```\n\n## Problem: ALEAPP Parsing-Fehler\n\n### Lösung: Datenformat-Probleme beheben\n```bash\n# Log-Dateien prüfen\npython3 aleapp.py -t dir -i /path/to/data -o output --debug\n\n# Spezifische Parser deaktivieren\n# Manuelle SQLite-Analyse bei Parser-Fehlern\nsqlite3 database.db \".tables\"\nsqlite3 database.db \".schema table_name\"\n```\n\n# Erweiterte Techniken\n\n## Memory Forensics mit LiME\n\n### LiME für ARM-Devices kompilieren\n```bash\n# Cross-Compilation Setup\nexport ARCH=arm\nexport CROSS_COMPILE=arm-linux-gnueabi-\nexport KERNEL_DIR=/path/to/kernel/source\n\n# LiME Module kompilieren\ngit clone https://github.com/504ensicsLabs/LiME.git\ncd LiME/src\nmake\n\n# Memory Dump erstellen (Root erforderlich)\nadb push lime.ko /data/local/tmp/\nadb shell su -c \"insmod /data/local/tmp/lime.ko 'path=/sdcard/memory.lime format=lime'\"\n```\n\n### Volatility-Analyse von Android Memory\n```bash\n# Memory Dump analysieren\npython vol.py -f memory.lime --profile=Linux \u003Cprofile> linux.pslist\npython vol.py -f memory.lime --profile=Linux \u003Cprofile> linux.bash\npython vol.py -f memory.lime --profile=Linux \u003Cprofile> linux.netstat\n```\n\n## FRIDA-basierte Runtime-Analyse\n\n### FRIDA für Kryptographie-Hooks\n```javascript\n// crypto_hooks.js - SSL/TLS Traffic abfangen\nJava.perform(function() {\n var SSLContext = Java.use(\"javax.net.ssl.SSLContext\");\n SSLContext.init.overload('[Ljavax.net.ssl.KeyManager;', '[Ljavax.net.ssl.TrustManager;', 'java.security.SecureRandom').implementation = function(keyManagers, trustManagers, secureRandom) {\n console.log(\"[+] SSLContext.init() called\");\n this.init(keyManagers, trustManagers, secureRandom);\n };\n});\n```\n\n### FRIDA Installation und Verwendung\n```bash\n# FRIDA Server auf Android-Gerät installieren\nadb push frida-server /data/local/tmp/\nadb shell su -c \"chmod 755 /data/local/tmp/frida-server\"\nadb shell su -c \"/data/local/tmp/frida-server &\"\n\n# Script ausführen\nfrida -U -l crypto_hooks.js com.target.package\n```\n\n## Custom Recovery und Fastboot-Exploits\n\n### TWRP Installation für forensischen Zugang\n```bash\n# Bootloader entsperren (Herstellerabhängig)\nfastboot oem unlock\n# Oder\nfastboot flashing unlock\n\n# TWRP flashen\nfastboot flash recovery twrp-device.img\nfastboot boot twrp-device.img # Temporäre Installation\n\n# In TWRP: ADB-Zugang mit Root-Berechtigungen\nadb shell mount /system\nadb shell mount /data\n```\n\n### Partitions-Imaging mit dd\n```bash\n# Vollständige Partition-Liste\nadb shell cat /proc/partitions\n\n# Kritische Partitionen extrahieren\nadb shell dd if=/dev/block/bootdevice/by-name/system of=/external_sd/system.img\nadb shell dd if=/dev/block/bootdevice/by-name/userdata of=/external_sd/userdata.img\nadb shell dd if=/dev/block/bootdevice/by-name/boot of=/external_sd/boot.img\n```\n\n## SQLite Forensics und gelöschte Daten\n\n### Erweiterte SQLite-Analyse\n```bash\n# Freelist-Analyse für gelöschte Einträge\nsqlite3 database.db \"PRAGMA freelist_count;\"\nsqlite3 database.db \"PRAGMA page_size;\"\n\n# WAL-Datei Analyse\nsqlite3 database.db \"PRAGMA wal_checkpoint;\"\nstrings database.db-wal | grep -i \"search_term\"\n\n# Undark für Deleted Record Recovery\nundark database.db --freelist --export-csv\n```\n\n### Timeline-Rekonstruktion\n```bash\n# Autopsy Timeline-Generierung\n# Tools → Generate Timeline\n# Analyse von MAC-Times (Modified, Accessed, Created)\n\n# Plaso Timeline-Tools\nlog2timeline.py timeline.plaso /path/to/android/data/\npsort.py -o dynamic timeline.plaso\n```\n\n## Weiterführende Ressourcen\n\n### Dokumentation und Standards\n- [NIST SP 800-101 Rev. 1 - Mobile Device Forensics Guidelines](https://csrc.nist.gov/pubs/sp/800/101/r1/final)\n- [SANS FOR585 - Smartphone Forensics](https://www.sans.org/cyber-security-courses/advanced-smartphone-mobile-device-forensics/)\n- [ALEAPP GitHub Repository](https://github.com/abrignoni/ALEAPP)\n- [MVT Documentation](https://docs.mvt.re/en/latest/)\n\n### Community und Weiterbildung\n- [Autopsy User Documentation](https://sleuthkit.org/autopsy/docs/)\n- [Android Forensics References](https://github.com/impillar/AndroidReferences/blob/master/AndroidTools.md)\n- [Digital Forensics Framework Collection](https://github.com/mesquidar/ForensicsTools)\n\n### Spezialisierte Tools\n- [MTKClient für MediaTek Exploits](https://github.com/bkerler/mtkclient)\n- [Android Forensics Framework](https://github.com/nowsecure/android-forensics)\n- [Santoku Linux Mobile Forensics Distribution](https://santoku-linux.com/)\n\n---\n\n**Wichtiger Hinweis**: Diese Anleitung dient ausschließlich für autorisierte forensische Untersuchungen. Stellen Sie sicher, dass Sie über entsprechende rechtliche Befugnisse verfügen, bevor Sie diese Techniken anwenden. Bei Zweifeln konsultieren Sie Rechtsberatung.","src/content/knowledgebase/android-logical-imaging.md","0bb3f1d2c872d2bf",{"html":307,"metadata":308},"\u003Ch1 id=\"übersicht\">Übersicht\u003C/h1>\n\u003Cp>Open-Source Android Forensik bietet robuste Alternativen zu kommerziellen Lösungen wie Cellebrite UFED und Magnet AXIOM. Besonders für ältere Android-Geräte (5+ Jahre) existieren bewährte Methoden zur Datenextraktion und -analyse.\u003C/p>\n\u003Ch2 id=\"kernkomponenten-des-open-source-forensik-stacks\">Kernkomponenten des Open-Source Forensik-Stacks\u003C/h2>\n\u003Cp>\u003Cstrong>Autopsy Digital Forensics Platform\u003C/strong> bildet das Fundament mit GUI-basierter Analyse und integrierten Android-Parsing-Fähigkeiten. Die Plattform unterstützt \u003Cstrong>ALEAPP (Android Logs Events And Protobuf Parser)\u003C/strong>, das über 100 Artefakt-Kategorien aus Android-Extraktionen parst.\u003C/p>\n\u003Cp>\u003Cstrong>Mobile Verification Toolkit (MVT)\u003C/strong> von Amnesty International bietet spezialisierte Command-Line-Tools für Android-Analyse mit Fokus auf Kompromittierungserkennung.\u003C/p>\n\u003Cp>\u003Cstrong>SIFT Workstation\u003C/strong> stellt eine komplette Ubuntu-basierte forensische Umgebung mit 125+ vorinstallierten Tools bereit.\u003C/p>\n\u003Ch2 id=\"erfolgsraten-nach-gerätealter\">Erfolgsraten nach Gerätealter\u003C/h2>\n\u003Cul>\n\u003Cli>\u003Cstrong>Pre-2017 Geräte\u003C/strong>: 85-98% logische Extraktion, 30-70% physische Extraktion\u003C/li>\n\u003Cli>\u003Cstrong>2017-2019 Geräte\u003C/strong>: 80-95% logische Extraktion, 15-35% physische Extraktion\u003C/li>\n\u003Cli>\u003Cstrong>2020+ Geräte\u003C/strong>: 70-85% logische Extraktion, 5-15% physische Extraktion\u003C/li>\n\u003C/ul>\n\u003Ch1 id=\"installation\">Installation\u003C/h1>\n\u003Ch2 id=\"sift-workstation-setup\">SIFT Workstation Setup\u003C/h2>\n\u003Ch3 id=\"systemanforderungen\">Systemanforderungen\u003C/h3>\n\u003Cul>\n\u003Cli>Quad-Core CPU 2.5GHz+\u003C/li>\n\u003Cli>16GB+ RAM\u003C/li>\n\u003Cli>500GB+ SSD Speicher\u003C/li>\n\u003Cli>USB 3.0+ Anschlüsse\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"installation-1\">Installation\u003C/h3>\n\u003Col>\n\u003Cli>Download von \u003Ca href=\"https://www.sans.org/tools/sift-workstation/\">SANS SIFT Workstation\u003C/a>\u003C/li>\n\u003Cli>VMware/VirtualBox Import der OVA-Datei\u003C/li>\n\u003Cli>VM-Konfiguration: 8GB+ RAM, 4+ CPU-Kerne\u003C/li>\n\u003C/ol>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Update nach Installation\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apt\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> update\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> && \u003C/span>\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apt\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> upgrade\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -y\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> sift\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> update\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"autopsy-installation\">Autopsy Installation\u003C/h2>\n\u003Ch3 id=\"windows-installation\">Windows Installation\u003C/h3>\n\u003Col>\n\u003Cli>Download von \u003Ca href=\"https://www.autopsy.com/\">autopsy.com\u003C/a>\u003C/li>\n\u003Cli>Java 8+ Installation erforderlich\u003C/li>\n\u003Cli>Installation mit Administratorrechten\u003C/li>\n\u003C/ol>\n\u003Ch3 id=\"linux-installation\">Linux Installation\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Ubuntu/Debian\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apt\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> install\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> autopsy\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> sleuthkit\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Oder manueller Download und Installation\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">wget\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> https://github.com/sleuthkit/autopsy/releases/latest\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"essential-tools-installation\">Essential Tools Installation\u003C/h2>\n\u003Ch3 id=\"android-debug-bridge-adb\">Android Debug Bridge (ADB)\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Ubuntu/Debian\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apt\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> install\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> android-tools-adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> android-tools-fastboot\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Windows - Download Android Platform Tools\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># https://developer.android.com/studio/releases/platform-tools\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"aleapp-installation\">ALEAPP Installation\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">git\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> clone\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> https://github.com/abrignoni/ALEAPP.git\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">cd\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> ALEAPP\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">pip3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> install\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -r\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> requirements.txt\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"mobile-verification-toolkit-mvt\">Mobile Verification Toolkit (MVT)\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">pip3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> install\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> mvt\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Oder via GitHub für neueste Version\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">git\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> clone\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> https://github.com/mvt-project/mvt.git\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">cd\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> mvt\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> && \u003C/span>\u003Cspan style=\"color:#B392F0\">pip3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> install\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> .\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"andriller-installation\">Andriller Installation\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">git\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> clone\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> https://github.com/den4uk/andriller.git\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">cd\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> andriller\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">pip3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> install\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -r\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> requirements.txt\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch1 id=\"konfiguration\">Konfiguration\u003C/h1>\n\u003Ch2 id=\"adb-setup-und-gerätevorbereitung\">ADB Setup und Gerätevorbereitung\u003C/h2>\n\u003Ch3 id=\"usb-debugging-aktivieren\">USB-Debugging aktivieren\u003C/h3>\n\u003Col>\n\u003Cli>Entwickleroptionen freischalten (7x Build-Nummer antippen)\u003C/li>\n\u003Cli>USB-Debugging aktivieren\u003C/li>\n\u003Cli>Gerät via USB verbinden\u003C/li>\n\u003Cli>RSA-Fingerprint akzeptieren\u003C/li>\n\u003C/ol>\n\u003Ch3 id=\"adb-verbindung-testen\">ADB Verbindung testen\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> devices\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Sollte Gerät mit \"device\" Status zeigen\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> getprop\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> ro.build.version.release\u003C/span>\u003Cspan style=\"color:#6A737D\"> # Android Version\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> getprop\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> ro.product.model\u003C/span>\u003Cspan style=\"color:#6A737D\"> # Gerätemodell\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"autopsy-projektkonfiguration\">Autopsy Projektkonfiguration\u003C/h2>\n\u003Ch3 id=\"case-setup\">Case-Setup\u003C/h3>\n\u003Col>\n\u003Cli>Neuen Fall erstellen\u003C/li>\n\u003Cli>Ermittler-Informationen eingeben\u003C/li>\n\u003Cli>Case-Verzeichnis festlegen (ausreichend Speicherplatz)\u003C/li>\n\u003C/ol>\n\u003Ch3 id=\"android-analyzer-module-aktivieren\">Android Analyzer Module aktivieren\u003C/h3>\n\u003Cul>\n\u003Cli>Tools → Options → Modules\u003C/li>\n\u003Cli>Android Analyzer aktivieren\u003C/li>\n\u003Cli>ALEAPP Integration konfigurieren\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"hash-algorithmen-konfigurieren\">Hash-Algorithmen konfigurieren\u003C/h3>\n\u003Cul>\n\u003Cli>MD5, SHA-1, SHA-256 für Integritätsprüfung\u003C/li>\n\u003Cli>Automatische Hash-Berechnung bei Import aktivieren\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"mvt-konfiguration\">MVT Konfiguration\u003C/h2>\n\u003Ch3 id=\"konfigurationsdatei-erstellen\">Konfigurationsdatei erstellen\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"yaml\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># ~/.mvt/config.yaml\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#85E89D\">adb_path\u003C/span>\u003Cspan style=\"color:#E1E4E8\">: \u003C/span>\u003Cspan style=\"color:#9ECBFF\">\"/usr/bin/adb\"\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#85E89D\">output_folder\u003C/span>\u003Cspan style=\"color:#E1E4E8\">: \u003C/span>\u003Cspan style=\"color:#9ECBFF\">\"/home/user/mvt_output\"\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch1 id=\"verwendungsbeispiele\">Verwendungsbeispiele\u003C/h1>\n\u003Ch2 id=\"fall-1-logische-datenextraktion-mit-adb\">Fall 1: Logische Datenextraktion mit ADB\u003C/h2>\n\u003Ch3 id=\"geräteinformationen-sammeln\">Geräteinformationen sammeln\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Systeminfo\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> getprop\u003C/span>\u003Cspan style=\"color:#F97583\"> >\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> device_properties.txt\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> cat\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /proc/version\u003C/span>\u003Cspan style=\"color:#F97583\"> >\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> kernel_info.txt\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> mount\u003C/span>\u003Cspan style=\"color:#F97583\"> >\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> mount_info.txt\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Installierte Apps\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> pm\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> list\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> packages\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -f\u003C/span>\u003Cspan style=\"color:#F97583\"> >\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> installed_packages.txt\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"datenbank-extraktion\">Datenbank-Extraktion\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># SMS/MMS Datenbank\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> pull\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /data/data/com.android.providers.telephony/databases/mmssms.db\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Kontakte\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> pull\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /data/data/com.android.providers.contacts/databases/contacts2.db\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Anrufliste \u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> pull\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /data/data/com.android.providers.contacts/databases/calllog.db\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"whatsapp-datenextraktion\">WhatsApp Datenextraktion\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># WhatsApp Datenbanken (Root erforderlich)\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> su\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -c\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \"cp -r /data/data/com.whatsapp/ /sdcard/whatsapp_backup/\"\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> pull\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /sdcard/whatsapp_backup/\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"fall-2-android-backup-analyse\">Fall 2: Android Backup-Analyse\u003C/h2>\n\u003Ch3 id=\"vollständiges-backup-erstellen\">Vollständiges Backup erstellen\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Umfassendes Backup (ohne Root)\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> backup\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -all\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -system\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -apk\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -shared\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -f\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> backup.ab\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Backup entschlüsseln (falls verschlüsselt)\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">java\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -jar\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> abe.jar\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> unpack\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> backup.ab\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> backup.tar\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">tar\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -xf\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> backup.tar\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"backup-mit-aleapp-analysieren\">Backup mit ALEAPP analysieren\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">python3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> aleappGUI.py\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Oder Command-Line\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">python3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> aleapp.py\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -t\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> tar\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -i\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> backup.tar\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -o\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> output_folder\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"fall-3-mvt-kompromittierungsanalyse\">Fall 3: MVT Kompromittierungsanalyse\u003C/h2>\n\u003Ch3 id=\"live-geräteanalyse\">Live-Geräteanalyse\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># ADB-basierte Analyse\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">mvt-android\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> check-adb\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --output\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /path/to/output/\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Backup-Analyse\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">mvt-android\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> check-backup\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --output\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /path/to/output/\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> backup.ab\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"ioc-suche-mit-pegasus-indikatoren\">IOC-Suche mit Pegasus-Indikatoren\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Mit vorgefertigten IOCs\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">mvt-android\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> check-adb\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --iocs\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /path/to/pegasus.stix2\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --output\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> results/\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"fall-4-physische-extraktion-root-erforderlich\">Fall 4: Physische Extraktion (Root erforderlich)\u003C/h2>\n\u003Ch3 id=\"device-rooting---mediatek-geräte\">Device Rooting - MediaTek Geräte\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># MTKClient für MediaTek-Chipsets\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">git\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> clone\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> https://github.com/bkerler/mtkclient.git\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">cd\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> mtkclient\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">python3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> mtk\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> payload\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Nach erfolgreichem Root\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> su\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"vollständiges-memory-dump\">Vollständiges Memory Dump\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Partitionslayout ermitteln\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> su\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -c\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \"cat /proc/partitions\"\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> su\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -c\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \"ls -la /dev/block/\"\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Vollständiges Device Image (Root erforderlich)\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> su\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -c\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \"dd if=/dev/block/mmcblk0 of=/sdcard/full_device.img bs=4096\"\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> pull\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /sdcard/full_device.img\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch1 id=\"best-practices\">Best Practices\u003C/h1>\n\u003Ch2 id=\"rechtliche-compliance\">Rechtliche Compliance\u003C/h2>\n\u003Ch3 id=\"dokumentation-und-chain-of-custody\">Dokumentation und Chain of Custody\u003C/h3>\n\u003Cul>\n\u003Cli>\u003Cstrong>Vollständige Dokumentation\u003C/strong>: Wer, Was, Wann, Wo, Warum\u003C/li>\n\u003Cli>\u003Cstrong>Hash-Verifikation\u003C/strong>: MD5/SHA-256 für alle extrahierten Daten\u003C/li>\n\u003Cli>\u003Cstrong>Nur forensische Kopien analysieren\u003C/strong>, niemals Originaldaten\u003C/li>\n\u003Cli>\u003Cstrong>Schriftliche Genehmigung\u003C/strong> für Geräteanalyse einholen\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"familiengeräte-und-nachlässe\">Familiengeräte und Nachlässe\u003C/h3>\n\u003Cul>\n\u003Cli>Genehmigung durch Nachlassverwalter erforderlich\u003C/li>\n\u003Cli>Gerichtsbeschlüsse für Cloud-Zugang eventuell nötig\u003C/li>\n\u003Cli>Drittpartei-Kommunikation kann weiterhin geschützt sein\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"technische-best-practices\">Technische Best Practices\u003C/h2>\n\u003Ch3 id=\"hash-integrität-sicherstellen\">Hash-Integrität sicherstellen\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Hash vor und nach Transfer prüfen\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">md5sum\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> original_file.db\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sha256sum\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> original_file.db\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Hash-Verifikation dokumentieren\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">echo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \"$(\u003C/span>\u003Cspan style=\"color:#B392F0\">date\u003C/span>\u003Cspan style=\"color:#9ECBFF\">): MD5: $(\u003C/span>\u003Cspan style=\"color:#B392F0\">md5sum\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> file.db)\"\u003C/span>\u003Cspan style=\"color:#F97583\"> >>\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> chain_of_custody.log\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"sichere-arbeitsumgebung\">Sichere Arbeitsumgebung\u003C/h3>\n\u003Cul>\n\u003Cli>Isolierte VM für Forensik-Arbeit\u003C/li>\n\u003Cli>Netzwerk-Isolation während Analyse\u003C/li>\n\u003Cli>Verschlüsselte Speicherung aller Evidenz\u003C/li>\n\u003Cli>Regelmäßige Backups der Case-Datenbanken\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"qualitätssicherung\">Qualitätssicherung\u003C/h3>\n\u003Cul>\n\u003Cli>Peer-Review kritischer Analysen\u003C/li>\n\u003Cli>Standardisierte Arbeitsabläufe (SOPs)\u003C/li>\n\u003Cli>Regelmäßige Tool-Validierung\u003C/li>\n\u003Cli>Kontinuierliche Weiterbildung\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"erfolgsmaximierung-nach-gerätehersteller\">Erfolgsmaximierung nach Gerätehersteller\u003C/h2>\n\u003Ch3 id=\"mediatek-geräte-höchste-erfolgsrate\">MediaTek-Geräte (Höchste Erfolgsrate)\u003C/h3>\n\u003Cul>\n\u003Cli>BootROM-Exploits für MT6735, MT6737, MT6750, MT6753, MT6797\u003C/li>\n\u003Cli>MTKClient für Hardware-Level-Zugang\u003C/li>\n\u003Cli>Erfolgsrate: 80%+ für Geräte 2015-2019\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"samsung-geräte\">Samsung-Geräte\u003C/h3>\n\u003Cul>\n\u003Cli>Ältere Knox-Implementierungen umgehbar\u003C/li>\n\u003Cli>Emergency Dialer Exploits für Android 4.x\u003C/li>\n\u003Cli>Erfolgsrate: 40-70% je nach Knox-Version\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"pixelnexus-geräte\">Pixel/Nexus-Geräte\u003C/h3>\n\u003Cul>\n\u003Cli>Bootloader-Unlocking oft möglich\u003C/li>\n\u003Cli>Fastboot-basierte Recovery-Installation\u003C/li>\n\u003Cli>Erfolgsrate: 60-80% bei freigeschaltetem Bootloader\u003C/li>\n\u003C/ul>\n\u003Ch1 id=\"troubleshooting\">Troubleshooting\u003C/h1>\n\u003Ch2 id=\"problem-adb-erkennt-gerät-nicht\">Problem: ADB erkennt Gerät nicht\u003C/h2>\n\u003Ch3 id=\"lösung-usb-treiber-und-berechtigungen\">Lösung: USB-Treiber und Berechtigungen\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Linux: USB-Berechtigungen prüfen\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">lsusb\u003C/span>\u003Cspan style=\"color:#F97583\"> |\u003C/span>\u003Cspan style=\"color:#B392F0\"> grep\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -i\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> android\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> chmod\u003C/span>\u003Cspan style=\"color:#79B8FF\"> 666\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /dev/bus/usb/XXX/XXX\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># udev-Regeln erstellen\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">echo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> 'SUBSYSTEM==\"usb\", ATTR{idVendor}==\"18d1\", MODE=\"0666\", GROUP=\"plugdev\"'\u003C/span>\u003Cspan style=\"color:#F97583\"> |\u003C/span>\u003Cspan style=\"color:#B392F0\"> sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> tee\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /etc/udev/rules.d/51-android.rules\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> udevadm\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> control\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --reload-rules\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"windows-treiber-installation\">Windows: Treiber-Installation\u003C/h3>\n\u003Col>\n\u003Cli>Geräte-Manager öffnen\u003C/li>\n\u003Cli>Android-Gerät mit Warnsymbol finden\u003C/li>\n\u003Cli>Treiber manuell installieren (Android USB Driver)\u003C/li>\n\u003C/ol>\n\u003Ch2 id=\"problem-verschlüsselte-android-backups\">Problem: Verschlüsselte Android Backups\u003C/h2>\n\u003Ch3 id=\"lösung-android-backup-extractor\">Lösung: Android Backup Extractor\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># ADB Backup Extractor installieren\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">git\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> clone\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> https://github.com/nelenkov/android-backup-extractor.git\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">cd\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> android-backup-extractor\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">gradle\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> build\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Backup entschlüsseln\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">java\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -jar\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> abe.jar\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> unpack\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> backup.ab\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> backup.tar\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> [password]\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"problem-unzureichende-berechtigungen-für-datenextraktion\">Problem: Unzureichende Berechtigungen für Datenextraktion\u003C/h2>\n\u003Ch3 id=\"lösung-alternative-extraktionsmethoden\">Lösung: Alternative Extraktionsmethoden\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># AFLogical OSE für begrenzte Extraktion ohne Root\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># WhatsApp Key/DB Extractor für spezifische Apps\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Backup-basierte Extraktion als Fallback\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Custom Recovery für erweiterten Zugang\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">fastboot\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> flash\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> recovery\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> twrp-device.img\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"problem-aleapp-parsing-fehler\">Problem: ALEAPP Parsing-Fehler\u003C/h2>\n\u003Ch3 id=\"lösung-datenformat-probleme-beheben\">Lösung: Datenformat-Probleme beheben\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Log-Dateien prüfen\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">python3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> aleapp.py\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -t\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> dir\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -i\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /path/to/data\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -o\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> output\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --debug\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Spezifische Parser deaktivieren\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Manuelle SQLite-Analyse bei Parser-Fehlern\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sqlite3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> database.db\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \".tables\"\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sqlite3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> database.db\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \".schema table_name\"\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch1 id=\"erweiterte-techniken\">Erweiterte Techniken\u003C/h1>\n\u003Ch2 id=\"memory-forensics-mit-lime\">Memory Forensics mit LiME\u003C/h2>\n\u003Ch3 id=\"lime-für-arm-devices-kompilieren\">LiME für ARM-Devices kompilieren\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Cross-Compilation Setup\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">export\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> ARCH\u003C/span>\u003Cspan style=\"color:#F97583\">=\u003C/span>\u003Cspan style=\"color:#E1E4E8\">arm\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">export\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> CROSS_COMPILE\u003C/span>\u003Cspan style=\"color:#F97583\">=\u003C/span>\u003Cspan style=\"color:#E1E4E8\">arm-linux-gnueabi-\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\">export\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> KERNEL_DIR\u003C/span>\u003Cspan style=\"color:#F97583\">=\u003C/span>\u003Cspan style=\"color:#E1E4E8\">/path/to/kernel/source\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># LiME Module kompilieren\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">git\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> clone\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> https://github.com/504ensicsLabs/LiME.git\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\">cd\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> LiME/src\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">make\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Memory Dump erstellen (Root erforderlich)\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> push\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> lime.ko\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /data/local/tmp/\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> su\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -c\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \"insmod /data/local/tmp/lime.ko 'path=/sdcard/memory.lime format=lime'\"\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"volatility-analyse-von-android-memory\">Volatility-Analyse von Android Memory\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Memory Dump analysieren\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">python\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> vol.py\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -f\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> memory.lime\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --profile=Linux\u003C/span>\u003Cspan style=\"color:#F97583\"> <\u003C/span>\u003Cspan style=\"color:#9ECBFF\">profil\u003C/span>\u003Cspan style=\"color:#E1E4E8\">e\u003C/span>\u003Cspan style=\"color:#F97583\">>\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> linux.pslist\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">python\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> vol.py\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -f\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> memory.lime\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --profile=Linux\u003C/span>\u003Cspan style=\"color:#F97583\"> <\u003C/span>\u003Cspan style=\"color:#9ECBFF\">profil\u003C/span>\u003Cspan style=\"color:#E1E4E8\">e\u003C/span>\u003Cspan style=\"color:#F97583\">>\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> linux.bash\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">python\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> vol.py\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -f\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> memory.lime\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --profile=Linux\u003C/span>\u003Cspan style=\"color:#F97583\"> <\u003C/span>\u003Cspan style=\"color:#9ECBFF\">profil\u003C/span>\u003Cspan style=\"color:#E1E4E8\">e\u003C/span>\u003Cspan style=\"color:#F97583\">>\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> linux.netstat\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"frida-basierte-runtime-analyse\">FRIDA-basierte Runtime-Analyse\u003C/h2>\n\u003Ch3 id=\"frida-für-kryptographie-hooks\">FRIDA für Kryptographie-Hooks\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"javascript\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\">// crypto_hooks.js - SSL/TLS Traffic abfangen\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">Java.\u003C/span>\u003Cspan style=\"color:#B392F0\">perform\u003C/span>\u003Cspan style=\"color:#E1E4E8\">(\u003C/span>\u003Cspan style=\"color:#F97583\">function\u003C/span>\u003Cspan style=\"color:#E1E4E8\">() {\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#F97583\"> var\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> SSLContext \u003C/span>\u003Cspan style=\"color:#F97583\">=\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> Java.\u003C/span>\u003Cspan style=\"color:#B392F0\">use\u003C/span>\u003Cspan style=\"color:#E1E4E8\">(\u003C/span>\u003Cspan style=\"color:#9ECBFF\">\"javax.net.ssl.SSLContext\"\u003C/span>\u003Cspan style=\"color:#E1E4E8\">);\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\"> SSLContext.init.\u003C/span>\u003Cspan style=\"color:#B392F0\">overload\u003C/span>\u003Cspan style=\"color:#E1E4E8\">(\u003C/span>\u003Cspan style=\"color:#9ECBFF\">'[Ljavax.net.ssl.KeyManager;'\u003C/span>\u003Cspan style=\"color:#E1E4E8\">, \u003C/span>\u003Cspan style=\"color:#9ECBFF\">'[Ljavax.net.ssl.TrustManager;'\u003C/span>\u003Cspan style=\"color:#E1E4E8\">, \u003C/span>\u003Cspan style=\"color:#9ECBFF\">'java.security.SecureRandom'\u003C/span>\u003Cspan style=\"color:#E1E4E8\">).\u003C/span>\u003Cspan style=\"color:#B392F0\">implementation\u003C/span>\u003Cspan style=\"color:#F97583\"> =\u003C/span>\u003Cspan style=\"color:#F97583\"> function\u003C/span>\u003Cspan style=\"color:#E1E4E8\">(\u003C/span>\u003Cspan style=\"color:#FFAB70\">keyManagers\u003C/span>\u003Cspan style=\"color:#E1E4E8\">, \u003C/span>\u003Cspan style=\"color:#FFAB70\">trustManagers\u003C/span>\u003Cspan style=\"color:#E1E4E8\">, \u003C/span>\u003Cspan style=\"color:#FFAB70\">secureRandom\u003C/span>\u003Cspan style=\"color:#E1E4E8\">) {\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\"> console.\u003C/span>\u003Cspan style=\"color:#B392F0\">log\u003C/span>\u003Cspan style=\"color:#E1E4E8\">(\u003C/span>\u003Cspan style=\"color:#9ECBFF\">\"[+] SSLContext.init() called\"\u003C/span>\u003Cspan style=\"color:#E1E4E8\">);\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\"> this\u003C/span>\u003Cspan style=\"color:#E1E4E8\">.\u003C/span>\u003Cspan style=\"color:#B392F0\">init\u003C/span>\u003Cspan style=\"color:#E1E4E8\">(keyManagers, trustManagers, secureRandom);\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\"> };\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\">});\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"frida-installation-und-verwendung\">FRIDA Installation und Verwendung\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># FRIDA Server auf Android-Gerät installieren\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> push\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> frida-server\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /data/local/tmp/\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> su\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -c\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \"chmod 755 /data/local/tmp/frida-server\"\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> su\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -c\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \"/data/local/tmp/frida-server &\"\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Script ausführen\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">frida\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -U\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -l\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> crypto_hooks.js\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> com.target.package\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"custom-recovery-und-fastboot-exploits\">Custom Recovery und Fastboot-Exploits\u003C/h2>\n\u003Ch3 id=\"twrp-installation-für-forensischen-zugang\">TWRP Installation für forensischen Zugang\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Bootloader entsperren (Herstellerabhängig)\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">fastboot\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> oem\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> unlock\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Oder\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">fastboot\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> flashing\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> unlock\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># TWRP flashen\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">fastboot\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> flash\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> recovery\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> twrp-device.img\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">fastboot\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> boot\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> twrp-device.img\u003C/span>\u003Cspan style=\"color:#6A737D\"> # Temporäre Installation\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># In TWRP: ADB-Zugang mit Root-Berechtigungen\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> mount\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /system\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> mount\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /data\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"partitions-imaging-mit-dd\">Partitions-Imaging mit dd\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Vollständige Partition-Liste\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> cat\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /proc/partitions\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Kritische Partitionen extrahieren\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> dd\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> if=/dev/block/bootdevice/by-name/system\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> of=/external_sd/system.img\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> dd\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> if=/dev/block/bootdevice/by-name/userdata\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> of=/external_sd/userdata.img\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">adb\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> shell\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> dd\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> if=/dev/block/bootdevice/by-name/boot\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> of=/external_sd/boot.img\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"sqlite-forensics-und-gelöschte-daten\">SQLite Forensics und gelöschte Daten\u003C/h2>\n\u003Ch3 id=\"erweiterte-sqlite-analyse\">Erweiterte SQLite-Analyse\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Freelist-Analyse für gelöschte Einträge\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sqlite3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> database.db\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \"PRAGMA freelist_count;\"\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sqlite3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> database.db\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \"PRAGMA page_size;\"\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># WAL-Datei Analyse\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sqlite3\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> database.db\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \"PRAGMA wal_checkpoint;\"\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">strings\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> database.db-wal\u003C/span>\u003Cspan style=\"color:#F97583\"> |\u003C/span>\u003Cspan style=\"color:#B392F0\"> grep\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -i\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> \"search_term\"\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Undark für Deleted Record Recovery\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">undark\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> database.db\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --freelist\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --export-csv\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"timeline-rekonstruktion\">Timeline-Rekonstruktion\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Autopsy Timeline-Generierung\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Tools → Generate Timeline\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Analyse von MAC-Times (Modified, Accessed, Created)\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D\"># Plaso Timeline-Tools\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">log2timeline.py\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> timeline.plaso\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /path/to/android/data/\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">psort.py\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -o\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> dynamic\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> timeline.plaso\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"weiterführende-ressourcen\">Weiterführende Ressourcen\u003C/h2>\n\u003Ch3 id=\"dokumentation-und-standards\">Dokumentation und Standards\u003C/h3>\n\u003Cul>\n\u003Cli>\u003Ca href=\"https://csrc.nist.gov/pubs/sp/800/101/r1/final\">NIST SP 800-101 Rev. 1 - Mobile Device Forensics Guidelines\u003C/a>\u003C/li>\n\u003Cli>\u003Ca href=\"https://www.sans.org/cyber-security-courses/advanced-smartphone-mobile-device-forensics/\">SANS FOR585 - Smartphone Forensics\u003C/a>\u003C/li>\n\u003Cli>\u003Ca href=\"https://github.com/abrignoni/ALEAPP\">ALEAPP GitHub Repository\u003C/a>\u003C/li>\n\u003Cli>\u003Ca href=\"https://docs.mvt.re/en/latest/\">MVT Documentation\u003C/a>\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"community-und-weiterbildung\">Community und Weiterbildung\u003C/h3>\n\u003Cul>\n\u003Cli>\u003Ca href=\"https://sleuthkit.org/autopsy/docs/\">Autopsy User Documentation\u003C/a>\u003C/li>\n\u003Cli>\u003Ca href=\"https://github.com/impillar/AndroidReferences/blob/master/AndroidTools.md\">Android Forensics References\u003C/a>\u003C/li>\n\u003Cli>\u003Ca href=\"https://github.com/mesquidar/ForensicsTools\">Digital Forensics Framework Collection\u003C/a>\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"spezialisierte-tools\">Spezialisierte Tools\u003C/h3>\n\u003Cul>\n\u003Cli>\u003Ca href=\"https://github.com/bkerler/mtkclient\">MTKClient für MediaTek Exploits\u003C/a>\u003C/li>\n\u003Cli>\u003Ca href=\"https://github.com/nowsecure/android-forensics\">Android Forensics Framework\u003C/a>\u003C/li>\n\u003Cli>\u003Ca href=\"https://santoku-linux.com/\">Santoku Linux Mobile Forensics Distribution\u003C/a>\u003C/li>\n\u003C/ul>\n\u003Chr>\n\u003Cp>\u003Cstrong>Wichtiger Hinweis\u003C/strong>: Diese Anleitung dient ausschließlich für autorisierte forensische Untersuchungen. Stellen Sie sicher, dass Sie über entsprechende rechtliche Befugnisse verfügen, bevor Sie diese Techniken anwenden. Bei Zweifeln konsultieren Sie Rechtsberatung.\u003C/p>",{"headings":309,"localImagePaths":531,"remoteImagePaths":532,"frontmatter":290,"imagePaths":533},[310,311,314,317,318,321,324,326,329,332,335,338,341,344,347,350,351,354,357,360,363,366,369,372,375,378,379,382,385,388,391,394,397,400,403,406,409,412,415,418,419,422,425,428,431,434,437,440,443,446,449,452,453,456,459,462,465,468,471,474,477,480,483,486,489,492,495,498,501,504,507,510,513,516,519,522,525,528],{"depth":43,"slug":44,"text":45},{"depth":47,"slug":312,"text":313},"kernkomponenten-des-open-source-forensik-stacks","Kernkomponenten des Open-Source Forensik-Stacks",{"depth":47,"slug":315,"text":316},"erfolgsraten-nach-gerätealter","Erfolgsraten nach Gerätealter",{"depth":43,"slug":48,"text":49},{"depth":47,"slug":319,"text":320},"sift-workstation-setup","SIFT Workstation Setup",{"depth":51,"slug":322,"text":323},"systemanforderungen","Systemanforderungen",{"depth":51,"slug":325,"text":49},"installation-1",{"depth":47,"slug":327,"text":328},"autopsy-installation","Autopsy Installation",{"depth":51,"slug":330,"text":331},"windows-installation","Windows Installation",{"depth":51,"slug":333,"text":334},"linux-installation","Linux Installation",{"depth":47,"slug":336,"text":337},"essential-tools-installation","Essential Tools Installation",{"depth":51,"slug":339,"text":340},"android-debug-bridge-adb","Android Debug Bridge (ADB)",{"depth":51,"slug":342,"text":343},"aleapp-installation","ALEAPP Installation",{"depth":51,"slug":345,"text":346},"mobile-verification-toolkit-mvt","Mobile Verification Toolkit (MVT)",{"depth":51,"slug":348,"text":349},"andriller-installation","Andriller Installation",{"depth":43,"slug":58,"text":59},{"depth":47,"slug":352,"text":353},"adb-setup-und-gerätevorbereitung","ADB Setup und Gerätevorbereitung",{"depth":51,"slug":355,"text":356},"usb-debugging-aktivieren","USB-Debugging aktivieren",{"depth":51,"slug":358,"text":359},"adb-verbindung-testen","ADB Verbindung testen",{"depth":47,"slug":361,"text":362},"autopsy-projektkonfiguration","Autopsy Projektkonfiguration",{"depth":51,"slug":364,"text":365},"case-setup","Case-Setup",{"depth":51,"slug":367,"text":368},"android-analyzer-module-aktivieren","Android Analyzer Module aktivieren",{"depth":51,"slug":370,"text":371},"hash-algorithmen-konfigurieren","Hash-Algorithmen konfigurieren",{"depth":47,"slug":373,"text":374},"mvt-konfiguration","MVT Konfiguration",{"depth":51,"slug":376,"text":377},"konfigurationsdatei-erstellen","Konfigurationsdatei erstellen",{"depth":43,"slug":70,"text":71},{"depth":47,"slug":380,"text":381},"fall-1-logische-datenextraktion-mit-adb","Fall 1: Logische Datenextraktion mit ADB",{"depth":51,"slug":383,"text":384},"geräteinformationen-sammeln","Geräteinformationen sammeln",{"depth":51,"slug":386,"text":387},"datenbank-extraktion","Datenbank-Extraktion",{"depth":51,"slug":389,"text":390},"whatsapp-datenextraktion","WhatsApp Datenextraktion",{"depth":47,"slug":392,"text":393},"fall-2-android-backup-analyse","Fall 2: Android Backup-Analyse",{"depth":51,"slug":395,"text":396},"vollständiges-backup-erstellen","Vollständiges Backup erstellen",{"depth":51,"slug":398,"text":399},"backup-mit-aleapp-analysieren","Backup mit ALEAPP analysieren",{"depth":47,"slug":401,"text":402},"fall-3-mvt-kompromittierungsanalyse","Fall 3: MVT Kompromittierungsanalyse",{"depth":51,"slug":404,"text":405},"live-geräteanalyse","Live-Geräteanalyse",{"depth":51,"slug":407,"text":408},"ioc-suche-mit-pegasus-indikatoren","IOC-Suche mit Pegasus-Indikatoren",{"depth":47,"slug":410,"text":411},"fall-4-physische-extraktion-root-erforderlich","Fall 4: Physische Extraktion (Root erforderlich)",{"depth":51,"slug":413,"text":414},"device-rooting---mediatek-geräte","Device Rooting - MediaTek Geräte",{"depth":51,"slug":416,"text":417},"vollständiges-memory-dump","Vollständiges Memory Dump",{"depth":43,"slug":79,"text":80},{"depth":47,"slug":420,"text":421},"rechtliche-compliance","Rechtliche Compliance",{"depth":51,"slug":423,"text":424},"dokumentation-und-chain-of-custody","Dokumentation und Chain of Custody",{"depth":51,"slug":426,"text":427},"familiengeräte-und-nachlässe","Familiengeräte und Nachlässe",{"depth":47,"slug":429,"text":430},"technische-best-practices","Technische Best Practices",{"depth":51,"slug":432,"text":433},"hash-integrität-sicherstellen","Hash-Integrität sicherstellen",{"depth":51,"slug":435,"text":436},"sichere-arbeitsumgebung","Sichere Arbeitsumgebung",{"depth":51,"slug":438,"text":439},"qualitätssicherung","Qualitätssicherung",{"depth":47,"slug":441,"text":442},"erfolgsmaximierung-nach-gerätehersteller","Erfolgsmaximierung nach Gerätehersteller",{"depth":51,"slug":444,"text":445},"mediatek-geräte-höchste-erfolgsrate","MediaTek-Geräte (Höchste Erfolgsrate)",{"depth":51,"slug":447,"text":448},"samsung-geräte","Samsung-Geräte",{"depth":51,"slug":450,"text":451},"pixelnexus-geräte","Pixel/Nexus-Geräte",{"depth":43,"slug":82,"text":83},{"depth":47,"slug":454,"text":455},"problem-adb-erkennt-gerät-nicht","Problem: ADB erkennt Gerät nicht",{"depth":51,"slug":457,"text":458},"lösung-usb-treiber-und-berechtigungen","Lösung: USB-Treiber und Berechtigungen",{"depth":51,"slug":460,"text":461},"windows-treiber-installation","Windows: Treiber-Installation",{"depth":47,"slug":463,"text":464},"problem-verschlüsselte-android-backups","Problem: Verschlüsselte Android Backups",{"depth":51,"slug":466,"text":467},"lösung-android-backup-extractor","Lösung: Android Backup Extractor",{"depth":47,"slug":469,"text":470},"problem-unzureichende-berechtigungen-für-datenextraktion","Problem: Unzureichende Berechtigungen für Datenextraktion",{"depth":51,"slug":472,"text":473},"lösung-alternative-extraktionsmethoden","Lösung: Alternative Extraktionsmethoden",{"depth":47,"slug":475,"text":476},"problem-aleapp-parsing-fehler","Problem: ALEAPP Parsing-Fehler",{"depth":51,"slug":478,"text":479},"lösung-datenformat-probleme-beheben","Lösung: Datenformat-Probleme beheben",{"depth":43,"slug":481,"text":482},"erweiterte-techniken","Erweiterte Techniken",{"depth":47,"slug":484,"text":485},"memory-forensics-mit-lime","Memory Forensics mit LiME",{"depth":51,"slug":487,"text":488},"lime-für-arm-devices-kompilieren","LiME für ARM-Devices kompilieren",{"depth":51,"slug":490,"text":491},"volatility-analyse-von-android-memory","Volatility-Analyse von Android Memory",{"depth":47,"slug":493,"text":494},"frida-basierte-runtime-analyse","FRIDA-basierte Runtime-Analyse",{"depth":51,"slug":496,"text":497},"frida-für-kryptographie-hooks","FRIDA für Kryptographie-Hooks",{"depth":51,"slug":499,"text":500},"frida-installation-und-verwendung","FRIDA Installation und Verwendung",{"depth":47,"slug":502,"text":503},"custom-recovery-und-fastboot-exploits","Custom Recovery und Fastboot-Exploits",{"depth":51,"slug":505,"text":506},"twrp-installation-für-forensischen-zugang","TWRP Installation für forensischen Zugang",{"depth":51,"slug":508,"text":509},"partitions-imaging-mit-dd","Partitions-Imaging mit dd",{"depth":47,"slug":511,"text":512},"sqlite-forensics-und-gelöschte-daten","SQLite Forensics und gelöschte Daten",{"depth":51,"slug":514,"text":515},"erweiterte-sqlite-analyse","Erweiterte SQLite-Analyse",{"depth":51,"slug":517,"text":518},"timeline-rekonstruktion","Timeline-Rekonstruktion",{"depth":47,"slug":520,"text":521},"weiterführende-ressourcen","Weiterführende Ressourcen",{"depth":51,"slug":523,"text":524},"dokumentation-und-standards","Dokumentation und Standards",{"depth":51,"slug":526,"text":527},"community-und-weiterbildung","Community und Weiterbildung",{"depth":51,"slug":529,"text":530},"spezialisierte-tools","Spezialisierte Tools",[],[],[],"android-logical-imaging.md","nextcloud",{"id":535,"data":537,"body":551,"filePath":552,"digest":553,"rendered":554,"legacyId":590},{"title":538,"tool_name":539,"description":540,"last_updated":541,"author":16,"difficulty":542,"categories":543,"tags":545,"sections":550,"review_status":34},"Nextcloud - Sichere Kollaborationsplattform","Nextcloud","Detaillierte Anleitung und Best Practices für Nextcloud in forensischen Einsatzszenarien",["Date","2025-07-20T00:00:00.000Z"],"novice",[544],"collaboration-general",[25,546,547,27,548,549],"collaboration","file-sharing","encryption","document-management",{"overview":32,"installation":32,"configuration":32,"usage_examples":32,"best_practices":32,"troubleshooting":32,"advanced_topics":33},"> **⚠️ Hinweis**: Dies ist ein vorläufiger, KI-generierter Knowledgebase-Eintrag. Wir freuen uns über Verbesserungen und Ergänzungen durch die Community!\n\n\n# Übersicht\n\nNextcloud ist eine Open-Source-Cloud-Suite, die speziell für die sichere Zusammenarbeit entwickelt wurde. Sie eignet sich ideal für forensische Teams, da sie eine DSGVO-konforme Umgebung mit verschlüsselter Dateiablage, Office-Integration und Videokonferenzen bereitstellt. Zusätzlich bietet Nextcloud einen integrierten SSO-Provider, der das Identitätsmanagement für andere forensische Tools stark vereinfacht.\n\nSkalierbar von kleinen Raspberry-Pi-Installationen bis hin zu hochverfügbaren Multi-Node-Setups.\n\n- **Website:** [nextcloud.com](https://nextcloud.com/)\n- **Demo/Projektinstanz:** [cloud.cc24.dev](https://cloud.cc24.dev)\n- **Statusseite:** [Mikoshi Status](https://status.mikoshi.de/api/badge/11/status)\n- **Lizenz:** AGPL-3.0\n\n---\n\n## Installation\n\n### Voraussetzungen\n\n- Linux-Server oder Raspberry Pi\n- PHP 8.1 oder höher\n- MariaDB/PostgreSQL\n- Webserver (Apache/Nginx)\n- SSL-Zertifikat (empfohlen: Let's Encrypt)\n\n### Installationsschritte (Ubuntu Beispiel)\n\n```bash\nsudo apt update && sudo apt upgrade\nsudo apt install apache2 mariadb-server libapache2-mod-php php php-mysql \\\n php-gd php-xml php-mbstring php-curl php-zip php-intl php-bcmath unzip\n\nwget https://download.nextcloud.com/server/releases/latest.zip\nunzip latest.zip -d /var/www/\nchown -R www-data:www-data /var/www/nextcloud\n````\n\nDanach den Web-Installer im Browser aufrufen (`https://\u003Cyour-domain>/nextcloud`) und Setup abschließen.\n\n## Konfiguration\n\n* **Trusted Domains** in `config.php` definieren\n* SSO mit OpenID Connect aktivieren\n* Dateiverschlüsselung aktivieren (`Settings → Security`)\n* Benutzer und Gruppen über LDAP oder SAML integrieren\n\n## Verwendungsbeispiele\n\n### Gemeinsame Fallbearbeitung\n\n1. Ermittlungsordner als geteiltes Gruppenverzeichnis anlegen\n2. Versionierung und Kommentare zu forensischen Berichten aktivieren\n3. Vorschau für Office-Dateien, PDFs und Bilder direkt im Browser nutzen\n\n### Videokonferenzen mit \"Nextcloud Talk\"\n\n* Sichere Kommunikation zwischen Ermittlern und Sachverständigen\n* Ende-zu-Ende-verschlüsselt\n* Bildschirmfreigabe möglich\n\n### Automatischer Dateiimport per API\n\n* REST-Schnittstelle nutzen, um z. B. automatisch Logdateien oder Exportdaten hochzuladen\n* Ideal für Anbindung an SIEM, DLP oder Analyse-Pipelines\n\n## Best Practices\n\n* Zwei-Faktor-Authentifizierung aktivieren\n* Tägliche Backups der Datenbank und Datenstruktur\n* Nutzung von OnlyOffice oder Collabora für revisionssichere Dokumentenbearbeitung\n* Zugriff regelmäßig überprüfen, insbesondere bei externen Partnern\n\n## Troubleshooting\n\n### Problem: Langsame Performance\n\n**Lösung:** APCu aktivieren und Caching optimieren (`config.php → 'memcache.local'`).\n\n### Problem: Dateien erscheinen nicht im Sync\n\n**Lösung:** Cronjob für `files:scan` konfigurieren oder manuell ausführen:\n\n```bash\nsudo -u www-data php /var/www/nextcloud/occ files:scan --all\n```\n\n### Problem: Fehlermeldung \"Trusted domain not set\"\n\n**Lösung:** In `config/config.php` Eintrag `trusted_domains` korrekt konfigurieren:\n\n```php\n'trusted_domains' =>\n array (\n 0 => 'yourdomain.tld',\n 1 => 'cloud.cc24.dev',\n ),\n```\n\n## Weiterführende Themen\n\n* **Integration mit Forensik-Plattformen** (über WebDAV, API oder SSO)\n* **Custom Apps entwickeln** für spezielle Ermittlungs-Workflows\n* **Auditing aktivieren**: Nutzung und Änderungen nachvollziehen mit Protokollierungsfunktionen","src/content/knowledgebase/nextcloud.md","9294074e6083e37b",{"html":555,"metadata":556},"\u003Cblockquote>\n\u003Cp>\u003Cstrong>⚠️ Hinweis\u003C/strong>: Dies ist ein vorläufiger, KI-generierter Knowledgebase-Eintrag. Wir freuen uns über Verbesserungen und Ergänzungen durch die Community!\u003C/p>\n\u003C/blockquote>\n\u003Ch1 id=\"übersicht\">Übersicht\u003C/h1>\n\u003Cp>Nextcloud ist eine Open-Source-Cloud-Suite, die speziell für die sichere Zusammenarbeit entwickelt wurde. Sie eignet sich ideal für forensische Teams, da sie eine DSGVO-konforme Umgebung mit verschlüsselter Dateiablage, Office-Integration und Videokonferenzen bereitstellt. Zusätzlich bietet Nextcloud einen integrierten SSO-Provider, der das Identitätsmanagement für andere forensische Tools stark vereinfacht.\u003C/p>\n\u003Cp>Skalierbar von kleinen Raspberry-Pi-Installationen bis hin zu hochverfügbaren Multi-Node-Setups.\u003C/p>\n\u003Cul>\n\u003Cli>\u003Cstrong>Website:\u003C/strong> \u003Ca href=\"https://nextcloud.com/\">nextcloud.com\u003C/a>\u003C/li>\n\u003Cli>\u003Cstrong>Demo/Projektinstanz:\u003C/strong> \u003Ca href=\"https://cloud.cc24.dev\">cloud.cc24.dev\u003C/a>\u003C/li>\n\u003Cli>\u003Cstrong>Statusseite:\u003C/strong> \u003Ca href=\"https://status.mikoshi.de/api/badge/11/status\">Mikoshi Status\u003C/a>\u003C/li>\n\u003Cli>\u003Cstrong>Lizenz:\u003C/strong> AGPL-3.0\u003C/li>\n\u003C/ul>\n\u003Chr>\n\u003Ch2 id=\"installation\">Installation\u003C/h2>\n\u003Ch3 id=\"voraussetzungen\">Voraussetzungen\u003C/h3>\n\u003Cul>\n\u003Cli>Linux-Server oder Raspberry Pi\u003C/li>\n\u003Cli>PHP 8.1 oder höher\u003C/li>\n\u003Cli>MariaDB/PostgreSQL\u003C/li>\n\u003Cli>Webserver (Apache/Nginx)\u003C/li>\n\u003Cli>SSL-Zertifikat (empfohlen: Let’s Encrypt)\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"installationsschritte-ubuntu-beispiel\">Installationsschritte (Ubuntu Beispiel)\u003C/h3>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apt\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> update\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> && \u003C/span>\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apt\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> upgrade\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apt\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> install\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> apache2\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> mariadb-server\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> libapache2-mod-php\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> php\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> php-mysql\u003C/span>\u003Cspan style=\"color:#79B8FF\"> \\\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#9ECBFF\"> php-gd\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> php-xml\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> php-mbstring\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> php-curl\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> php-zip\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> php-intl\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> php-bcmath\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> unzip\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">wget\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> https://download.nextcloud.com/server/releases/latest.zip\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">unzip\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> latest.zip\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -d\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /var/www/\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">chown\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -R\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> www-data:www-data\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /var/www/nextcloud\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Cp>Danach den Web-Installer im Browser aufrufen (\u003Ccode>https://<your-domain>/nextcloud\u003C/code>) und Setup abschließen.\u003C/p>\n\u003Ch2 id=\"konfiguration\">Konfiguration\u003C/h2>\n\u003Cul>\n\u003Cli>\u003Cstrong>Trusted Domains\u003C/strong> in \u003Ccode>config.php\u003C/code> definieren\u003C/li>\n\u003Cli>SSO mit OpenID Connect aktivieren\u003C/li>\n\u003Cli>Dateiverschlüsselung aktivieren (\u003Ccode>Settings → Security\u003C/code>)\u003C/li>\n\u003Cli>Benutzer und Gruppen über LDAP oder SAML integrieren\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"verwendungsbeispiele\">Verwendungsbeispiele\u003C/h2>\n\u003Ch3 id=\"gemeinsame-fallbearbeitung\">Gemeinsame Fallbearbeitung\u003C/h3>\n\u003Col>\n\u003Cli>Ermittlungsordner als geteiltes Gruppenverzeichnis anlegen\u003C/li>\n\u003Cli>Versionierung und Kommentare zu forensischen Berichten aktivieren\u003C/li>\n\u003Cli>Vorschau für Office-Dateien, PDFs und Bilder direkt im Browser nutzen\u003C/li>\n\u003C/ol>\n\u003Ch3 id=\"videokonferenzen-mit-nextcloud-talk\">Videokonferenzen mit “Nextcloud Talk”\u003C/h3>\n\u003Cul>\n\u003Cli>Sichere Kommunikation zwischen Ermittlern und Sachverständigen\u003C/li>\n\u003Cli>Ende-zu-Ende-verschlüsselt\u003C/li>\n\u003Cli>Bildschirmfreigabe möglich\u003C/li>\n\u003C/ul>\n\u003Ch3 id=\"automatischer-dateiimport-per-api\">Automatischer Dateiimport per API\u003C/h3>\n\u003Cul>\n\u003Cli>REST-Schnittstelle nutzen, um z. B. automatisch Logdateien oder Exportdaten hochzuladen\u003C/li>\n\u003Cli>Ideal für Anbindung an SIEM, DLP oder Analyse-Pipelines\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"best-practices\">Best Practices\u003C/h2>\n\u003Cul>\n\u003Cli>Zwei-Faktor-Authentifizierung aktivieren\u003C/li>\n\u003Cli>Tägliche Backups der Datenbank und Datenstruktur\u003C/li>\n\u003Cli>Nutzung von OnlyOffice oder Collabora für revisionssichere Dokumentenbearbeitung\u003C/li>\n\u003Cli>Zugriff regelmäßig überprüfen, insbesondere bei externen Partnern\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"troubleshooting\">Troubleshooting\u003C/h2>\n\u003Ch3 id=\"problem-langsame-performance\">Problem: Langsame Performance\u003C/h3>\n\u003Cp>\u003Cstrong>Lösung:\u003C/strong> APCu aktivieren und Caching optimieren (\u003Ccode>config.php → 'memcache.local'\u003C/code>).\u003C/p>\n\u003Ch3 id=\"problem-dateien-erscheinen-nicht-im-sync\">Problem: Dateien erscheinen nicht im Sync\u003C/h3>\n\u003Cp>\u003Cstrong>Lösung:\u003C/strong> Cronjob für \u003Ccode>files:scan\u003C/code> konfigurieren oder manuell ausführen:\u003C/p>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#B392F0\">sudo\u003C/span>\u003Cspan style=\"color:#79B8FF\"> -u\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> www-data\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> php\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> /var/www/nextcloud/occ\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> files:scan\u003C/span>\u003Cspan style=\"color:#79B8FF\"> --all\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"problem-fehlermeldung-trusted-domain-not-set\">Problem: Fehlermeldung “Trusted domain not set”\u003C/h3>\n\u003Cp>\u003Cstrong>Lösung:\u003C/strong> In \u003Ccode>config/config.php\u003C/code> Eintrag \u003Ccode>trusted_domains\u003C/code> korrekt konfigurieren:\u003C/p>\n\u003Cpre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"php\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#9ECBFF\">'trusted_domains'\u003C/span>\u003Cspan style=\"color:#F97583\"> =>\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\"> array\u003C/span>\u003Cspan style=\"color:#E1E4E8\"> (\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\"> 0\u003C/span>\u003Cspan style=\"color:#F97583\"> =>\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> 'yourdomain.tld'\u003C/span>\u003Cspan style=\"color:#E1E4E8\">,\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79B8FF\"> 1\u003C/span>\u003Cspan style=\"color:#F97583\"> =>\u003C/span>\u003Cspan style=\"color:#9ECBFF\"> 'cloud.cc24.dev'\u003C/span>\u003Cspan style=\"color:#E1E4E8\">,\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E1E4E8\"> ),\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"weiterführende-themen\">Weiterführende Themen\u003C/h2>\n\u003Cul>\n\u003Cli>\u003Cstrong>Integration mit Forensik-Plattformen\u003C/strong> (über WebDAV, API oder SSO)\u003C/li>\n\u003Cli>\u003Cstrong>Custom Apps entwickeln\u003C/strong> für spezielle Ermittlungs-Workflows\u003C/li>\n\u003Cli>\u003Cstrong>Auditing aktivieren\u003C/strong>: Nutzung und Änderungen nachvollziehen mit Protokollierungsfunktionen\u003C/li>\n\u003C/ul>",{"headings":557,"localImagePaths":587,"remoteImagePaths":588,"frontmatter":537,"imagePaths":589},[558,559,560,561,564,565,566,569,572,575,576,577,580,583,586],{"depth":43,"slug":44,"text":45},{"depth":47,"slug":48,"text":49},{"depth":51,"slug":52,"text":53},{"depth":51,"slug":562,"text":563},"installationsschritte-ubuntu-beispiel","Installationsschritte (Ubuntu Beispiel)",{"depth":47,"slug":58,"text":59},{"depth":47,"slug":70,"text":71},{"depth":51,"slug":567,"text":568},"gemeinsame-fallbearbeitung","Gemeinsame Fallbearbeitung",{"depth":51,"slug":570,"text":571},"videokonferenzen-mit-nextcloud-talk","Videokonferenzen mit “Nextcloud Talk”",{"depth":51,"slug":573,"text":574},"automatischer-dateiimport-per-api","Automatischer Dateiimport per API",{"depth":47,"slug":79,"text":80},{"depth":47,"slug":82,"text":83},{"depth":51,"slug":578,"text":579},"problem-langsame-performance","Problem: Langsame Performance",{"depth":51,"slug":581,"text":582},"problem-dateien-erscheinen-nicht-im-sync","Problem: Dateien erscheinen nicht im Sync",{"depth":51,"slug":584,"text":585},"problem-fehlermeldung-trusted-domain-not-set","Problem: Fehlermeldung “Trusted domain not set”",{"depth":47,"slug":94,"text":95},[],[],[],"nextcloud.md"] \ No newline at end of file diff --git a/src/pages/index.astro b/src/pages/index.astro index afa9d45..2eb81c2 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -21,6 +21,39 @@ const phases = data.phases; Systematische digitale Forensik nach bewährter NIST SP 800-86 Methodik.
Wählen Sie Ihren Ansatz für die Werkzeugauswahl:

+
+
+
+ + + + + +
+
+

Forensic AI-Beratung

+

Analyse des Untersuchungsszenarios mit Empfehlungen zum Vorgehen

+
+
+ + + +
+ Workflow-Empfehlungen + Transparenz + Sofortige Analyse +
+
@@ -63,7 +96,7 @@ const phases = data.phases; Teilnehmer der Seminargruppe CC24-w1 (oder andere Berechtigte) können die gehostete Infrastruktur nutzen. Kontakt bei Problemen

- +
@@ -74,14 +107,6 @@ const phases = data.phases; Infos, SSO & Zugang - - @@ -182,7 +207,9 @@ const phases = data.phases; document.querySelectorAll('.approach-card').forEach(card => { card.classList.remove('selected'); }); - document.querySelector(`.approach-card.${approach}`).classList.add('selected'); + + const selectedCard = document.querySelector(`.approach-card.${approach}`); + if (selectedCard) selectedCard.classList.add('selected'); if (approach === 'methodology') { const methodologySection = document.getElementById('methodology-section'); @@ -238,61 +265,57 @@ const phases = data.phases; return; } + // AI Button click handler if (aiQueryBtn) { - aiQueryBtn.addEventListener('click', async () => { - if (typeof window.requireClientAuth === 'function') { - await window.requireClientAuth(() => switchToView('ai'), `${window.location.pathname}?view=ai`, 'ai'); + aiQueryBtn.addEventListener('click', () => { + // Visual feedback + aiQueryBtn.classList.add('activated'); + setTimeout(() => aiQueryBtn.classList.remove('activated'), 400); + + // Switch to AI view + switchToView('ai'); + + // Trigger existing view change system + window.dispatchEvent(new CustomEvent('viewChanged', { detail: 'ai' })); + + // Scroll to AI interface + if (window.scrollToElementById) { + window.scrollToElementById('ai-interface'); } else { - console.warn('[AUTH] requireClientAuth not available'); - switchToView('ai'); + aiInterface.scrollIntoView({ behavior: 'smooth', block: 'start' }); } }); } - function switchToView(view) { - toolsGrid.style.display = 'none'; - matrixContainer.style.display = 'none'; - aiInterface.style.display = 'none'; - filtersSection.style.display = 'none'; - - const viewToggles = document.querySelectorAll('.view-toggle'); - viewToggles.forEach(btn => { - btn.classList.toggle('active', btn.getAttribute('data-view') === view); - }); - - switch (view) { - case 'ai': - aiInterface.style.display = 'block'; - filtersSection.style.display = 'block'; - hideFilterControls(); - if (window.restoreAIResults) { - window.restoreAIResults(); - } - const aiInput = document.getElementById('ai-query-input'); - if (aiInput) { - setTimeout(() => aiInput.focus(), 100); - } - break; - case 'matrix': - matrixContainer.style.display = 'block'; - filtersSection.style.display = 'block'; - showFilterControls(); - break; - default: - toolsGrid.style.display = 'block'; - filtersSection.style.display = 'block'; - showFilterControls(); - break; - } - - setTimeout(() => { - window.scrollToElementById('filters-section'); - }, 150); - - if (window.location.search) { - window.history.replaceState({}, '', window.location.pathname); - } + function switchToView(view) { + const toolsGrid = document.getElementById('tools-grid'); + const matrixContainer = document.getElementById('matrix-container'); + const aiInterface = document.getElementById('ai-interface'); + const filtersSection = document.getElementById('filters-section'); + const noResults = document.getElementById('no-results'); + + // Hide all views first + if (toolsGrid) toolsGrid.style.display = 'none'; + if (matrixContainer) matrixContainer.style.display = 'none'; + if (aiInterface) aiInterface.style.display = 'none'; + if (filtersSection) filtersSection.style.display = 'none'; + if (noResults) noResults.style.display = 'none'; + + // Show selected view + switch (view) { + case 'grid': + if (toolsGrid) toolsGrid.style.display = 'block'; + if (filtersSection) filtersSection.style.display = 'block'; + break; + case 'matrix': + if (matrixContainer) matrixContainer.style.display = 'block'; + if (filtersSection) filtersSection.style.display = 'block'; + break; + case 'ai': + if (aiInterface) aiInterface.style.display = 'block'; + break; } + } function hideFilterControls() { const filterSections = document.querySelectorAll('.filter-section'); diff --git a/src/styles/global copy.css b/src/styles/global copy.css deleted file mode 100644 index 4f1952f..0000000 --- a/src/styles/global copy.css +++ /dev/null @@ -1,2920 +0,0 @@ -/* CSS Reset and Base Styles */ -*, -*::before, -*::after { - box-sizing: border-box; - margin: 0; - padding: 0; -} - -/* CSS Variables for Theming */ -:root { - /* Light Theme Colors */ - --color-bg: #fff; - --color-bg-secondary: #f8fafc; - --color-bg-tertiary: #e2e8f0; - --color-text: #1e293b; - --color-text-secondary: #64748b; - --color-border: #cbd5e1; - --color-primary: #2563eb; - --color-primary-hover: #1d4ed8; - --color-accent: #059669; - --color-accent-hover: #047857; - --color-warning: #d97706; - --color-error: #dc2626; - - /* Enhanced card type colors */ - --color-hosted: #7c3aed; - --color-hosted-bg: #f3f0ff; - --color-oss: #059669; - --color-oss-bg: #ecfdf5; - --color-method: #0891b2; - --color-method-bg: #f0f9ff; - --color-concept: #ea580c; - --color-concept-bg: #fff7ed; - - --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 5%); - --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 10%); - --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 10%); - - /* Common transitions */ - --transition-fast: all 0.2s ease; - --transition-medium: all 0.3s ease; -} - -[data-theme="dark"] { - --color-bg: #0f172a; - --color-bg-secondary: #1e293b; - --color-bg-tertiary: #334155; - --color-text: #f1f5f9; - --color-text-secondary: #94a3b8; - --color-border: #475569; - --color-primary: #3b82f6; - --color-primary-hover: #60a5fa; - --color-accent: #10b981; - --color-accent-hover: #34d399; - --color-warning: #f59e0b; - --color-error: #f87171; - - --color-hosted: #a855f7; - --color-hosted-bg: #2e1065; - --color-oss: #10b981; - --color-oss-bg: #064e3b; - --color-method: #0891b2; - --color-method-bg: #164e63; - --color-concept: #f97316; - --color-concept-bg: #7c2d12; - - --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 30%); - --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 40%); - --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 50%); -} - -/* Base Styles */ -html { - font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; - font-size: 16px; - line-height: 1.6; - color: var(--color-text); - background-color: var(--color-bg); - transition: background-color 0.3s ease, color 0.3s ease; -} - -body { - min-height: 100vh; - display: flex; - flex-direction: column; -} - -/* Typography - Consolidated */ -h1, h2, h3, h4, h5, h6 { - font-weight: 600; - line-height: 1.25; - margin-bottom: 0.5rem; -} - -h1 { font-size: 2.5rem; } -h2 { font-size: 2rem; } -h3 { font-size: 1.5rem; } -h4 { font-size: 1.25rem; } -h5 { font-size: 1.125rem; } -h6 { font-size: 1rem; } - -p { margin-bottom: 1rem; } - -a { - color: var(--color-primary); - text-decoration: none; - transition: var(--transition-fast); -} - -a:hover { - color: var(--color-primary-hover); - text-decoration: underline; -} - -/* Container */ -.container { - width: 100%; - max-width: 1280px; - margin: 0 auto; - padding: 0 1rem; -} - -/* Navigation */ -nav { - background-color: var(--color-bg-secondary); - border-bottom: 1px solid var(--color-border); - position: sticky; - top: 0; - z-index: 100; - overflow-x: hidden; -} - -.nav-wrapper { - display: flex; - align-items: center; - justify-content: space-between; - padding: 1rem; - max-width: 1280px; - margin: 0 auto; -} - -.nav-brand { - display: flex; - align-items: center; - gap: 0.5rem; - flex-shrink: 0; - text-decoration: none !important; - color: var(--color-text) !important; - transition: var(--transition-fast); -} - -.nav-brand:hover { - text-decoration: none !important; - opacity: 0.8; - transform: translateY(-1px); -} - -.nav-logo { - width: 32px; - height: 32px; -} - -/* Logo theme switching */ -.nav-logo-light { display: block; } -.nav-logo-dark { display: none; } - -[data-theme="dark"] .nav-logo-light { display: none; } -[data-theme="dark"] .nav-logo-dark { display: block; } - -.nav-links { - display: flex; - align-items: center; - gap: 2rem; - list-style: none; - flex-wrap: wrap; -} - -.nav-link { - color: var(--color-text); - font-weight: 500; - transition: var(--transition-fast); - white-space: nowrap; -} - -.nav-link:hover { - color: var(--color-primary); - text-decoration: none; -} - -.nav-link.active { - color: var(--color-primary); -} - -/* Consolidated Button System */ -.btn { - display: inline-flex; - align-items: center; - justify-content: center; - padding: 0.5rem 1rem; - border: 1px solid transparent; - border-radius: 0.375rem; - font-weight: 500; - font-size: 0.875rem; - cursor: pointer; - transition: var(--transition-fast); - text-decoration: none; -} - -.btn:hover { text-decoration: none; } - -.btn-primary { - background-color: var(--color-primary); - color: white; -} - -.btn-primary:hover { - background-color: var(--color-primary-hover); -} - -.btn-secondary { - background-color: var(--color-bg-secondary); - color: var(--color-text); - border-color: var(--color-border); -} - -.btn-secondary:hover { - background-color: var(--color-bg-tertiary); -} - -.btn-accent { - background-color: var(--color-accent); - color: white; - border-color: var(--color-accent); -} - -.btn-accent:hover { - background-color: var(--color-accent-hover); - border-color: var(--color-accent-hover); -} - -/* Button sizes */ -.btn-sm { - padding: 0.375rem 0.75rem; - font-size: 0.8125rem; -} - -.btn-xs { - padding: 0.25rem 0.5rem; - font-size: 0.75rem; -} - -/* Icon Button */ -.btn-icon { - background: none; - border: none; - color: var(--color-text-secondary); - cursor: pointer; - padding: 0.25rem; - border-radius: 0.25rem; - transition: var(--transition-fast); - display: inline-flex; - align-items: center; - justify-content: center; -} - -.btn-icon:hover { - color: var(--color-text); - background-color: var(--color-bg-secondary); -} - -/* Forms - Consolidated */ -input, select, textarea { - width: 100%; - padding: 0.5rem 0.75rem; - border: 1px solid var(--color-border); - border-radius: 0.375rem; - background-color: var(--color-bg); - color: var(--color-text); - font-size: 0.875rem; - transition: border-color var(--transition-fast), box-shadow var(--transition-fast); -} - -input:focus, textarea:focus, select:focus { - border-color: var(--color-primary); - box-shadow: 0 0 0 2px rgba(var(--color-primary-rgb), 0.1); - outline: 2px solid var(--color-primary); - outline-offset: 2px; -} - -/* Form validation states */ -input:invalid:not(:focus), textarea:invalid:not(:focus), select:invalid:not(:focus) { - border-color: var(--color-error); -} - -input:valid:not(:focus), textarea:valid:not(:focus), select:valid:not(:focus) { - border-color: var(--color-accent); -} - -select { - cursor: pointer; - appearance: none; - background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E"); - background-repeat: no-repeat; - background-position: right 0.75rem center; - padding-right: 2rem; -} - -.checkbox-wrapper { - display: flex; - align-items: center; - gap: 0.5rem; - cursor: pointer; - transition: var(--transition-fast); - user-select: none; -} - -.checkbox-wrapper:hover { - background-color: var(--color-bg-secondary); - border-radius: 0.25rem; -} - -.checkbox-wrapper input[type="checkbox"] { - margin-right: 0.5rem; - cursor: pointer; -} - -input[type="checkbox"] { - width: 16px; - height: 16px; - accent-color: var(--color-primary); - margin: 0; - cursor: pointer; -} - -/* Consolidated Card System */ -.card { - background-color: var(--color-bg); - border: 1px solid var(--color-border); - border-radius: 0.5rem; - padding: 1.5rem; - box-shadow: var(--shadow-sm); - transition: var(--transition-fast); -} - -.card:hover { - box-shadow: var(--shadow-md); -} - -/* Card type modifiers using CSS custom properties for DRY */ -.card-hosted { - background-color: var(--color-hosted-bg); - border-color: var(--color-hosted); - box-shadow: 0 0 0 1px var(--color-hosted); -} - -.card-oss { - background-color: var(--color-oss-bg); - border-color: var(--color-oss); -} - -.card-method { - background-color: var(--color-method-bg); - border-color: var(--color-method); -} - -.card-concept { - background-color: var(--color-concept-bg); - border-color: var(--color-concept); -} - -/* Grid Systems - Consolidated */ -.grid-auto-fit { - display: grid; - grid-template-columns: repeat(auto-fill, minmax(300px, 350px)); - gap: 1rem; - justify-content: center; -} - -/* Tool Cards - Consolidated */ -.tool-card { - height: 300px; - display: flex; - flex-direction: column; - padding: 1.25rem; -} - -.tool-card-header { - display: flex; - justify-content: space-between; - align-items: flex-start; - min-height: 2.5rem; - margin-bottom: 0.75rem; -} - -.tool-card-header h3 { - margin: 0; - font-size: 1.125rem; - line-height: 1.3; - flex: 1; - margin-right: 0.75rem; -} - -.tool-card-badges { - display: flex; - gap: 0.375rem; - flex-wrap: wrap; - flex-shrink: 0; -} - -.tool-card .text-muted { - display: -webkit-box; - -webkit-line-clamp: 3; - line-clamp: 3; - -webkit-box-orient: vertical; - overflow: hidden; - line-height: 1.4; - max-height: calc(1.4em * 3); - font-size: 0.875rem; - margin-bottom: 0.5rem; - word-break: break-word; -} - -.tool-card-metadata { - display: flex; - align-items: center; - gap: 1rem; - margin-bottom: 0.75rem; - line-height: 1; -} - -.metadata-item { - display: flex; - align-items: center; - gap: 0.5rem; - font-size: 0.75rem; - color: var(--color-text-secondary); - flex-shrink: 1; - min-width: 0; -} - -.metadata-item svg { - flex-shrink: 0; -} - -.metadata-item span { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - min-width: 0; -} - -.tool-tags-container { - display: flex; - flex-wrap: wrap; - gap: 0.25rem; - max-height: 3.5rem; - overflow: hidden; - position: relative; - margin-bottom: 1rem; - flex-shrink: 0; -} - -.tool-tags-container::after { - content: ''; - position: absolute; - bottom: 0; - right: 0; - width: 3rem; - height: 100%; - background: linear-gradient(to right, transparent 0%, var(--color-bg) 70%); - pointer-events: none; - opacity: 0.8; -} - -/* Card-specific gradients */ -.card-hosted .tool-tags-container::after { - background: linear-gradient(to right, transparent 0%, var(--color-hosted-bg) 70%); -} - -.card-oss .tool-tags-container::after { - background: linear-gradient(to right, transparent 0%, var(--color-oss-bg) 70%); -} - -.card-method .tool-tags-container::after { - background: linear-gradient(to right, transparent 0%, var(--color-method-bg) 70%); -} - -.card-concept .tool-tags-container::after { - background: linear-gradient(to right, transparent 0%, var(--color-concept-bg) 70%); -} - -.tool-card-buttons { - margin-top: auto; - flex-shrink: 0; -} - -.button-row { - display: flex; - gap: 0.5rem; -} - -.button-row .btn, -.single-button { - font-size: 0.8125rem; - padding: 0.625rem 1rem; -} - -.button-row .btn { - flex: 1; -} - -.single-button { - width: 100%; -} - -/* Matrix Components - Consolidated */ -.matrix-wrapper { - overflow-x: auto; - margin: 1rem 0; -} - -.matrix-table { - width: 100%; - border-collapse: collapse; - min-width: 800px; - table-layout: fixed; - background-color: var(--color-bg); - border-radius: 0.75rem; - overflow: hidden; - box-shadow: var(--shadow-md); -} - -.matrix-table th { - background: linear-gradient(135deg, var(--color-primary) 0%, #525252 100%); - color: white; - font-weight: 600; - position: sticky; - top: 0; - z-index: 1; - border: none; - padding: 1rem 0.75rem; -} - -.matrix-table td { - border: 1px solid var(--color-border); - padding: 0.75rem; - text-align: left; - background-color: var(--color-bg); - transition: var(--transition-fast); - overflow: hidden; - word-wrap: break-word; -} - -.matrix-table tr:hover td { - background-color: var(--color-bg-secondary); -} - -.matrix-table th:first-child, -.matrix-table td:first-child { - width: 200px; - min-width: 200px; - max-width: 200px; -} - -.matrix-table th:not(:first-child), -.matrix-table td:not(:first-child) { - width: 150px; - min-width: 150px; - max-width: 150px; -} - -.matrix-cell { - min-height: 60px; - vertical-align: top; -} - -/* Matrix highlighting - Consolidated */ -.matrix-table tr.highlight-row th, -.matrix-table tr.highlight-row td, -.matrix-table th.highlight-column, -.matrix-table td.highlight-column { - background-color: rgb(37 99 235 / 8%); - border-color: rgb(37 99 235 / 20%); -} - -.matrix-table tr.highlight-row th.highlight-column, -.matrix-table tr.highlight-row td.highlight-column { - background-color: rgb(37 99 235 / 15%); - border-color: rgb(37 99 235 / 40%); - box-shadow: inset 0 0 0 1px rgb(37 99 235 / 30%); -} - -/* Dark theme matrix adjustments */ -[data-theme="dark"] .matrix-table tr.highlight-row th, -[data-theme="dark"] .matrix-table tr.highlight-row td, -[data-theme="dark"] .matrix-table th.highlight-column, -[data-theme="dark"] .matrix-table td.highlight-column { - background-color: rgb(59 130 246 / 12%); - border-color: rgb(59 130 246 / 30%); -} - -[data-theme="dark"] .matrix-table tr.highlight-row th.highlight-column, -[data-theme="dark"] .matrix-table tr.highlight-row td.highlight-column { - background-color: rgb(59 130 246 / 20%); - border-color: rgb(59 130 246 / 50%); - box-shadow: inset 0 0 0 1px rgb(59 130 246 / 40%); -} - -/* Tool Chips - Consolidated */ -.tool-chip { - display: inline-block; - padding: 0.25rem 0.5rem; - margin: 0.125rem; - background-color: var(--color-bg-secondary); - border-radius: 0.25rem; - font-size: 0.75rem; - cursor: pointer; - transition: var(--transition-fast); -} - -.tool-chip:hover { - background-color: var(--color-primary); - color: white; -} - -.tool-chip-hosted { - background-color: var(--color-hosted); - color: white; -} - -.tool-chip-oss { - background-color: var(--color-oss); - color: white; -} - -.tool-chip-method { - background-color: var(--color-method); - color: white; -} - -/* Consolidated Badge System */ -.badge { - display: inline-flex; - align-items: center; - padding: 0.125rem 0.5rem; - border-radius: 9999px; - font-size: 0.75rem; - font-weight: 500; - margin-left: 0.5rem; -} - -.badge--mini { - padding: 0.0625rem 0.375rem; - font-size: 0.625rem; -} - -.badge-primary { background-color: var(--color-primary); color: white; } -.badge-secondary { background-color: var(--color-bg-secondary); color: var(--color-text); border: 1px solid var(--color-border); } -.badge-success { background-color: var(--color-accent); color: white; } -.badge-accent { background-color: var(--color-accent); color: white; } -.badge-warning { background-color: var(--color-warning); color: white; } -.badge-error { background-color: var(--color-error); color: white; } - -/* Tags */ -.tag { - display: inline-block; - padding: 0.125rem 0.5rem; - background-color: var(--color-bg-secondary); - border-radius: 0.25rem; - font-size: 0.75rem; - margin: 0.125rem; -} - -/* Tool Details Modal - Consolidated */ -.tool-details { - display: none; - position: fixed; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - background-color: var(--color-bg); - border: 1px solid var(--color-border); - border-radius: 0.5rem; - padding: 2rem; - max-width: 600px; - width: 90%; - max-height: 85vh; - overflow-y: auto; - z-index: 1000; - box-shadow: var(--shadow-lg); - transition: var(--transition-medium); -} - -.tool-details.active { display: block; } - -.modal-overlay { - display: none; - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - background-color: rgb(0 0 0 / 50%); - backdrop-filter: blur(2px); - z-index: 999; -} - -.modal-overlay.active { display: block; } - -/* Side-by-side modal positioning */ -.modals-side-by-side #tool-details-primary.active { - left: 25%; - transform: translate(-50%, -50%); - max-width: 45vw; - width: 45vw; -} - -.modals-side-by-side #tool-details-secondary.active { - left: 75%; - transform: translate(-50%, -50%); - max-width: 45vw; - width: 45vw; -} - -/* Phase Controls - Consolidated */ -.domain-phase-container { - display: grid; - grid-template-columns: 1fr 2fr; - gap: 2rem; - align-items: start; -} - -.phase-buttons { - display: flex; - flex-wrap: wrap; - gap: 0.5rem; -} - -.phase-button { - padding: 0.5rem 1rem; - border: 1px solid var(--color-border); - border-radius: 0.375rem; - background-color: var(--color-bg); - color: var(--color-text); - font-size: 0.875rem; - font-weight: 500; - cursor: pointer; - transition: var(--transition-fast); - user-select: none; - white-space: nowrap; -} - -.phase-button:hover { - border-color: var(--color-primary); - background-color: var(--color-bg-secondary); - transform: translateY(-1px); - box-shadow: var(--shadow-sm); -} - -.phase-button.active { - background-color: var(--color-primary); - border-color: var(--color-primary); - color: white; -} - -.phase-button.active:hover { - background-color: var(--color-primary-hover); - border-color: var(--color-primary-hover); -} - -/* Tag Cloud - Consolidated */ -.tag-header { - display: flex; - align-items: center; - gap: 1rem; - margin-bottom: 0.75rem; -} - -.tag-cloud { - display: flex; - flex-wrap: wrap; - gap: 0.5rem; - margin-top: 0.5rem; - max-height: 60px; - overflow: hidden; - transition: var(--transition-medium); - position: relative; -} - -.tag-cloud.expanded { max-height: 1000px; } - -.tag-cloud::after { - content: ''; - position: absolute; - bottom: 0; - left: 0; - right: 0; - height: 40px; - background: linear-gradient(to bottom, transparent 0%, transparent 60%, var(--color-bg) 100%); - pointer-events: none; - opacity: 1; - transition: var(--transition-medium); -} - -.tag-cloud.expanded::after { opacity: 0; } - -.tag-cloud-item { - display: inline-flex; - align-items: center; - gap: 0.25rem; - padding: 0.375rem 0.75rem; - border: 1px solid var(--color-border); - border-radius: 1rem; - background-color: var(--color-bg); - color: var(--color-text); - font-size: 0.875rem; - cursor: pointer; - transition: var(--transition-fast); - user-select: none; -} - -.tag-cloud-item.hidden { display: none; } - -.tag-cloud-item:hover { - border-color: var(--color-primary); - background-color: var(--color-bg-secondary); - transform: scale(1.05); -} - -.tag-cloud-item.active { - background-color: var(--color-accent); - border-color: var(--color-accent); - color: white; -} - -.tag-cloud-item.active:hover { - background-color: var(--color-accent-hover); - border-color: var(--color-accent-hover); -} - -.tag-frequency { - font-size: 0.75rem; - opacity: 0.8; -} - -.btn-tag-toggle { - padding: 0.25rem 0.75rem; - border: 1px solid var(--color-border); - border-radius: 0.25rem; - background-color: var(--color-bg-secondary); - color: var(--color-text-secondary); - font-size: 0.75rem; - cursor: pointer; - transition: var(--transition-fast); -} - -.btn-tag-toggle:hover { - background-color: var(--color-bg-tertiary); - color: var(--color-text); - transform: translateY(-1px); -} - -/* Loading states */ -.btn.loading { - opacity: 0.7; - pointer-events: none; - position: relative; -} - -.btn.loading::after { - content: ""; - position: absolute; - top: 50%; - left: 50%; - width: 16px; - height: 16px; - margin: -8px 0 0 -8px; - border: 2px solid transparent; - border-top: 2px solid currentColor; - border-radius: 50%; - animation: spin 1s linear infinite; -} - -/* Collaboration Tools - Consolidated */ -.collaboration-tools-compact { - display: flex; - gap: 1rem; - flex-wrap: wrap; - flex-direction: row; -} - -.collaboration-tool-compact { - background-color: var(--color-bg); - border: 1px solid var(--color-border); - border-radius: 0.375rem; - padding: 0.75rem; - min-width: 200px; - max-width: 300px; - flex: 1; - cursor: pointer; - transition: var(--transition-fast); -} - -.collaboration-tool-compact:hover { - border-color: var(--color-primary); - box-shadow: var(--shadow-sm); -} - -.collaboration-tool-compact.hosted { - background-color: var(--color-hosted-bg); - border-color: var(--color-hosted); -} - -.collaboration-tool-compact.oss { - background-color: var(--color-oss-bg); - border-color: var(--color-oss); -} - -.collaboration-tool-compact .text-muted { - display: -webkit-box; - -webkit-line-clamp: 3; - line-clamp: 3; - -webkit-box-orient: vertical; - overflow: hidden; - line-height: 1.3; - max-height: calc(1.3em * 3); - font-size: 0.75rem; - margin: 0.25rem 0; - word-break: break-word; -} - -.collaboration-expand-icon { - transition: var(--transition-medium); - color: var(--color-text-secondary); -} - -.collaboration-expand-icon svg { - transition: var(--transition-medium); -} - -.collaboration-section-expanded .collaboration-expand-icon svg { - transform: rotate(180deg); -} - -.collaboration-content { - animation: slideDown 0.3s ease-out; -} - -.tool-compact-header { - display: flex; - justify-content: space-between; - align-items: start; - margin-bottom: 0.5rem; -} - -.tool-count { - background: var(--color-bg-tertiary); - padding: 0.25rem 0.75rem; - border-radius: 1rem; - font-size: 0.75rem; - color: var(--color-text-secondary); - font-weight: 500; -} - -/* AI Interface - Consolidated */ -.ai-interface { - padding: 2rem 0; - max-width: 1200px; - margin: 0 auto; -} - -.ai-query-section { margin-bottom: 3rem; } - -.ai-input-container textarea { - transition: var(--transition-fast); -} - -.ai-input-layout { - display: flex; - gap: 1.5rem; - align-items: flex-start; - margin-bottom: 1rem; -} - -.ai-textarea-section { - flex: 1; - min-width: 0; -} - -.ai-suggestions-section { - flex: 0 0 320px; - min-height: 120px; -} - -.ai-input-container textarea:focus { - outline: none; - border-color: var(--color-primary); - box-shadow: 0 0 0 3px rgb(37 99 235 / 10%); -} - -.ai-loading, .ai-error, .ai-results { - animation: fadeIn 0.3s ease-in-out; -} - -.ai-mode-toggle { - user-select: none; -} - -.toggle-label { - display: flex; - align-items: center; - font-size: 0.875rem; - transition: var(--transition-fast); -} - -.toggle-label:hover { - color: var(--color-primary) !important; -} - -.toggle-label.active { - font-weight: 600; -} - -.toggle-switch { - position: relative; - cursor: pointer; - transition: var(--transition-fast); -} - -.toggle-switch:hover { - transform: scale(1.05); -} - -.toggle-slider { - box-shadow: var(--shadow-sm); - transition: var(--transition-fast); -} - -[data-theme="dark"] .toggle-slider { - box-shadow: 0 2px 4px 0 rgb(255 255 255 / 10%); -} - -/* Focus states for accessibility - Consolidated */ -.toggle-switch:focus-visible { - outline: 2px solid var(--color-primary); - outline-offset: 2px; - border-radius: 12px; -} - -.toggle-label:focus-visible { - outline: 2px solid var(--color-primary); - outline-offset: 2px; - border-radius: 0.25rem; -} - -/* Workflow Components - Consolidated */ -.workflow-container { - display: flex; - flex-direction: column; - gap: 1rem; - max-width: 1200px; - margin: 0 auto; -} - -.phase-header { - display: flex; - align-items: flex-start; - gap: 1rem; - padding: 1.5rem; - background-color: var(--color-bg); - border: 2px solid var(--color-border); - border-radius: 0.75rem; - transition: var(--transition-medium); -} - -.phase-header:hover { - border-color: var(--color-primary); - box-shadow: var(--shadow-md); -} - -.phase-number { - width: 2rem; - height: 2rem; - background: var(--phase-color); - color: white; - border-radius: 50%; - display: flex; - align-items: center; - justify-content: center; - font-weight: 600; - margin: 0 auto 0.75rem; -} - -.phase-info { flex: 1; min-width: 0; } - -.phase-title { - font-weight: 600; - margin-bottom: 0.5rem; - color: var(--color-text); -} - -.phase-description { - font-size: 0.8125rem; - color: var(--color-text-secondary); - margin-bottom: 0.75rem; - line-height: 1.4; -} - -.phase-tools { - display: grid; - grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); - gap: 1rem; -} - -.phase-card { - background: var(--color-bg-secondary); - border: 2px solid var(--color-border); - border-radius: 0.5rem; - padding: 1.5rem; - cursor: pointer; - transition: var(--transition-fast); - text-align: center; - position: relative; -} - -.phase-card::before { - content: ''; - position: absolute; - top: 0; - left: 0; - right: 0; - height: 3px; - background: var(--phase-color); -} - -.phase-card:hover { - transform: translateY(-2px); - border-color: var(--phase-color); - box-shadow: var(--shadow-md); -} - -.phase-card.active { - border-color: var(--phase-color); - background: linear-gradient(135deg, var(--color-bg) 0%, color-mix(in srgb, var(--phase-color) 8%, transparent) 100%); -} - -.workflow-arrow { - display: flex; - justify-content: center; - margin: 0.5rem 0; -} - -/* Tool Recommendations - Consolidated */ -.tool-recommendation { - background-color: var(--color-bg); - border: 1px solid var(--color-border); - border-radius: 0.5rem; - padding: 1.25rem; - transition: var(--transition-fast); - cursor: pointer; - display: flex; - flex-direction: column; - height: 100%; - min-height: 200px; - animation: fadeInUp 0.3s ease-out; -} - -.tool-recommendation:hover { - border-color: var(--color-primary); - box-shadow: var(--shadow-md); - transform: translateY(-2px); -} - -.tool-recommendation.hosted { - background-color: var(--color-hosted-bg); - border-color: var(--color-hosted); - box-shadow: 0 0 0 1px var(--color-hosted); -} - -.tool-recommendation.oss { - background-color: var(--color-oss-bg); - border-color: var(--color-oss); -} - -.tool-recommendation.method { - background-color: var(--color-method-bg); - border-color: var(--color-method); -} - -.tool-rec-header { - display: flex; - justify-content: space-between; - align-items: start; - margin-bottom: 0.75rem; -} - -.tool-rec-name { - font-weight: 600; - font-size: 1rem; - margin: 0; - color: var(--color-text); -} - -.tool-rec-priority { - font-size: 0.75rem; - padding: 0.25rem 0.5rem; - border-radius: 1rem; - font-weight: 500; - text-transform: uppercase; -} - -.tool-rec-priority.high { background-color: var(--color-error); color: white; } -.tool-rec-priority.medium { background-color: var(--color-warning); color: white; } -.tool-rec-priority.low { background-color: var(--color-accent); color: white; } - -.tool-rec-justification { - font-size: 0.875rem; - line-height: 1.5; - color: var(--color-text-secondary); - margin-bottom: 0.75rem; - font-style: italic; - background-color: var(--color-bg-tertiary); - padding: 0.75rem; - border-radius: 0.375rem; - border-left: 3px solid var(--color-primary); -} - -.tool-rec-metadata { - display: flex; - flex-direction: column; - gap: 0.375rem; - font-size: 0.75rem; - color: var(--color-text-secondary); -} - -/* Tool Results - Consolidated */ -.tool-results-container { - max-width: 1000px; - margin: 0 auto; -} - -.tool-recommendations-grid { - display: grid; - gap: 1.5rem; -} - -.tool-detailed-recommendation { - position: relative; - transition: var(--transition-fast); - border: 2px solid transparent; - animation: fadeInUp 0.5s ease-out; -} - -.tool-detailed-recommendation:nth-child(2) { animation-delay: 0.1s; } -.tool-detailed-recommendation:nth-child(3) { animation-delay: 0.2s; } - -.tool-detailed-recommendation:hover { - transform: translateY(-2px); - box-shadow: var(--shadow-lg); - border-color: var(--color-primary); -} - -.tool-detailed-recommendation.card-hosted { - background-color: var(--color-hosted-bg); - border-color: var(--color-hosted); -} - -.tool-detailed-recommendation.card-hosted:hover { - border-color: var(--color-hosted); - box-shadow: 0 0 0 1px var(--color-hosted), var(--shadow-lg); -} - -.tool-detailed-recommendation.card-oss { - background-color: var(--color-oss-bg); - border-color: var(--color-oss); -} - -.tool-detailed-recommendation.card-method { - background-color: var(--color-method-bg); - border-color: var(--color-method); -} - -.tool-detailed-recommendation.card-method:hover { - border-color: var(--color-method); - box-shadow: 0 0 0 1px var(--color-method), var(--shadow-lg); -} - -.tool-rank-badge { - animation: fadeInUp 0.6s ease-out; - font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; - font-weight: 700; -} - -[data-theme="dark"] .tool-rank-badge { - box-shadow: 0 4px 6px -1px rgb(0 0 0 / 50%); -} - -.tool-detailed-explanation h4 { - display: flex; - align-items: center; - font-size: 1rem; - margin-bottom: 0.75rem; -} - -/* Pros/Cons - Consolidated */ -.pros-cons-section { - animation: fadeIn 0.4s ease-in; -} - -.pros, .cons { - font-size: 0.875rem; -} - -.pros ul, .cons ul { - list-style-type: none; - padding-left: 0; -} - -.pros li, .cons li { - position: relative; - padding-left: 1.5rem; - margin-bottom: 0.375rem; - line-height: 1.4; -} - -.pros li::before { - content: '✓'; - position: absolute; - left: 0; - color: var(--color-accent); - font-weight: bold; -} - -.cons li::before { - content: '⚠'; - position: absolute; - left: 0; - color: var(--color-warning); - font-weight: bold; -} - -.tool-metadata { - background-color: var(--color-bg-secondary); - padding: 1rem; - border-radius: 0.5rem; - border-left: 3px solid var(--color-primary); -} - -.alternatives { - border-left: 3px solid var(--color-text-secondary); -} - -/* Knowledgebase - Consolidated */ -.kb-entry { - margin-bottom: 1rem; - transition: var(--transition-fast); - position: relative; - cursor: pointer; -} - -.kb-entry:hover { - transform: translateY(-2px); - box-shadow: var(--shadow-md); -} - -.kb-entry:target { - animation: highlight-flash 2s ease-out; -} - -.kb-content { line-height: 1.7; } - -/* Footer */ -footer { - margin-top: auto; - background-color: var(--color-bg-secondary); - border-top: 1px solid var(--color-border); - padding: 2rem 0; -} - -.footer-content { - display: flex; - justify-content: space-between; - align-items: center; - flex-wrap: wrap; - gap: 1rem; -} - -/* Utility Classes - Systematic Generation */ -.text-muted { color: var(--color-text-secondary); } -.leading-tight { line-height: 1.25; } -.leading-relaxed { line-height: 1.625; } - -/* Layout utilities */ -.flex { display: flex; } -.flex-col { flex-direction: column; } -.flex-wrap { flex-wrap: wrap; } -.flex-1 { flex: 1; } -.flex-shrink-0 { flex-shrink: 0; } -.flex-shrink-1 { flex-shrink: 1; } -.items-center { align-items: center; } -.items-start { align-items: flex-start; } -.justify-center { justify-content: center; } -.justify-between { justify-content: space-between; } -.text-center { text-align: center; } - -.grid { display: grid; } -.gap-1 { gap: 0.25rem; } -.gap-2 { gap: 0.5rem; } -.gap-3 { gap: 0.75rem; } -.gap-4 { gap: 1rem; } - -/* Spacing utilities - systematic */ -.mb-2 { margin-bottom: 0.5rem; } -.mb-3 { margin-bottom: 0.75rem; } -.mb-4 { margin-bottom: 1rem; } -.mb-6 { margin-bottom: 1.5rem; } -.mb-8 { margin-bottom: 2rem; } -.mt-auto { margin-top: auto; } -.mr-2 { margin-right: 0.5rem; } -.mr-3 { margin-right: 0.75rem; } - -.p-8 { padding: 2rem; } -.pt-3 { padding-top: 0.75rem; } - -/* Size utilities */ -.w-full { width: 100%; } -.max-w-lg { max-width: 32rem; } -.max-w-6xl { max-width: 72rem; } -.min-w-0 { min-width: 0; } - -/* Position utilities */ -.fixed { position: fixed; } -.relative { position: relative; } -.bottom-8 { bottom: 2rem; } -.right-8 { right: 2rem; } -.z-50 { z-index: 50; } - -/* Text utilities */ -.text-xs { font-size: 0.75rem; } -.text-sm { font-size: 0.875rem; } -.text-lg { font-size: 1.125rem; } -.text-2xl { font-size: 1.5rem; } -.font-semibold { font-weight: 600; } - -/* Visual utilities */ -.rounded-lg { border-radius: 0.75rem; } -.border { border: 1px solid var(--color-border); } -.cursor-pointer { cursor: pointer; } -.overflow-hidden { overflow: hidden; } - -/* Color utilities */ -.bg-secondary { background-color: var(--color-bg-secondary); } -.text-primary { color: var(--color-primary); } -.text-secondary { color: var(--color-text-secondary); } - -/* Knowledgebase specific */ -#kb-entries { - display: grid; - grid-template-columns: 1fr; - gap: 1rem; -} - -/* FAB button */ -.fab-button { - box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15); - transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); -} - -.fab-button:hover { - transform: scale(1.1); - box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2); -} - -[data-theme="dark"] .fab-button { - box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4); -} - -[data-theme="dark"] .fab-button:hover { - box-shadow: 0 6px 25px rgba(0, 0, 0, 0.5); -} - -/* Markdown content */ -.markdown-content h1, -.markdown-content h2, -.markdown-content h3, -.markdown-content h4, -.markdown-content h5, -.markdown-content h6 { - margin-top: 2rem; - margin-bottom: 1rem; -} - -.markdown-content h1:first-child, -.markdown-content h2:first-child, -.markdown-content h3:first-child { - margin-top: 0; -} - -.markdown-content p { - margin-bottom: 1rem; -} - -.markdown-content ul, -.markdown-content ol { - margin-bottom: 1rem; - padding-left: 1.5rem; -} - -.markdown-content li { - margin-bottom: 0.5rem; -} - -.markdown-content pre { - background-color: var(--color-bg-tertiary); - border: 1px solid var(--color-border); - border-radius: 0.5rem; - padding: 1rem; - margin: 1.5rem 0; - overflow-x: auto; - font-size: 0.875rem; -} - -.markdown-content code:not(pre code) { - background-color: var(--color-bg-secondary); - border: 1px solid var(--color-border); - border-radius: 0.25rem; - padding: 0.125rem 0.375rem; - font-size: 0.875rem; -} - -.markdown-content table { - width: 100%; - border-collapse: collapse; - margin: 1.5rem 0; - background-color: var(--color-bg); - border-radius: 0.5rem; - overflow: hidden; - border: 1px solid var(--color-border); -} - -.markdown-content th, -.markdown-content td { - padding: 0.75rem; - text-align: left; - border-bottom: 1px solid var(--color-border); -} - -.markdown-content th { - background-color: var(--color-bg-secondary); - font-weight: 600; -} - -.markdown-content blockquote { - border-left: 4px solid var(--color-primary); - background-color: var(--color-bg-secondary); - padding: 1rem 1.5rem; - margin: 1.5rem 0; - border-radius: 0 0.5rem 0.5rem 0; -} - -.markdown-content hr { - border: none; - border-top: 1px solid var(--color-border); - margin: 2rem 0; -} - -/* Share Button Styles */ -.share-btn { - background: none; - border: none; - color: var(--color-text-secondary); - cursor: pointer; - padding: 0.25rem; - border-radius: 0.25rem; - transition: var(--transition-fast); - display: inline-flex; - align-items: center; - justify-content: center; -} - -.share-btn:hover { - color: var(--color-primary); - background-color: var(--color-bg-secondary); -} - -.share-btn--small { - padding: 0.125rem; -} - -.share-btn--medium { - padding: 0.375rem; -} - -.share-btn svg { - flex-shrink: 0; -} - -/* Form styling */ -.form-section { - border: 1px solid var(--color-border); - border-radius: 0.5rem; - padding: 1rem; - margin-bottom: 1.5rem; - background-color: var(--color-bg); -} - -.form-section h3 { - margin-top: 0; - margin-bottom: 1rem; - color: var(--color-primary); - font-size: 1.125rem; -} - -.form-grid { - display: grid; - gap: 1rem; -} - -.form-grid.two-columns { - grid-template-columns: 1fr 1fr; -} - -.form-group { - margin-bottom: 1.5rem; -} - -.form-group:last-child { - margin-bottom: 0; -} - -.form-label { - display: block; - margin-bottom: 0.5rem; - font-weight: 600; - color: var(--color-text); -} - -/* Animations - Consolidated */ -@keyframes fadeIn { - from { opacity: 0; } - to { opacity: 1; } -} - -@keyframes slideDown { - from { - opacity: 0; - max-height: 0; - padding-top: 0; - margin-top: 0; - transform: translateY(-10px); - } - to { - opacity: 1; - max-height: 1000px; - padding-top: 1rem; - margin-top: 1rem; - transform: translateY(0); - } -} - -@keyframes fadeInUp { - from { - opacity: 0; - transform: translateY(20px); - } - to { - opacity: 1; - transform: translateY(0); - } -} - -@keyframes pulse { - 0%, 100% { - transform: scale(1); - opacity: 1; - } - 50% { - transform: scale(1.05); - opacity: 0.8; - } -} - -@keyframes spin { - 0% { transform: rotate(0deg); } - 100% { transform: rotate(360deg); } -} - -@keyframes highlight-flash { - 0% { - background-color: rgb(57 255 20 / 60%); - box-shadow: 0 0 0 8px rgb(255 20 147 / 50%), 0 0 20px rgb(57 255 20 / 80%); - transform: scale(1.12) rotate(2deg); - border: 3px solid rgb(255 255 0); - } - 12.5% { - background-color: rgb(255 20 147 / 70%); - box-shadow: 0 0 0 15px rgb(0 191 255 / 60%), 0 0 30px rgb(255 20 147 / 90%); - transform: scale(1.18) rotate(-3deg); - border: 3px solid rgb(57 255 20); - } - 25% { - background-color: rgb(0 191 255 / 65%); - box-shadow: 0 0 0 12px rgb(191 0 255 / 55%), 0 0 25px rgb(0 191 255 / 85%); - transform: scale(1.15) rotate(1deg); - border: 3px solid rgb(255 20 147); - } - 37.5% { - background-color: rgb(191 0 255 / 75%); - box-shadow: 0 0 0 18px rgb(255 255 0 / 65%), 0 0 35px rgb(191 0 255 / 95%); - transform: scale(1.20) rotate(-2deg); - border: 3px solid rgb(0 191 255); - } - 50% { - background-color: rgb(255 255 0 / 80%); - box-shadow: 0 0 0 10px rgb(57 255 20 / 70%), 0 0 40px rgb(255 255 0 / 100%); - transform: scale(1.16) rotate(3deg); - border: 3px solid rgb(191 0 255); - } - 62.5% { - background-color: rgb(255 69 0 / 70%); - box-shadow: 0 0 0 16px rgb(255 20 147 / 60%), 0 0 30px rgb(255 69 0 / 90%); - transform: scale(1.22) rotate(-1deg); - border: 3px solid rgb(255 255 0); - } - 75% { - background-color: rgb(255 20 147 / 65%); - box-shadow: 0 0 0 14px rgb(0 191 255 / 50%), 0 0 45px rgb(255 20 147 / 85%); - transform: scale(1.14) rotate(2deg); - border: 3px solid rgb(57 255 20); - } - 87.5% { - background-color: rgb(57 255 20 / 75%); - box-shadow: 0 0 0 20px rgb(191 0 255 / 65%), 0 0 35px rgb(57 255 20 / 95%); - transform: scale(1.25) rotate(-3deg); - border: 3px solid rgb(255 69 0); - } - 100% { - background-color: transparent; - box-shadow: none; - transform: scale(1) rotate(0deg); - border: none; - } -} - -/* Highlight animation triggers */ -.tool-card.highlight-flash, -.tool-chip.highlight-flash, -.tool-recommendation.highlight-flash { - animation: highlight-flash 2s ease-out; -} - -/* Responsive Design - Consolidated Media Queries */ -@media (width >= 768px) { - #kb-entries { - grid-template-columns: repeat(auto-fit, minmax(500px, 1fr)); - gap: 1.5rem; - } -} - -@media (width >= 1200px) { - #kb-entries { - grid-template-columns: repeat(auto-fit, minmax(600px, 1fr)); - gap: 2rem; - } - - .modals-side-by-side #tool-details-primary.active, - .modals-side-by-side #tool-details-secondary.active { - max-width: 45vw; - width: 45vw; - } -} - -@media (width <= 1200px) { - .modals-side-by-side #tool-details-primary.active, - .modals-side-by-side #tool-details-secondary.active { - max-width: 42vw; - width: 42vw; - } -} - -@media (width <= 768px) { - .nav-wrapper { padding: 0.75rem; } - .nav-links { gap: 1rem; } - .nav-link { font-size: 0.875rem; } - - h1 { font-size: 2rem; } - h2 { font-size: 1.5rem; } - - .footer-content { - flex-direction: column; - text-align: center; - } - - .domain-phase-container { - grid-template-columns: 1fr; - gap: 1rem; - } - - .phase-buttons { gap: 0.375rem; } - .phase-button { - padding: 0.375rem 0.75rem; - font-size: 0.8125rem; - } - - .tag-cloud { max-height: 100px; } - .tag-header { gap: 0.75rem; } - - .matrix-table { min-width: 600px; } - .matrix-table th:first-child, - .matrix-table td:first-child { - width: 140px; - min-width: 140px; - max-width: 140px; - } - .matrix-table th:not(:first-child), - .matrix-table td:not(:first-child) { - width: 120px; - min-width: 120px; - max-width: 120px; - } - .matrix-cell { - width: 120px; - min-width: 120px; - max-width: 120px; - min-height: 50px; - } - - .modals-side-by-side #tool-details-primary.active { - top: 25%; - left: 50%; - max-width: 90vw; - width: 90vw; - max-height: 35vh; - } - - .modals-side-by-side #tool-details-secondary.active { - top: 75%; - left: 50%; - max-width: 90vw; - width: 90vw; - max-height: 35vh; - } - - .tool-details { - max-height: 80vh; - padding: 1.5rem; - width: 95%; - max-width: none; - } - - .form-grid.two-columns { - grid-template-columns: 1fr; - } - .hint-card { - padding: 1rem; - } - - .hint-description { - font-size: 0.6875rem; - } - - .hint-trigger { - flex-direction: column; - gap: 0.25rem; - } - .ai-input-layout { - gap: 0.75rem; - flex-direction: column; - } - .ai-suggestions-section { - flex: 0 0 auto; - width: 100%; - max-width: none; - } - .ai-textarea-section { - flex: 1; - min-width: 0; - width: 100%; - min-height: 100px; - } - .approach-hero { - padding: 2rem 1rem; - margin: 1rem 0; - } - - .approach-content h1 { - font-size: 2rem; - } - - .hero-tagline { - font-size: 1.125rem; - } - - .approach-selector { - grid-template-columns: 1fr; - gap: 1rem; - margin-bottom: 1.5rem; - } - - .approach-card { - padding: 1.5rem; - } - - .approach-header { - gap: 0.75rem; - } - - .approach-icon { - width: 2.5rem; - height: 2.5rem; - font-size: 1.25rem; - } - - .approach-card h3 { - font-size: 1.25rem; - } - - .quick-actions { - gap: 0.75rem; - } - - .quick-actions .btn { - padding: 0.625rem 1.25rem; - font-size: 0.8125rem; - } - .nist-workflow { - grid-template-columns: 1fr 1fr; - gap: 0.75rem; - } - .search-suggestions { - gap: 0.5rem; - } - - .suggestion-chip { - padding: 0.5rem 0.75rem; - font-size: 0.8125rem; - } - - .scenario-emoji { - font-size: 1rem; - } - - .targeted-search-input { - padding: 0.875rem 0.875rem 0.875rem 2.75rem; - } - - .search-icon { - left: 0.875rem; - } -} - -@media (width <= 640px) { - .phase-buttons { justify-content: center; } - .phase-button { - flex: 1; - min-width: 0; - text-align: center; - } - - .tag-cloud { max-height: 80px; } - .tag-cloud.expanded { max-height: 800px; } - - .nav-wrapper { - flex-direction: column; - gap: 1rem; - padding: 0.75rem; - } - - .nav-links { - gap: 0.75rem; - justify-content: center; - width: 100%; - } - - .nav-link { - font-size: 0.8125rem; - padding: 0.25rem 0.5rem; - } - - .ai-mode-toggle { - flex-direction: column; - gap: 0.75rem; - text-align: center; - } - - .toggle-label { - font-size: 0.8125rem; - } - - .toggle-switch { - align-self: center; - } - - .pros-cons-section { - grid-template-columns: 1fr; - } - - .card { - padding: 1rem; - } - - .form-grid { - gap: 0.75rem; - } - - .kb-entry { - padding: 1rem; - } - - .kb-entry .flex-between { - flex-direction: column; - align-items: flex-start; - gap: 1rem; - } - - .kb-entry .flex-shrink-0 { - align-self: stretch; - } - - .kb-entry .flex-shrink-0 .flex { - justify-content: space-between; - width: 100%; - } - - .btn-sm { - padding: 0.5rem 1rem; - flex: 1; - } - .search-suggestions { - justify-content: center; - } - - .suggestion-chip { - flex: 1; - min-width: 0; - max-width: calc(50% - 0.25rem); - justify-content: center; - } - - .targeted-section { - padding: 1.5rem; - } -} - -@media (width <= 480px) { - .phase-buttons { - flex-direction: column; - gap: 0.375rem; - } - - .phase-button { width: 100%; } - - .phase-tools { grid-template-columns: 1fr; } - - .collaboration-tools-compact { - flex-direction: column; - } - .collaboration-tool-compact { - min-width: auto; - max-width: none; - } - - .nav-wrapper { gap: 0.75rem; } - .nav-links { - gap: 0.5rem; - flex-wrap: wrap; - justify-content: center; - } - - .nav-link { - font-size: 0.75rem; - padding: 0.25rem 0.375rem; - } - - .tool-details { - max-height: 75vh; - padding: 1rem; - border-radius: 0.25rem; - } - - .kb-entry .badge { - font-size: 0.625rem; - padding: 0.125rem 0.375rem; - } - - .kb-entry .text-lg { - font-size: 1rem; - } - - .kb-entry .flex.gap-4 { - gap: 0.75rem; - } - - .kb-entry .flex.gap-2 { - gap: 0.5rem; - } - - - .prompting-card { - padding: 0.75rem; - } - - .suggestion-item { - padding: 0.375rem 0.5rem; - font-size: 0.75rem; - } - - .position-badge { - width: 28px; - height: 28px; - font-size: 0.875rem; - } - - .queue-status-card { - padding: 1rem; - } - .hint-card { - padding: 0.75rem; - } - - .hint-title { - font-size: 0.8125rem; - } - - .hint-description { - font-size: 0.625rem; - } - .approach-info { - padding: 0.75rem; - font-size: 0.8125rem; - } - - .quick-actions { - flex-direction: column; - align-items: center; - } - - .quick-actions .btn { - width: 100%; - max-width: 280px; - } - .nist-workflow { - grid-template-columns: 1fr; - } -} - -/* Smart Prompting Styles - Simplified */ -.smart-prompting-container { - height: 100%; - animation: smartPromptSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1); -} - -.prompting-card { - background-color: var(--color-bg-tertiary); - border: 1px solid var(--color-border); - border-radius: 0.5rem; - padding: 1rem; - height: 100%; - min-height: 120px; - display: flex; - flex-direction: column; - opacity: 0.85; - transition: var(--transition-fast); -} - -.prompting-card:hover { - opacity: 1; - border-color: var(--color-accent); -} - -.prompting-status { - display: flex; - align-items: center; - gap: 0.5rem; - margin-bottom: 0.75rem; - padding-bottom: 0.75rem; - border-bottom: 1px solid var(--color-border); -} - -.status-icon { - font-size: 1rem; - flex-shrink: 0; -} - -.status-text { - font-size: 0.8125rem; - font-weight: 500; - color: var(--color-text); - flex: 1; -} - -.prompting-spinner { - flex-shrink: 0; - animation: spin 1s linear infinite; -} - -/* Smart Prompting Hint */ -.smart-prompting-hint { - height: 100%; - min-height: 120px; - display: flex; - align-items: center; - animation: hintFadeIn 0.3s ease-in-out; -} - -.hint-card { - background: linear-gradient(135deg, var(--color-bg-secondary) 0%, var(--color-bg-tertiary) 100%); - border: 1px dashed var(--color-border); - border-radius: 0.5rem; - padding: 1.25rem; - width: 100%; - text-align: center; - opacity: 0.7; - transition: var(--transition-medium); -} - -.hint-card:hover { - opacity: 0.9; - border-color: var(--color-accent); - transform: translateY(-1px); -} - -.hint-icon { - margin-bottom: 0.75rem; - opacity: 0.8; -} - -.hint-content { - display: flex; - flex-direction: column; - gap: 0.5rem; -} - -.hint-title { - margin: 0; - font-size: 0.875rem; - font-weight: 600; - color: var(--color-text); - letter-spacing: 0.025em; -} - -.hint-description { - margin: 0; - font-size: 0.75rem; - line-height: 1.5; - color: var(--color-text-secondary); -} - -.hint-trigger { - display: flex; - align-items: center; - justify-content: center; - gap: 0.5rem; - margin-top: 0.25rem; - padding-top: 0.75rem; - border-top: 1px solid var(--color-border); -} - -.hint-label { - font-size: 0.6875rem; - color: var(--color-text-secondary); - text-transform: uppercase; - letter-spacing: 0.05em; - font-weight: 500; -} - -.hint-value { - font-size: 0.75rem; - font-weight: 600; - color: var(--color-accent); - background-color: var(--color-bg); - padding: 0.125rem 0.5rem; - border-radius: 1rem; - border: 1px solid var(--color-accent); -} - -/* Hide hint when smart prompting is active */ -.smart-prompting-container[style*="block"] ~ .smart-prompting-hint, -.smart-prompting-container:not([style*="none"]) ~ .smart-prompting-hint { - display: none; -} - -@keyframes hintFadeIn { - from { - opacity: 0; - transform: translateY(10px); - } - to { - opacity: 0.7; - transform: translateY(0); - } -} - -.suggested-questions { - flex: 1; - display: flex; - flex-direction: column; -} - -.suggestions-header { - margin-bottom: 0.75rem; -} - -.suggestions-label { - font-size: 0.75rem; - color: var(--color-text-secondary); - font-weight: 500; - text-transform: uppercase; - letter-spacing: 0.025em; -} - -.questions-list { - flex: 1; - display: flex; - flex-direction: column; - gap: 0.5rem; - margin-bottom: 0.75rem; -} - -.suggestion-item { - background-color: var(--color-bg); - border: 1px solid transparent; - border-radius: 0.375rem; - padding: 0.5rem 0.75rem; - font-size: 0.8125rem; - line-height: 1.4; - color: var(--color-text-secondary); - border-left: 2px solid var(--color-accent); - transition: var(--transition-fast); - position: relative; -} - -.suggestion-item::before { - content: counter(suggestion-counter); - counter-increment: suggestion-counter; - position: absolute; - left: -8px; - top: -6px; - background-color: var(--color-accent); - color: white; - width: 16px; - height: 16px; - border-radius: 50%; - display: flex; - align-items: center; - justify-content: center; - font-size: 0.625rem; - font-weight: 600; -} -.questions-list { - counter-reset: suggestion-counter; -} - -.suggestion-number { - color: var(--color-accent); - font-weight: 600; - margin-right: 0.5rem; -} - -.suggestion-chip { - display: inline-flex; - align-items: center; - gap: 0.5rem; - padding: 0.75rem 1rem; - background-color: var(--color-bg-secondary); - border: 1px solid var(--color-border); - border-radius: 2rem; - cursor: pointer; - transition: var(--transition-fast); - font-size: 0.875rem; - user-select: none; -} - -.suggestion-chip:hover { - background-color: var(--color-accent); - border-color: var(--color-accent); - color: white; - transform: translateY(-2px); - box-shadow: var(--shadow-md); -} - -.suggestion-chip.active { - background-color: var(--color-accent); - border-color: var(--color-accent); - color: white; -} - -.scenario-emoji { - font-size: 1.125rem; -} - -.scenario-text { - font-weight: 500; -} - -.more-scenarios { - text-align: center; - margin-top: 1rem; -} - -.btn-more-scenarios { - background: none; - border: 1px solid var(--color-border); - border-radius: 1rem; - padding: 0.5rem 1rem; - color: var(--color-text-secondary); - cursor: pointer; - font-size: 0.8125rem; - transition: var(--transition-fast); -} - -.btn-more-scenarios:hover { - background-color: var(--color-bg-secondary); - border-color: var(--color-accent); - color: var(--color-accent); -} - -.targeted-tip { - background-color: var(--color-bg-secondary); - border: 1px solid var(--color-border); - border-radius: 0.5rem; - padding: 1rem; - text-align: center; - max-width: 600px; - margin: 0 auto; -} - -.targeted-tip p { - margin: 0; - font-size: 0.875rem; - color: var(--color-text-secondary); -} - -.dismiss-button { - align-self: flex-end; - background: none; - border: none; - color: var(--color-text-secondary); - cursor: pointer; - padding: 0.25rem; - border-radius: 0.25rem; - transition: var(--transition-fast); - opacity: 0.7; -} - -.dismiss-button:hover { - background-color: var(--color-bg-secondary); - color: var(--color-text); - opacity: 1; -} - -/* Queue Status - Improved Design */ -.queue-status-card { - max-width: 400px; - margin: 1.5rem auto 0; - background: linear-gradient(135deg, var(--color-bg-secondary) 0%, var(--color-bg-tertiary) 100%); - border: 1px solid var(--color-border); - border-radius: 0.75rem; - padding: 1.25rem; - box-shadow: var(--shadow-sm); -} - -.queue-header { - display: flex; - align-items: center; - justify-content: center; - margin-bottom: 1rem; -} - -.queue-position-display { - display: flex; - align-items: center; - gap: 0.75rem; -} - -.position-badge { - width: 32px; - height: 32px; - background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%); - color: white; - border-radius: 50%; - display: flex; - align-items: center; - justify-content: center; - font-weight: 700; - font-size: 1rem; - box-shadow: var(--shadow-sm); -} - -.position-label { - font-weight: 600; - color: var(--color-text); - font-size: 0.9375rem; -} - -.queue-details { - display: grid; - grid-template-columns: 1fr 1fr; - gap: 1rem; - margin-bottom: 1.25rem; -} - -.queue-stat { - text-align: center; - padding: 0.75rem; - background-color: var(--color-bg); - border-radius: 0.5rem; - border: 1px solid var(--color-border); -} - -.stat-label { - display: block; - font-size: 0.75rem; - color: var(--color-text-secondary); - margin-bottom: 0.25rem; - font-weight: 500; -} - -.stat-value { - font-size: 1.125rem; - font-weight: 700; - color: var(--color-primary); -} - -.stat-unit { - font-size: 0.75rem; - color: var(--color-text-secondary); - margin-left: 0.25rem; -} - -.queue-progress-container { - position: relative; -} - -.queue-progress-track { - background-color: var(--color-bg); - border-radius: 8px; - height: 6px; - overflow: hidden; - border: 1px solid var(--color-border); - margin-bottom: 0.75rem; -} - -.queue-progress-fill { - height: 100%; - background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-accent) 100%); - width: 0%; - transition: width 0.3s ease; - border-radius: 8px; -} - -.task-id-display { - text-align: center; - padding: 0.5rem; - background-color: var(--color-bg); - border-radius: 0.375rem; - border: 1px solid var(--color-border); -} - -.task-label { - font-size: 0.6875rem; - color: var(--color-text-secondary); - margin-right: 0.5rem; - text-transform: uppercase; - letter-spacing: 0.025em; - font-weight: 500; -} - -.task-id { - font-family: 'SF Mono', 'Monaco', 'Menlo', 'Consolas', monospace; - font-size: 0.6875rem; - color: var(--color-text); - background-color: var(--color-bg-secondary); - padding: 0.125rem 0.375rem; - border-radius: 0.25rem; - border: 1px solid var(--color-border); -} - -@keyframes smartPromptSlideIn { - from { - opacity: 0; - transform: translateX(20px); - max-height: 0; - } - to { - opacity: 0.85; - transform: translateX(0); - max-height: 300px; - } -} - - -/* Enhanced contextual analysis cards */ -.contextual-analysis-card { - margin-bottom: 2rem; - border-left: 4px solid; - transition: var(--transition-fast); -} - -.contextual-analysis-card:hover { - transform: translateY(-1px); - box-shadow: var(--shadow-md); -} - -.contextual-analysis-card.scenario { - border-left-color: var(--color-primary); -} - -.contextual-analysis-card.approach { - border-left-color: var(--color-accent); -} - -.contextual-analysis-card.critical { - border-left-color: var(--color-warning); -} - -.analysis-header { - display: flex; - align-items: center; - gap: 0.5rem; - margin-bottom: 1rem; - font-size: 1rem; - font-weight: 600; -} - -.analysis-header.scenario { color: var(--color-primary); } -.analysis-header.approach { color: var(--color-accent); } -.analysis-header.critical { color: var(--color-warning); } - -/* Methodology-First Approach Styles */ -.approach-hero { - background: linear-gradient(135deg, var(--color-bg-secondary) 0%, var(--color-bg-tertiary) 100%); - border-radius: 1rem; - border: 1px solid var(--color-border); - padding: 3rem 2rem; - margin: 2rem 0; - text-align: center; -} - -.approach-content h1 { - font-size: 2.5rem; - margin-bottom: 1rem; - color: var(--color-primary); -} - -.hero-tagline { - font-size: 1.25rem; - color: var(--color-text); - margin-bottom: 0.5rem; - font-weight: 600; -} - -.hero-subtitle { - color: var(--color-text-secondary); - margin-bottom: 2rem; - line-height: 1.6; - max-width: 700px; - margin-left: auto; - margin-right: auto; -} - -.approach-selector { - display: grid; - grid-template-columns: 1fr 1fr; - gap: 2rem; - max-width: 900px; - margin: 0 auto 2rem; -} - -.approach-card { - background: var(--color-bg); - border: 2px solid var(--color-border); - border-radius: 0.75rem; - padding: 2rem; - cursor: pointer; - transition: var(--transition-fast); - text-align: left; - position: relative; - overflow: hidden; -} - -.approach-card::before { - content: ''; - position: absolute; - top: 0; - left: 0; - right: 0; - height: 4px; - background: var(--approach-color); - opacity: 0.7; -} - -.approach-card.methodology { --approach-color: var(--color-primary); } -.approach-card.targeted { --approach-color: var(--color-accent); } - -.approach-card:hover { - transform: translateY(-4px); - box-shadow: var(--shadow-lg); - border-color: var(--approach-color); -} - -.approach-header { - display: flex; - align-items: center; - margin-bottom: 1rem; - gap: 1rem; -} - -.approach-icon { - width: 3rem; - height: 3rem; - background: var(--approach-color); - color: white; - border-radius: 0.75rem; - display: flex; - align-items: center; - justify-content: center; - font-size: 1.5rem; - flex-shrink: 0; -} - -.approach-card h3 { - font-size: 1.375rem; - color: var(--color-text); - margin: 0; -} - -.approach-card.selected { - border-color: var(--approach-color); - background: linear-gradient(135deg, var(--color-bg) 0%, color-mix(in srgb, var(--approach-color) 8%, transparent) 100%); - box-shadow: var(--shadow-md); -} - -.approach-description { - color: var(--color-text-secondary); - margin-bottom: 1.5rem; - line-height: 1.6; -} - -.approach-features { - list-style: none; - padding: 0; - margin: 0; -} - -.approach-features li { - display: flex; - align-items: center; - gap: 0.5rem; - margin-bottom: 0.5rem; - font-size: 0.875rem; - color: var(--color-text-secondary); -} - -.approach-features li::before { - content: '✓'; - color: var(--approach-color); - font-weight: bold; - flex-shrink: 0; -} - -.approach-actions { - max-width: 800px; - margin: 0 auto; -} - -.approach-info { - background: var(--color-bg-secondary); - border: 1px solid var(--color-border); - border-radius: 0.5rem; - padding: 1rem; - margin-bottom: 1.5rem; - font-size: 0.875rem; - color: var(--color-text-secondary); - line-height: 1.6; - text-align: left; -} - -.info-icon { - margin-right: 0.5rem; - font-size: 1rem; -} - -.quick-actions { - display: flex; - gap: 1rem; - justify-content: center; - flex-wrap: wrap; -} - -.quick-actions .btn { - padding: 0.75rem 1.5rem; - font-size: 0.875rem; -} - -.methodology-section { - background: var(--color-bg); - border: 1px solid var(--color-border); - border-radius: 0.75rem; - padding: 2rem; - margin: 2rem 0; - display: none; -} - -.methodology-section.active { - display: block; - animation: fadeInUp 0.5s ease-out; -} - -.methodology-header { - text-align: center; - margin-bottom: 2rem; -} - -.methodology-header h3 { - color: var(--color-primary); - font-size: 1.5rem; - margin-bottom: 0.5rem; -} - -.methodology-subtitle { - color: var(--color-text-secondary); - font-size: 0.875rem; -} - -.methodology-tip { - text-align: center; - padding: 1.5rem; - background: var(--color-bg-secondary); - border-radius: 0.5rem; -} - -.methodology-tip p { - color: var(--color-text-secondary); - margin: 0; - font-size: 0.875rem; -} - -.nist-workflow { - display: grid; - grid-template-columns: repeat(4, 1fr); - gap: 1rem; - margin-bottom: 2rem; -} - -.targeted-section { - background: var(--color-bg); - border: 1px solid var(--color-border); - border-radius: 0.75rem; - padding: 2rem; - margin: 2rem 0; - display: none; - animation: fadeInUp 0.5s ease-out; -} - -.targeted-section.active { - display: block; -} - -.targeted-header { - text-align: center; - margin-bottom: 2rem; -} - -.targeted-header h3 { - color: var(--color-accent); - font-size: 1.5rem; - margin-bottom: 0.5rem; -} - -.targeted-subtitle { - color: var(--color-text-secondary); - font-size: 0.875rem; - margin: 0; -} - -.search-interface { - max-width: 800px; - margin: 0 auto 2rem; -} - -.search-box { - position: relative; - margin-bottom: 1.5rem; -} - -.search-icon { - position: absolute; - left: 1rem; - top: 50%; - transform: translateY(-50%); - color: var(--color-text-secondary); - pointer-events: none; -} - -.targeted-search-input { - width: 100%; - padding: 1rem 1rem 1rem 3rem; - border: 2px solid var(--color-border); - border-radius: 0.5rem; - font-size: 0.875rem; - background-color: var(--color-bg); - color: var(--color-text); - transition: var(--transition-fast); -} - -.targeted-search-input:focus { - outline: none; - border-color: var(--color-accent); - box-shadow: 0 0 0 3px rgb(5 150 105 / 10%); -} - -.search-suggestions { - display: flex; - flex-wrap: wrap; - gap: 0.75rem; - margin-bottom: 1rem; - justify-content: center; -} \ No newline at end of file diff --git a/src/styles/global.css b/src/styles/global.css index ca7ceee..4c59ca9 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -1750,7 +1750,93 @@ input[type="checkbox"] { border-color: var(--color-accent) !important; } +.ai-hero-spotlight { + background: linear-gradient(135deg, var(--color-bg) 0%, var(--color-bg-secondary) 100%); + border: 2px solid var(--color-accent); + border-radius: 1rem; + padding: 2rem; + margin: 1.5rem auto; + text-align: center; + position: relative; + overflow: hidden; + max-width: 600px; + width: 100%; +} +.ai-hero-spotlight::before { + content: ''; + position: absolute; + top: 0; + left: 0; + right: 0; + height: 3px; + background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-primary) 100%); +} + +.ai-spotlight-content { + display: flex; + align-items: center; + justify-content: center; + gap: 1rem; + margin-bottom: 1.5rem; +} + +.ai-spotlight-icon { + width: 48px; + height: 48px; + background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-primary) 100%); + border-radius: 0.75rem; + display: flex; + align-items: center; + justify-content: center; + color: white; + box-shadow: var(--shadow-md); + flex-shrink: 0; +} + +.ai-spotlight-text h3 { + margin: 0 0 0.25rem 0; + font-size: 1.25rem; + color: var(--color-text); +} + +.ai-spotlight-text p { + margin: 0; + color: var(--color-text-secondary); + font-size: 0.875rem; +} + +.ai-primary-btn { + padding: 0.875rem 2rem; + margin: 0 0 1rem 0; + position: relative; + overflow: hidden; +} + +.ai-primary-btn:hover { + transform: translateY(-2px); + box-shadow: var(--shadow-lg), 0 8px 20px rgba(5, 150, 105, 0.3); +} + +.ai-primary-btn svg:last-child { + transition: var(--transition-fast); +} + +.ai-primary-btn:hover svg:last-child { + transform: translate(2px, -2px); +} + +/* Mini features display */ +.ai-features-mini { + display: flex; + justify-content: center; + gap: 0.5rem; + flex-wrap: wrap; +} + +.ai-features-mini .badge { + font-size: 0.75rem; +} /* =================================================================== 16. AI INTERFACE (CONSOLIDATED) @@ -1985,21 +2071,7 @@ input[type="checkbox"] { } } -/* Animation for micro-task progress */ -@keyframes micro-task-pulse { - 0%, 100% { opacity: 1; } - 50% { opacity: 0.7; } -} -.micro-step.active { - animation: micro-task-pulse 2s ease-in-out infinite; -} - -@keyframes micro-task-complete { - 0% { transform: scale(1); } - 50% { transform: scale(1.1); } - 100% { transform: scale(1); } -} .micro-step.completed { animation: micro-task-complete 0.6s ease-out; @@ -2566,6 +2638,32 @@ footer { } } +/* Animation for micro-task progress */ +@keyframes micro-task-pulse { + 0%, 100% { opacity: 1; } + 50% { opacity: 0.7; } +} + +.micro-step.active { + animation: micro-task-pulse 2s ease-in-out infinite; +} + +@keyframes micro-task-complete { + 0% { transform: scale(1); } + 50% { transform: scale(1.1); } + 100% { transform: scale(1); } +} + +@keyframes ai-spotlight-pulse { + 0% { transform: scale(1); } + 50% { transform: scale(1.02); } + 100% { transform: scale(1); } +} + +.ai-primary-btn.activated { + animation: ai-spotlight-pulse 0.4s ease-out; +} + /* =================================================================== 21. SMART PROMPTING INTERFACE (MISSING STYLES ADDED BACK) ================================================================= */ @@ -3353,6 +3451,30 @@ footer { width: 100%; min-height: 100px; } + + .ai-spotlight-content { + flex-direction: column; + gap: 0.75rem; + margin-bottom: 1rem; + } + + .ai-spotlight-icon { + width: 40px; + height: 40px; + } + + .ai-spotlight-text h3 { + font-size: 1.125rem; + } + + .ai-primary-btn { + width: 100%; + max-width: 280px; + } + + .ai-features-mini { + gap: 0.375rem; + } .approach-hero { padding: 2rem 1rem; @@ -3625,6 +3747,14 @@ footer { flex: 1 1 100%; justify-content: flex-end; } + .ai-hero-spotlight { + padding: 1.5rem 1rem; + } + + .ai-features-mini { + flex-direction: column; + align-items: center; + } } -- 2.39.5 From 99117e8e7a1104893eaffbbdcf37912cd36089cd Mon Sep 17 00:00:00 2001 From: overcuriousity Date: Tue, 5 Aug 2025 13:03:33 +0200 Subject: [PATCH 11/19] first draft enhancement 2 --- .env.example | 21 +- check-unused-css.js | 102 ++++++++++ package.json | 6 +- src/components/AIQueryInterface.astro | 170 ++++++++++++++-- src/styles/global.css | 126 ++++++++---- src/utils/aiPipeline.ts | 267 +++++++++++++++++++++++++- unused-selectors.txt | 89 +++++++++ 7 files changed, 714 insertions(+), 67 deletions(-) create mode 100644 check-unused-css.js create mode 100644 unused-selectors.txt diff --git a/.env.example b/.env.example index 00b00bc..2ad295d 100644 --- a/.env.example +++ b/.env.example @@ -190,19 +190,22 @@ FORENSIC_AUDIT_RETENTION_HOURS=24 FORENSIC_AUDIT_MAX_ENTRIES=50 # ============================================================================ -# 10. QUALITY CONTROL & BIAS DETECTION (ADVANCED) +# 10. CONFIDENCE SCORING SYSTEM (Enhancement 2) # ============================================================================ -# Confidence scoring weights (must sum to 1.0) -CONFIDENCE_EMBEDDINGS_WEIGHT=0.3 -CONFIDENCE_CONSENSUS_WEIGHT=0.25 -CONFIDENCE_DOMAIN_MATCH_WEIGHT=0.25 -CONFIDENCE_FRESHNESS_WEIGHT=0.2 +# Confidence component weights (must sum to 1.0) +CONFIDENCE_EMBEDDINGS_WEIGHT=0.3 # Weight for vector similarity quality +CONFIDENCE_CONSENSUS_WEIGHT=0.25 # Weight for micro-task agreement +CONFIDENCE_DOMAIN_MATCH_WEIGHT=0.25 # Weight for domain alignment +CONFIDENCE_FRESHNESS_WEIGHT=0.2 # Weight for tool freshness/maintenance # Confidence thresholds (0-100) -CONFIDENCE_MINIMUM_THRESHOLD=40 -CONFIDENCE_MEDIUM_THRESHOLD=60 -CONFIDENCE_HIGH_THRESHOLD=80 +CONFIDENCE_MINIMUM_THRESHOLD=40 # Below this = weak recommendation +CONFIDENCE_MEDIUM_THRESHOLD=60 # 40-59 = weak, 60-79 = moderate +CONFIDENCE_HIGH_THRESHOLD=80 # 80+ = strong recommendation + +# Domain keywords for confidence scoring (domain:keyword1,keyword2|domain:keyword3,keyword4) +CONFIDENCE_DOMAIN_KEYWORDS="incident-response:incident,breach,attack,compromise,response|malware-analysis:malware,virus,trojan,reverse,analysis|network-forensics:network,traffic,packet,pcap,wireshark|mobile-forensics:mobile,android,ios,phone,app|cloud-forensics:cloud,aws,azure,saas,paas" # ============================================================================ # PERFORMANCE TUNING PRESETS diff --git a/check-unused-css.js b/check-unused-css.js new file mode 100644 index 0000000..c61aac7 --- /dev/null +++ b/check-unused-css.js @@ -0,0 +1,102 @@ +#!/usr/bin/env node +// find-unused-css.js +// Usage: node find-unused-css [--verbose] + +import fs from 'fs/promises'; +import path from 'path'; +import fg from 'fast-glob'; +import pc from 'picocolors'; +import postcss from 'postcss'; +import safeParser from 'postcss-safe-parser'; + +const [,, cssPath, srcRoot = '.', ...rest] = process.argv; +const verbose = rest.includes('--verbose'); +if (!cssPath) { + console.error('Usage: node find-unused-css '); + process.exit(1); +} + +/* -------------------------------------------------- */ +/* 1. Parse the CSS and harvest class/id tokens */ +/* -------------------------------------------------- */ +const cssRaw = await fs.readFile(cssPath, 'utf8'); +const root = postcss().process(cssRaw, { parser: safeParser }).root; + +const selectorTokens = new Map(); // selector → Set('.foo', '#bar') +const CLASS = /\.([\w-]+)/g; +const ID = /#([\w-]+)/g; + +root.walkRules(rule => { + rule.selectors.forEach(sel => { + const tokens = new Set(); + sel.replace(CLASS, (_, c) => tokens.add('.'+c)); + sel.replace(ID, (_, i) => tokens.add('#'+i)); + if (tokens.size) selectorTokens.set(sel, tokens); + }); +}); + +/* -------------------------------------------------- */ +/* 2. Dynamic classes you add via JS (safe keep) */ +/* -------------------------------------------------- */ +const dynamicAllow = new Set([ + 'hidden', 'active', 'loading', 'open', 'closed' +]); + +/* -------------------------------------------------- */ +/* 3. Read every source file once */ +/* -------------------------------------------------- */ +const files = await fg([ + `${srcRoot}/**/*.{html,htm,js,jsx,ts,tsx,vue,svelte,astro}`, + `!${srcRoot}/**/node_modules/**` +]); +const sources = await Promise.all(files.map(f => fs.readFile(f, 'utf8'))); + +/* -------------------------------------------------- */ +/* 4. Fast search helpers */ +/* -------------------------------------------------- */ +const makeClassRE = cls => + new RegExp( + `(class|className)=['"][^'"]*\\b${cls}\\b[^'"]*['"]|['"\`]${cls}['"\`]`, + 'i' + ); +const makeIdRE = id => + new RegExp(`id=['"]${id}['"]|['"\`]${id}['"\`]`, 'i'); + +const tokenInSources = token => { + // dynamic allow-list + if (dynamicAllow.has(token)) return true; + + const re = token.startsWith('.') + ? makeClassRE(token.slice(1)) + : makeIdRE(token.slice(1)); + + return sources.some(txt => re.test(txt)); +}; + +/* -------------------------------------------------- */ +/* 5. Decide used vs unused */ +/* -------------------------------------------------- */ +const used = []; +const unused = []; + +for (const [selector, tokens] of selectorTokens.entries()) { + const isUsed = [...tokens].some(tokenInSources); // **ANY** token keeps rule + (isUsed ? used : unused).push(selector); + if (verbose) { + console.log(isUsed ? pc.green('✓ '+selector) : pc.red('✗ '+selector)); + } +} + +/* -------------------------------------------------- */ +/* 6. Report & write list */ +/* -------------------------------------------------- */ +console.log( + `\n${pc.bold(pc.blue('🎯 CSS usage summary'))}\n` + + ` selectors total : ${selectorTokens.size}\n` + + ` still used : ${pc.green(used.length)}\n` + + ` maybe unused : ${pc.red(unused.length)}\n` +); + +const outFile = path.resolve('unused-selectors.txt'); +await fs.writeFile(outFile, unused.join('\n')); +console.log(`📝 Unused selector list → ${pc.yellow(outFile)}\n`); diff --git a/package.json b/package.json index 12677b7..7367a40 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,11 @@ "zod": "^3.25.76" }, "devDependencies": { - "@types/js-yaml": "^4.0.9" + "@types/js-yaml": "^4.0.9", + "fast-glob": "^3.3.3", + "picocolors": "^1.1.1", + "postcss": "^8.5.6", + "postcss-safe-parser": "^7.0.1" }, "engines": { "node": ">=18.0.0" diff --git a/src/components/AIQueryInterface.astro b/src/components/AIQueryInterface.astro index 9b80036..076b322 100644 --- a/src/components/AIQueryInterface.astro +++ b/src/components/AIQueryInterface.astro @@ -1,5 +1,6 @@ --- import { getToolsData } from '../utils/dataService.js'; +import { isToolHosted } from '../utils/toolHelpers.js'; const data = await getToolsData(); const tools = data.tools; @@ -698,7 +699,10 @@ class AIQueryInterface { if (fullTool) { toolsByPhase[recTool.phase].push({ ...fullTool, - recommendation: recTool + recommendation: recTool, + confidence: recTool.confidence, + justification: recTool.justification, + priority: recTool.priority }); } } @@ -999,6 +1003,151 @@ class AIQueryInterface { return String(data); } + renderConfidenceIndicator(confidence) { + if (!confidence || typeof confidence.overall !== 'number') return ''; + + const confidenceColor = confidence.overall >= 80 ? 'var(--color-accent)' : + confidence.overall >= 60 ? 'var(--color-warning)' : 'var(--color-error)'; + + const strengthText = confidence.overall >= 80 ? 'HOCH' : + confidence.overall >= 60 ? 'MITTEL' : 'NIEDRIG'; + + return ` +
+
+
+
+
+ + ${confidence.overall}% + + +
+ +
+ `; + } + + renderWorkflowTool(tool) { + const hasValidProjectUrl = isToolHosted(tool); + const priorityColors = { + high: 'var(--color-error)', + medium: 'var(--color-warning)', + low: 'var(--color-accent)' + }; + + return ` +
+
+

+ ${tool.icon ? `${tool.icon}` : ''} + ${tool.name} +

+
+ + ${tool.recommendation ? tool.recommendation.priority : tool.priority} + +
+
+ + ${tool.confidence ? this.renderConfidenceIndicator(tool.confidence) : ''} + +
+ "${this.sanitizeText(tool.justification || (tool.recommendation && tool.recommendation.justification) || `Empfohlen für ${tool.phase}`)}" +
+ +
+ ${this.renderToolBadges(tool)} +
+ ${tool.type === 'method' ? 'Methode' : tool.platforms.join(', ') + ' • ' + tool.license} +
+
+
+ `; + } + + renderDetailedTool(tool, recommendation, rank) { + const rankColors = { 1: 'var(--color-accent)', 2: 'var(--color-primary)', 3: 'var(--color-warning)' }; + const suitabilityColors = { high: 'var(--color-accent)', medium: 'var(--color-warning)', low: 'var(--color-text-secondary)' }; + + return ` +
+
+ ${rank} +
+ +
+

${tool.name}

+
+ + ${this.getSuitabilityText(recommendation.suitability_score)} + + ${this.renderToolBadges(tool)} +
+ ${recommendation.confidence ? this.renderConfidenceIndicator(recommendation.confidence) : ''} +
+ +
+

Warum diese Methode?

+
${this.sanitizeText(recommendation.detailed_explanation)}
+ + ${recommendation.implementation_approach ? ` +

Anwendungsansatz

+
${this.sanitizeText(recommendation.implementation_approach)}
+ ` : ''} +
+ + ${this.renderProsAndCons(recommendation.pros, recommendation.cons)} + ${this.renderToolMetadata(tool)} + ${recommendation.alternatives ? this.renderAlternatives(recommendation.alternatives) : ''} +
+ `; + } + renderHeader(title, query) { return `
@@ -1099,7 +1248,7 @@ class AIQueryInterface { } renderWorkflowTool(tool) { - const hasValidProjectUrl = this.isToolHosted(tool); + const hasValidProjectUrl = isToolHosted(tool); const priorityColors = { high: 'var(--color-error)', medium: 'var(--color-warning)', @@ -1142,7 +1291,10 @@ class AIQueryInterface { const fullTool = tools.find(t => t.name === toolRec.name); if (!fullTool) return ''; - return this.renderDetailedTool(fullTool, toolRec, index + 1); + return this.renderDetailedTool(fullTool, { + ...toolRec, + confidence: toolRec.confidence + }, index + 1); }).join('')}
`; @@ -1256,7 +1408,7 @@ class AIQueryInterface { renderToolBadges(tool) { const isMethod = tool.type === 'method'; - const hasValidProjectUrl = this.isToolHosted(tool); + const hasValidProjectUrl = isToolHosted(tool); let badges = ''; if (isMethod) { @@ -1300,16 +1452,9 @@ class AIQueryInterface { .trim(); } - isToolHosted(tool) { - return tool.projectUrl !== undefined && - tool.projectUrl !== null && - tool.projectUrl !== "" && - tool.projectUrl.trim() !== ""; - } - getToolClass(tool, context = 'card') { const isMethod = tool.type === 'method'; - const hasValidProjectUrl = this.isToolHosted(tool); + const hasValidProjectUrl = isToolHosted(tool); if (context === 'recommendation') { if (isMethod) return 'method'; @@ -1402,5 +1547,6 @@ document.addEventListener('DOMContentLoaded', () => { aiInterface.hideError(); } }; + window.isToolHosted = window.isToolHosted || isToolHosted }); \ No newline at end of file diff --git a/src/styles/global.css b/src/styles/global.css index b3540f5..823d7b3 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -144,20 +144,11 @@ a:hover { margin: 0 auto; } -.container-wide { - max-width: 1400px; - margin: 0 auto; -} - /* Section Utilities */ .section { padding: 2rem 0; } -.section-sm { - padding: 1rem 0; -} - .section-lg { padding: 3rem 0; } @@ -2218,6 +2209,10 @@ input[type="checkbox"] { border-color: var(--color-method); } +.tool-recommendation:hover .confidence-bar-fill { + box-shadow: 0 0 8px rgba(0,0,0,0.1); +} + .tool-rec-header { display: flex; justify-content: space-between; @@ -2264,6 +2259,57 @@ input[type="checkbox"] { color: var(--color-text-secondary); } +/* =================================================================== + CONFIDENCE INTEGRATION STYLES + ================================================================= */ + +.confidence-indicator-integrated { + position: relative; +} + +.confidence-bar-wrapper { + position: relative; + background-color: var(--color-bg-tertiary); + border-radius: 2px; + overflow: hidden; + border: 1px solid var(--color-border); +} + +.confidence-bar-fill { + transition: width 0.6s ease-out; + position: relative; +} + +.confidence-bar-fill::after { + content: ''; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: linear-gradient(45deg, transparent 25%, rgba(255,255,255,0.1) 25%, rgba(255,255,255,0.1) 50%, transparent 50%, transparent 75%, rgba(255,255,255,0.1) 75%); + background-size: 8px 8px; + animation: confidence-shimmer 2s linear infinite; +} + +.confidence-badge-compact .btn-icon { + transition: var(--transition-fast); +} + +.confidence-badge-compact .btn-icon:hover { + background-color: var(--color-bg-secondary); + transform: scale(1.1); +} + +.confidence-details-popup { + animation: confidence-popup-in 0.2s ease-out; +} + +/* Hover effect for confidence bars */ +.confidence-indicator-integrated:hover .confidence-bar-fill { + filter: brightness(1.1); +} + /* =================================================================== 18. APPROACH SELECTION (CONSOLIDATED) ================================================================= */ @@ -2665,11 +2711,26 @@ footer { animation: ai-spotlight-pulse 0.4s ease-out; } +@keyframes confidence-shimmer { + 0% { transform: translateX(-8px); } + 100% { transform: translateX(8px); } +} + +@keyframes confidence-popup-in { + from { + opacity: 0; + transform: translateY(-8px); + } + to { + opacity: 1; + transform: translateY(0); + } +} + /* =================================================================== 21. SMART PROMPTING INTERFACE (MISSING STYLES ADDED BACK) ================================================================= */ -/* Smart Prompting Container */ .smart-prompting-container { height: 100%; animation: smartPromptSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1); @@ -3599,6 +3660,26 @@ footer { width: 14px; height: 14px; } + + .confidence-details-popup { + position: fixed !important; + top: 50% !important; + left: 50% !important; + transform: translate(-50%, -50%) !important; + margin: 0 !important; + width: 90vw !important; + max-width: 300px !important; + z-index: 1000 !important; + } + + .confidence-indicator-integrated { + margin-bottom: 0.5rem; + } + + .confidence-badge-compact .btn-icon { + width: 18px; + height: 18px; + } } @media (width <= 640px) { @@ -3924,28 +4005,6 @@ footer { background: linear-gradient(to bottom, var(--color-border) 0%, transparent 100%); } -.confidence-indicator { - position: relative; - overflow: hidden; -} - -.confidence-indicator::after { - content: ''; - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - background: linear-gradient(45deg, transparent 25%, rgba(255,255,255,0.1) 25%, rgba(255,255,255,0.1) 50%, transparent 50%, transparent 75%, rgba(255,255,255,0.1) 75%); - background-size: 4px 4px; - animation: confidence-shimmer 2s linear infinite; -} - -@keyframes confidence-shimmer { - 0% { transform: translateX(-4px); } - 100% { transform: translateX(4px); } -} - .toggle-icon { transition: transform 0.2s ease; } @@ -4000,7 +4059,4 @@ footer { gap: 0.5rem; } - .confidence-indicator { - width: 100%; - } } \ No newline at end of file diff --git a/src/utils/aiPipeline.ts b/src/utils/aiPipeline.ts index 5b14b4d..284b1a5 100644 --- a/src/utils/aiPipeline.ts +++ b/src/utils/aiPipeline.ts @@ -3,6 +3,7 @@ import { getCompressedToolsDataForAI } from './dataService.js'; import { embeddingsService, type EmbeddingData } from './embeddings.js'; import { AI_PROMPTS, getPrompt } from '../config/prompts.js'; +import { isToolHosted } from './toolHelpers.js'; interface AIConfig { endpoint: string; @@ -67,6 +68,16 @@ interface SimilarityResult extends EmbeddingData { similarity: number; } +interface ConfidenceMetrics { + overall: number; // 0-100: Combined confidence score + embeddingsQuality: number; // How well embeddings matched + domainAlignment: number; // How well tools match scenario domain + consensus: number; // How much micro-tasks agree + freshness: number; // How recent/up-to-date the selection is + uncertaintyFactors: string[]; // What could make this wrong + strengthIndicators: string[]; // What makes this recommendation strong +} + class ImprovedMicroTaskAIPipeline { private config: AIConfig; @@ -92,6 +103,16 @@ class ImprovedMicroTaskAIPipeline { detailLevel: 'minimal' | 'standard' | 'verbose'; retentionHours: number; }; + + private confidenceConfig: { + embeddingsWeight: number; + consensusWeight: number; + domainMatchWeight: number; + freshnessWeight: number; + minimumThreshold: number; + mediumThreshold: number; + highThreshold: number; + }; private tempAuditEntries: AuditEntry[] = []; @@ -131,6 +152,21 @@ class ImprovedMicroTaskAIPipeline { noEmbeddingsLimits: `${this.noEmbeddingsToolLimit || 'unlimited'} tools, ${this.noEmbeddingsConceptLimit || 'unlimited'} concepts`, auditEnabled: this.auditConfig.enabled }); + + this.confidenceConfig = { + embeddingsWeight: parseFloat(process.env.CONFIDENCE_EMBEDDINGS_WEIGHT || '0.3'), + consensusWeight: parseFloat(process.env.CONFIDENCE_CONSENSUS_WEIGHT || '0.25'), + domainMatchWeight: parseFloat(process.env.CONFIDENCE_DOMAIN_MATCH_WEIGHT || '0.25'), + freshnessWeight: parseFloat(process.env.CONFIDENCE_FRESHNESS_WEIGHT || '0.2'), + minimumThreshold: parseInt(process.env.CONFIDENCE_MINIMUM_THRESHOLD || '40', 10), + mediumThreshold: parseInt(process.env.CONFIDENCE_MEDIUM_THRESHOLD || '60', 10), + highThreshold: parseInt(process.env.CONFIDENCE_HIGH_THRESHOLD || '80', 10) + }; + + console.log('[AI PIPELINE] Confidence scoring enabled:', { + weights: `E:${this.confidenceConfig.embeddingsWeight} C:${this.confidenceConfig.consensusWeight} D:${this.confidenceConfig.domainMatchWeight} F:${this.confidenceConfig.freshnessWeight}`, + thresholds: `${this.confidenceConfig.minimumThreshold}/${this.confidenceConfig.mediumThreshold}/${this.confidenceConfig.highThreshold}` + }); } private getEnv(key: string): string { @@ -662,6 +698,40 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; } } + private calculateRecommendationConfidence( + tool: any, + embeddingsSimilarity: number, + domainMatch: boolean, + microTaskAgreement: number, + context: AnalysisContext + ): ConfidenceMetrics { + + const embeddingsQuality = Math.min(100, embeddingsSimilarity * 100 * 2); // Scale 0.5 similarity to 100% + const domainAlignment = domainMatch ? 90 : (tool.domains?.length > 0 ? 60 : 30); + const consensus = Math.min(100, microTaskAgreement * 100); + const freshness = this.calculateToolFreshness(tool); + + const overall = ( + embeddingsQuality * this.confidenceConfig.embeddingsWeight + + domainAlignment * this.confidenceConfig.domainMatchWeight + + consensus * this.confidenceConfig.consensusWeight + + freshness * this.confidenceConfig.freshnessWeight + ); + + const uncertaintyFactors = this.identifyUncertaintyFactors(tool, context, overall); + const strengthIndicators = this.identifyStrengthIndicators(tool, context, overall); + + return { + overall: Math.round(overall), + embeddingsQuality: Math.round(embeddingsQuality), + domainAlignment: Math.round(domainAlignment), + consensus: Math.round(consensus), + freshness: Math.round(freshness), + uncertaintyFactors, + strengthIndicators + }; + } + private async analyzeScenario(context: AnalysisContext): Promise { const isWorkflow = context.mode === 'workflow'; const prompt = getPrompt('scenarioAnalysis', isWorkflow, context.userQuery); @@ -1010,6 +1080,124 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; } } + private calculateToolFreshness(tool: any): number { + // Base freshness score + let freshness = 70; // Default for tools without specific freshness data + + // Boost for tools with knowledge base (more maintained) + if (tool.knowledgebase === true) freshness += 20; + + // Boost for hosted tools (actively maintained) + if (isToolHosted(tool)) freshness += 15; + + // Slight boost for open source (community maintained) + if (tool.license && tool.license !== 'Proprietary') freshness += 5; + + return Math.min(100, freshness); + } + + private checkDomainMatch(tool: any, userQuery: string): boolean { + if (!tool.domains || tool.domains.length === 0) return false; + + const queryLower = userQuery.toLowerCase(); + + const domainKeywordsEnv = process.env.CONFIDENCE_DOMAIN_KEYWORDS || ''; + + const domainKeywords = domainKeywordsEnv.split('|').reduce((acc, pair) => { + const [domain, keywords] = pair.split(':'); + acc[domain] = keywords.split(','); + return acc; + }, {}); + + return tool.domains.some(domain => { + const keywords = domainKeywords[domain] || [domain.replace('-', ' ')]; + return keywords.some(keyword => queryLower.includes(keyword)); + }); + } + + private getMicroTaskAgreement(toolName: string, context: AnalysisContext): number { + // Check how many micro-tasks selected this tool + const microTaskEntries = context.auditTrail.filter(entry => + entry.phase === 'micro-task' && + entry.action.includes('selection') && + entry.output && + typeof entry.output === 'object' && + Array.isArray(entry.output.selectedTools) && + entry.output.selectedTools.includes(toolName) + ); + + const totalMicroTasks = context.auditTrail.filter(entry => + entry.phase === 'micro-task' && entry.action.includes('selection') + ).length; + + return totalMicroTasks > 0 ? microTaskEntries.length / totalMicroTasks : 0.8; // Default high agreement + } + + private getEmbeddingsSimilarity(toolName: string, context: AnalysisContext): number { + // Extract similarity from audit trail embeddings entry + const embeddingsEntry = context.auditTrail.find(entry => + entry.phase === 'retrieval' && entry.action === 'embeddings-search' + ); + + if (!embeddingsEntry || !embeddingsEntry.output) return 0.5; // Default medium similarity + + // Look for similarity data in the output (implementation specific) + // This would need to be populated during embeddings search + return 0.7; // Placeholder - would need actual similarity data from embeddings + } + + private identifyUncertaintyFactors(tool: any, context: AnalysisContext, confidence: number): string[] { + const factors: string[] = []; + + if (confidence < this.confidenceConfig.mediumThreshold) { + factors.push('Low overall confidence - consider manual validation'); + } + + if (!this.checkDomainMatch(tool, context.userQuery)) { + factors.push('Domain mismatch detected - tool may not be specifically designed for this scenario'); + } + + if (tool.skillLevel === 'expert' && /rapid|quick|urgent|triage/i.test(context.userQuery)) { + factors.push('Expert-level tool for rapid scenario - may be overcomplicated'); + } + + if (tool.type === 'software' && !isToolHosted(tool) && !tool.url) { + factors.push('Limited access information - availability uncertain'); + } + + if (tool.skillLevel === 'novice' && /complex|advanced|deep/i.test(context.userQuery)) { + factors.push('Novice-level tool for complex scenario - may lack required capabilities'); + } + + return factors; + } + + private identifyStrengthIndicators(tool: any, context: AnalysisContext, confidence: number): string[] { + const indicators: string[] = []; + + if (confidence >= this.confidenceConfig.highThreshold) { + indicators.push('High confidence recommendation based on multiple factors'); + } + + if (this.checkDomainMatch(tool, context.userQuery)) { + indicators.push('Strong domain alignment with scenario requirements'); + } + + if (tool.knowledgebase === true) { + indicators.push('Documentation and knowledge base available for guidance'); + } + + if (isToolHosted(tool)) { + indicators.push('Hosted solution available for immediate access'); + } + + if (tool.type === 'method' && /methodology|approach|process/i.test(context.userQuery)) { + indicators.push('Methodological approach matches procedural inquiry'); + } + + return indicators; + } + private buildRecommendation(context: AnalysisContext, mode: string, finalContent: string): any { const isWorkflow = mode === 'workflow'; @@ -1025,20 +1213,71 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; }; if (isWorkflow) { - return { - ...base, - recommended_tools: context.selectedTools?.map(st => ({ + const recommendedToolsWithConfidence = context.selectedTools?.map(st => { + // Calculate confidence for each tool + const confidence = this.calculateRecommendationConfidence( + st.tool, + this.getEmbeddingsSimilarity(st.tool.name, context), + this.checkDomainMatch(st.tool, context.userQuery), + this.getMicroTaskAgreement(st.tool.name, context), + context + ); + + // Add audit entry for confidence calculation + this.addAuditEntry(context, 'validation', 'confidence-scoring', + { toolName: st.tool.name, phase: st.phase }, + { + overall: confidence.overall, + components: { + embeddings: confidence.embeddingsQuality, + domain: confidence.domainAlignment, + consensus: confidence.consensus, + freshness: confidence.freshness + } + }, + confidence.overall, + Date.now(), + { uncertaintyCount: confidence.uncertaintyFactors.length } + ); + + return { name: st.tool.name, phase: st.phase, priority: st.priority, - justification: st.justification || `Empfohlen für ${st.phase}` - })) || [], + justification: st.justification || `Empfohlen für ${st.phase}`, + confidence: confidence, + recommendationStrength: confidence.overall >= this.confidenceConfig.highThreshold ? 'strong' : + confidence.overall >= this.confidenceConfig.mediumThreshold ? 'moderate' : 'weak' + }; + }) || []; + + return { + ...base, + recommended_tools: recommendedToolsWithConfidence, workflow_suggestion: finalContent }; } else { - return { - ...base, - recommended_tools: context.selectedTools?.map(st => ({ + const recommendedToolsWithConfidence = context.selectedTools?.map(st => { + const confidence = this.calculateRecommendationConfidence( + st.tool, + this.getEmbeddingsSimilarity(st.tool.name, context), + this.checkDomainMatch(st.tool, context.userQuery), + this.getMicroTaskAgreement(st.tool.name, context), + context + ); + + this.addAuditEntry(context, 'validation', 'confidence-scoring', + { toolName: st.tool.name, rank: st.tool.evaluation?.rank || 1 }, + { + overall: confidence.overall, + suitabilityAlignment: st.priority === 'high' && confidence.overall >= this.confidenceConfig.highThreshold + }, + confidence.overall, + Date.now(), + { strengthCount: confidence.strengthIndicators.length } + ); + + return { name: st.tool.name, rank: st.tool.evaluation?.rank || 1, suitability_score: st.priority, @@ -1046,8 +1285,16 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; implementation_approach: st.tool.evaluation?.implementation_approach || '', pros: st.tool.evaluation?.pros || [], cons: st.tool.evaluation?.cons || [], - alternatives: st.tool.evaluation?.alternatives || '' - })) || [], + alternatives: st.tool.evaluation?.alternatives || '', + confidence: confidence, + recommendationStrength: confidence.overall >= this.confidenceConfig.highThreshold ? 'strong' : + confidence.overall >= this.confidenceConfig.mediumThreshold ? 'moderate' : 'weak' + }; + }) || []; + + return { + ...base, + recommended_tools: recommendedToolsWithConfidence, additional_considerations: finalContent }; } diff --git a/unused-selectors.txt b/unused-selectors.txt new file mode 100644 index 0000000..ba12c40 --- /dev/null +++ b/unused-selectors.txt @@ -0,0 +1,89 @@ +.container-wide +.section-sm +.section-lg +.flex-center +.flex-start +.flex-end +.grid-3 +.grid-auto-fit-sm +.grid-auto-fit-lg +.gap-6 +.m-1 +.m-2 +.m-3 +.m-4 +.m-6 +.m-8 +.mt-0 +.mt-6 +.mt-8 +.mr-1 +.mr-4 +.ml-1 +.ml-3 +.ml-4 +.p-0 +.p-1 +.px-1 +.px-2 +.py-1 +.py-3 +.py-4 +.py-6 +.pb-2 +.content-narrow +.content-wide +.card-info-md +.card-info-lg +.info-text +.info-text-center +.grid-auto-300 +.grid-auto-400 +.grid-auto-500 +.pros-cons-section +.tool-metadata +.text-left +.font-normal +.font-bold +.text-error +.inline-block +.relative +.absolute +.sticky +.top-0 +.left-0 +.z-10 +.z-100 +.overflow-auto +.rounded-md +.rounded-2xl +.bg-tertiary +.h-12 +.nav-link +.nav-link:hover +.btn-xs +.card-sm +.card-lg +.card-gradient +.card-hero +.card-concept +.badge-accent +.tool-chip +.tool-chip:hover +.phase-grid +.phase-chip +.phase-chip:hover +.filter-row +.phase-card +.phase-card::before +.phase-card:hover +.tool-rec-metadata +.stat-unit +.share-btn--small +.collaboration-tool-compact +.collaboration-tool-compact:hover +.domain-phase-container +.card-info-xl +.text-3xl +.audit-progress-step +.audit-progress-step::before \ No newline at end of file -- 2.39.5 From cba42962f64d822ee620836e339ffcdc7879349a Mon Sep 17 00:00:00 2001 From: overcuriousity Date: Tue, 5 Aug 2025 13:38:46 +0200 Subject: [PATCH 12/19] flex-center --- src/styles/global.css | 206 +----------------------------------------- unused-selectors.txt | 89 ------------------ 2 files changed, 1 insertion(+), 294 deletions(-) delete mode 100644 unused-selectors.txt diff --git a/src/styles/global.css b/src/styles/global.css index 823d7b3..e784e53 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -149,10 +149,6 @@ a:hover { padding: 2rem 0; } -.section-lg { - padding: 3rem 0; -} - /* Flex Utilities */ .flex { display: flex; @@ -200,10 +196,6 @@ a:hover { align-items: center; } -.items-start { - align-items: flex-start; -} - .justify-center { justify-content: center; } @@ -222,11 +214,6 @@ a:hover { grid-template-columns: 1fr 1fr; } -.grid-3 { - display: grid; - grid-template-columns: 1fr 1fr 1fr; -} - .grid-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; @@ -239,24 +226,11 @@ a:hover { justify-content: center; } -.grid-auto-fit-sm { - display: grid; - grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); - gap: 1rem; -} - -.grid-auto-fit-lg { - display: grid; - grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); - gap: 1rem; -} - /* Gap Utilities */ .gap-1 { gap: 0.25rem; } .gap-2 { gap: 0.5rem; } .gap-3 { gap: 0.75rem; } .gap-4 { gap: 1rem; } -.gap-6 { gap: 1.5rem; } .gap-8 { gap: 2rem; } /* =================================================================== @@ -264,29 +238,16 @@ a:hover { ================================================================= */ /* Margin Utilities */ -.m-0 { margin: 0; } -.m-1 { margin: 0.25rem; } -.m-2 { margin: 0.5rem; } -.m-3 { margin: 0.75rem; } -.m-4 { margin: 1rem; } -.m-6 { margin: 1.5rem; } -.m-8 { margin: 2rem; } - .mx-auto { margin-left: auto; margin-right: auto; } -.mt-0 { margin-top: 0; } .mt-1 { margin-top: 0.25rem; } .mt-2 { margin-top: 0.5rem; } .mt-3 { margin-top: 0.75rem; } .mt-4 { margin-top: 1rem; } -.mt-6 { margin-top: 1.5rem; } -.mt-8 { margin-top: 2rem; } .mt-auto { margin-top: auto; } -.mr-1 { margin-right: 0.25rem; } .mr-2 { margin-right: 0.5rem; } .mr-3 { margin-right: 0.75rem; } -.mr-4 { margin-right: 1rem; } .mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 0.25rem; } @@ -296,34 +257,22 @@ a:hover { .mb-6 { margin-bottom: 1.5rem; } .mb-8 { margin-bottom: 2rem; } -.ml-1 { margin-left: 0.25rem; } .ml-2 { margin-left: 0.5rem; } -.ml-3 { margin-left: 0.75rem; } -.ml-4 { margin-left: 1rem; } /* Padding Utilities */ -.p-0 { padding: 0; } -.p-1 { padding: 0.25rem; } .p-2 { padding: 0.5rem; } .p-3 { padding: 0.75rem; } .p-4 { padding: 1rem; } .p-6 { padding: 1.5rem; } .p-8 { padding: 2rem; } -.px-1 { padding-left: 0.25rem; padding-right: 0.25rem; } -.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; } .px-3 { padding-left: 0.75rem; padding-right: 0.75rem; } .px-4 { padding-left: 1rem; padding-right: 1rem; } -.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; } .py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; } -.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; } -.py-4 { padding-top: 1rem; padding-bottom: 1rem; } -.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; } .py-8 { padding-top: 2rem; padding-bottom: 2rem; } .pt-3 { padding-top: 0.75rem; } -.pb-2 { padding-bottom: 0.5rem; } /* =================================================================== 6. TARGETED UTILITY CLASSES (FOR INLINE STYLE CONSOLIDATION) @@ -333,8 +282,6 @@ a:hover { .section-padding { padding: 2rem 0; } .content-center { text-align: center; margin-bottom: 1rem; } .content-center-lg { text-align: center; margin-bottom: 2rem; } -.content-narrow { max-width: 900px; margin: 0 auto; } -.content-wide { max-width: 1200px; margin: 0 auto; } /* Card Info Variants (for inline background/padding combinations) */ .card-info-sm { @@ -343,20 +290,6 @@ a:hover { border-radius: 0.5rem; } -.card-info-md { - background-color: var(--color-bg-secondary); - padding: 1.5rem; - border-radius: 0.75rem; - border: 1px solid var(--color-border); -} - -.card-info-lg { - background-color: var(--color-bg-secondary); - padding: 2rem; - border-radius: 1rem; - border: 1px solid var(--color-border); -} - /* Header/Title Combinations */ .header-center { text-align: center; @@ -375,42 +308,6 @@ a:hover { color: white; } -/* Metadata/Info Text Combinations */ -.info-text { - font-size: 0.875rem; - color: var(--color-text-secondary); - line-height: 1.6; -} - -.info-text-center { - font-size: 0.875rem; - color: var(--color-text-secondary); - text-align: center; - line-height: 1.6; -} - -/* Grid Auto-fit Variants for common inline grid patterns */ -.grid-auto-300 { - display: grid; - grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); - gap: 1rem; -} - -.grid-auto-400 { - display: grid; - grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); - gap: 1rem; -} - -.grid-auto-500 { - display: grid; - grid-template-columns: repeat(auto-fit, minmax(500px, 1fr)); - gap: 1.5rem; -} - -/* Add to global.css */ -.pros-cons-section { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; } -.tool-metadata { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.75rem; } .grid-cols-2 { grid-template-columns: 1fr 1fr; } .flex-shrink-1 { flex-shrink: 1; } @@ -420,7 +317,6 @@ a:hover { /* Text Utilities */ .text-center { text-align: center; } -.text-left { text-align: left; } .text-right { text-align: right; } .text-xs { font-size: 0.75rem; } @@ -430,10 +326,8 @@ a:hover { .text-xl { font-size: 1.25rem; } .text-2xl { font-size: 1.5rem; } -.font-normal { font-weight: 400; } .font-medium { font-weight: 500; } .font-semibold { font-weight: 600; } -.font-bold { font-weight: 700; } .leading-tight { line-height: 1.25; } .leading-normal { line-height: 1.5; } @@ -445,12 +339,10 @@ a:hover { .text-secondary { color: var(--color-text-secondary); } .text-accent { color: var(--color-accent); } .text-warning { color: var(--color-warning); } -.text-error { color: var(--color-error); } /* Display Utilities */ .block { display: block; } .inline { display: inline; } -.inline-block { display: inline-block; } .hidden { display: none; } /* Size Utilities */ @@ -466,18 +358,13 @@ a:hover { .fixed { position: fixed; } .sticky { position: sticky; } -.top-0 { top: 0; } .bottom-8 { bottom: 2rem; } .right-8 { right: 2rem; } -.left-0 { left: 0; } -.z-10 { z-index: 10; } .z-50 { z-index: 50; } -.z-100 { z-index: 100; } /* Overflow Utilities */ .overflow-hidden { overflow: hidden; } -.overflow-auto { overflow: auto; } /* Border Utilities */ .border { border: 1px solid var(--color-border); } @@ -485,19 +372,15 @@ a:hover { .border-l-4 { border-left: 4px solid; } .rounded { border-radius: 0.25rem; } -.rounded-md { border-radius: 0.375rem; } .rounded-lg { border-radius: 0.5rem; } .rounded-xl { border-radius: 0.75rem; } -.rounded-2xl { border-radius: 1rem; } /* Background Utilities */ .bg-secondary { background-color: var(--color-bg-secondary); } -.bg-tertiary { background-color: var(--color-bg-tertiary); } /* Cursor Utilities */ .cursor-pointer { cursor: pointer; } -.h-12 { height: 3rem; } .align-middle { vertical-align: middle; } @@ -637,11 +520,6 @@ nav { } /* Button Sizes */ -.btn-xs { - padding: 0.25rem 0.5rem; - font-size: 0.75rem; -} - .btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8125rem; @@ -799,14 +677,6 @@ input[type="checkbox"] { } /* Card Variants */ -.card-sm { - padding: 1rem; -} - -.card-lg { - padding: 2rem; -} - .card-info { background-color: var(--color-bg-secondary); border-left: 4px solid var(--color-primary); @@ -817,15 +687,6 @@ input[type="checkbox"] { color: white; } -.card-gradient { - background: linear-gradient(135deg, var(--color-bg-secondary) 0%, var(--color-bg-tertiary) 100%); -} - -.card-hero { - background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%); - color: white; -} - /* Card Type Modifiers */ .card-hosted { background-color: var(--color-hosted-bg); @@ -869,7 +730,6 @@ input[type="checkbox"] { .badge-primary { background-color: var(--color-primary); color: white; } .badge-secondary { background-color: var(--color-bg-secondary); color: var(--color-text); border: 1px solid var(--color-border); } .badge-success { background-color: var(--color-accent); color: white; } -.badge-accent { background-color: var(--color-accent); color: white; } .badge-warning { background-color: var(--color-warning); color: white; } .badge-error { background-color: var(--color-error); color: white; } @@ -2251,14 +2111,6 @@ input[type="checkbox"] { border-left: 3px solid var(--color-primary); } -.tool-rec-metadata { - display: flex; - flex-direction: column; - gap: 0.375rem; - font-size: 0.75rem; - color: var(--color-text-secondary); -} - /* =================================================================== CONFIDENCE INTEGRATION STYLES ================================================================= */ @@ -3012,12 +2864,6 @@ footer { color: var(--color-primary); } -.stat-unit { - font-size: 0.75rem; - color: var(--color-text-secondary); - margin-left: 0.25rem; -} - .queue-progress-container { position: relative; } @@ -3433,7 +3279,7 @@ footer { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.5rem; } - + .phase-chip { padding: 0.625rem 0.75rem; font-size: 0.8125rem; @@ -3590,7 +3436,6 @@ footer { } .grid-2, - .grid-3, .grid-4 { grid-template-columns: 1fr; } @@ -3620,10 +3465,6 @@ footer { .advanced-filters-compact { gap: 0.5rem; } - - .filter-row { - grid-template-columns: 1fr; - } .filter-toggles-compact { flex-direction: column; @@ -3844,9 +3685,6 @@ footer { MIGRATION UTILITIES - Additional classes for inline style migration ================================================================= */ -/* Height utilities */ -.h-12 { height: 3rem; } - /* Alignment utilities */ .align-middle { vertical-align: middle; } @@ -3871,17 +3709,8 @@ footer { color: white; } -/* Enhanced card info variants (if not already present) */ -.card-info-xl { - background-color: var(--color-bg-secondary); - padding: 2.5rem; - border-radius: 1.25rem; - border: 1px solid var(--color-border); -} - /* Ensure we have all text size variants */ .text-2xl { font-size: 1.5rem; } -.text-3xl { font-size: 1.875rem; } /* Additional spacing utilities that might be missing */ .py-8 { padding-top: 2rem; padding-bottom: 2rem; } @@ -3893,7 +3722,6 @@ footer { /* Additional rounded variants */ .rounded-xl { border-radius: 0.75rem; } -.rounded-2xl { border-radius: 1rem; } /* =================================================================== 23. MARKDOWN CONTENT @@ -4014,38 +3842,6 @@ footer { background-color: var(--color-bg-secondary); } -/* Progress indicators */ -.audit-progress-step { - position: relative; - display: flex; - align-items: center; - gap: 0.75rem; - padding: 0.5rem; - border-radius: 0.375rem; - transition: var(--transition-fast); -} - -.audit-progress-step::before { - content: ''; - width: 8px; - height: 8px; - border-radius: 50%; - flex-shrink: 0; - transition: var(--transition-fast); -} - -.audit-progress-step.success::before { - background-color: var(--color-accent); -} - -.audit-progress-step.warning::before { - background-color: var(--color-warning); -} - -.audit-progress-step.error::before { - background-color: var(--color-error); -} - /* Responsive adjustments for audit trail */ @media (width <= 768px) { .audit-process-flow .grid-cols-3 { diff --git a/unused-selectors.txt b/unused-selectors.txt deleted file mode 100644 index ba12c40..0000000 --- a/unused-selectors.txt +++ /dev/null @@ -1,89 +0,0 @@ -.container-wide -.section-sm -.section-lg -.flex-center -.flex-start -.flex-end -.grid-3 -.grid-auto-fit-sm -.grid-auto-fit-lg -.gap-6 -.m-1 -.m-2 -.m-3 -.m-4 -.m-6 -.m-8 -.mt-0 -.mt-6 -.mt-8 -.mr-1 -.mr-4 -.ml-1 -.ml-3 -.ml-4 -.p-0 -.p-1 -.px-1 -.px-2 -.py-1 -.py-3 -.py-4 -.py-6 -.pb-2 -.content-narrow -.content-wide -.card-info-md -.card-info-lg -.info-text -.info-text-center -.grid-auto-300 -.grid-auto-400 -.grid-auto-500 -.pros-cons-section -.tool-metadata -.text-left -.font-normal -.font-bold -.text-error -.inline-block -.relative -.absolute -.sticky -.top-0 -.left-0 -.z-10 -.z-100 -.overflow-auto -.rounded-md -.rounded-2xl -.bg-tertiary -.h-12 -.nav-link -.nav-link:hover -.btn-xs -.card-sm -.card-lg -.card-gradient -.card-hero -.card-concept -.badge-accent -.tool-chip -.tool-chip:hover -.phase-grid -.phase-chip -.phase-chip:hover -.filter-row -.phase-card -.phase-card::before -.phase-card:hover -.tool-rec-metadata -.stat-unit -.share-btn--small -.collaboration-tool-compact -.collaboration-tool-compact:hover -.domain-phase-container -.card-info-xl -.text-3xl -.audit-progress-step -.audit-progress-step::before \ No newline at end of file -- 2.39.5 From 8c5dc36788ded121d554b1bc657ff46691ab555b Mon Sep 17 00:00:00 2001 From: overcuriousity Date: Tue, 5 Aug 2025 15:01:07 +0200 Subject: [PATCH 13/19] add env var for timeouts --- src/utils/rateLimitedQueue.ts | 114 ++++++++++++++++++---------------- 1 file changed, 61 insertions(+), 53 deletions(-) diff --git a/src/utils/rateLimitedQueue.ts b/src/utils/rateLimitedQueue.ts index 603807a..18286f8 100644 --- a/src/utils/rateLimitedQueue.ts +++ b/src/utils/rateLimitedQueue.ts @@ -1,10 +1,14 @@ -// src/utils/rateLimitedQueue.ts - FIXED: Memory leak and better cleanup +// src/utils/rateLimitedQueue.ts import dotenv from "dotenv"; dotenv.config(); -const RATE_LIMIT_DELAY_MS = Number.parseInt(process.env.AI_RATE_LIMIT_DELAY_MS ?? "2000", 10) || 2000; +const RATE_LIMIT_DELAY_MS = + Number.parseInt(process.env.AI_RATE_LIMIT_DELAY_MS ?? "2000", 10) || 2000; + +const TASK_TIMEOUT_MS = + Number.parseInt(process.env.AI_TASK_TIMEOUT_MS ?? "300000", 10) || 300000; export type Task = () => Promise; @@ -12,7 +16,7 @@ interface QueuedTask { id: string; task: Task; addedAt: number; - status: 'queued' | 'processing' | 'completed' | 'failed'; + status: "queued" | "processing" | "completed" | "failed" | "timedout"; startedAt?: number; completedAt?: number; } @@ -29,11 +33,12 @@ class RateLimitedQueue { private tasks: QueuedTask[] = []; private isProcessing = false; private delayMs = RATE_LIMIT_DELAY_MS; + private taskTimeoutMs = TASK_TIMEOUT_MS; private lastProcessedAt = 0; private currentlyProcessingTaskId: string | null = null; - + private cleanupInterval: NodeJS.Timeout; - private readonly TASK_RETENTION_MS = 30000; + private readonly TASK_RETENTION_MS = 300000; // 5 minutes constructor() { this.cleanupInterval = setInterval(() => { @@ -44,19 +49,19 @@ class RateLimitedQueue { private cleanupOldTasks(): void { const now = Date.now(); const initialLength = this.tasks.length; - - this.tasks = this.tasks.filter(task => { - if (task.status === 'queued' || task.status === 'processing') { + + this.tasks = this.tasks.filter((task) => { + if (task.status === "queued" || task.status === "processing") { return true; } - - if (task.completedAt && (now - task.completedAt) > this.TASK_RETENTION_MS) { + + if (task.completedAt && now - task.completedAt > this.TASK_RETENTION_MS) { return false; } - + return true; }); - + const cleaned = initialLength - this.tasks.length; if (cleaned > 0) { console.log(`[QUEUE] Cleaned up ${cleaned} old tasks, ${this.tasks.length} remaining`); @@ -86,11 +91,12 @@ class RateLimitedQueue { } }, addedAt: Date.now(), - status: 'queued' + status: "queued", }; - + this.tasks.push(queuedTask); - + + // Kick the processor soon. setTimeout(() => { this.processQueue(); }, 100); @@ -98,12 +104,12 @@ class RateLimitedQueue { } getStatus(taskId?: string): QueueStatus { - const queuedTasks = this.tasks.filter(t => t.status === 'queued'); - const processingTasks = this.tasks.filter(t => t.status === 'processing'); + const queuedTasks = this.tasks.filter((t) => t.status === "queued"); + const processingTasks = this.tasks.filter((t) => t.status === "processing"); const queueLength = queuedTasks.length + processingTasks.length; - + const now = Date.now(); - + let estimatedWaitTime = 0; if (queueLength > 0) { if (this.isProcessing && this.lastProcessedAt > 0) { @@ -118,38 +124,34 @@ class RateLimitedQueue { const status: QueueStatus = { queueLength, isProcessing: this.isProcessing, - estimatedWaitTime + estimatedWaitTime, }; if (taskId) { - const task = this.tasks.find(t => t.id === taskId); - + const task = this.tasks.find((t) => t.id === taskId); + if (task) { status.taskStatus = task.status; - - if (task.status === 'processing') { + + if (task.status === "processing") { status.currentPosition = 1; - } else if (task.status === 'queued') { + } else if (task.status === "queued") { const queuedTasksInOrder = this.tasks - .filter(t => t.status === 'queued') + .filter((t) => t.status === "queued") .sort((a, b) => a.addedAt - b.addedAt); - - const positionInQueue = queuedTasksInOrder.findIndex(t => t.id === taskId); - + + const positionInQueue = queuedTasksInOrder.findIndex((t) => t.id === taskId); + if (positionInQueue >= 0) { const processingOffset = processingTasks.length > 0 ? 1 : 0; status.currentPosition = processingOffset + positionInQueue + 1; } } - } else { + } else { const taskTimestamp = taskId.match(/ai_(\d+)_/)?.[1]; if (taskTimestamp) { const taskAge = now - parseInt(taskTimestamp); - if (taskAge < 30000) { - status.taskStatus = 'starting'; - } else { - status.taskStatus = 'unknown'; - } + status.taskStatus = taskAge < 300000 ? "starting" : "unknown"; } } } @@ -158,41 +160,47 @@ class RateLimitedQueue { } private async processQueue(): Promise { - if (this.isProcessing) { - return; - } + if (this.isProcessing) return; this.isProcessing = true; try { while (true) { const nextTask = this.tasks - .filter(t => t.status === 'queued') + .filter((t) => t.status === "queued") .sort((a, b) => a.addedAt - b.addedAt)[0]; - - if (!nextTask) { - break; - } - - nextTask.status = 'processing'; + + if (!nextTask) break; // No more work + + nextTask.status = "processing"; nextTask.startedAt = Date.now(); this.currentlyProcessingTaskId = nextTask.id; this.lastProcessedAt = Date.now(); - + try { - await nextTask.task(); - nextTask.status = 'completed'; + await Promise.race([ + nextTask.task(), + new Promise((_, reject) => + setTimeout( + () => reject(new Error(`Task ${nextTask.id} timed out after ${this.taskTimeoutMs} ms`)), + this.taskTimeoutMs, + ), + ), + ]); + + nextTask.status = "completed"; nextTask.completedAt = Date.now(); console.log(`[QUEUE] Task ${nextTask.id} completed`); } catch (error) { - nextTask.status = 'failed'; + const err = error as Error; + nextTask.status = err.message.includes("timed out") ? "timedout" : "failed"; nextTask.completedAt = Date.now(); console.error(`[QUEUE] Task ${nextTask.id} failed:`, error); } - + this.currentlyProcessingTaskId = null; - - const hasMoreQueued = this.tasks.some(t => t.status === 'queued'); + + const hasMoreQueued = this.tasks.some((t) => t.status === "queued"); if (hasMoreQueued) { console.log(`[QUEUE] Waiting ${this.delayMs}ms before next task`); await new Promise((r) => setTimeout(r, this.delayMs)); @@ -223,4 +231,4 @@ export function shutdownQueue(): void { queue.shutdown(); } -export default queue; \ No newline at end of file +export default queue; -- 2.39.5 From 183e36b86d2e45f8116d76b9c119557fd69e2e45 Mon Sep 17 00:00:00 2001 From: overcuriousity Date: Tue, 5 Aug 2025 15:49:23 +0200 Subject: [PATCH 14/19] confidence metrics --- src/components/AIQueryInterface.astro | 246 +++++++++++++++++--------- src/styles/global.css | 89 +--------- src/utils/aiPipeline.ts | 8 +- 3 files changed, 166 insertions(+), 177 deletions(-) diff --git a/src/components/AIQueryInterface.astro b/src/components/AIQueryInterface.astro index 076b322..38a5547 100644 --- a/src/components/AIQueryInterface.astro +++ b/src/components/AIQueryInterface.astro @@ -672,6 +672,15 @@ class AIQueryInterface { } displayResults(recommendation, originalQuery) { + console.log('[AI DEBUG] Full recommendation object:', recommendation); + console.log('[AI DEBUG] Recommended tools:', recommendation.recommended_tools); + + if (recommendation.recommended_tools) { + recommendation.recommended_tools.forEach((tool, index) => { + console.log(`[AI DEBUG] Tool ${index}:`, tool.name, 'Confidence:', tool.confidence); + }); + } + if (this.currentMode === 'workflow') { this.displayWorkflowResults(recommendation, originalQuery); } else { @@ -693,16 +702,24 @@ class AIQueryInterface { toolsByPhase[phase] = []; }); + // DEBUG: Log recommendation structure + console.log('[AI Results] Recommendation structure:', recommendation); + console.log('[AI Results] Recommended tools:', recommendation.recommended_tools); + recommendation.recommended_tools?.forEach(recTool => { + // DEBUG: Log each tool's confidence data + console.log('[AI Results] Tool confidence data:', recTool.name, recTool.confidence); + if (toolsByPhase[recTool.phase]) { const fullTool = tools.find(t => t.name === recTool.name); if (fullTool) { toolsByPhase[recTool.phase].push({ ...fullTool, recommendation: recTool, - confidence: recTool.confidence, + confidence: recTool.confidence, // Ensure confidence is passed justification: recTool.justification, - priority: recTool.priority + priority: recTool.priority, + recommendationStrength: recTool.recommendationStrength }); } } @@ -737,6 +754,106 @@ class AIQueryInterface { this.elements.results.innerHTML = html; } + renderConfidenceTooltip(confidence) { + if (!confidence || typeof confidence.overall !== 'number') { + console.log('[AI DEBUG] No confidence data or invalid format:', confidence); + return ''; + } + + const confidenceColor = confidence.overall >= 80 ? 'var(--color-accent)' : + confidence.overall >= 60 ? 'var(--color-warning)' : 'var(--color-error)'; + + const tooltipId = `tooltip-${Math.random().toString(36).substr(2, 9)}`; + + console.log(`[AI DEBUG] Generating confidence tooltip: ${confidence.overall}% with ID ${tooltipId}`); + + return ` + +
+ ${confidence.overall}% + + +
+ `; + } + renderAuditTrail(auditTrail) { if (!auditTrail || !Array.isArray(auditTrail) || auditTrail.length === 0) { return ''; @@ -1003,74 +1120,6 @@ class AIQueryInterface { return String(data); } - renderConfidenceIndicator(confidence) { - if (!confidence || typeof confidence.overall !== 'number') return ''; - - const confidenceColor = confidence.overall >= 80 ? 'var(--color-accent)' : - confidence.overall >= 60 ? 'var(--color-warning)' : 'var(--color-error)'; - - const strengthText = confidence.overall >= 80 ? 'HOCH' : - confidence.overall >= 60 ? 'MITTEL' : 'NIEDRIG'; - - return ` -
-
-
-
-
- - ${confidence.overall}% - - -
- -
- `; - } - renderWorkflowTool(tool) { const hasValidProjectUrl = isToolHosted(tool); const priorityColors = { @@ -1088,14 +1137,13 @@ class AIQueryInterface {
+ style="background-color: ${priorityColors[tool.recommendation ? tool.recommendation.priority : tool.priority]}; color: white; padding: 0.25rem 0.5rem; border-radius: 1rem; font-size: 0.75rem; position: relative;"> ${tool.recommendation ? tool.recommendation.priority : tool.priority} + ${tool.confidence ? this.renderConfidenceTooltip(tool.confidence, 'priority') : ''}
- ${tool.confidence ? this.renderConfidenceIndicator(tool.confidence) : ''} -
"${this.sanitizeText(tool.justification || (tool.recommendation && tool.recommendation.justification) || `Empfohlen für ${tool.phase}`)}"
@@ -1123,12 +1171,11 @@ class AIQueryInterface {

${tool.name}

- - ${this.getSuitabilityText(recommendation.suitability_score)} + + ${this.getSuitabilityText(recommendation.suitability_score, recommendation.confidence)} ${this.renderToolBadges(tool)}
- ${recommendation.confidence ? this.renderConfidenceIndicator(recommendation.confidence) : ''}
@@ -1230,6 +1277,8 @@ class AIQueryInterface { const phaseTools = toolsByPhase[phase]; if (phaseTools.length === 0) return ''; + console.log(`[AI DEBUG] Phase ${phase} tools:`, phaseTools.map(t => ({name: t.name, hasConfidence: !!t.confidence}))); + return `
@@ -1237,7 +1286,10 @@ class AIQueryInterface {

${phaseNames[phase]}

- ${phaseTools.map(tool => this.renderWorkflowTool(tool)).join('')} + ${phaseTools.map(tool => { + console.log(`[AI DEBUG] Rendering tool ${tool.name} with confidence:`, tool.confidence); + return this.renderWorkflowTool(tool); + }).join('')}
@@ -1248,6 +1300,8 @@ class AIQueryInterface { } renderWorkflowTool(tool) { + console.log(`[AI DEBUG] renderWorkflowTool called for ${tool.name}, confidence:`, tool.confidence); + const hasValidProjectUrl = isToolHosted(tool); const priorityColors = { high: 'var(--color-error)', @@ -1255,21 +1309,29 @@ class AIQueryInterface { low: 'var(--color-accent)' }; + const priority = tool.recommendation ? tool.recommendation.priority : tool.priority; + const confidenceTooltip = tool.confidence ? this.renderConfidenceTooltip(tool.confidence) : ''; + + console.log(`[AI DEBUG] Priority: ${priority}, Confidence tooltip:`, confidenceTooltip ? 'generated' : 'empty'); + return ` -
+

${tool.icon ? `${tool.icon}` : ''} ${tool.name}

- - ${tool.recommendation.priority} - +
+ + ${priority} + ${confidenceTooltip} + +
- "${this.sanitizeText(tool.recommendation.justification)}" + "${this.sanitizeText(tool.justification || (tool.recommendation && tool.recommendation.justification) || `Empfohlen für ${tool.phase}`)}"
@@ -1301,9 +1363,13 @@ class AIQueryInterface { } renderDetailedTool(tool, recommendation, rank) { + console.log(`[AI DEBUG] renderDetailedTool called for ${tool.name}, recommendation confidence:`, recommendation.confidence); + const rankColors = { 1: 'var(--color-accent)', 2: 'var(--color-primary)', 3: 'var(--color-warning)' }; const suitabilityColors = { high: 'var(--color-accent)', medium: 'var(--color-warning)', low: 'var(--color-text-secondary)' }; + const confidenceTooltip = recommendation.confidence ? this.renderConfidenceTooltip(recommendation.confidence) : ''; + return `
@@ -1312,9 +1378,10 @@ class AIQueryInterface {

${tool.name}

-
- +
+ ${this.getSuitabilityText(recommendation.suitability_score)} + ${confidenceTooltip} ${this.renderToolBadges(tool)}
@@ -1469,13 +1536,18 @@ class AIQueryInterface { } } - getSuitabilityText(score) { + getSuitabilityText(score, confidence = null) { const texts = { high: 'GUT GEEIGNET', medium: 'GEEIGNET', low: 'VIELLEICHT GEEIGNET' }; - return texts[score] || 'GEEIGNET'; + const baseText = texts[score] || 'GEEIGNET'; + + if (confidence) { + return `${baseText} ${this.renderConfidenceTooltip(confidence, 'suitability')}`; + } + return baseText; } escapeHtml(text) { diff --git a/src/styles/global.css b/src/styles/global.css index e784e53..be43144 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -2069,7 +2069,7 @@ input[type="checkbox"] { border-color: var(--color-method); } -.tool-recommendation:hover .confidence-bar-fill { +.tool-recommendation:hover { box-shadow: 0 0 8px rgba(0,0,0,0.1); } @@ -2111,57 +2111,6 @@ input[type="checkbox"] { border-left: 3px solid var(--color-primary); } -/* =================================================================== - CONFIDENCE INTEGRATION STYLES - ================================================================= */ - -.confidence-indicator-integrated { - position: relative; -} - -.confidence-bar-wrapper { - position: relative; - background-color: var(--color-bg-tertiary); - border-radius: 2px; - overflow: hidden; - border: 1px solid var(--color-border); -} - -.confidence-bar-fill { - transition: width 0.6s ease-out; - position: relative; -} - -.confidence-bar-fill::after { - content: ''; - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - background: linear-gradient(45deg, transparent 25%, rgba(255,255,255,0.1) 25%, rgba(255,255,255,0.1) 50%, transparent 50%, transparent 75%, rgba(255,255,255,0.1) 75%); - background-size: 8px 8px; - animation: confidence-shimmer 2s linear infinite; -} - -.confidence-badge-compact .btn-icon { - transition: var(--transition-fast); -} - -.confidence-badge-compact .btn-icon:hover { - background-color: var(--color-bg-secondary); - transform: scale(1.1); -} - -.confidence-details-popup { - animation: confidence-popup-in 0.2s ease-out; -} - -/* Hover effect for confidence bars */ -.confidence-indicator-integrated:hover .confidence-bar-fill { - filter: brightness(1.1); -} - /* =================================================================== 18. APPROACH SELECTION (CONSOLIDATED) ================================================================= */ @@ -2563,22 +2512,6 @@ footer { animation: ai-spotlight-pulse 0.4s ease-out; } -@keyframes confidence-shimmer { - 0% { transform: translateX(-8px); } - 100% { transform: translateX(8px); } -} - -@keyframes confidence-popup-in { - from { - opacity: 0; - transform: translateY(-8px); - } - to { - opacity: 1; - transform: translateY(0); - } -} - /* =================================================================== 21. SMART PROMPTING INTERFACE (MISSING STYLES ADDED BACK) ================================================================= */ @@ -3501,26 +3434,6 @@ footer { width: 14px; height: 14px; } - - .confidence-details-popup { - position: fixed !important; - top: 50% !important; - left: 50% !important; - transform: translate(-50%, -50%) !important; - margin: 0 !important; - width: 90vw !important; - max-width: 300px !important; - z-index: 1000 !important; - } - - .confidence-indicator-integrated { - margin-bottom: 0.5rem; - } - - .confidence-badge-compact .btn-icon { - width: 18px; - height: 18px; - } } @media (width <= 640px) { diff --git a/src/utils/aiPipeline.ts b/src/utils/aiPipeline.ts index 284b1a5..b1adefa 100644 --- a/src/utils/aiPipeline.ts +++ b/src/utils/aiPipeline.ts @@ -1101,11 +1101,15 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; const queryLower = userQuery.toLowerCase(); - const domainKeywordsEnv = process.env.CONFIDENCE_DOMAIN_KEYWORDS || ''; + // Load domain keywords from environment with fallback + const domainKeywordsEnv = process.env.CONFIDENCE_DOMAIN_KEYWORDS || + 'incident-response:incident,breach,attack,compromise,response|malware-analysis:malware,virus,trojan,reverse,analysis|network-forensics:network,traffic,packet,pcap,wireshark|mobile-forensics:mobile,android,ios,phone,app|cloud-forensics:cloud,aws,azure,saas,paas'; const domainKeywords = domainKeywordsEnv.split('|').reduce((acc, pair) => { const [domain, keywords] = pair.split(':'); - acc[domain] = keywords.split(','); + if (domain && keywords) { + acc[domain] = keywords.split(','); + } return acc; }, {}); -- 2.39.5 From 27e64f05cab4cfa6d0215a2969e6c51f67870cc8 Mon Sep 17 00:00:00 2001 From: overcuriousity Date: Tue, 5 Aug 2025 16:23:47 +0200 Subject: [PATCH 15/19] fine-tuning of confidence --- .env.example | 13 +- src/components/AIQueryInterface.astro | 30 +- src/config/prompts.ts | 16 +- src/utils/aiPipeline.ts | 553 +++++++++++++++----------- 4 files changed, 353 insertions(+), 259 deletions(-) diff --git a/.env.example b/.env.example index 2ad295d..2cddc9b 100644 --- a/.env.example +++ b/.env.example @@ -190,23 +190,20 @@ FORENSIC_AUDIT_RETENTION_HOURS=24 FORENSIC_AUDIT_MAX_ENTRIES=50 # ============================================================================ -# 10. CONFIDENCE SCORING SYSTEM (Enhancement 2) +# 10. ENHANCED CONFIDENCE SCORING SYSTEM # ============================================================================ # Confidence component weights (must sum to 1.0) -CONFIDENCE_EMBEDDINGS_WEIGHT=0.3 # Weight for vector similarity quality -CONFIDENCE_CONSENSUS_WEIGHT=0.25 # Weight for micro-task agreement -CONFIDENCE_DOMAIN_MATCH_WEIGHT=0.25 # Weight for domain alignment -CONFIDENCE_FRESHNESS_WEIGHT=0.2 # Weight for tool freshness/maintenance +CONFIDENCE_SEMANTIC_WEIGHT=0.25 # Weight for vector similarity quality +CONFIDENCE_SUITABILITY_WEIGHT=0.4 # Weight for AI-determined task fitness +CONFIDENCE_CONSISTENCY_WEIGHT=0.2 # Weight for cross-validation agreement +CONFIDENCE_RELIABILITY_WEIGHT=0.15 # Weight for tool quality indicators # Confidence thresholds (0-100) CONFIDENCE_MINIMUM_THRESHOLD=40 # Below this = weak recommendation CONFIDENCE_MEDIUM_THRESHOLD=60 # 40-59 = weak, 60-79 = moderate CONFIDENCE_HIGH_THRESHOLD=80 # 80+ = strong recommendation -# Domain keywords for confidence scoring (domain:keyword1,keyword2|domain:keyword3,keyword4) -CONFIDENCE_DOMAIN_KEYWORDS="incident-response:incident,breach,attack,compromise,response|malware-analysis:malware,virus,trojan,reverse,analysis|network-forensics:network,traffic,packet,pcap,wireshark|mobile-forensics:mobile,android,ios,phone,app|cloud-forensics:cloud,aws,azure,saas,paas" - # ============================================================================ # PERFORMANCE TUNING PRESETS # ============================================================================ diff --git a/src/components/AIQueryInterface.astro b/src/components/AIQueryInterface.astro index 38a5547..3c855fb 100644 --- a/src/components/AIQueryInterface.astro +++ b/src/components/AIQueryInterface.astro @@ -785,41 +785,41 @@ class AIQueryInterface {
- 🔍 Ähnlichkeit zur Anfrage - ${confidence.embeddingsQuality}% + 🔍 Semantische Relevanz + ${confidence.semanticRelevance}%
- Wie gut die Tool-Beschreibung zu Ihrer Suchanfrage passt (basierend auf Vektor-Ähnlichkeit) + Wie gut die Tool-Beschreibung semantisch zu Ihrer Anfrage passt (basierend auf Vektor-Ähnlichkeit)
- 🎯 Domain-Passung - ${confidence.domainAlignment}% + 🎯 Aufgaben-Eignung + ${confidence.taskSuitability}%
- Wie gut das Tool-Einsatzgebiet zu Ihrem forensischen Szenario passt + KI-bewertete Eignung des Tools für Ihre spezifische forensische Aufgabenstellung
- 🤝 KI-Konsens - ${confidence.consensus}% + 🤝 Methodische Konsistenz + ${confidence.methodologicalConsistency}%
- Wie einig sich die verschiedenen KI-Analyseschritte über dieses Tool sind + Wie einheitlich verschiedene Analyseschritte dieses Tool bewerten (Kreuzvalidierung)
- 🔄 Aktualität - ${confidence.freshness}% + 🔧 Tool-Zuverlässigkeit + ${confidence.toolReliability}%
- Wie aktuell und gut gepflegt das Tool ist (basierend auf Hosting-Status, Knowledge Base, Open Source) + Qualitätsindikatoren: Dokumentation, Wartung, Verfügbarkeit und Benutzerfreundlichkeit
@@ -827,7 +827,7 @@ class AIQueryInterface { ${confidence.strengthIndicators && confidence.strengthIndicators.length > 0 ? `
- Was für dieses Tool spricht: + Stärken dieser Empfehlung:
    ${confidence.strengthIndicators.slice(0, 3).map(s => `
  • ${this.sanitizeText(s)}
  • `).join('')} @@ -838,7 +838,7 @@ class AIQueryInterface { ${confidence.uncertaintyFactors && confidence.uncertaintyFactors.length > 0 ? `
    - Unsicherheitsfaktoren: + Mögliche Einschränkungen:
      ${confidence.uncertaintyFactors.slice(0, 3).map(f => `
    • ${this.sanitizeText(f)}
    • `).join('')} @@ -847,7 +847,7 @@ class AIQueryInterface { ` : ''}
      - Vertrauensscore basiert auf KI-Analyse • Forensisch validiert + Mehrstufige KI-Analyse mit Kreuzvalidierung
    diff --git a/src/config/prompts.ts b/src/config/prompts.ts index 112a15e..6b31a49 100644 --- a/src/config/prompts.ts +++ b/src/config/prompts.ts @@ -147,7 +147,7 @@ Antworten Sie AUSSCHLIESSLICH mit diesem JSON-Format (kein zusätzlicher Text): // Tool evaluation prompt toolEvaluation: (userQuery: string, tool: any, rank: number) => { - return `Bewerten Sie diese Methode/Tool fallbezogen für das spezifische Problem nach forensischen Qualitätskriterien. + return `Sie sind ein DFIR-Experte und bewerten ein forensisches Tool für eine spezifische Aufgabe. PROBLEM: "${userQuery}" @@ -155,16 +155,26 @@ TOOL: ${tool.name} BESCHREIBUNG: ${tool.description} PLATTFORMEN: ${tool.platforms?.join(', ') || 'N/A'} SKILL LEVEL: ${tool.skillLevel} +DOMAINS: ${tool.domains?.join(', ') || 'N/A'} +TAGS: ${tool.tags?.join(', ') || 'N/A'} Bewerten Sie nach forensischen Standards und antworten Sie AUSSCHLIESSLICH mit diesem JSON-Format: { "suitability_score": "high|medium|low", + "task_relevance": 85, "detailed_explanation": "Detaillierte forensische Begründung warum diese Methode/Tool das Problem löst", "implementation_approach": "Konkrete methodische Schritte zur korrekten Anwendung für dieses spezifische Problem", "pros": ["Forensischer Vorteil 1", "Validierter Vorteil 2"], "cons": ["Methodische Limitation 1", "Potenzielle Schwäche 2"], + "limitations": ["Spezifische Einschränkung 1", "Mögliche Problematik 2"], "alternatives": "Alternative Ansätze falls diese Methode/Tool nicht optimal ist" -}`; +} + +WICHTIG: +- task_relevance: Numerischer Wert 0-100 wie gut das Tool für DIESE SPEZIFISCHE Aufgabe geeignet ist +- limitations: Konkrete Einschränkungen oder Situationen wo das Tool NICHT optimal wäre +- Berücksichtigen Sie den Skill Level vs. Anfrage-Komplexität +- Bewerten Sie objektiv, nicht beschönigend`; }, // Background knowledge selection prompt @@ -191,7 +201,7 @@ Antworten Sie AUSSCHLIESSLICH mit diesem JSON-Format: // Final recommendations prompt finalRecommendations: (isWorkflow: boolean, userQuery: string, selectedToolNames: string[]) => { const prompt = isWorkflow ? - `Erstellen Sie eine forensisch fundierte Workflow-Empfehlung basierend auf DFIR-Prinzipien. + `Erstellen Sie eine Workflow-Empfehlung basierend auf DFIR-Prinzipien. SZENARIO: "${userQuery}" AUSGEWÄHLTE TOOLS: ${selectedToolNames.join(', ') || 'Keine Tools ausgewählt'} diff --git a/src/utils/aiPipeline.ts b/src/utils/aiPipeline.ts index b1adefa..396fcea 100644 --- a/src/utils/aiPipeline.ts +++ b/src/utils/aiPipeline.ts @@ -1,7 +1,7 @@ -// src/utils/aiPipeline.ts - Enhanced with Audit Trail System +// src/utils/aiPipeline.ts - Enhanced with Proper Confidence Scoring import { getCompressedToolsDataForAI } from './dataService.js'; -import { embeddingsService, type EmbeddingData } from './embeddings.js'; +import { embeddingsService, type EmbeddingData, type SimilarityResult } from './embeddings.js'; import { AI_PROMPTS, getPrompt } from '../config/prompts.js'; import { isToolHosted } from './toolHelpers.js'; @@ -34,11 +34,11 @@ interface AnalysisResult { interface AuditEntry { timestamp: number; - phase: string; // 'retrieval', 'selection', 'micro-task-N' - action: string; // 'embeddings-search', 'ai-selection', 'tool-evaluation' - input: any; // What went into this step - output: any; // What came out of this step - confidence: number; // 0-100: How confident we are in this step + phase: string; + action: string; + input: any; + output: any; + confidence: number; processingTimeMs: number; metadata: Record; } @@ -56,29 +56,27 @@ interface AnalysisContext { problemAnalysis?: string; investigationApproach?: string; criticalConsiderations?: string; - selectedTools?: Array<{tool: any, phase: string, priority: string, justification?: string}>; + selectedTools?: Array<{tool: any, phase: string, priority: string, justification?: string, taskRelevance?: number, limitations?: string[]}>; backgroundKnowledge?: Array<{concept: any, relevance: string}>; seenToolNames: Set; auditTrail: AuditEntry[]; -} - -interface SimilarityResult extends EmbeddingData { - similarity: number; + + // Store actual similarity data from embeddings + embeddingsSimilarities: Map; } interface ConfidenceMetrics { - overall: number; // 0-100: Combined confidence score - embeddingsQuality: number; // How well embeddings matched - domainAlignment: number; // How well tools match scenario domain - consensus: number; // How much micro-tasks agree - freshness: number; // How recent/up-to-date the selection is - uncertaintyFactors: string[]; // What could make this wrong - strengthIndicators: string[]; // What makes this recommendation strong + overall: number; // 0-100: Combined confidence score + semanticRelevance: number; // How well tool description matches query (from embeddings) + taskSuitability: number; // AI-determined fitness for this specific task + methodologicalConsistency: number; // How well different analysis steps agree + toolReliability: number; // Indicators of tool quality and maintenance + uncertaintyFactors: string[]; // Specific reasons why this might not work + strengthIndicators: string[]; // Specific reasons why this is a good choice } - class ImprovedMicroTaskAIPipeline { private config: AIConfig; private maxSelectedItems: number; @@ -105,10 +103,10 @@ class ImprovedMicroTaskAIPipeline { }; private confidenceConfig: { - embeddingsWeight: number; - consensusWeight: number; - domainMatchWeight: number; - freshnessWeight: number; + semanticWeight: number; // Weight for embeddings similarity + suitabilityWeight: number; // Weight for AI task fit evaluation + consistencyWeight: number; // Weight for cross-validation agreement + reliabilityWeight: number; // Weight for tool quality indicators minimumThreshold: number; mediumThreshold: number; highThreshold: number; @@ -146,25 +144,19 @@ class ImprovedMicroTaskAIPipeline { retentionHours: parseInt(process.env.FORENSIC_AUDIT_RETENTION_HOURS || '72', 10) }; - console.log('[AI PIPELINE] Configuration loaded:', { - embeddingCandidates: this.embeddingCandidates, - embeddingSelection: `${this.embeddingSelectionLimit} tools, ${this.embeddingConceptsLimit} concepts`, - noEmbeddingsLimits: `${this.noEmbeddingsToolLimit || 'unlimited'} tools, ${this.noEmbeddingsConceptLimit || 'unlimited'} concepts`, - auditEnabled: this.auditConfig.enabled - }); - + // Updated confidence weights - more focused on AI evaluation this.confidenceConfig = { - embeddingsWeight: parseFloat(process.env.CONFIDENCE_EMBEDDINGS_WEIGHT || '0.3'), - consensusWeight: parseFloat(process.env.CONFIDENCE_CONSENSUS_WEIGHT || '0.25'), - domainMatchWeight: parseFloat(process.env.CONFIDENCE_DOMAIN_MATCH_WEIGHT || '0.25'), - freshnessWeight: parseFloat(process.env.CONFIDENCE_FRESHNESS_WEIGHT || '0.2'), + semanticWeight: parseFloat(process.env.CONFIDENCE_SEMANTIC_WEIGHT || '0.25'), // Embeddings similarity + suitabilityWeight: parseFloat(process.env.CONFIDENCE_SUITABILITY_WEIGHT || '0.4'), // AI task fit evaluation + consistencyWeight: parseFloat(process.env.CONFIDENCE_CONSISTENCY_WEIGHT || '0.2'), // Cross-validation agreement + reliabilityWeight: parseFloat(process.env.CONFIDENCE_RELIABILITY_WEIGHT || '0.15'), // Tool quality indicators minimumThreshold: parseInt(process.env.CONFIDENCE_MINIMUM_THRESHOLD || '40', 10), mediumThreshold: parseInt(process.env.CONFIDENCE_MEDIUM_THRESHOLD || '60', 10), highThreshold: parseInt(process.env.CONFIDENCE_HIGH_THRESHOLD || '80', 10) }; - console.log('[AI PIPELINE] Confidence scoring enabled:', { - weights: `E:${this.confidenceConfig.embeddingsWeight} C:${this.confidenceConfig.consensusWeight} D:${this.confidenceConfig.domainMatchWeight} F:${this.confidenceConfig.freshnessWeight}`, + console.log('[AI PIPELINE] Enhanced confidence scoring enabled:', { + weights: `Semantic:${this.confidenceConfig.semanticWeight} Suitability:${this.confidenceConfig.suitabilityWeight} Consistency:${this.confidenceConfig.consistencyWeight} Reliability:${this.confidenceConfig.reliabilityWeight}`, thresholds: `${this.confidenceConfig.minimumThreshold}/${this.confidenceConfig.mediumThreshold}/${this.confidenceConfig.highThreshold}` }); } @@ -247,8 +239,8 @@ class ImprovedMicroTaskAIPipeline { let confidence = 60; // Base confidence if (selectionRatio > 0.05 && selectionRatio < 0.3) confidence += 20; - else if (selectionRatio <= 0.05) confidence -= 10; // Too few - else confidence -= 15; // Too many + else if (selectionRatio <= 0.05) confidence -= 10; + else confidence -= 15; if (hasReasoning) confidence += 15; @@ -357,7 +349,7 @@ class ImprovedMicroTaskAIPipeline { const possibleTools = toolMatches .map(match => match.replace(/"/g, '')) .filter(name => name.length > 2 && !['selectedTools', 'selectedConcepts', 'reasoning'].includes(name)) - .slice(0, 15); // Reasonable limit + .slice(0, 15); if (possibleTools.length > 0) { console.log(`[AI PIPELINE] Recovered ${possibleTools.length} possible tool names from broken JSON`); @@ -374,7 +366,7 @@ class ImprovedMicroTaskAIPipeline { } } - private addToolToSelection(context: AnalysisContext, tool: any, phase: string, priority: string, justification?: string): boolean { + private addToolToSelection(context: AnalysisContext, tool: any, phase: string, priority: string, justification?: string, taskRelevance?: number, limitations?: string[]): boolean { context.seenToolNames.add(tool.name); if (!context.selectedTools) context.selectedTools = []; @@ -382,18 +374,22 @@ class ImprovedMicroTaskAIPipeline { tool, phase, priority, - justification + justification, + taskRelevance, + limitations }); return true; } - private async getIntelligentCandidates(userQuery: string, toolsData: any, mode: string) { + private async getIntelligentCandidates(userQuery: string, toolsData: any, mode: string, context: AnalysisContext) { let candidateTools: any[] = []; let candidateConcepts: any[] = []; let selectionMethod = 'unknown'; - // WAIT for embeddings initialization if embeddings are enabled + // Initialize embeddings similarities storage + context.embeddingsSimilarities = new Map(); + if (process.env.AI_EMBEDDINGS_ENABLED === 'true') { try { console.log('[AI PIPELINE] Waiting for embeddings initialization...'); @@ -414,6 +410,11 @@ class ImprovedMicroTaskAIPipeline { console.log(`[AI PIPELINE] Embeddings found ${similarItems.length} similar items`); + // Store actual similarity scores for confidence calculation + similarItems.forEach(item => { + context.embeddingsSimilarities.set(item.name, item.similarity); + }); + const toolsMap = new Map(toolsData.tools.map((tool: any) => [tool.name, tool])); const conceptsMap = new Map(toolsData.concepts.map((concept: any) => [concept.name, concept])); @@ -450,7 +451,7 @@ class ImprovedMicroTaskAIPipeline { } if (this.auditConfig.enabled) { - this.addAuditEntry(null, 'retrieval', 'embeddings-search', + this.addAuditEntry(context, 'retrieval', 'embeddings-search', { query: userQuery, threshold: this.similarityThreshold, candidates: this.embeddingCandidates }, { candidatesFound: similarItems.length, @@ -459,7 +460,8 @@ class ImprovedMicroTaskAIPipeline { reductionRatio: reductionRatio, usingEmbeddings: selectionMethod === 'embeddings_candidates', totalAvailable: totalAvailableTools, - filtered: similarTools.length + filtered: similarTools.length, + avgSimilarity: similarItems.length > 0 ? similarItems.reduce((sum, item) => sum + item.similarity, 0) / similarItems.length : 0 }, selectionMethod === 'embeddings_candidates' ? 85 : 60, embeddingsStart, @@ -479,7 +481,7 @@ class ImprovedMicroTaskAIPipeline { } console.log(`[AI PIPELINE] AI will analyze ${candidateTools.length} candidate tools (method: ${selectionMethod})`); - const finalSelection = await this.aiSelectionWithFullData(userQuery, candidateTools, candidateConcepts, mode, selectionMethod); + const finalSelection = await this.aiSelectionWithFullData(userQuery, candidateTools, candidateConcepts, mode, selectionMethod, context); return { tools: finalSelection.selectedTools, @@ -495,7 +497,8 @@ class ImprovedMicroTaskAIPipeline { candidateTools: any[], candidateConcepts: any[], mode: string, - selectionMethod: string + selectionMethod: string, + context: AnalysisContext ) { const selectionStart = Date.now(); @@ -576,7 +579,7 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; console.error('[AI PIPELINE] AI selection returned invalid structure:', response.slice(0, 200)); if (this.auditConfig.enabled) { - this.addAuditEntry(null, 'selection', 'ai-tool-selection-failed', + this.addAuditEntry(context, 'selection', 'ai-tool-selection-failed', { candidateCount: candidateTools.length, mode, prompt: prompt.slice(0, 200) }, { error: 'Invalid JSON structure', response: response.slice(0, 200) }, 10, @@ -602,7 +605,7 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; if (this.auditConfig.enabled) { const confidence = this.calculateSelectionConfidence(result, candidateTools.length); - this.addAuditEntry(null, 'selection', 'ai-tool-selection', + this.addAuditEntry(context, 'selection', 'ai-tool-selection', { candidateCount: candidateTools.length, mode, promptLength: prompt.length }, { selectedToolCount: result.selectedTools.length, @@ -626,7 +629,7 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; console.error('[AI PIPELINE] AI selection failed:', error); if (this.auditConfig.enabled) { - this.addAuditEntry(null, 'selection', 'ai-tool-selection-error', + this.addAuditEntry(context, 'selection', 'ai-tool-selection-error', { candidateCount: candidateTools.length, mode }, { error: error.message }, 5, @@ -700,38 +703,225 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; private calculateRecommendationConfidence( tool: any, - embeddingsSimilarity: number, - domainMatch: boolean, - microTaskAgreement: number, - context: AnalysisContext + context: AnalysisContext, + taskRelevance: number = 70, + limitations: string[] = [] ): ConfidenceMetrics { - const embeddingsQuality = Math.min(100, embeddingsSimilarity * 100 * 2); // Scale 0.5 similarity to 100% - const domainAlignment = domainMatch ? 90 : (tool.domains?.length > 0 ? 60 : 30); - const consensus = Math.min(100, microTaskAgreement * 100); - const freshness = this.calculateToolFreshness(tool); + // 1. Semantic Relevance: Real embeddings similarity score + const semanticRelevance = context.embeddingsSimilarities.has(tool.name) ? + Math.round(context.embeddingsSimilarities.get(tool.name)! * 100) : 50; + // 2. Task Suitability: AI-determined fitness for specific task + const taskSuitability = Math.round(taskRelevance); + + // 3. Methodological Consistency: Cross-validation between micro-tasks + const methodologicalConsistency = this.calculateCrossValidationScore(tool.name, context); + + // 4. Tool Reliability: Quality indicators + const toolReliability = this.calculateToolReliability(tool); + + // Debug logging + console.log(`[CONFIDENCE DEBUG] ${tool.name}:`, { + semantic: semanticRelevance, + taskSuitability: taskSuitability, + consistency: methodologicalConsistency, + reliability: toolReliability, + hasEmbeddingsSimilarity: context.embeddingsSimilarities.has(tool.name), + rawTaskRelevance: taskRelevance + }); + + // Calculate weighted overall score const overall = ( - embeddingsQuality * this.confidenceConfig.embeddingsWeight + - domainAlignment * this.confidenceConfig.domainMatchWeight + - consensus * this.confidenceConfig.consensusWeight + - freshness * this.confidenceConfig.freshnessWeight + semanticRelevance * this.confidenceConfig.semanticWeight + + taskSuitability * this.confidenceConfig.suitabilityWeight + + methodologicalConsistency * this.confidenceConfig.consistencyWeight + + toolReliability * this.confidenceConfig.reliabilityWeight ); - const uncertaintyFactors = this.identifyUncertaintyFactors(tool, context, overall); - const strengthIndicators = this.identifyStrengthIndicators(tool, context, overall); + const uncertaintyFactors = this.identifySpecificUncertaintyFactors(tool, context, limitations, overall); + const strengthIndicators = this.identifySpecificStrengthIndicators(tool, context, overall); return { overall: Math.round(overall), - embeddingsQuality: Math.round(embeddingsQuality), - domainAlignment: Math.round(domainAlignment), - consensus: Math.round(consensus), - freshness: Math.round(freshness), + semanticRelevance: Math.round(semanticRelevance), + taskSuitability: Math.round(taskSuitability), + methodologicalConsistency: Math.round(methodologicalConsistency), + toolReliability: Math.round(toolReliability), uncertaintyFactors, strengthIndicators }; } + private calculateCrossValidationScore(toolName: string, context: AnalysisContext): number { + // Look for entries where this tool was mentioned across different phases + const relevantEntries = context.auditTrail.filter(entry => + entry.phase === 'micro-task' || entry.phase === 'selection' + ); + + let toolMentions = 0; + let positiveEvaluations = 0; + let confidenceSum = 0; + + relevantEntries.forEach(entry => { + let toolFound = false; + + // Check various ways the tool might be referenced in output + if (entry.output && typeof entry.output === 'object') { + // Check selectedTools arrays + if (Array.isArray(entry.output.selectedTools) && + entry.output.selectedTools.includes(toolName)) { + toolFound = true; + } + + // Check finalToolNames arrays + if (Array.isArray(entry.output.finalToolNames) && + entry.output.finalToolNames.includes(toolName)) { + toolFound = true; + } + + // Check toolName in individual evaluation + if (entry.output.toolName === toolName) { + toolFound = true; + } + } + + if (toolFound) { + toolMentions++; + confidenceSum += entry.confidence; + + // Consider it positive if confidence >= 60 + if (entry.confidence >= 60) { + positiveEvaluations++; + } + } + }); + + console.log(`[AI PIPELINE] Cross-validation for ${toolName}: ${toolMentions} mentions, ${positiveEvaluations} positive, avg confidence: ${toolMentions > 0 ? Math.round(confidenceSum / toolMentions) : 0}`); + + if (toolMentions === 0) { + return 60; // Default when no cross-validation data available + } + + if (toolMentions === 1) { + // Single mention - use confidence directly but cap it + return Math.min(85, Math.max(40, confidenceSum)); + } + + // Multiple mentions - calculate agreement ratio + const agreementRatio = positiveEvaluations / toolMentions; + const avgConfidence = confidenceSum / toolMentions; + + // Combine agreement ratio with average confidence + const crossValidationScore = (agreementRatio * 0.7 + (avgConfidence / 100) * 0.3) * 100; + + return Math.round(Math.min(95, Math.max(30, crossValidationScore))); + } + + // NEW: Calculate tool reliability based on objective indicators + private calculateToolReliability(tool: any): number { + let reliability = 50; // Base score + + // Documentation availability + if (tool.knowledgebase === true) reliability += 25; + + // Active maintenance (hosted tools are typically maintained) + if (isToolHosted(tool)) reliability += 20; + + // Community support (open source often has community) + if (tool.license && tool.license !== 'Proprietary') reliability += 10; + + // Skill level appropriateness (not too complex, not too simple) + if (tool.skillLevel === 'intermediate' || tool.skillLevel === 'advanced') reliability += 10; + else if (tool.skillLevel === 'expert') reliability -= 5; // May be overcomplicated + + // Multi-platform support (more versatile) + if (tool.platforms && tool.platforms.length > 1) reliability += 5; + + return Math.min(100, reliability); + } + + // NEW: Identify specific uncertainty factors based on analysis + private identifySpecificUncertaintyFactors(tool: any, context: AnalysisContext, limitations: string[], confidence: number): string[] { + const factors: string[] = []; + + // Add AI-identified limitations + if (limitations && limitations.length > 0) { + factors.push(...limitations.slice(0, 3)); // Limit to top 3 + } + + // Low semantic similarity + const similarity = context.embeddingsSimilarities.get(tool.name) || 0.5; + if (similarity < 0.4) { + factors.push('Geringe semantische Ähnlichkeit zur Anfrage - Tool-Beschreibung passt möglicherweise nicht optimal'); + } + + // Skill level mismatch + if (tool.skillLevel === 'expert' && /schnell|rapid|triage|urgent/i.test(context.userQuery)) { + factors.push('Experten-Tool für Eilszenario - möglicherweise zu komplex für schnelle Antworten'); + } + + if (tool.skillLevel === 'novice' && /komplex|erweitert|tiefgehend|advanced/i.test(context.userQuery)) { + factors.push('Einsteiger-Tool für komplexes Szenario - könnte funktionale Einschränkungen haben'); + } + + // Access limitations + if (tool.type === 'software' && !isToolHosted(tool) && tool.accessType === 'download') { + factors.push('Installation erforderlich - nicht sofort verfügbar ohne Setup'); + } + + // Cross-validation disagreement + const crossValidation = this.calculateCrossValidationScore(tool.name, context); + if (crossValidation < 50) { + factors.push('Uneinheitliche Bewertung in verschiedenen Analyseschritten - Empfehlung nicht eindeutig'); + } + + return factors.slice(0, 4); // Limit to 4 most important factors + } + + // NEW: Identify specific strength indicators + private identifySpecificStrengthIndicators(tool: any, context: AnalysisContext, confidence: number): string[] { + const indicators: string[] = []; + + // High confidence overall + if (confidence >= this.confidenceConfig.highThreshold) { + indicators.push('Hohe Gesamtbewertung durch mehrfache Validierung'); + } + + // High semantic similarity + const similarity = context.embeddingsSimilarities.get(tool.name) || 0.5; + if (similarity >= 0.7) { + indicators.push('Sehr gute semantische Übereinstimmung mit Ihrer Anfrage'); + } + + // Strong cross-validation + const crossValidation = this.calculateCrossValidationScore(tool.name, context); + if (crossValidation >= 80) { + indicators.push('Konsistente Empfehlung über verschiedene Analyseschritte hinweg'); + } + + // Quality indicators + if (tool.knowledgebase === true) { + indicators.push('Umfassende Dokumentation und Wissensbasis verfügbar'); + } + + if (isToolHosted(tool)) { + indicators.push('Sofort verfügbar über gehostete Lösung - kein Setup erforderlich'); + } + + // Skill level match + if (tool.skillLevel === 'intermediate' || tool.skillLevel === 'advanced') { + indicators.push('Ausgewogenes Verhältnis zwischen Funktionalität und Benutzerfreundlichkeit'); + } + + // Method alignment + if (tool.type === 'method' && /methodik|vorgehen|prozess|ansatz/i.test(context.userQuery)) { + indicators.push('Methodischer Ansatz passt zu Ihrer prozeduralen Anfrage'); + } + + return indicators.slice(0, 4); // Limit to 4 most important indicators + } + private async analyzeScenario(context: AnalysisContext): Promise { const isWorkflow = context.mode === 'workflow'; const prompt = getPrompt('scenarioAnalysis', isWorkflow, context.userQuery); @@ -833,27 +1023,49 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; if (result.success) { const evaluation = this.safeParseJSON(result.content, { suitability_score: 'medium', + task_relevance: '', detailed_explanation: 'Evaluation failed', implementation_approach: '', pros: [], cons: [], + limitations: [], alternatives: '' }); + // Debug logging to see what we're getting + console.log(`[AI PIPELINE] Tool ${tool.name} evaluation:`, { + taskRelevance: evaluation.task_relevance, + suitabilityScore: evaluation.suitability_score, + limitationsCount: evaluation.limitations?.length || 0 + }); + + // Ensure task_relevance is a number + const taskRelevance = typeof evaluation.task_relevance === 'number' ? + evaluation.task_relevance : + parseInt(String(evaluation.task_relevance)) || 70; + + // Store enhanced evaluation data this.addToolToSelection(context, { ...tool, evaluation: { ...evaluation, + task_relevance: taskRelevance, // Ensure it's stored as number rank } - }, 'evaluation', evaluation.suitability_score); + }, 'evaluation', evaluation.suitability_score, evaluation.detailed_explanation, + taskRelevance, evaluation.limitations); this.addAuditEntry(context, 'micro-task', 'tool-evaluation', { toolName: tool.name, rank }, - { suitabilityScore: evaluation.suitability_score, hasExplanation: !!evaluation.detailed_explanation }, + { + suitabilityScore: evaluation.suitability_score, + taskRelevance: taskRelevance, // Use the cleaned number + hasExplanation: !!evaluation.detailed_explanation, + limitationsIdentified: evaluation.limitations?.length || 0 + }, evaluation.suitability_score === 'high' ? 85 : evaluation.suitability_score === 'medium' ? 70 : 50, Date.now() - result.processingTimeMs, - { toolType: tool.type } + { toolType: tool.type, taskRelevanceScore: taskRelevance } ); } @@ -963,28 +1175,31 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; async processQuery(userQuery: string, mode: string): Promise { const startTime = Date.now(); - let completedTasks = 0; + let completeTasks = 0; let failedTasks = 0; this.tempAuditEntries = []; - console.log(`[AI PIPELINE] Starting ${mode} query processing with context continuity and audit trail`); + console.log(`[AI PIPELINE] Starting ${mode} query processing with enhanced confidence scoring`); try { const toolsData = await getCompressedToolsDataForAI(); - const filteredData = await this.getIntelligentCandidates(userQuery, toolsData, mode); const context: AnalysisContext = { userQuery, mode, - filteredData, + filteredData: {}, // Will be populated by getIntelligentCandidates contextHistory: [], maxContextLength: this.maxContextTokens, currentContextLength: 0, seenToolNames: new Set(), - auditTrail: [] + auditTrail: [], + embeddingsSimilarities: new Map() }; + const filteredData = await this.getIntelligentCandidates(userQuery, toolsData, mode, context); + context.filteredData = filteredData; + this.mergeTemporaryAuditEntries(context); console.log(`[AI PIPELINE] Starting micro-tasks with ${filteredData.tools.length} tools visible`); @@ -994,58 +1209,54 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; { candidateTools: filteredData.tools.length, candidateConcepts: filteredData.concepts.length }, 90, startTime, - { auditEnabled: this.auditConfig.enabled } + { auditEnabled: this.auditConfig.enabled, confidenceScoringEnabled: true } ); - // MICRO-TASK SEQUENCE + // MICRO-TASK SEQUENCE WITH ENHANCED CONFIDENCE TRACKING - // Task 1: Scenario/Problem Analysis const analysisResult = await this.analyzeScenario(context); - if (analysisResult.success) completedTasks++; else failedTasks++; + if (analysisResult.success) completeTasks++; else failedTasks++; await this.delay(this.microTaskDelay); - // Task 2: Investigation/Solution Approach const approachResult = await this.generateApproach(context); - if (approachResult.success) completedTasks++; else failedTasks++; + if (approachResult.success) completeTasks++; else failedTasks++; await this.delay(this.microTaskDelay); - // Task 3: Critical Considerations const considerationsResult = await this.generateCriticalConsiderations(context); - if (considerationsResult.success) completedTasks++; else failedTasks++; + if (considerationsResult.success) completeTasks++; else failedTasks++; await this.delay(this.microTaskDelay); - // Task 4: Tool Selection/Evaluation (mode-dependent) if (mode === 'workflow') { const phases = toolsData.phases || []; for (const phase of phases) { const toolSelectionResult = await this.selectToolsForPhase(context, phase); - if (toolSelectionResult.success) completedTasks++; else failedTasks++; + if (toolSelectionResult.success) completeTasks++; else failedTasks++; await this.delay(this.microTaskDelay); } } else { const topTools = filteredData.tools.slice(0, 3); for (let i = 0; i < topTools.length; i++) { const evaluationResult = await this.evaluateSpecificTool(context, topTools[i], i + 1); - if (evaluationResult.success) completedTasks++; else failedTasks++; + if (evaluationResult.success) completeTasks++; else failedTasks++; await this.delay(this.microTaskDelay); } } const knowledgeResult = await this.selectBackgroundKnowledge(context); - if (knowledgeResult.success) completedTasks++; else failedTasks++; + if (knowledgeResult.success) completeTasks++; else failedTasks++; await this.delay(this.microTaskDelay); const finalResult = await this.generateFinalRecommendations(context); - if (finalResult.success) completedTasks++; else failedTasks++; + if (finalResult.success) completeTasks++; else failedTasks++; const recommendation = this.buildRecommendation(context, mode, finalResult.content); this.addAuditEntry(context, 'completion', 'pipeline-end', - { completedTasks, failedTasks }, + { completedTasks: completeTasks, failedTasks }, { finalRecommendation: !!recommendation, auditEntriesGenerated: context.auditTrail.length }, - completedTasks > failedTasks ? 85 : 60, + completeTasks > failedTasks ? 85 : 60, startTime, - { totalProcessingTimeMs: Date.now() - startTime } + { totalProcessingTimeMs: Date.now() - startTime, confidenceScoresGenerated: context.selectedTools?.length || 0 } ); const processingStats = { @@ -1054,13 +1265,13 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; finalSelectedItems: (context.selectedTools?.length || 0) + (context.backgroundKnowledge?.length || 0), processingTimeMs: Date.now() - startTime, - microTasksCompleted: completedTasks, + microTasksCompleted: completeTasks, microTasksFailed: failedTasks, contextContinuityUsed: true }; - console.log(`[AI PIPELINE] Completed: ${completedTasks} tasks, Failed: ${failedTasks} tasks`); - console.log(`[AI PIPELINE] Unique tools selected: ${context.seenToolNames.size}`); + console.log(`[AI PIPELINE] Completed: ${completeTasks} tasks, Failed: ${failedTasks} tasks`); + console.log(`[AI PIPELINE] Enhanced confidence scores generated: ${context.selectedTools?.length || 0}`); console.log(`[AI PIPELINE] Audit trail entries: ${context.auditTrail.length}`); return { @@ -1080,128 +1291,6 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; } } - private calculateToolFreshness(tool: any): number { - // Base freshness score - let freshness = 70; // Default for tools without specific freshness data - - // Boost for tools with knowledge base (more maintained) - if (tool.knowledgebase === true) freshness += 20; - - // Boost for hosted tools (actively maintained) - if (isToolHosted(tool)) freshness += 15; - - // Slight boost for open source (community maintained) - if (tool.license && tool.license !== 'Proprietary') freshness += 5; - - return Math.min(100, freshness); - } - - private checkDomainMatch(tool: any, userQuery: string): boolean { - if (!tool.domains || tool.domains.length === 0) return false; - - const queryLower = userQuery.toLowerCase(); - - // Load domain keywords from environment with fallback - const domainKeywordsEnv = process.env.CONFIDENCE_DOMAIN_KEYWORDS || - 'incident-response:incident,breach,attack,compromise,response|malware-analysis:malware,virus,trojan,reverse,analysis|network-forensics:network,traffic,packet,pcap,wireshark|mobile-forensics:mobile,android,ios,phone,app|cloud-forensics:cloud,aws,azure,saas,paas'; - - const domainKeywords = domainKeywordsEnv.split('|').reduce((acc, pair) => { - const [domain, keywords] = pair.split(':'); - if (domain && keywords) { - acc[domain] = keywords.split(','); - } - return acc; - }, {}); - - return tool.domains.some(domain => { - const keywords = domainKeywords[domain] || [domain.replace('-', ' ')]; - return keywords.some(keyword => queryLower.includes(keyword)); - }); - } - - private getMicroTaskAgreement(toolName: string, context: AnalysisContext): number { - // Check how many micro-tasks selected this tool - const microTaskEntries = context.auditTrail.filter(entry => - entry.phase === 'micro-task' && - entry.action.includes('selection') && - entry.output && - typeof entry.output === 'object' && - Array.isArray(entry.output.selectedTools) && - entry.output.selectedTools.includes(toolName) - ); - - const totalMicroTasks = context.auditTrail.filter(entry => - entry.phase === 'micro-task' && entry.action.includes('selection') - ).length; - - return totalMicroTasks > 0 ? microTaskEntries.length / totalMicroTasks : 0.8; // Default high agreement - } - - private getEmbeddingsSimilarity(toolName: string, context: AnalysisContext): number { - // Extract similarity from audit trail embeddings entry - const embeddingsEntry = context.auditTrail.find(entry => - entry.phase === 'retrieval' && entry.action === 'embeddings-search' - ); - - if (!embeddingsEntry || !embeddingsEntry.output) return 0.5; // Default medium similarity - - // Look for similarity data in the output (implementation specific) - // This would need to be populated during embeddings search - return 0.7; // Placeholder - would need actual similarity data from embeddings - } - - private identifyUncertaintyFactors(tool: any, context: AnalysisContext, confidence: number): string[] { - const factors: string[] = []; - - if (confidence < this.confidenceConfig.mediumThreshold) { - factors.push('Low overall confidence - consider manual validation'); - } - - if (!this.checkDomainMatch(tool, context.userQuery)) { - factors.push('Domain mismatch detected - tool may not be specifically designed for this scenario'); - } - - if (tool.skillLevel === 'expert' && /rapid|quick|urgent|triage/i.test(context.userQuery)) { - factors.push('Expert-level tool for rapid scenario - may be overcomplicated'); - } - - if (tool.type === 'software' && !isToolHosted(tool) && !tool.url) { - factors.push('Limited access information - availability uncertain'); - } - - if (tool.skillLevel === 'novice' && /complex|advanced|deep/i.test(context.userQuery)) { - factors.push('Novice-level tool for complex scenario - may lack required capabilities'); - } - - return factors; - } - - private identifyStrengthIndicators(tool: any, context: AnalysisContext, confidence: number): string[] { - const indicators: string[] = []; - - if (confidence >= this.confidenceConfig.highThreshold) { - indicators.push('High confidence recommendation based on multiple factors'); - } - - if (this.checkDomainMatch(tool, context.userQuery)) { - indicators.push('Strong domain alignment with scenario requirements'); - } - - if (tool.knowledgebase === true) { - indicators.push('Documentation and knowledge base available for guidance'); - } - - if (isToolHosted(tool)) { - indicators.push('Hosted solution available for immediate access'); - } - - if (tool.type === 'method' && /methodology|approach|process/i.test(context.userQuery)) { - indicators.push('Methodological approach matches procedural inquiry'); - } - - return indicators; - } - private buildRecommendation(context: AnalysisContext, mode: string, finalContent: string): any { const isWorkflow = mode === 'workflow'; @@ -1218,13 +1307,12 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; if (isWorkflow) { const recommendedToolsWithConfidence = context.selectedTools?.map(st => { - // Calculate confidence for each tool + // Calculate enhanced confidence for each tool const confidence = this.calculateRecommendationConfidence( st.tool, - this.getEmbeddingsSimilarity(st.tool.name, context), - this.checkDomainMatch(st.tool, context.userQuery), - this.getMicroTaskAgreement(st.tool.name, context), - context + context, + st.taskRelevance || 70, + st.limitations || [] ); // Add audit entry for confidence calculation @@ -1233,15 +1321,15 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; { overall: confidence.overall, components: { - embeddings: confidence.embeddingsQuality, - domain: confidence.domainAlignment, - consensus: confidence.consensus, - freshness: confidence.freshness + semantic: confidence.semanticRelevance, + suitability: confidence.taskSuitability, + consistency: confidence.methodologicalConsistency, + reliability: confidence.toolReliability } }, confidence.overall, Date.now(), - { uncertaintyCount: confidence.uncertaintyFactors.length } + { uncertaintyCount: confidence.uncertaintyFactors.length, strengthCount: confidence.strengthIndicators.length } ); return { @@ -1264,10 +1352,9 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; const recommendedToolsWithConfidence = context.selectedTools?.map(st => { const confidence = this.calculateRecommendationConfidence( st.tool, - this.getEmbeddingsSimilarity(st.tool.name, context), - this.checkDomainMatch(st.tool, context.userQuery), - this.getMicroTaskAgreement(st.tool.name, context), - context + context, + st.taskRelevance || 70, + st.limitations || [] ); this.addAuditEntry(context, 'validation', 'confidence-scoring', @@ -1278,7 +1365,7 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; }, confidence.overall, Date.now(), - { strengthCount: confidence.strengthIndicators.length } + { strengthCount: confidence.strengthIndicators.length, limitationsCount: confidence.uncertaintyFactors.length } ); return { -- 2.39.5 From fe1be323bb705d23bd5cbc1273de7a5df0d87fc3 Mon Sep 17 00:00:00 2001 From: overcuriousity Date: Tue, 5 Aug 2025 21:35:38 +0200 Subject: [PATCH 16/19] confidence updates, content adjustment --- .env.example | 14 +- src/components/AIQueryInterface.astro | 29 +-- src/config/prompts.ts | 87 ++++---- src/data/tools.yaml | 12 +- src/utils/aiPipeline.ts | 288 +++++++++----------------- 5 files changed, 160 insertions(+), 270 deletions(-) diff --git a/.env.example b/.env.example index 2cddc9b..1814d9f 100644 --- a/.env.example +++ b/.env.example @@ -117,7 +117,7 @@ AI_MAX_CONTEXT_TOKENS=4000 # Maximum tokens per individual AI prompt # Larger = more context per call | Smaller = faster responses -AI_MAX_PROMPT_TOKENS=1500 +AI_MAX_PROMPT_TOKENS=2500 # ============================================================================ # 6. AUTHENTICATION & AUTHORIZATION (OPTIONAL) @@ -190,18 +190,16 @@ FORENSIC_AUDIT_RETENTION_HOURS=24 FORENSIC_AUDIT_MAX_ENTRIES=50 # ============================================================================ -# 10. ENHANCED CONFIDENCE SCORING SYSTEM +# 10. SIMPLIFIED CONFIDENCE SCORING SYSTEM # ============================================================================ # Confidence component weights (must sum to 1.0) -CONFIDENCE_SEMANTIC_WEIGHT=0.25 # Weight for vector similarity quality -CONFIDENCE_SUITABILITY_WEIGHT=0.4 # Weight for AI-determined task fitness -CONFIDENCE_CONSISTENCY_WEIGHT=0.2 # Weight for cross-validation agreement -CONFIDENCE_RELIABILITY_WEIGHT=0.15 # Weight for tool quality indicators +CONFIDENCE_SEMANTIC_WEIGHT=0.5 # Weight for vector similarity quality +CONFIDENCE_SUITABILITY_WEIGHT=0.5 # Weight for AI-determined task fitness # Confidence thresholds (0-100) -CONFIDENCE_MINIMUM_THRESHOLD=40 # Below this = weak recommendation -CONFIDENCE_MEDIUM_THRESHOLD=60 # 40-59 = weak, 60-79 = moderate +CONFIDENCE_MINIMUM_THRESHOLD=50 # Below this = weak recommendation +CONFIDENCE_MEDIUM_THRESHOLD=70 # 40-59 = weak, 60-79 = moderate CONFIDENCE_HIGH_THRESHOLD=80 # 80+ = strong recommendation # ============================================================================ diff --git a/src/components/AIQueryInterface.astro b/src/components/AIQueryInterface.astro index 3c855fb..99f3c6b 100644 --- a/src/components/AIQueryInterface.astro +++ b/src/components/AIQueryInterface.astro @@ -756,17 +756,14 @@ class AIQueryInterface { renderConfidenceTooltip(confidence) { if (!confidence || typeof confidence.overall !== 'number') { - console.log('[AI DEBUG] No confidence data or invalid format:', confidence); return ''; } const confidenceColor = confidence.overall >= 80 ? 'var(--color-accent)' : - confidence.overall >= 60 ? 'var(--color-warning)' : 'var(--color-error)'; + confidence.overall >= 60 ? 'var(--color-warning)' : 'var(--color-error)'; const tooltipId = `tooltip-${Math.random().toString(36).substr(2, 9)}`; - console.log(`[AI DEBUG] Generating confidence tooltip: ${confidence.overall}% with ID ${tooltipId}`); - return ` ${confidence.semanticRelevance}%
- Wie gut die Tool-Beschreibung semantisch zu Ihrer Anfrage passt (basierend auf Vektor-Ähnlichkeit) + Wie gut die Tool-Beschreibung semantisch zu Ihrer Anfrage passt (Vektor-Ähnlichkeit)
@@ -802,26 +799,6 @@ class AIQueryInterface { KI-bewertete Eignung des Tools für Ihre spezifische forensische Aufgabenstellung
- -
-
- 🤝 Methodische Konsistenz - ${confidence.methodologicalConsistency}% -
-
- Wie einheitlich verschiedene Analyseschritte dieses Tool bewerten (Kreuzvalidierung) -
-
- -
-
- 🔧 Tool-Zuverlässigkeit - ${confidence.toolReliability}% -
-
- Qualitätsindikatoren: Dokumentation, Wartung, Verfügbarkeit und Benutzerfreundlichkeit -
-
${confidence.strengthIndicators && confidence.strengthIndicators.length > 0 ? ` @@ -847,7 +824,7 @@ class AIQueryInterface { ` : ''}
- Mehrstufige KI-Analyse mit Kreuzvalidierung + Forensisch fundierte KI-Analyse
diff --git a/src/config/prompts.ts b/src/config/prompts.ts index 6b31a49..e0ac22d 100644 --- a/src/config/prompts.ts +++ b/src/config/prompts.ts @@ -120,61 +120,60 @@ ${aspects} WICHTIG: Antworten Sie NUR in fließendem deutschen Text ohne Listen oder Markdown. Maximum 120 Wörter.`; }, - // Phase tool selection prompt phaseToolSelection: (userQuery: string, phase: any, phaseTools: any[]) => { - return `Wählen Sie 2-3 Methoden/Tools für die Phase "${phase.name}" basierend auf objektiven, fallbezogenen Kriterien. + return `Wählen Sie 2-3 Methoden/Tools für die Phase "${phase.name}" und bewerten Sie deren Aufgaben-Eignung VERGLEICHEND. SZENARIO: "${userQuery}" +SPEZIFISCHE PHASE: ${phase.name} - ${phase.description || 'Forensische Untersuchungsphase'} VERFÜGBARE TOOLS FÜR ${phase.name.toUpperCase()}: -${phaseTools.map((tool: any) => `- ${tool.name}: ${tool.description.slice(0, 100)}...`).join('\n')} +${phaseTools.map((tool: any, index: number) => `${index + 1}. ${tool.name}: ${tool.description.slice(0, 150)}... + - Plattformen: ${tool.platforms?.join(', ') || 'N/A'} + - Skill Level: ${tool.skillLevel} + - Tags: ${tool.tags?.join(', ') || 'N/A'}`).join('\n\n')} -Wählen Sie Methoden/Tools nach forensischen Kriterien aus: -- Court admissibility und Chain of Custody Kompatibilität -- Integration in forensische Standard-Workflows -- Reproduzierbarkeit und Dokumentationsqualität -- Objektivität +Bewerten Sie ALLE Tools vergleichend für diese spezifische Aufgabe UND Phase. Wählen Sie die 2-3 besten aus. -Antworten Sie AUSSCHLIESSLICH mit diesem JSON-Format (kein zusätzlicher Text): +BEWERTUNGSKRITERIEN: +- Wie gut löst das Tool das forensische Problem im SZENARIO-Kontext? +- Wie gut passt es zur spezifischen PHASE "${phase.name}"? +- Wie vergleicht es sich mit den anderen verfügbaren Tools für diese Phase? + +Antworten Sie AUSSCHLIESSLICH mit diesem JSON-Format: [ { - "toolName": "Exakter Methoden/Tool-Name", - "priority": "high|medium|low", - "justification": "Objektive Begründung warum diese Methode/Tool für das spezifische Szenario besser geeignet ist" + "toolName": "Exakter Tool-Name", + "taskRelevance": 85, + "justification": "Vergleichende Begründung warum dieses Tool für diese Phase und Aufgabe besser/schlechter als die anderen geeignet ist", + "limitations": ["Spezifische Einschränkung 1", "Einschränkung 2"] } -]`; - }, - - // Tool evaluation prompt - toolEvaluation: (userQuery: string, tool: any, rank: number) => { - return `Sie sind ein DFIR-Experte und bewerten ein forensisches Tool für eine spezifische Aufgabe. - -PROBLEM: "${userQuery}" - -TOOL: ${tool.name} -BESCHREIBUNG: ${tool.description} -PLATTFORMEN: ${tool.platforms?.join(', ') || 'N/A'} -SKILL LEVEL: ${tool.skillLevel} -DOMAINS: ${tool.domains?.join(', ') || 'N/A'} -TAGS: ${tool.tags?.join(', ') || 'N/A'} - -Bewerten Sie nach forensischen Standards und antworten Sie AUSSCHLIESSLICH mit diesem JSON-Format: -{ - "suitability_score": "high|medium|low", - "task_relevance": 85, - "detailed_explanation": "Detaillierte forensische Begründung warum diese Methode/Tool das Problem löst", - "implementation_approach": "Konkrete methodische Schritte zur korrekten Anwendung für dieses spezifische Problem", - "pros": ["Forensischer Vorteil 1", "Validierter Vorteil 2"], - "cons": ["Methodische Limitation 1", "Potenzielle Schwäche 2"], - "limitations": ["Spezifische Einschränkung 1", "Mögliche Problematik 2"], - "alternatives": "Alternative Ansätze falls diese Methode/Tool nicht optimal ist" -} +] WICHTIG: -- task_relevance: Numerischer Wert 0-100 wie gut das Tool für DIESE SPEZIFISCHE Aufgabe geeignet ist -- limitations: Konkrete Einschränkungen oder Situationen wo das Tool NICHT optimal wäre -- Berücksichtigen Sie den Skill Level vs. Anfrage-Komplexität -- Bewerten Sie objektiv, nicht beschönigend`; +- taskRelevance: 0-100 Score basierend auf Szenario-Eignung UND Phasen-Passung im VERGLEICH zu anderen Tools +- Nur die 2-3 BESTEN Tools auswählen und bewerten +- justification soll VERGLEICHEND sein ("besser als X weil...", "für diese Phase ideal weil...")`; + }, + + toolEvaluation: (userQuery: string, tool: any, rank: number, taskRelevance: number) => { + return `Sie sind ein DFIR-Experte. Erklären Sie DETAILLIERT die Anwendung dieses bereits bewerteten Tools. + +PROBLEM: "${userQuery}" +TOOL: ${tool.name} (bereits bewertet mit ${taskRelevance}% Aufgaben-Eignung) +BESCHREIBUNG: ${tool.description} + +Das Tool wurde bereits als Rang ${rank} für diese Aufgabe bewertet. Erklären Sie nun: + +Antworten Sie AUSSCHLIESSLICH mit diesem JSON-Format: +{ + "detailed_explanation": "Detaillierte Erklärung warum und wie dieses Tool für diese spezifische Aufgabe eingesetzt wird", + "implementation_approach": "Konkrete Schritt-für-Schritt Anleitung zur korrekten Anwendung", + "pros": ["Spezifischer Vorteil 1", "Spezifischer Vorteil 2"], + "cons": ["Bekannte Limitation 1", "Bekannte Limitation 2"], + "alternatives": "Alternative Ansätze oder Tools falls dieses nicht verfügbar ist" +} + +WICHTIG: Keine erneute Bewertung - nur detaillierte Erklärung der bereits bewerteten Eignung.`; }, // Background knowledge selection prompt @@ -229,7 +228,7 @@ export function getPrompt(key: 'scenarioAnalysis', isWorkflow: boolean, userQuer export function getPrompt(key: 'investigationApproach', isWorkflow: boolean, userQuery: string): string; export function getPrompt(key: 'criticalConsiderations', isWorkflow: boolean, userQuery: string): string; export function getPrompt(key: 'phaseToolSelection', userQuery: string, phase: any, phaseTools: any[]): string; -export function getPrompt(key: 'toolEvaluation', userQuery: string, tool: any, rank: number): string; +export function getPrompt(key: 'toolEvaluation', userQuery: string, tool: any, rank: number, taskRelevance: number): string; export function getPrompt(key: 'backgroundKnowledgeSelection', userQuery: string, mode: string, selectedToolNames: string[], availableConcepts: any[]): string; export function getPrompt(key: 'finalRecommendations', isWorkflow: boolean, userQuery: string, selectedToolNames: string[]): string; export function getPrompt(promptKey: keyof typeof AI_PROMPTS, ...args: any[]): string { diff --git a/src/data/tools.yaml b/src/data/tools.yaml index 0c3a185..808b804 100644 --- a/src/data/tools.yaml +++ b/src/data/tools.yaml @@ -3975,7 +3975,7 @@ tools: - name: KAPE type: software description: >- - Kroll Artifact Parser and Extractor revolutioniert Windows-Forensik durch + Kroll Artifact Parser and Extractor versucht sich an Windows-Forensik durch intelligente Ziel-basierte Sammlung. Statt Full-Disk-Images extrahiert KAPE gezielt kritische Artefakte: Registry-Hives, Event-Logs, Prefetch, Browser- Daten, Scheduled-Tasks in Minuten statt Stunden. Die Target-Files @@ -3983,12 +3983,10 @@ tools: Besonders clever: Compound-Targets gruppieren zusammengehörige Artefakte (z.B. "Browser" sammelt Chrome+Firefox+Edge), die gKAPE-GUI macht es auch für Nicht-Techniker zugänglich. Batch-Mode verarbeitet mehrere Images - parallel. Output direkt kompatibel zu Timeline-Tools wie Plaso. Die - ständigen Community-Updates halten mit Windows-Entwicklungen Schritt. + parallel. Output direkt kompatibel zu Timeline-Tools wie Plaso. VSS-Processing analysiert Shadow- Copies automatisch. Der - Remote-Collection-Mode sammelt über Netzwerk. Kostenlos aber - Enterprise-Support verfügbar. Der neue Standard für effiziente - Windows-Forensik-Triage. + Remote-Collection-Mode sammelt über Netzwerk. Kostenlos (mit Registrierung) aber + Enterprise-Support verfügbar. skillLevel: intermediate url: https://www.kroll.com/kape icon: 🧰 @@ -4003,7 +4001,7 @@ tools: platforms: - Windows accessType: download - license: Freeware + license: Proprietary knowledgebase: false - name: Kibana type: software diff --git a/src/utils/aiPipeline.ts b/src/utils/aiPipeline.ts index 396fcea..f291f3b 100644 --- a/src/utils/aiPipeline.ts +++ b/src/utils/aiPipeline.ts @@ -72,7 +72,6 @@ interface ConfidenceMetrics { semanticRelevance: number; // How well tool description matches query (from embeddings) taskSuitability: number; // AI-determined fitness for this specific task methodologicalConsistency: number; // How well different analysis steps agree - toolReliability: number; // Indicators of tool quality and maintenance uncertaintyFactors: string[]; // Specific reasons why this might not work strengthIndicators: string[]; // Specific reasons why this is a good choice } @@ -146,17 +145,17 @@ class ImprovedMicroTaskAIPipeline { // Updated confidence weights - more focused on AI evaluation this.confidenceConfig = { - semanticWeight: parseFloat(process.env.CONFIDENCE_SEMANTIC_WEIGHT || '0.25'), // Embeddings similarity - suitabilityWeight: parseFloat(process.env.CONFIDENCE_SUITABILITY_WEIGHT || '0.4'), // AI task fit evaluation - consistencyWeight: parseFloat(process.env.CONFIDENCE_CONSISTENCY_WEIGHT || '0.2'), // Cross-validation agreement - reliabilityWeight: parseFloat(process.env.CONFIDENCE_RELIABILITY_WEIGHT || '0.15'), // Tool quality indicators + semanticWeight: parseFloat(process.env.CONFIDENCE_SEMANTIC_WEIGHT || '0.3'), // Embeddings similarity + suitabilityWeight: parseFloat(process.env.CONFIDENCE_SUITABILITY_WEIGHT || '0.7'), // AI task fit evaluation + consistencyWeight: 0, + reliabilityWeight: 0, minimumThreshold: parseInt(process.env.CONFIDENCE_MINIMUM_THRESHOLD || '40', 10), mediumThreshold: parseInt(process.env.CONFIDENCE_MEDIUM_THRESHOLD || '60', 10), highThreshold: parseInt(process.env.CONFIDENCE_HIGH_THRESHOLD || '80', 10) }; - - console.log('[AI PIPELINE] Enhanced confidence scoring enabled:', { - weights: `Semantic:${this.confidenceConfig.semanticWeight} Suitability:${this.confidenceConfig.suitabilityWeight} Consistency:${this.confidenceConfig.consistencyWeight} Reliability:${this.confidenceConfig.reliabilityWeight}`, + + console.log('[AI PIPELINE] Simplified confidence scoring enabled:', { + weights: `Semantic:${this.confidenceConfig.semanticWeight} Suitability:${this.confidenceConfig.suitabilityWeight}`, thresholds: `${this.confidenceConfig.minimumThreshold}/${this.confidenceConfig.mediumThreshold}/${this.confidenceConfig.highThreshold}` }); } @@ -709,197 +708,107 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; ): ConfidenceMetrics { // 1. Semantic Relevance: Real embeddings similarity score - const semanticRelevance = context.embeddingsSimilarities.has(tool.name) ? - Math.round(context.embeddingsSimilarities.get(tool.name)! * 100) : 50; + const rawSemanticRelevance = context.embeddingsSimilarities.has(tool.name) ? + context.embeddingsSimilarities.get(tool.name)! * 100 : 50; - // 2. Task Suitability: AI-determined fitness for specific task - const taskSuitability = Math.round(taskRelevance); + // 2. Task Suitability: Enhanced with phase-awareness for workflow mode + let enhancedTaskSuitability = taskRelevance; - // 3. Methodological Consistency: Cross-validation between micro-tasks - const methodologicalConsistency = this.calculateCrossValidationScore(tool.name, context); + if (context.mode === 'workflow') { + // In workflow mode, boost score if tool is well-matched to its assigned phase + const toolSelection = context.selectedTools?.find(st => st.tool.name === tool.name); + if (toolSelection && tool.phases && tool.phases.includes(toolSelection.phase)) { + // Boost for phase alignment (but cap at 100) + const phaseBonus = Math.min(15, 100 - taskRelevance); + enhancedTaskSuitability = Math.min(100, taskRelevance + phaseBonus); + + console.log(`[CONFIDENCE] Phase bonus for ${tool.name}: ${taskRelevance} -> ${enhancedTaskSuitability} (phase: ${toolSelection.phase})`); + } + } - // 4. Tool Reliability: Quality indicators - const toolReliability = this.calculateToolReliability(tool); - - // Debug logging - console.log(`[CONFIDENCE DEBUG] ${tool.name}:`, { - semantic: semanticRelevance, - taskSuitability: taskSuitability, - consistency: methodologicalConsistency, - reliability: toolReliability, - hasEmbeddingsSimilarity: context.embeddingsSimilarities.has(tool.name), - rawTaskRelevance: taskRelevance - }); - - // Calculate weighted overall score + // Simple weighted combination - no artificial scaling const overall = ( - semanticRelevance * this.confidenceConfig.semanticWeight + - taskSuitability * this.confidenceConfig.suitabilityWeight + - methodologicalConsistency * this.confidenceConfig.consistencyWeight + - toolReliability * this.confidenceConfig.reliabilityWeight + rawSemanticRelevance * this.confidenceConfig.semanticWeight + + enhancedTaskSuitability * this.confidenceConfig.suitabilityWeight ); const uncertaintyFactors = this.identifySpecificUncertaintyFactors(tool, context, limitations, overall); const strengthIndicators = this.identifySpecificStrengthIndicators(tool, context, overall); + console.log(`[CONFIDENCE DEBUG] ${tool.name}:`, { + rawSemantic: Math.round(rawSemanticRelevance), + rawTaskSuitability: taskRelevance, + enhancedTaskSuitability: Math.round(enhancedTaskSuitability), + overall: Math.round(overall), + mode: context.mode + }); + return { overall: Math.round(overall), - semanticRelevance: Math.round(semanticRelevance), - taskSuitability: Math.round(taskSuitability), - methodologicalConsistency: Math.round(methodologicalConsistency), - toolReliability: Math.round(toolReliability), + semanticRelevance: Math.round(rawSemanticRelevance), + taskSuitability: Math.round(enhancedTaskSuitability), + methodologicalConsistency: 0, uncertaintyFactors, strengthIndicators }; } - private calculateCrossValidationScore(toolName: string, context: AnalysisContext): number { - // Look for entries where this tool was mentioned across different phases - const relevantEntries = context.auditTrail.filter(entry => - entry.phase === 'micro-task' || entry.phase === 'selection' - ); - - let toolMentions = 0; - let positiveEvaluations = 0; - let confidenceSum = 0; - - relevantEntries.forEach(entry => { - let toolFound = false; - - // Check various ways the tool might be referenced in output - if (entry.output && typeof entry.output === 'object') { - // Check selectedTools arrays - if (Array.isArray(entry.output.selectedTools) && - entry.output.selectedTools.includes(toolName)) { - toolFound = true; - } - - // Check finalToolNames arrays - if (Array.isArray(entry.output.finalToolNames) && - entry.output.finalToolNames.includes(toolName)) { - toolFound = true; - } - - // Check toolName in individual evaluation - if (entry.output.toolName === toolName) { - toolFound = true; - } - } - - if (toolFound) { - toolMentions++; - confidenceSum += entry.confidence; - - // Consider it positive if confidence >= 60 - if (entry.confidence >= 60) { - positiveEvaluations++; - } - } - }); - - console.log(`[AI PIPELINE] Cross-validation for ${toolName}: ${toolMentions} mentions, ${positiveEvaluations} positive, avg confidence: ${toolMentions > 0 ? Math.round(confidenceSum / toolMentions) : 0}`); - - if (toolMentions === 0) { - return 60; // Default when no cross-validation data available - } - - if (toolMentions === 1) { - // Single mention - use confidence directly but cap it - return Math.min(85, Math.max(40, confidenceSum)); - } - - // Multiple mentions - calculate agreement ratio - const agreementRatio = positiveEvaluations / toolMentions; - const avgConfidence = confidenceSum / toolMentions; - - // Combine agreement ratio with average confidence - const crossValidationScore = (agreementRatio * 0.7 + (avgConfidence / 100) * 0.3) * 100; - - return Math.round(Math.min(95, Math.max(30, crossValidationScore))); - } - - // NEW: Calculate tool reliability based on objective indicators - private calculateToolReliability(tool: any): number { - let reliability = 50; // Base score - - // Documentation availability - if (tool.knowledgebase === true) reliability += 25; - - // Active maintenance (hosted tools are typically maintained) - if (isToolHosted(tool)) reliability += 20; - - // Community support (open source often has community) - if (tool.license && tool.license !== 'Proprietary') reliability += 10; - - // Skill level appropriateness (not too complex, not too simple) - if (tool.skillLevel === 'intermediate' || tool.skillLevel === 'advanced') reliability += 10; - else if (tool.skillLevel === 'expert') reliability -= 5; // May be overcomplicated - - // Multi-platform support (more versatile) - if (tool.platforms && tool.platforms.length > 1) reliability += 5; - - return Math.min(100, reliability); - } - - // NEW: Identify specific uncertainty factors based on analysis private identifySpecificUncertaintyFactors(tool: any, context: AnalysisContext, limitations: string[], confidence: number): string[] { const factors: string[] = []; - // Add AI-identified limitations + // Add AI-identified limitations first (most specific) if (limitations && limitations.length > 0) { - factors.push(...limitations.slice(0, 3)); // Limit to top 3 + factors.push(...limitations.slice(0, 2)); // Limit to top 2 to leave room for others } // Low semantic similarity const similarity = context.embeddingsSimilarities.get(tool.name) || 0.5; - if (similarity < 0.4) { + if (similarity < 0.7) { factors.push('Geringe semantische Ähnlichkeit zur Anfrage - Tool-Beschreibung passt möglicherweise nicht optimal'); } - // Skill level mismatch - if (tool.skillLevel === 'expert' && /schnell|rapid|triage|urgent/i.test(context.userQuery)) { - factors.push('Experten-Tool für Eilszenario - möglicherweise zu komplex für schnelle Antworten'); + // Skill level vs scenario complexity mismatch + if (tool.skillLevel === 'expert' && /schnell|rapid|triage|urgent|sofort/i.test(context.userQuery)) { + factors.push('Experten-Tool für zeitkritisches Szenario - Setup und Einarbeitung könnten zu lange dauern'); } - if (tool.skillLevel === 'novice' && /komplex|erweitert|tiefgehend|advanced/i.test(context.userQuery)) { - factors.push('Einsteiger-Tool für komplexes Szenario - könnte funktionale Einschränkungen haben'); + if (tool.skillLevel === 'novice' && /komplex|erweitert|tiefgehend|advanced|forensisch/i.test(context.userQuery)) { + factors.push('Einsteiger-Tool für komplexe Analyse - könnte funktionale Limitierungen haben'); } - // Access limitations + // Platform availability concerns + if (tool.platforms && tool.platforms.length === 1 && tool.platforms[0] === 'Windows' && /linux|unix|server/i.test(context.userQuery)) { + factors.push('Nur Windows-Tool bei möglicher Linux/Server-Umgebung - Plattform-Inkompatibilität'); + } + + // Access and deployment concerns if (tool.type === 'software' && !isToolHosted(tool) && tool.accessType === 'download') { - factors.push('Installation erforderlich - nicht sofort verfügbar ohne Setup'); + factors.push('Installation und Setup erforderlich'); } - // Cross-validation disagreement - const crossValidation = this.calculateCrossValidationScore(tool.name, context); - if (crossValidation < 50) { - factors.push('Uneinheitliche Bewertung in verschiedenen Analyseschritten - Empfehlung nicht eindeutig'); + // License restrictions + if (tool.license === 'Proprietary') { + factors.push('Kommerzielle Software - Lizenzkosten und rechtliche Beschränkungen zu beachten'); } - return factors.slice(0, 4); // Limit to 4 most important factors + // Low overall confidence warning + if (confidence < 60) { + factors.push('Moderate Gesamtbewertung - alternative Ansätze sollten ebenfalls betrachtet werden'); + } + + return factors.slice(0, 4); // Limit to 4 most relevant factors } // NEW: Identify specific strength indicators private identifySpecificStrengthIndicators(tool: any, context: AnalysisContext, confidence: number): string[] { const indicators: string[] = []; - // High confidence overall - if (confidence >= this.confidenceConfig.highThreshold) { - indicators.push('Hohe Gesamtbewertung durch mehrfache Validierung'); - } - // High semantic similarity const similarity = context.embeddingsSimilarities.get(tool.name) || 0.5; if (similarity >= 0.7) { indicators.push('Sehr gute semantische Übereinstimmung mit Ihrer Anfrage'); } - // Strong cross-validation - const crossValidation = this.calculateCrossValidationScore(tool.name, context); - if (crossValidation >= 80) { - indicators.push('Konsistente Empfehlung über verschiedene Analyseschritte hinweg'); - } - // Quality indicators if (tool.knowledgebase === true) { indicators.push('Umfassende Dokumentation und Wissensbasis verfügbar'); @@ -985,7 +894,7 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; const prompt = getPrompt('phaseToolSelection', context.userQuery, phase, phaseTools); - const result = await this.callMicroTaskAI(prompt, context, 800); + const result = await this.callMicroTaskAI(prompt, context, 1000); if (result.success) { const selections = this.safeParseJSON(result.content, []); @@ -998,16 +907,30 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; validSelections.forEach((sel: any) => { const tool = phaseTools.find((t: any) => t.name === sel.toolName); if (tool) { - this.addToolToSelection(context, tool, phase.id, sel.priority, sel.justification); + // Ensure taskRelevance is a number + const taskRelevance = typeof sel.taskRelevance === 'number' ? + sel.taskRelevance : parseInt(String(sel.taskRelevance)) || 70; + + // Derive priority automatically from score + const priority = this.derivePriorityFromScore(taskRelevance); + + this.addToolToSelection(context, tool, phase.id, priority, sel.justification, taskRelevance, sel.limitations); } }); this.addAuditEntry(context, 'micro-task', 'phase-tool-selection', { phase: phase.id, availableTools: phaseTools.length }, - { validSelections: validSelections.length, selectedTools: validSelections.map(s => s.toolName) }, + { + validSelections: validSelections.length, + selectedTools: validSelections.map(s => ({ + name: s.toolName, + taskRelevance: s.taskRelevance, + derivedPriority: this.derivePriorityFromScore(s.taskRelevance) + })) + }, validSelections.length > 0 ? 75 : 30, Date.now() - result.processingTimeMs, - { phaseName: phase.name } + { phaseName: phase.name, comparativeEvaluation: true, priorityDerived: true } ); } } @@ -1016,56 +939,46 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; } private async evaluateSpecificTool(context: AnalysisContext, tool: any, rank: number): Promise { - const prompt = getPrompt('toolEvaluation', context.userQuery, tool, rank); + // Get existing task relevance from previous phase selection + const existingSelection = context.selectedTools?.find(st => st.tool.name === tool.name); + const taskRelevance = existingSelection?.taskRelevance || 70; + const priority = this.derivePriorityFromScore(taskRelevance); + + const prompt = getPrompt('toolEvaluation', context.userQuery, tool, rank, taskRelevance); - const result = await this.callMicroTaskAI(prompt, context, 1200); + const result = await this.callMicroTaskAI(prompt, context, 1000); if (result.success) { const evaluation = this.safeParseJSON(result.content, { - suitability_score: 'medium', - task_relevance: '', detailed_explanation: 'Evaluation failed', implementation_approach: '', pros: [], cons: [], - limitations: [], alternatives: '' }); - // Debug logging to see what we're getting - console.log(`[AI PIPELINE] Tool ${tool.name} evaluation:`, { - taskRelevance: evaluation.task_relevance, - suitabilityScore: evaluation.suitability_score, - limitationsCount: evaluation.limitations?.length || 0 - }); - - // Ensure task_relevance is a number - const taskRelevance = typeof evaluation.task_relevance === 'number' ? - evaluation.task_relevance : - parseInt(String(evaluation.task_relevance)) || 70; - - // Store enhanced evaluation data + // Store evaluation without re-scoring this.addToolToSelection(context, { ...tool, evaluation: { ...evaluation, - task_relevance: taskRelevance, // Ensure it's stored as number - rank + rank, + task_relevance: taskRelevance } - }, 'evaluation', evaluation.suitability_score, evaluation.detailed_explanation, - taskRelevance, evaluation.limitations); + }, 'evaluation', priority, evaluation.detailed_explanation, + taskRelevance, existingSelection?.limitations); this.addAuditEntry(context, 'micro-task', 'tool-evaluation', - { toolName: tool.name, rank }, + { toolName: tool.name, rank, existingTaskRelevance: taskRelevance, derivedPriority: priority }, { - suitabilityScore: evaluation.suitability_score, - taskRelevance: taskRelevance, // Use the cleaned number hasExplanation: !!evaluation.detailed_explanation, - limitationsIdentified: evaluation.limitations?.length || 0 + hasImplementationApproach: !!evaluation.implementation_approach, + prosCount: evaluation.pros?.length || 0, + consCount: evaluation.cons?.length || 0 }, - evaluation.suitability_score === 'high' ? 85 : evaluation.suitability_score === 'medium' ? 70 : 50, + 70, Date.now() - result.processingTimeMs, - { toolType: tool.type, taskRelevanceScore: taskRelevance } + { toolType: tool.type, explanationOnly: true, priorityDerived: true } ); } @@ -1173,6 +1086,12 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; } } + private derivePriorityFromScore(taskRelevance: number): string { + if (taskRelevance >= 80) return 'high'; + if (taskRelevance >= 60) return 'medium'; + return 'low'; + } + async processQuery(userQuery: string, mode: string): Promise { const startTime = Date.now(); let completeTasks = 0; @@ -1323,8 +1242,7 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; components: { semantic: confidence.semanticRelevance, suitability: confidence.taskSuitability, - consistency: confidence.methodologicalConsistency, - reliability: confidence.toolReliability + consistency: confidence.methodologicalConsistency } }, confidence.overall, -- 2.39.5 From 769c223d39342a66ffe55acac28d6dbee3031126 Mon Sep 17 00:00:00 2001 From: overcuriousity Date: Tue, 5 Aug 2025 21:47:16 +0200 Subject: [PATCH 17/19] fine-tuning --- src/components/AIQueryInterface.astro | 2 +- src/config/prompts.ts | 7 +++++-- src/utils/aiPipeline.ts | 25 +++++++++---------------- 3 files changed, 15 insertions(+), 19 deletions(-) diff --git a/src/components/AIQueryInterface.astro b/src/components/AIQueryInterface.astro index 99f3c6b..68afb79 100644 --- a/src/components/AIQueryInterface.astro +++ b/src/components/AIQueryInterface.astro @@ -741,7 +741,7 @@ class AIQueryInterface { displayToolResults(recommendation, originalQuery) { const html = ` -
+
${this.renderHeader('Handlungsempfehlung', originalQuery)} ${this.renderContextualAnalysis(recommendation, 'tool')} ${this.renderBackgroundKnowledge(recommendation.background_knowledge)} diff --git a/src/config/prompts.ts b/src/config/prompts.ts index e0ac22d..2c880ee 100644 --- a/src/config/prompts.ts +++ b/src/config/prompts.ts @@ -169,11 +169,14 @@ Antworten Sie AUSSCHLIESSLICH mit diesem JSON-Format: "detailed_explanation": "Detaillierte Erklärung warum und wie dieses Tool für diese spezifische Aufgabe eingesetzt wird", "implementation_approach": "Konkrete Schritt-für-Schritt Anleitung zur korrekten Anwendung", "pros": ["Spezifischer Vorteil 1", "Spezifischer Vorteil 2"], - "cons": ["Bekannte Limitation 1", "Bekannte Limitation 2"], + "limitations": ["Spezifische Einschränkung 1", "Spezifische Einschränkung 2"], "alternatives": "Alternative Ansätze oder Tools falls dieses nicht verfügbar ist" } -WICHTIG: Keine erneute Bewertung - nur detaillierte Erklärung der bereits bewerteten Eignung.`; +WICHTIG: +- Keine erneute Bewertung - nur detaillierte Erklärung der bereits bewerteten Eignung +- "limitations" soll spezifische technische/methodische Einschränkungen des Tools auflisten +- "pros" soll die Stärken für diese spezifische Aufgabe hervorheben`; }, // Background knowledge selection prompt diff --git a/src/utils/aiPipeline.ts b/src/utils/aiPipeline.ts index f291f3b..34a94a5 100644 --- a/src/utils/aiPipeline.ts +++ b/src/utils/aiPipeline.ts @@ -776,11 +776,6 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; factors.push('Einsteiger-Tool für komplexe Analyse - könnte funktionale Limitierungen haben'); } - // Platform availability concerns - if (tool.platforms && tool.platforms.length === 1 && tool.platforms[0] === 'Windows' && /linux|unix|server/i.test(context.userQuery)) { - factors.push('Nur Windows-Tool bei möglicher Linux/Server-Umgebung - Plattform-Inkompatibilität'); - } - // Access and deployment concerns if (tool.type === 'software' && !isToolHosted(tool) && tool.accessType === 'download') { factors.push('Installation und Setup erforderlich'); @@ -939,7 +934,6 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; } private async evaluateSpecificTool(context: AnalysisContext, tool: any, rank: number): Promise { - // Get existing task relevance from previous phase selection const existingSelection = context.selectedTools?.find(st => st.tool.name === tool.name); const taskRelevance = existingSelection?.taskRelevance || 70; const priority = this.derivePriorityFromScore(taskRelevance); @@ -953,11 +947,10 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; detailed_explanation: 'Evaluation failed', implementation_approach: '', pros: [], - cons: [], + limitations: [], alternatives: '' }); - // Store evaluation without re-scoring this.addToolToSelection(context, { ...tool, evaluation: { @@ -966,7 +959,7 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; task_relevance: taskRelevance } }, 'evaluation', priority, evaluation.detailed_explanation, - taskRelevance, existingSelection?.limitations); + taskRelevance, evaluation.limitations); this.addAuditEntry(context, 'micro-task', 'tool-evaluation', { toolName: tool.name, rank, existingTaskRelevance: taskRelevance, derivedPriority: priority }, @@ -974,11 +967,12 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; hasExplanation: !!evaluation.detailed_explanation, hasImplementationApproach: !!evaluation.implementation_approach, prosCount: evaluation.pros?.length || 0, - consCount: evaluation.cons?.length || 0 + limitationsCount: evaluation.limitations?.length || 0, // ← Updated field name + hasLimitations: Array.isArray(evaluation.limitations) && evaluation.limitations.length > 0 }, 70, Date.now() - result.processingTimeMs, - { toolType: tool.type, explanationOnly: true, priorityDerived: true } + { toolType: tool.type, explanationOnly: true, priorityDerived: true, limitationsExtracted: true } ); } @@ -1226,7 +1220,6 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; if (isWorkflow) { const recommendedToolsWithConfidence = context.selectedTools?.map(st => { - // Calculate enhanced confidence for each tool const confidence = this.calculateRecommendationConfidence( st.tool, context, @@ -1234,7 +1227,6 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; st.limitations || [] ); - // Add audit entry for confidence calculation this.addAuditEntry(context, 'validation', 'confidence-scoring', { toolName: st.tool.name, phase: st.phase }, { @@ -1272,14 +1264,15 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; st.tool, context, st.taskRelevance || 70, - st.limitations || [] + st.limitations || [] ); this.addAuditEntry(context, 'validation', 'confidence-scoring', { toolName: st.tool.name, rank: st.tool.evaluation?.rank || 1 }, { overall: confidence.overall, - suitabilityAlignment: st.priority === 'high' && confidence.overall >= this.confidenceConfig.highThreshold + suitabilityAlignment: st.priority === 'high' && confidence.overall >= this.confidenceConfig.highThreshold, + limitationsUsed: st.limitations?.length || 0 }, confidence.overall, Date.now(), @@ -1293,7 +1286,7 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; detailed_explanation: st.tool.evaluation?.detailed_explanation || '', implementation_approach: st.tool.evaluation?.implementation_approach || '', pros: st.tool.evaluation?.pros || [], - cons: st.tool.evaluation?.cons || [], + cons: st.tool.evaluation?.limitations || [], // ← FIXED: Use limitations as cons for display alternatives: st.tool.evaluation?.alternatives || '', confidence: confidence, recommendationStrength: confidence.overall >= this.confidenceConfig.highThreshold ? 'strong' : -- 2.39.5 From 1c0025796aa3c752c61d703f0be8a2670c52ba68 Mon Sep 17 00:00:00 2001 From: overcuriousity Date: Tue, 5 Aug 2025 22:09:38 +0200 Subject: [PATCH 18/19] cleanup --- check-unused-css.js | 102 --- context.md | 337 ------- dfir_yaml_editor.html | 2016 ----------------------------------------- 3 files changed, 2455 deletions(-) delete mode 100644 check-unused-css.js delete mode 100644 context.md delete mode 100644 dfir_yaml_editor.html diff --git a/check-unused-css.js b/check-unused-css.js deleted file mode 100644 index c61aac7..0000000 --- a/check-unused-css.js +++ /dev/null @@ -1,102 +0,0 @@ -#!/usr/bin/env node -// find-unused-css.js -// Usage: node find-unused-css [--verbose] - -import fs from 'fs/promises'; -import path from 'path'; -import fg from 'fast-glob'; -import pc from 'picocolors'; -import postcss from 'postcss'; -import safeParser from 'postcss-safe-parser'; - -const [,, cssPath, srcRoot = '.', ...rest] = process.argv; -const verbose = rest.includes('--verbose'); -if (!cssPath) { - console.error('Usage: node find-unused-css '); - process.exit(1); -} - -/* -------------------------------------------------- */ -/* 1. Parse the CSS and harvest class/id tokens */ -/* -------------------------------------------------- */ -const cssRaw = await fs.readFile(cssPath, 'utf8'); -const root = postcss().process(cssRaw, { parser: safeParser }).root; - -const selectorTokens = new Map(); // selector → Set('.foo', '#bar') -const CLASS = /\.([\w-]+)/g; -const ID = /#([\w-]+)/g; - -root.walkRules(rule => { - rule.selectors.forEach(sel => { - const tokens = new Set(); - sel.replace(CLASS, (_, c) => tokens.add('.'+c)); - sel.replace(ID, (_, i) => tokens.add('#'+i)); - if (tokens.size) selectorTokens.set(sel, tokens); - }); -}); - -/* -------------------------------------------------- */ -/* 2. Dynamic classes you add via JS (safe keep) */ -/* -------------------------------------------------- */ -const dynamicAllow = new Set([ - 'hidden', 'active', 'loading', 'open', 'closed' -]); - -/* -------------------------------------------------- */ -/* 3. Read every source file once */ -/* -------------------------------------------------- */ -const files = await fg([ - `${srcRoot}/**/*.{html,htm,js,jsx,ts,tsx,vue,svelte,astro}`, - `!${srcRoot}/**/node_modules/**` -]); -const sources = await Promise.all(files.map(f => fs.readFile(f, 'utf8'))); - -/* -------------------------------------------------- */ -/* 4. Fast search helpers */ -/* -------------------------------------------------- */ -const makeClassRE = cls => - new RegExp( - `(class|className)=['"][^'"]*\\b${cls}\\b[^'"]*['"]|['"\`]${cls}['"\`]`, - 'i' - ); -const makeIdRE = id => - new RegExp(`id=['"]${id}['"]|['"\`]${id}['"\`]`, 'i'); - -const tokenInSources = token => { - // dynamic allow-list - if (dynamicAllow.has(token)) return true; - - const re = token.startsWith('.') - ? makeClassRE(token.slice(1)) - : makeIdRE(token.slice(1)); - - return sources.some(txt => re.test(txt)); -}; - -/* -------------------------------------------------- */ -/* 5. Decide used vs unused */ -/* -------------------------------------------------- */ -const used = []; -const unused = []; - -for (const [selector, tokens] of selectorTokens.entries()) { - const isUsed = [...tokens].some(tokenInSources); // **ANY** token keeps rule - (isUsed ? used : unused).push(selector); - if (verbose) { - console.log(isUsed ? pc.green('✓ '+selector) : pc.red('✗ '+selector)); - } -} - -/* -------------------------------------------------- */ -/* 6. Report & write list */ -/* -------------------------------------------------- */ -console.log( - `\n${pc.bold(pc.blue('🎯 CSS usage summary'))}\n` + - ` selectors total : ${selectorTokens.size}\n` + - ` still used : ${pc.green(used.length)}\n` + - ` maybe unused : ${pc.red(unused.length)}\n` -); - -const outFile = path.resolve('unused-selectors.txt'); -await fs.writeFile(outFile, unused.join('\n')); -console.log(`📝 Unused selector list → ${pc.yellow(outFile)}\n`); diff --git a/context.md b/context.md deleted file mode 100644 index c806167..0000000 --- a/context.md +++ /dev/null @@ -1,337 +0,0 @@ -# ForensicPathways Architecture System Prompt - -## Project Overview -ForensicPathways is a curated directory of Digital Forensics and Incident Response (DFIR) tools, methods, and concepts built with Astro and TypeScript. It serves as an educational and professional resource for forensic investigators, following the NIST SP 800-86 framework (Kent, Chevalier, Grance & Dang). - -## Core Technology Stack -- **Framework**: Astro (static site generator with islands architecture) -- **Language**: TypeScript with strict typing -- **Styling**: Vanilla CSS with custom properties (CSS variables) -- **Data Storage**: YAML files for tool catalog -- **Content**: Astro Content Collections for knowledge base articles -- **Authentication**: OIDC (OpenID Connect) with configurable requirements -- **AI Integration**: Mistral API for workflow recommendations -- **File Storage**: Nextcloud with local fallback -- **Version Control**: Git integration for community contributions - -## Data Model Architecture - -### Core Entity: Tool -```yaml -name: string # Tool identifier -icon: string? # Emoji icon -type: 'software'|'method'|'concept' # Tool classification -description: string # Detailed description -domains: string[] # Forensic domains (incident-response, malware-analysis, etc.) -phases: string[] # NIST framework phases (data-collection, examination, analysis, reporting) -platforms: string[] # Operating systems (for software only) -skillLevel: string # novice|beginner|intermediate|advanced|expert -url: string # Primary documentation/homepage -projectUrl: string? # Hosted instance URL (CC24 server) -license: string? # Software license -knowledgebase: boolean? # Has detailed documentation -tags: string[] # Searchable keywords -related_concepts: string[]? # Links to concept-type tools -related_software: string[]? #Links to software-type-tools -``` - -### Taxonomies -- **Domains**: Forensic specializations (7 main domains) -- **Phases**: NIST investigation phases (4 phases) -- **Domain-Agnostic-Software**: Cross-cutting tools and platforms -- **Skill Levels**: Standardized competency requirements - -## Component Architecture - -### Layout System -- **BaseLayout.astro**: Global layout with theme system, authentication setup, shared utilities -- **Navigation.astro**: Main navigation with active state management -- **Footer.astro**: Site footer with links and licensing info - -### Core Components -- **ToolCard.astro**: Individual tool display with metadata, actions, and type-specific styling -- **ToolMatrix.astro**: Matrix view showing tools by domain/phase intersection -- **ToolFilters.astro**: Search, filtering, and view controls -- **AIQueryInterface.astro**: AI-powered workflow recommendation system - -### Utility Components -- **ShareButton.astro**: URL sharing with multiple view options -- **ContributionButton.astro**: Authenticated contribution links -- **ThemeToggle.astro**: Light/dark/auto theme switching - -## Feature Systems - -### 1. Authentication System (`src/utils/auth.ts`) -- **OIDC Integration**: Uses environment-configured provider -- **Contextual Requirements**: Different auth requirements for contributions vs AI features -- **Session Management**: JWT-based with configurable expiration -- **Client-Side Utilities**: Window-level auth checking functions - -### 2. AI Recommendation System -- **Dual Modes**: - - Workflow mode: Multi-phase recommendations for scenarios - - Tool mode: Specific tool recommendations for problems -- **Rate Limiting**: Queue-based system with status updates -- **Data Integration**: Uses compressed tool database for AI context -- **Response Validation**: Ensures AI only recommends existing tools - -### 3. Contribution System -- **Git Integration**: Automated issue creation via Gitea/GitHub/GitLab APIs -- **Tool Contributions**: Form-based tool submissions -- **Knowledge Base**: Rich text with file upload support -- **Validation**: Client and server-side validation with Zod schemas - -### 4. File Upload System -- **Primary**: Nextcloud integration with public link generation -- **Fallback**: Local file storage with public URL generation -- **Validation**: File type and size restrictions -- **Rate Limiting**: Per-user upload quotas - -## Styling Architecture - -### CSS Custom Properties System -```css -/* Core color system */ ---color-primary: /* Adaptive based on theme */ ---color-accent: /* Secondary brand color */ ---color-bg: /* Main background */ ---color-text: /* Primary text */ - -/* Component-specific colors */ ---color-hosted: /* CC24 server hosted tools */ ---color-oss: /* Open source tools */ ---color-method: /* Methodology entries */ ---color-concept: /* Knowledge concepts */ - -/* Theme system */ -[data-theme="light"] { /* Light theme values */ } -[data-theme="dark"] { /* Dark theme values */ } -``` - -### Component Styling Patterns -- **Card System**: Consistent `.card` base with type-specific variants -- **Badge System**: Status and metadata indicators -- **Button System**: Semantic button classes with size variants -- **Grid System**: CSS Grid with responsive breakpoints - -## Data Flow Architecture - -### 1. Data Loading (`src/utils/dataService.ts`) -```typescript -// Daily randomization with seeded shuffle -getToolsData() → shuffled tools array -getCompressedToolsDataForAI() → AI-optimized dataset -clearCache() → cache invalidation -``` - -### 2. Client-Side State Management -- **Global Tools Data**: Attached to `window.toolsData` -- **Filter State**: Component-local state with event emission -- **View State**: Grid/Matrix/AI view switching -- **Modal State**: Tool detail overlays with multi-modal support - -### 3. Search and Filtering -- **Text Search**: Name, description, tags -- **Faceted Filtering**: Domain, phase, skill level, license type -- **Tag Cloud**: Frequency-weighted tag selection -- **Real-time Updates**: Immediate filtering with event system - -## API Architecture - -### Endpoint Structure -``` -/api/auth/ # Authentication endpoints - login.ts # OIDC initiation - process.ts # OIDC callback processing - status.ts # Auth status checking - -/api/contribute/ # Contribution endpoints - tool.ts # Tool submissions - knowledgebase.ts # KB article submissions - -/api/ai/ # AI features - query.ts # Workflow recommendations - queue-status.ts # Queue monitoring - -/api/upload/ # File handling - media.ts # File upload processing - -/api/health.ts # System health check -``` - -### Response Patterns -All APIs use consolidated response utilities (`src/utils/api.ts`): -- **Success**: `apiResponse.success()`, `apiResponse.created()` -- **Errors**: `apiError.badRequest()`, `apiError.unauthorized()`, etc. -- **Server Errors**: `apiServerError.internal()`, etc. - -## File Organization Patterns - -### Page Structure -- **Static Pages**: About, impressum, status -- **Dynamic Pages**: Tool details, knowledge base articles -- **Authenticated Pages**: Contribution forms -- **API Routes**: RESTful endpoints with consistent naming - -### Utility Organization -- **Tool Operations**: `toolHelpers.ts` - Core tool manipulation -- **Data Management**: `dataService.ts` - YAML loading and caching -- **Authentication**: `auth.ts` - OIDC flow and session management -- **External APIs**: `gitContributions.ts`, `nextcloud.ts` -- **Rate Limiting**: `rateLimitedQueue.ts` - AI request queuing - -## Key Architectural Decisions - -### 1. Static-First with Dynamic Islands -- Astro's islands architecture for interactivity -- Static generation for performance -- Selective hydration for complex components - -### 2. YAML-Based Data Management -- Human-readable tool catalog -- Git-friendly versioning -- Type-safe loading with Zod validation - -### 3. Contextual Authentication -- Optional authentication based on feature -- Graceful degradation for unauthenticated users -- Environment-configurable requirements - -### 4. Multi-Modal UI Patterns -- Grid view for browsing -- Matrix view for relationship visualization -- AI interface for guided recommendations - -### 5. Progressive Enhancement -- Core functionality works without JavaScript -- Enhanced features require client-side hydration -- Responsive design with mobile-first approach - -## Development Patterns - -### Component Design -- Props interfaces with TypeScript -- Consistent styling via CSS classes -- Event-driven communication between components -- Server-side rendering with client-side enhancement - -### Error Handling -- Comprehensive try-catch in API routes -- User-friendly error messages -- Graceful fallbacks for external services -- Logging for debugging and monitoring - -### Performance Optimizations -- Daily data randomization with caching -- Compressed datasets for AI context -- Rate limiting for external API calls -- Efficient DOM updates with targeted selectors - -This architecture emphasizes maintainability, user experience, and extensibility while managing the complexity of a multi-feature forensics tool directory. - - -## Absolutely Essential (Core Architecture - 8 files) - -**File**: `src/data/tools.yaml.example` -**Why**: Defines the core data model - what a "tool" is, the schema, domains, phases, etc. Without this, an AI can't understand what the application manages. - -**File**: `src/pages/index.astro` -**Why**: Main application entry point showing the core functionality (filters, matrix, AI interface, tool grid). Contains the primary application logic flow. - -**File**: `src/layouts/BaseLayout.astro` -**Why**: Global layout with theme system, authentication setup, and shared utility functions. Shows the overall app structure. - -**File**: `src/utils/dataService.ts` -**Why**: Core data loading and processing logic. Essential for understanding how data flows through the application. - -**File**: `src/utils/toolHelpers.ts` -**Why**: Core utility functions used throughout the app (slug creation, tool identification, hosting checks). - -**File**: `src/styles/global.css` -**Why**: Complete styling system - defines visual architecture, component styling, theme system, responsive design. - -**File**: `src/env.d.ts` -**Why**: Global TypeScript definitions and window interface extensions. Shows the global API surface. - -**File**: `src/components/ToolCard.astro` -**Why**: Shows how the core entity (tools) are rendered and structured. Represents the component architecture pattern. - -## Secondary Priority (Major Features - 4 files) - -**File**: `src/components/ToolMatrix.astro` - Matrix view functionality -**File**: `src/components/AIQueryInterface.astro` - AI recommendation system -**File**: `src/utils/auth.ts` - Authentication system -**File**: `src/content/config.ts` - Content collection schema - -## Strategy for Context Management - -1. **Always provide**: The 8 essential files above -2. **Add selectively**: Include 1-3 secondary files based on the specific development task -3. **Reference others**: Mention other relevant files by name/purpose without including full content - -user01@altiera /v/h/u/P/forensic-pathways (main)> tree src -src -├── components -│ ├── AIQueryInterface.astro -│ ├── ContributionButton.astro -│ ├── Footer.astro -│ ├── Navigation.astro -│ ├── ShareButton.astro -│ ├── ThemeToggle.astro -│ ├── ToolCard.astro -│ ├── ToolFilters.astro -│ └── ToolMatrix.astro -├── content -│ ├── config.ts -│ └── knowledgebase -│ ├── android-logical-imaging.md -│ ├── kali-linux.md -│ ├── misp.md -│ ├── nextcloud.md -│ ├── regular-expressions-regex.md -│ └── velociraptor.md -├── data -│ ├── tools.yaml -│ └── tools.yaml.example -├── env.d.ts -├── layouts -│ └── BaseLayout.astro -├── pages -│ ├── about.astro -│ ├── api -│ │ ├── ai -│ │ │ ├── query.ts -│ │ │ └── queue-status.ts -│ │ ├── auth -│ │ │ ├── login.ts -│ │ │ ├── process.ts -│ │ │ └── status.ts -│ │ ├── contribute -│ │ │ ├── knowledgebase.ts -│ │ │ └── tool.ts -│ │ ├── health.ts -│ │ └── upload -│ │ └── media.ts -│ ├── auth -│ │ └── callback.astro -│ ├── contribute -│ │ ├── index.astro -│ │ ├── knowledgebase.astro -│ │ └── tool.astro -│ ├── impressum.astro -│ ├── index.astro -│ ├── knowledgebase -│ │ └── [slug].astro -│ ├── knowledgebase.astro -│ └── status.astro -├── styles -│ └── global.css -└── utils - ├── api.ts - ├── auth.ts - ├── dataService.ts - ├── gitContributions.ts - ├── nextcloud.ts - ├── rateLimitedQueue.ts - └── toolHelpers.ts -17 directories, 47 files \ No newline at end of file diff --git a/dfir_yaml_editor.html b/dfir_yaml_editor.html deleted file mode 100644 index 784d1dd..0000000 --- a/dfir_yaml_editor.html +++ /dev/null @@ -1,2016 +0,0 @@ - - - - - - DFIR Tools YAML Editor - - - - -
-
-

🔧 DFIR Tools YAML Editor

-

Enhanced editor for Digital Forensics and Incident Response tools, methods, and concepts

-
- -
-
📊 Overview
-
🛠️ Tools & Concepts
-
✏️ Editor
-
📋 Bulk Edit
-
📚 Knowledge Generator
-
💾 Export
-
- - -
-
-

📁 Load YAML File

- -

Select a YAML file to load existing tools data

-
- -
- - - -
- - -
-
- - -
-
-

🔍 Search & Filter Tools

- -
- -
- - - - - -
-
-
-
- - -
-

✏️ Add/Edit Tool, Method, or Concept

- -
-
-

📝 Basic Information

-
-
- - -
-
- - -
-
- -
-
- - -
-
- - -
-
- -
- - -
- -
- - -
-
- -
-

🎯 Classification

-
- -
-
- -
- -
-
- -
- -
-
-
- - -
-

⚙️ Technical Details

-
- -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
-
- -
- -
-
-
- - -
-

💻 Software Specific

-
-
- - -
- -
- - -
-
- -
-
- - -
- -
- - -
-
-
- -
-

🔗 Relationships

-
-
- - -
-
- -
- -
- -
-
- -
- -
- -
-
- -
- -
- -
-
-
- -
- - - -
-
-
- - -
-
-

📋 Bulk Operations

-
- No tools selected -
- -
- - - - -
- -

🏷️ Tags Operations

-
- - - - -
- -

🎯 Classification Operations

-
- - - - - - -
- -

🎮 Scenarios Operations

-
- - - -
- -

💻 Platform Operations

-
- - - -
- -

🔗 Relationships Operations

-
- - - - - - -
- -

⚠️ Dangerous Operations

-
- -
-
-
-
- - -
-
-

📚 Knowledgebase Entry Generator

-

Generate properly formatted markdown files for ForensicPathways knowledgebase.

- -
- - -
- - -
-
- - -
-

💾 Export & Preview

- - - -
- - - -
-
-
- - - - \ No newline at end of file -- 2.39.5 From b515a45e1ec1ad29836ab6a65c38b86067a1c668 Mon Sep 17 00:00:00 2001 From: overcuriousity Date: Tue, 5 Aug 2025 22:09:46 +0200 Subject: [PATCH 19/19] cleanup --- src/components/AIQueryInterface.astro | 7 +-- src/config/prompts.ts | 8 ---- src/pages/index.astro | 7 --- src/utils/aiPipeline.ts | 65 ++++++++------------------- src/utils/embeddings.ts | 11 +---- src/utils/rateLimitedQueue.ts | 3 +- 6 files changed, 22 insertions(+), 79 deletions(-) diff --git a/src/components/AIQueryInterface.astro b/src/components/AIQueryInterface.astro index 68afb79..e8a7604 100644 --- a/src/components/AIQueryInterface.astro +++ b/src/components/AIQueryInterface.astro @@ -702,12 +702,10 @@ class AIQueryInterface { toolsByPhase[phase] = []; }); - // DEBUG: Log recommendation structure console.log('[AI Results] Recommendation structure:', recommendation); console.log('[AI Results] Recommended tools:', recommendation.recommended_tools); recommendation.recommended_tools?.forEach(recTool => { - // DEBUG: Log each tool's confidence data console.log('[AI Results] Tool confidence data:', recTool.name, recTool.confidence); if (toolsByPhase[recTool.phase]) { @@ -716,7 +714,7 @@ class AIQueryInterface { toolsByPhase[recTool.phase].push({ ...fullTool, recommendation: recTool, - confidence: recTool.confidence, // Ensure confidence is passed + confidence: recTool.confidence, justification: recTool.justification, priority: recTool.priority, recommendationStrength: recTool.recommendationStrength @@ -836,13 +834,11 @@ class AIQueryInterface { return ''; } - // Calculate summary statistics const totalTime = auditTrail.reduce((sum, entry) => sum + entry.processingTimeMs, 0); const avgConfidence = auditTrail.reduce((sum, entry) => sum + entry.confidence, 0) / auditTrail.length; const lowConfidenceSteps = auditTrail.filter(entry => entry.confidence < 60).length; const highConfidenceSteps = auditTrail.filter(entry => entry.confidence >= 80).length; - // Group entries by phase for better organization const groupedEntries = auditTrail.reduce((groups, entry) => { if (!groups[entry.phase]) groups[entry.phase] = []; groups[entry.phase].push(entry); @@ -1048,7 +1044,6 @@ class AIQueryInterface { second: '2-digit' }); - // Reuse existing grid and text utilities return `
diff --git a/src/config/prompts.ts b/src/config/prompts.ts index 2c880ee..86467b5 100644 --- a/src/config/prompts.ts +++ b/src/config/prompts.ts @@ -2,7 +2,6 @@ export const AI_PROMPTS = { - // Main tool selection prompt toolSelection: (mode: string, userQuery: string, selectionMethod: string, maxSelectedItems: number) => { const modeInstruction = mode === 'workflow' ? 'Der Benutzer möchte einen UMFASSENDEN WORKFLOW mit mehreren Tools/Methoden über verschiedene Phasen. Wählen Sie 15-25 Tools aus, die den vollständigen Untersuchungslebenszyklus abdecken.' @@ -51,7 +50,6 @@ Antworten Sie NUR mit diesem JSON-Format: }`; }, - // Scenario analysis prompt scenarioAnalysis: (isWorkflow: boolean, userQuery: string) => { const analysisType = isWorkflow ? 'forensische Szenario' : 'technische Problem'; const considerations = isWorkflow ? @@ -74,7 +72,6 @@ ${considerations} WICHTIG: Antworten Sie NUR in fließendem deutschen Text ohne Listen, Aufzählungen oder Markdown-Formatierung. Maximum 150 Wörter.`; }, - // Investigation approach prompt investigationApproach: (isWorkflow: boolean, userQuery: string) => { const approachType = isWorkflow ? 'Untersuchungsansatz' : 'Lösungsansatz'; const considerations = isWorkflow ? @@ -96,7 +93,6 @@ ${considerations} WICHTIG: Antworten Sie NUR in fließendem deutschen Text ohne Listen oder Markdown. Maximum 150 Wörter.`; }, - // Critical considerations prompt criticalConsiderations: (isWorkflow: boolean, userQuery: string) => { const considerationType = isWorkflow ? 'kritische forensische Überlegungen' : 'wichtige methodische Voraussetzungen'; const aspects = isWorkflow ? @@ -179,7 +175,6 @@ WICHTIG: - "pros" soll die Stärken für diese spezifische Aufgabe hervorheben`; }, - // Background knowledge selection prompt backgroundKnowledgeSelection: (userQuery: string, mode: string, selectedToolNames: string[], availableConcepts: any[]) => { return `Wählen Sie relevante forensische Konzepte für das Verständnis der empfohlenen Methodik. @@ -200,7 +195,6 @@ Antworten Sie AUSSCHLIESSLICH mit diesem JSON-Format: ]`; }, - // Final recommendations prompt finalRecommendations: (isWorkflow: boolean, userQuery: string, selectedToolNames: string[]) => { const prompt = isWorkflow ? `Erstellen Sie eine Workflow-Empfehlung basierend auf DFIR-Prinzipien. @@ -225,7 +219,6 @@ WICHTIG: Antworten Sie NUR in fließendem deutschen Text ohne Listen oder Markdo } } as const; -// Type-safe prompt function with proper overloads export function getPrompt(key: 'toolSelection', mode: string, userQuery: string, selectionMethod: string, maxSelectedItems: number): string; export function getPrompt(key: 'scenarioAnalysis', isWorkflow: boolean, userQuery: string): string; export function getPrompt(key: 'investigationApproach', isWorkflow: boolean, userQuery: string): string; @@ -238,7 +231,6 @@ export function getPrompt(promptKey: keyof typeof AI_PROMPTS, ...args: any[]): s try { const promptFunction = AI_PROMPTS[promptKey]; if (typeof promptFunction === 'function') { - // Use type assertion since we've validated the function exists return (promptFunction as (...args: any[]) => string)(...args); } else { console.error(`[PROMPTS] Invalid prompt key: ${promptKey}`); diff --git a/src/pages/index.astro b/src/pages/index.astro index 2eb81c2..b5c8c35 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -265,20 +265,15 @@ const phases = data.phases; return; } - // AI Button click handler if (aiQueryBtn) { aiQueryBtn.addEventListener('click', () => { - // Visual feedback aiQueryBtn.classList.add('activated'); setTimeout(() => aiQueryBtn.classList.remove('activated'), 400); - // Switch to AI view switchToView('ai'); - // Trigger existing view change system window.dispatchEvent(new CustomEvent('viewChanged', { detail: 'ai' })); - // Scroll to AI interface if (window.scrollToElementById) { window.scrollToElementById('ai-interface'); } else { @@ -294,14 +289,12 @@ const phases = data.phases; const filtersSection = document.getElementById('filters-section'); const noResults = document.getElementById('no-results'); - // Hide all views first if (toolsGrid) toolsGrid.style.display = 'none'; if (matrixContainer) matrixContainer.style.display = 'none'; if (aiInterface) aiInterface.style.display = 'none'; if (filtersSection) filtersSection.style.display = 'none'; if (noResults) noResults.style.display = 'none'; - // Show selected view switch (view) { case 'grid': if (toolsGrid) toolsGrid.style.display = 'block'; diff --git a/src/utils/aiPipeline.ts b/src/utils/aiPipeline.ts index 34a94a5..c1583c0 100644 --- a/src/utils/aiPipeline.ts +++ b/src/utils/aiPipeline.ts @@ -63,17 +63,15 @@ interface AnalysisContext { auditTrail: AuditEntry[]; - // Store actual similarity data from embeddings embeddingsSimilarities: Map; } interface ConfidenceMetrics { - overall: number; // 0-100: Combined confidence score - semanticRelevance: number; // How well tool description matches query (from embeddings) - taskSuitability: number; // AI-determined fitness for this specific task - methodologicalConsistency: number; // How well different analysis steps agree - uncertaintyFactors: string[]; // Specific reasons why this might not work - strengthIndicators: string[]; // Specific reasons why this is a good choice + overall: number; + semanticRelevance: number; + taskSuitability: number; + uncertaintyFactors: string[]; + strengthIndicators: string[]; } class ImprovedMicroTaskAIPipeline { @@ -102,10 +100,10 @@ class ImprovedMicroTaskAIPipeline { }; private confidenceConfig: { - semanticWeight: number; // Weight for embeddings similarity - suitabilityWeight: number; // Weight for AI task fit evaluation - consistencyWeight: number; // Weight for cross-validation agreement - reliabilityWeight: number; // Weight for tool quality indicators + semanticWeight: number; + suitabilityWeight: number; + consistencyWeight: number; + reliabilityWeight: number; minimumThreshold: number; mediumThreshold: number; highThreshold: number; @@ -143,10 +141,9 @@ class ImprovedMicroTaskAIPipeline { retentionHours: parseInt(process.env.FORENSIC_AUDIT_RETENTION_HOURS || '72', 10) }; - // Updated confidence weights - more focused on AI evaluation this.confidenceConfig = { - semanticWeight: parseFloat(process.env.CONFIDENCE_SEMANTIC_WEIGHT || '0.3'), // Embeddings similarity - suitabilityWeight: parseFloat(process.env.CONFIDENCE_SUITABILITY_WEIGHT || '0.7'), // AI task fit evaluation + semanticWeight: parseFloat(process.env.CONFIDENCE_SEMANTIC_WEIGHT || '0.3'), + suitabilityWeight: parseFloat(process.env.CONFIDENCE_SUITABILITY_WEIGHT || '0.7'), consistencyWeight: 0, reliabilityWeight: 0, minimumThreshold: parseInt(process.env.CONFIDENCE_MINIMUM_THRESHOLD || '40', 10), @@ -235,7 +232,7 @@ class ImprovedMicroTaskAIPipeline { const selectionRatio = result.selectedTools.length / candidateCount; const hasReasoning = result.reasoning && result.reasoning.length > 50; - let confidence = 60; // Base confidence + let confidence = 60; if (selectionRatio > 0.05 && selectionRatio < 0.3) confidence += 20; else if (selectionRatio <= 0.05) confidence -= 10; @@ -386,7 +383,6 @@ class ImprovedMicroTaskAIPipeline { let candidateConcepts: any[] = []; let selectionMethod = 'unknown'; - // Initialize embeddings similarities storage context.embeddingsSimilarities = new Map(); if (process.env.AI_EMBEDDINGS_ENABLED === 'true') { @@ -409,7 +405,6 @@ class ImprovedMicroTaskAIPipeline { console.log(`[AI PIPELINE] Embeddings found ${similarItems.length} similar items`); - // Store actual similarity scores for confidence calculation similarItems.forEach(item => { context.embeddingsSimilarities.set(item.name, item.similarity); }); @@ -707,18 +702,14 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; limitations: string[] = [] ): ConfidenceMetrics { - // 1. Semantic Relevance: Real embeddings similarity score const rawSemanticRelevance = context.embeddingsSimilarities.has(tool.name) ? context.embeddingsSimilarities.get(tool.name)! * 100 : 50; - // 2. Task Suitability: Enhanced with phase-awareness for workflow mode let enhancedTaskSuitability = taskRelevance; if (context.mode === 'workflow') { - // In workflow mode, boost score if tool is well-matched to its assigned phase const toolSelection = context.selectedTools?.find(st => st.tool.name === tool.name); if (toolSelection && tool.phases && tool.phases.includes(toolSelection.phase)) { - // Boost for phase alignment (but cap at 100) const phaseBonus = Math.min(15, 100 - taskRelevance); enhancedTaskSuitability = Math.min(100, taskRelevance + phaseBonus); @@ -726,7 +717,6 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; } } - // Simple weighted combination - no artificial scaling const overall = ( rawSemanticRelevance * this.confidenceConfig.semanticWeight + enhancedTaskSuitability * this.confidenceConfig.suitabilityWeight @@ -747,7 +737,6 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; overall: Math.round(overall), semanticRelevance: Math.round(rawSemanticRelevance), taskSuitability: Math.round(enhancedTaskSuitability), - methodologicalConsistency: 0, uncertaintyFactors, strengthIndicators }; @@ -756,18 +745,15 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; private identifySpecificUncertaintyFactors(tool: any, context: AnalysisContext, limitations: string[], confidence: number): string[] { const factors: string[] = []; - // Add AI-identified limitations first (most specific) if (limitations && limitations.length > 0) { - factors.push(...limitations.slice(0, 2)); // Limit to top 2 to leave room for others + factors.push(...limitations.slice(0, 2)); } - // Low semantic similarity const similarity = context.embeddingsSimilarities.get(tool.name) || 0.5; if (similarity < 0.7) { factors.push('Geringe semantische Ähnlichkeit zur Anfrage - Tool-Beschreibung passt möglicherweise nicht optimal'); } - // Skill level vs scenario complexity mismatch if (tool.skillLevel === 'expert' && /schnell|rapid|triage|urgent|sofort/i.test(context.userQuery)) { factors.push('Experten-Tool für zeitkritisches Szenario - Setup und Einarbeitung könnten zu lange dauern'); } @@ -776,35 +762,29 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; factors.push('Einsteiger-Tool für komplexe Analyse - könnte funktionale Limitierungen haben'); } - // Access and deployment concerns if (tool.type === 'software' && !isToolHosted(tool) && tool.accessType === 'download') { factors.push('Installation und Setup erforderlich'); } - // License restrictions if (tool.license === 'Proprietary') { factors.push('Kommerzielle Software - Lizenzkosten und rechtliche Beschränkungen zu beachten'); } - // Low overall confidence warning if (confidence < 60) { factors.push('Moderate Gesamtbewertung - alternative Ansätze sollten ebenfalls betrachtet werden'); } - return factors.slice(0, 4); // Limit to 4 most relevant factors + return factors.slice(0, 4); } - // NEW: Identify specific strength indicators private identifySpecificStrengthIndicators(tool: any, context: AnalysisContext, confidence: number): string[] { const indicators: string[] = []; - // High semantic similarity const similarity = context.embeddingsSimilarities.get(tool.name) || 0.5; if (similarity >= 0.7) { indicators.push('Sehr gute semantische Übereinstimmung mit Ihrer Anfrage'); } - // Quality indicators if (tool.knowledgebase === true) { indicators.push('Umfassende Dokumentation und Wissensbasis verfügbar'); } @@ -813,17 +793,15 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; indicators.push('Sofort verfügbar über gehostete Lösung - kein Setup erforderlich'); } - // Skill level match if (tool.skillLevel === 'intermediate' || tool.skillLevel === 'advanced') { indicators.push('Ausgewogenes Verhältnis zwischen Funktionalität und Benutzerfreundlichkeit'); } - // Method alignment if (tool.type === 'method' && /methodik|vorgehen|prozess|ansatz/i.test(context.userQuery)) { indicators.push('Methodischer Ansatz passt zu Ihrer prozeduralen Anfrage'); } - return indicators.slice(0, 4); // Limit to 4 most important indicators + return indicators.slice(0, 4); } private async analyzeScenario(context: AnalysisContext): Promise { @@ -902,11 +880,9 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; validSelections.forEach((sel: any) => { const tool = phaseTools.find((t: any) => t.name === sel.toolName); if (tool) { - // Ensure taskRelevance is a number const taskRelevance = typeof sel.taskRelevance === 'number' ? sel.taskRelevance : parseInt(String(sel.taskRelevance)) || 70; - // Derive priority automatically from score const priority = this.derivePriorityFromScore(taskRelevance); this.addToolToSelection(context, tool, phase.id, priority, sel.justification, taskRelevance, sel.limitations); @@ -967,7 +943,7 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; hasExplanation: !!evaluation.detailed_explanation, hasImplementationApproach: !!evaluation.implementation_approach, prosCount: evaluation.pros?.length || 0, - limitationsCount: evaluation.limitations?.length || 0, // ← Updated field name + limitationsCount: evaluation.limitations?.length || 0, hasLimitations: Array.isArray(evaluation.limitations) && evaluation.limitations.length > 0 }, 70, @@ -1101,7 +1077,7 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; const context: AnalysisContext = { userQuery, mode, - filteredData: {}, // Will be populated by getIntelligentCandidates + filteredData: {}, contextHistory: [], maxContextLength: this.maxContextTokens, currentContextLength: 0, @@ -1124,9 +1100,7 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; startTime, { auditEnabled: this.auditConfig.enabled, confidenceScoringEnabled: true } ); - - // MICRO-TASK SEQUENCE WITH ENHANCED CONFIDENCE TRACKING - + const analysisResult = await this.analyzeScenario(context); if (analysisResult.success) completeTasks++; else failedTasks++; await this.delay(this.microTaskDelay); @@ -1234,7 +1208,6 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; components: { semantic: confidence.semanticRelevance, suitability: confidence.taskSuitability, - consistency: confidence.methodologicalConsistency } }, confidence.overall, @@ -1286,7 +1259,7 @@ ${JSON.stringify(conceptsToSend, null, 2)}`; detailed_explanation: st.tool.evaluation?.detailed_explanation || '', implementation_approach: st.tool.evaluation?.implementation_approach || '', pros: st.tool.evaluation?.pros || [], - cons: st.tool.evaluation?.limitations || [], // ← FIXED: Use limitations as cons for display + cons: st.tool.evaluation?.limitations || [], alternatives: st.tool.evaluation?.alternatives || '', confidence: confidence, recommendationStrength: confidence.overall >= this.confidenceConfig.highThreshold ? 'strong' : diff --git a/src/utils/embeddings.ts b/src/utils/embeddings.ts index d70d0ca..165fb90 100644 --- a/src/utils/embeddings.ts +++ b/src/utils/embeddings.ts @@ -31,7 +31,7 @@ interface SimilarityResult extends EmbeddingData { class EmbeddingsService { private embeddings: EmbeddingData[] = []; private isInitialized = false; - private initializationPromise: Promise | null = null; // ADD THIS LINE + private initializationPromise: Promise | null = null; private readonly embeddingsPath = path.join(process.cwd(), 'data', 'embeddings.json'); private readonly batchSize: number; private readonly batchDelay: number; @@ -43,24 +43,19 @@ class EmbeddingsService { this.batchDelay = parseInt(process.env.AI_EMBEDDINGS_BATCH_DELAY_MS || '1000', 10); } - // REPLACE the existing initialize method with this: async initialize(): Promise { - // If initialization is already in progress, wait for it if (this.initializationPromise) { return this.initializationPromise; } - // If already initialized, return immediately if (this.isInitialized) { return Promise.resolve(); } - // Start initialization and store the promise this.initializationPromise = this.performInitialization(); return this.initializationPromise; } - // ADD THIS NEW METHOD: private async performInitialization(): Promise { if (!this.enabled) { console.log('[EMBEDDINGS] Embeddings disabled, skipping initialization'); @@ -70,13 +65,11 @@ class EmbeddingsService { try { console.log('[EMBEDDINGS] Initializing embeddings system...'); - // Create data directory if it doesn't exist await fs.mkdir(path.dirname(this.embeddingsPath), { recursive: true }); const toolsData = await getCompressedToolsDataForAI(); const currentDataHash = this.hashData(toolsData); - // Try to load existing embeddings const existingEmbeddings = await this.loadEmbeddings(); if (existingEmbeddings && existingEmbeddings.version === currentDataHash) { @@ -336,12 +329,10 @@ class EmbeddingsService { -// Global instance const embeddingsService = new EmbeddingsService(); export { embeddingsService, type EmbeddingData, type SimilarityResult }; -// Auto-initialize on import in server environment if (typeof window === 'undefined' && process.env.NODE_ENV !== 'test') { embeddingsService.initialize().catch(error => { console.error('[EMBEDDINGS] Auto-initialization failed:', error); diff --git a/src/utils/rateLimitedQueue.ts b/src/utils/rateLimitedQueue.ts index 18286f8..d2f078c 100644 --- a/src/utils/rateLimitedQueue.ts +++ b/src/utils/rateLimitedQueue.ts @@ -96,7 +96,6 @@ class RateLimitedQueue { this.tasks.push(queuedTask); - // Kick the processor soon. setTimeout(() => { this.processQueue(); }, 100); @@ -170,7 +169,7 @@ class RateLimitedQueue { .filter((t) => t.status === "queued") .sort((a, b) => a.addedAt - b.addedAt)[0]; - if (!nextTask) break; // No more work + if (!nextTask) break; nextTask.status = "processing"; nextTask.startedAt = Date.now(); -- 2.39.5