On-Premises Knowledge Graph | Forensic AI Lab

Wikibase Lokale Kennisbank

Een Private Knowledge Graph voor Forensisch AI - Volledige Controle over Gevoelige Data

Wikibase is de open-source software achter Wikidata - ideaal voor een private, lokale instance waar we volledige controle hebben over data, privacy en security.

Waarom een Lokale Wikibase?

Autonome Forensische Knowledge Hub

Wikidata is de publieke gigant (gehost door Wikimedia), maar Wikibase is de open-source software erachter - perfect voor een private, lokale instance waar we volledige controle hebben. Geen publieke edits, geen community-messiness: puur ons eigen forensisch AI-lab.

πŸ”

Privacy & Compliance

Alle data blijft lokaal/on-premises. Cruciaal voor strafzaken en NIS2-dossiers met gevoelige logs, hashes en chain-of-custody.

πŸ•ΈοΈ

Knowledge Graph

Bouw een graph met CVE-vulnerabilities, threat actors, digitaal bewijs-types, timelines en inconsistenties.

πŸ€–

AI-Integratie

AI-modellen queryen via SPARQL voor anomaly-detectie, timeline-reconstructie of vormverzuim-haakjes.

βš™οΈ

Custom Properties

Eigen properties zoals P-forensic-hash (SHA-512), federated links naar Wikidata zonder data te lekken.

"Wikibase local = no single point of failure, full sovereignty over je cyber-kennis."

Wikibase vs Wikidata

Key Differences voor Forensische Setup
Aspect Wikidata (Publiek) Wikibase (Lokaal)
Hosting Gehost door Wikimedia, open voor iedereen Zelf gehost (Docker/on-premises), volledig private
Data Controle Community-edits, CC0-license Jij bepaalt access (OAuth, IP-fencing), beroepsgeheim-compliant
Schaal Miljarden statements, performance-tuned Start klein, schaalbaar; ideaal voor niche forensische data
Customisatie Beperkt tot Wikidata-policy Eigen ontology, properties, UI - volledige vrijheid
Integratie API/SPARQL publiek Lokale API + SPARQL; federate met Wikidata voor externe links
Security Publiek toegankelijk End-to-end: containers, encryption, hashes - SHA-512 stack

Wikibase is Wikidata's "blank slate" - perfect voor interne onderzoeken (datalekken, fraude) zonder risico op lekken naar de buitenwereld.

Installatie via Docker

De Aanbevolen Route (2026)

De makkelijkste en meest secure manier: Wikibase Suite via Docker (official WMDE-images). Dit zet een volledige stack op: MediaWiki + Wikibase Repository + Query Service (SPARQL) + Elasticsearch.

πŸ–₯️ Requirements

  • Docker + Docker Compose geinstalleerd
  • Minimaal 8GB RAM (voor Query Service)
  • Ports vrij: 8181 (Wikibase), 8282 (Query UI), 8989 (Blazegraph)
  • SSD storage aanbevolen voor performance

Stap-voor-Stap Guide

1

Repository Klonen

git clone https://github.com/wmde/wikibase-release-pipeline.git
cd wikibase-release-pipeline/deploy
2

Environment Configureren

Kopieer template.env naar .env en configureer:

  • DB_ROOT_PASSWORD - Sterke database password
  • MW_ADMIN_PASS - MediaWiki admin credentials
  • WIKIBASE_HOST - localhost of server IP
  • Enable QuickStatements voor batch imports
3

Docker Compose Starten

docker compose up -d
Eerste run pulls images: wikibase/wikibase, mysql, elasticsearch, wdqs
4

Access & Initial Setup

Wikibase: http://localhost:8181
Query UI: http://localhost:8282

Login als admin, run maintenance scripts, voeg eerste properties toe (bijv. "SameAs" voor Wikidata-links).

⚠️ Security Tip

Voor productie: Voeg HTTPS toe via reverse proxy (Traefik/Nginx) + Let's Encrypt. Gebruik nooit HTTP voor gevoelige forensische data.

Security Hardening

Forensisch-Grade Beveiliging
πŸ“¦
Container Isolatie

Per-zaak namespaces, gescheiden van andere workloads.

πŸ”’
Volume Encryption

Docker secrets en encrypted storage voor alle data.

πŸ“
Audit Logs

Elke edit traceable voor chain-of-custody proof.

πŸ”
mTLS

Mutual TLS voor alle API-communicatie.

Docker Security Configuratie

# docker-compose.override.yml
services:
  wikibase:
    security_opt:
      - no-new-privileges:true
    read_only: true
    tmpfs:
      - /tmp
    networks:
      - internal
      - proxy
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.wikibase.tls=true"

networks:
  internal:
    internal: true
  proxy:
    external: true

Integratie in het Forensic AI-Lab

Pipeline Uitbreiding met Knowledge Graph
1

Pre-Processing

Import data (logs, NFI-rapporten) als items/properties via QuickStatements of API.

2

AI-Analyse

SPARQL-queries voor patterns: "vind timelines met timestamp-gaps" voor inconsistentie-detectie.

3

Rapport

Embed graph-visualisaties (Query Service UI) in rapporten met references voor provenance.

Python API Integratie (WikibaseIntegrator)

from wikibaseintegrator import WikibaseIntegrator
from wikibaseintegrator.wbi_config import config
import os

# Configureer voor lokale instance
config['MEDIAWIKI_API_URL'] = 'http://localhost:8181/w/api.php'
config['SPARQL_ENDPOINT_URL'] = 'http://localhost:8282/sparql'
config['USER_AGENT'] = 'CyberSecurityAD-ForensicBot/1.0'

# Login met bot credentials
config['WIKIBASE_USERNAME'] = os.environ['WIKIBASE_USER']
config['WIKIBASE_PASSWORD'] = os.environ['WIKIBASE_PASS']

wbi = WikibaseIntegrator()

# Creeer nieuwe entity: Threat Actor
from wikibaseintegrator.models import Item
from wikibaseintegrator import datatypes

item = Item()
item.labels.set('nl', 'APT29 - Cozy Bear')
item.descriptions.set('nl', 'Russische state-sponsored threat actor')

# Voeg properties toe
item.claims.add(datatypes.String(
    value='APT29',
    prop_nr='P1'  # Alias property
))
item.claims.add(datatypes.Time(
    time='+2024-01-15T00:00:00Z',
    prop_nr='P2'  # First observed property
))

# Write naar lokale Wikibase
item.write()
print(f"Created item: {item.id}")

Forensische Ontology

Voorbeeld Data Model voor het Lab
Type ID Label Beschrijving
Item Q1 EncroChat Export Versleutelde chat-export dataset
Item Q2 Black-Box Tool Forensische software zonder broncode
Item Q3 Vormverzuim Art. 359a Sv schending
Property P1 SHA-512 Hash Cryptografische hash voor integriteit
Property P2 Timeline Event Timestamp voor tijdlijn-reconstructie
Property P3 Inconsistentie Gedetecteerde anomalie of gap

SPARQL Query: Vind Inconsistenties in Timeline

PREFIX wd: <http://localhost:8181/entity/>
PREFIX wdt: <http://localhost:8181/prop/direct/>

SELECT ?item ?itemLabel ?timestamp ?inconsistency WHERE {
  ?item wdt:P2 ?timestamp .           # Heeft timeline event
  ?item wdt:P3 ?inconsistency .       # Heeft inconsistentie
  SERVICE wikibase:label { bd:serviceParam wikibase:language "nl,en". }
}
ORDER BY ?timestamp

Roadmap voor Lancering

Van Setup naar Productie
Week 1

Docker Setup

Installatie Wikibase Suite + basic items aanmaken

Maand 1

Portaal Integratie

Koppeling met forensisch AI-pipeline en dashboard

Maand 3

AI-Queries Live

SPARQL-gestuurde anomaly-detectie in productie

Maand 6

Federation

Federate met Wikidata voor externe threat intel

πŸ’Ά Kostenraming

  • Software: Gratis (open-source)
  • Server: EUR 500-2000 initieel (GPU voor AI + storage)
  • Onderhoud: ~10 uur/maand (updates, backups)

Klaar om je Eigen Knowledge Graph te Bouwen?

Dit maakt ons lab een autonome forensische knowledge hub - mens + AI + graph = unbeatable in strafrecht/corporate investigations.