gitlab.com/rknall/wiresharktraining
🛡️

Security Analysis

mit Wireshark

Agenda

Nr.
Thema
Dauer
1
Einführung & Überblick
3 Min
2
Compliance Monitoring
8 Min
3
DDoS-Erkennung und -Analyse
8 Min
4
Extcap-Framework im Detail
10 Min
5
Daily Security Workflows
8 Min
6
Tool-Integration & Q&A
3 Min

Security mit Wireshark

📊 Compliance

DSGVO-konforme Überwachung und PCI-DSS Checks

🚨 Threat Detection

DDoS und Malware-Traffic erkennen

🌐 Remote Analysis

Verteilte Infrastrukturen mit Extcap überwachen

🤖 Automation

Security-Workflows mit unseren Tools optimieren

📋

Compliance Monitoring

DSGVO & PCI-DSS

DSGVO-konforme Überwachung

  • Art. 6 DSGVO: Berechtigtes Interesse bei IT-Sicherheit
  • § 26 BDSG: Beschäftigtendatenschutz beachten
# Header-only Capture (minimiert Datenschutz-Risiken)
dumpcap -i eth0 -s 100 -w headers_only.pcap

# Automatische Anonymisierung - https://omnipacket.com/safepcap
safepcap --anonymize-ips --scramble-macs input.pcap output.pcap

PCI-DSS Compliance-Checks

Requirement 4: Verschlüsselung prüfen

# Unverschlüsselte Kreditkartendaten suchen
tcp contains "4[0-9]{15}" or tcp contains "5[1-5][0-9]{14}"

# Veraltete TLS-Versionen erkennen
tls.record.version == 0x0301  # TLS 1.0 (nicht mehr erlaubt)

Requirement 10: Audit-Trails

  • Kontinuierliche Traffic-Aufzeichnung
  • Integration mit SIEM-Systemen
  • Forensisch verwertbare Dokumentation

Security Event Detection

# Brute Force Attempts
tcp.port == 22 and tcp.flags.reset == 1

# DNS Tunneling Detection
dns.qry.name matches ".*\..*\..*\..*\..*\."

# Data Exfiltration
tcp.len > 1460 and tcp.port == 443

# Compliance-Reporting
tshark -r daily_capture.pcap -Y "compliance_filter" \
  -T csv > compliance_report.csv

DDoS-Erkennung

Attack Pattern & Metriken

Typische DDoS-Patterns

🌊 SYN Flood

  • Hohe Rate von TCP SYN ohne ACK
  • Kleine Window-Größen (64 Bytes)
  • Konstante Paketlängen
tcp.flags.syn == 1 and tcp.flags.ack == 0

💥 UDP Flood

  • UDP zu ungewöhnlichen Ports
  • "Garbage"-Daten im Payload
  • Große Paketgrößen
frame.len > 500 and udp

DDoS-Schwellenwerte

Normal
<1 Gbps
<100k pps
<100/s SYN
Verdächtig
10+ Gbps
100k-1M pps
>1000/s SYN
Kritisch
100+ Gbps
>1M pps
>10k/s SYN
🔌

Extcap-Framework

Remote Capture leicht gemacht

Was ist Extcap?

  • External Capture Interface
  • Plugin-Architektur für Remote-Capture
  • Kommunikation über Kommandozeilen-Parameter
  • FIFO-basierte Datenübertragung

Extcap-Parameter

# Interface-Abfrage
extcap-tool --extcap-interfaces

# Konfiguration abrufen
extcap-tool --extcap-config

# Capture starten
extcap-tool --capture --fifo=/tmp/pipe

sshdump - Remote Linux/Unix

# Remote-Server überwachen
wireshark -oextcap.sshdump.remotehost:"192.168.1.100" -oextcap.sshdump.remoteusername:"admin" \
  -oextcap.sshdump.remoteinterface:"eth0" -i sshdump -k

# Mit eigenem Capture-Command
'-oextcap.sshdump.remotecapturecommand:
    "tcpdump -i eth0 -Uw- not port 22"'

Security-Szenarien:

sshdump - Remote Linux/Unix

  • Incident Response: Sofort-Analyse kompromittierter Server
  • Multi-Site Monitoring: Mehrere Standorte gleichzeitig
  • Forensik: Beweissicherung ohne lokalen Zugriff

udpdump - Network Appliances

🌐 Einsatzgebiete

  • Mikrotik Router (Port 37008)
  • Aruba Access Points
  • Proprietäre Monitoring-Systeme

⚙️ Konfiguration

# Standard-Port ändern
tshark -i udpdump \
  -o extcap.udpdump.port:37008

# Mit Debug-Output
udpdump --debug true --port 5555
🔍

Daily Security Workflows

Praxis-Tipps für den Alltag

Incident Response Process

# Verdächtige Aktivität isolieren
$ tshark -i eth0 \
-f "host 192.168.1.50" \
-w incident_$(date +%Y%m%d_%H%M%S).pcap

# Quick Analysis
$ tshark -r incident.pcap -q -z conv,ip

Wichtig: Sofort Beweise sichern!

Malware-Traffic-Analyse

Schritt-für-Schritt Vorgehen:

  1. Basis-Filter: http or dns or ssl
  2. Verdächtige Domains: HTTP Host-Header prüfen
  3. C&C-Kommunikation: Regelmäßige Verbindungen
  4. Payload-Extraktion: Export Objects
# DGA-Domains erkennen
dns.qry.name matches "[a-z0-9]{15,}"

# Base64-kodierte Payloads
http contains "==" and frame.len > 1000

# Beaconing (regelmäßige Callbacks)
tcp.time_delta < 0.1

Security-Automatisierung

#!/bin/bash
# Täglicher Security-Scan
DATUM=$(date +%Y%m%d)

# Suspicious DNS
tshark -r capture_$DATUM.pcap -Y "dns.qry.name contains tunnel" \
  -T fields -e dns.qry.name > suspicious_dns.txt

# Port Scans
tshark -r capture_$DATUM.pcap -Y "tcp.flags.syn==1 and tcp.flags.ack==0" \
  -T fields -e ip.src | sort | uniq -c | \
  awk '$1 > 100 {print "Port scan:", $2, $1, "SYNs"}'

Integration mit Teil 1

🌙 Lua erweitern

-- DGA-Detection
if domain:match("[a-z0-9]{15,}") then
  tree:add_expert_info(PI_SECURITY, 
    PI_WARN, "Possible DGA")

🐍 Python Threat Intel

# IoC-Check
if pkt.ip.src in ioc_list:
    alerts.append(
      f"IoC hit: {pkt.ip.src}")

Bash Dashboard: Echtzeit Security-Monitoring

Best Practices

  • Profile verwenden: Einheitliche Team-Konfiguration
  • Filter-Bibliothek: Getestete Security-Filter sammeln
  • Dokumentation: Jeden Incident sauber dokumentieren
  • Rechtliche Compliance: Datenschutz immer beachten
  • Performance: Ring-Buffer für große Captures

Nächste Schritte

  1. Eigene Security-Profile erstellen
  2. Extcap-Tools konfigurieren
  3. Automatisierungs-Scripts anpassen
  4. Team-Training durchführen

gitlab.com/rknall/wiresharktraining

Fragen?

Zeit für Diskussion

Vielen Dank!

Stay Secure with Wireshark

gitlab.com/rknall/wiresharktraining

1 / 23
Pfeiltasten: Navigation | F: Vollbild | ESC: Beenden