Communitygithub.com

Browser-Forensik mit Hindsight analysieren

Analysiere Chromium-basierte Browserdatenbanken mit Hindsight, um Browserverlauf, Downloads, Cookies, Cache, Autofill-Daten, gespeicherte Passwörter und Erweiterungen aus Chrome, Edge, Brave, Opera und Vivaldi zu extrahieren und in einer einheitlichen Timeline (XLSX, JSON oder SQLite) zusammenzuführen.

Was ist Browser-Forensik mit Hindsight analysieren?

Diese Fähigkeit ermöglicht die automatisierte forensische Analyse von Chromium-Browsern (Chrome, Edge, Brave, Opera, Vivaldi) mithilfe von Hindsight, einem Open-Source-Tool. Sie extrahiert und korreliert Daten aus verschiedenen Browser-Datenbankdateien (History, Cookies, Web Data, Login Data, Bookmarks, Local Storage) und erstellt eine chronologische Timeline der Webaktivitäten. Die Fähigkeit eignet sich für Incident Response, Insider-Bedrohungsanalysen und strafrechtliche Ermittlungen, um Benutzeraktivitäten zu rekonstruieren. Unterstützt werden CLI und Web-UI; die Ausgabe erfolgt als XLSX, JSON oder SQLite. Ein mitgeliefertes Python-Skript demonstriert die direkte Abfrage der History-Datenbank mit SQL und die Umrechnung von Chrome-Zeitstempeln in lesbare Datumsangaben.

Funktioniert mit~Claude Code~Codex CLI✓Cursor
npx skills add https://github.com/mukul975/Anthropic-Cybersecurity-Skills/tree/main/skills/analyzing-browser-forensics-with-hindsight

In Ihrer bevorzugten KI fragen

Öffnet einen neuen Chat, in dem dieser Agent-Skill bereits geladen ist.

Dokumentation

Was macht Browser-Forensik mit Hindsight analysieren?

Überblick

Hindsight ist ein Open-Source-Browser-Forensik-Tool, das speziell für die Analyse von Google Chrome und anderen Chromium-basierten Browsern (Microsoft Edge, Brave, Opera, Vivaldi) entwickelt wurde. Es extrahiert und korreliert Daten aus mehreren Browser-Datenbankdateien und erstellt eine einheitliche Timeline der Webaktivität. Mit Hindsight können URLs, Download-Verlauf, Cache-Einträge, Lesezeichen, Autofill-Datensätze, gespeicherte Passwörter, Einstellungen, Browsererweiterungen, HTTP-Cookies, Local Storage (HTML5-Cookies), Anmeldedaten sowie Sitzungs-/Tab-Informationen analysiert werden. Das Tool erzeugt chronologische Timelines in verschiedenen Ausgabeformaten (XLSX, JSON, SQLite), die es Ermittlern ermöglichen, die Webaktivität eines Benutzers für Incident Response, Insider-Bedrohungsanalysen und strafrechtliche Ermittlungen zu rekonstruieren.

Wann verwenden

  • Bei der Untersuchung von Sicherheitsvorfällen, bei denen eine Browser-Forensik mit Hindsight erforderlich ist
  • Beim Erstellen von Erkennungsregeln oder Threat-Hunting-Abfragen für diesen Bereich
  • Wenn SOC-Analysten strukturierte Verfahren für diesen Analysetyp benötigen
  • Bei der Validierung der Sicherheitsüberwachungsabdeckung für verwandte Angriffstechniken

Voraussetzungen

  • Python 3.8+ mit installiertem Hindsight (pip install pyhindsight)
  • Zugriff auf die Browser-Profilverzeichnisse aus einem forensischen Image
  • Browser-Profildaten (nicht mit Betriebssystem-Verschlüsselung verschlüsselt)
  • Timeline Explorer oder eine Tabellenkalkulation zur Analyse

Speicherorte der Browser-Profile

BrowserWindows-Profilpfad
Chrome%LOCALAPPDATA%\Google\Chrome\User Data\Default\
Edge%LOCALAPPDATA%\Microsoft\Edge\User Data\Default\
Brave%LOCALAPPDATA%\BraveSoftware\Brave-Browser\User Data\Default\
Opera%APPDATA%\Opera Software\Opera Stable\
Vivaldi%LOCALAPPDATA%\Vivaldi\User Data\Default\
Chrome (macOS)~/Library/Application Support/Google/Chrome/Default/
Chrome (Linux)~/.config/google-chrome/Default/

Wichtige Artefakt-Dateien

DateiInhalt
HistoryURL-Besuche, Downloads, Suchbegriffe
CookiesHTTP-Cookies mit Domain, Ablaufdatum, Werten
Web DataAutofill-Einträge, gespeicherte Kreditkarten
Login DataGespeicherte Benutzernamen/Passwörter (verschlüsselt)
BookmarksJSON-Lesezeichenstruktur
PreferencesBrowsereinstellungen und Erweiterungen
Local Storage/HTML5 Local Storage pro Domain
Session Storage/Sitzungsspezifischer Storage pro Domain
Network Action PredictorZuvor eingegebene URLs
ShortcutsOmnibox-Verknüpfungen und Vorhersagen
Top SitesHäufig besuchte Seiten

Hindsight ausführen

Befehlszeile

# Grundlegende Analyse eines Chrome-Profils
hindsight.exe -i "C:\Evidence\Users\suspect\AppData\Local\Google\Chrome\User Data\Default" -o C:\Output\chrome_analysis

# Browser-Typ angeben
hindsight.exe -i "/path/to/profile" -o /output/analysis -b Chrome

# JSON-Ausgabeformat
hindsight.exe -i "C:\Evidence\Chrome\Default" -o C:\Output\chrome --format jsonl

# Mit Cache-Analyse (langsamer, aber vollständiger)
hindsight.exe -i "C:\Evidence\Chrome\Default" -o C:\Output\chrome --cache

Weboberfläche

# Hindsight-Webinterface starten
hindsight_gui.exe
# Navigieren Sie zu http://localhost:8080
# Laden Sie das Browser-Profilverzeichnis hoch oder geben Sie es an
# Konfigurieren Sie Ausgabeformat und Analyseoptionen
# Erstellen und herunterladen Sie den Bericht

Details zur Artefaktanalyse

URL-Verlauf und Besuche

-- Schema der Chrome-Verlaufsdatenbank (wichtige Tabellen)
-- urls-Tabelle: id, url, title, visit_count, typed_count, last_visit_time
-- visits-Tabelle: id, url, visit_time, from_visit, transition, segment_id

-- Zeitstempel sind im Chrome/WebKit-Format: Mikrosekunden seit 1601-01-01
-- Konvertierung: datetime((visit_time/1000000)-11644473600, 'unixepoch')

Download-Verlauf

-- downloads-Tabelle: id, current_path, target_path, start_time, end_time,
--   received_bytes, total_bytes, state, danger_type, interrupt_reason,
--   url, referrer, tab_url, mime_type, original_mime_type

Cookie-Analyse

-- cookies-Tabelle: creation_utc, host_key, name, value, encrypted_value,
--   path, expires_utc, is_secure, is_httponly, last_access_utc,
--   has_expires, is_persistent, priority, samesite

Python-Analyse-Skript

import sqlite3
import os
import json
import sys
from datetime import datetime, timedelta


CHROME_EPOCH = datetime(1601, 1, 1)


def chrome_time_to_datetime(chrome_ts: int):
    """Konvertiert einen Chrome-Zeitstempel in ein datetime-Objekt."""
    if chrome_ts == 0:
        return None
    try:
        return CHROME_EPOCH + timedelta(microseconds=chrome_ts)
    except (OverflowError, OSError):
        return None


def analyze_chrome_history(profile_path: str, output_dir: str) -> dict:
    """Analysiert die Chrome-Verlaufsdatenbank für forensische Beweise."""
    history_db = os.path.join(profile_path, "History")
    if not os.path.exists(history_db):
        return {"error": "History-Datenbank nicht gefunden"}

    os.makedirs(output_dir, exist_ok=True)
    conn = sqlite3.connect(f"file:{history_db}?mode=ro", uri=True)

    # URL-Besuche mit Zeitstempeln
    cursor = conn.cursor()
    cursor.execute("""
        SELECT u.url, u.title, v.visit_time, u.visit_count,
               v.transition & 0xFF as transition_type
        FROM visits v JOIN urls u ON v.url = u.id
        ORDER BY v.visit_time DESC LIMIT 5000
    """)
    visits = [{
        "url": r[0], "title": r[1],
        "visit_time": str(chrome_time_to_datetime(r[2])),
        "total_visits": r[3], "transition": r[4]
    } for r in cursor.fetchall()]

    # Downloads
    cursor.execute("""
        SELECT target_path, tab_url, start_time, end_time,
               received_bytes, total_bytes, mime_type, state
        FROM downloads ORDER BY start_time DESC LIMIT 1000
    """)
    downloads = [{
        "path": r[0], "source_url": r[1],
        "start_time": str(chrome_time_to_datetime(r[2])),
        "end_time": str(chrome_time_to_datetime(r[3])),
        "received_bytes": r[4], "total_bytes": r[5],
        "mime_type": r[6], "state": r[7]
    } for r in cursor.fetchall()]

    # Suchbegriffe
    cursor.execute("""
        SELECT k.term, u.url, k.url_id
        FROM keyword_search_terms k JOIN urls u ON k.url_id = u.id
        ORDER BY u.last_visit_time DESC LIMIT 1000
    """)
    searches = [{"term": r[0], "url": r[1]} for r in cursor.fetchall()]

    conn.close()

    report = {
        "analysis_timestamp": datetime.now().isoformat(),
        "profile_path": profile_path,
        "total_visits": len(visits),
        "total_downloads": len(downloads),
        "total_searches": len(searches),
        "visits": visits,
        "downloads": downloads,
        "searches": searches
    }

    report_path = os.path.join(output_dir, "browser_forensics.json")
    with open(report_path, "w") as f:
        json.dump(report, f, indent=2)

    return report


def main():
    if len(sys.argv) < 3:
        print("Verwendung: python process.py <chrome_profile_path> <output_dir>")
        sys.exit(1)
    analyze_chrome_history(sys.argv[1], sys.argv[2])


if __name__ == "__main__":
    main()

Referenzen

Beispielausgabe

$ python hindsight.py -i /evidence/chrome-profile -o /analysis/hindsight_output

Hindsight v2024.01 - Chrome/Chromium Browser Forensische Analyse
================================================================

Profil: /evidence/chrome-profile (Chrome 120.0.6099.130)
Betriebssystem: Windows 10

[+] Parst History-Datenbank...
    URL-Einträge:          12.456
    Download-Einträge:     234
    Suchbegriffe:          567

[+] Parst Cookies-Datenbank...
    Cookie-Einträge:       8.923
    Verschlüsselte Cookies: 6.712

[+] Parst Web Data (Autofill)...
    Autofill-Einträge:     1.234
    Kreditkarten-Einträge: 2 (verschlüsselt)

[+] Parst Login Data...
    Gespeicherte Anmeldedaten: 45 (verschlüsselt)

[+] Parst Lesezeichen...
    Lesezeichen-Einträge:     189

--- Browserverlauf (Letzte 10 Einträge) ---
Zeitstempel (UTC)          | URL                                          | Titel                        | Besuche
2024-01-15 14:32:05.123  | https://mail.corporate.com/inbox             | Firmen-E-Mail                | 45
2024-01-15 14:33:12.456  | https://drive.google.com/file/d/1aBcDe...    | Q4_Finanzbericht.xlsx        | 1
2024-01-15 14:35:44.789  | https://mega.nz/folder/xYz123               | MEGA - Sichere Cloud         | 3
2024-01-15 14:36:01.234  | https://mega.nz/folder/xYz123#upload        | MEGA - Hochladen             | 8
2024-01-15 14:42:15.567  | https://pastebin.com/raw/kL9mN2pQ           | Pastebin (roh)               | 1
2024-01-15 15:01:33.890  | https://192.168.1.50:8443/admin              | Admin-Panel                  | 12
2024-01-15 15:15:22.111  | https://transfer.sh/upload                  | transfer.sh                  | 2
2024-01-15 15:30:45.222  | https://vpn-gateway.corporate.com            | VPN-Anmeldung                | 5
2024-01-15 16:00:00.333  | https://whatismyipaddress.com                 | Was ist meine IP             | 1
2024-01-15 16:05:12.444  | https://protonmail.com/inbox                 | ProtonMail                   | 3

--- Downloads (Verdächtig) ---
Zeitstempel (UTC)          | Dateiname                    | URL-Quelle                               | Größe
2024-01-15 14:33:15.000  | Q4_Finanzbericht.xlsm       | https://phish-domain.com/docs/report     | 245 KB
2024-01-15 14:34:02.000  | update_client.exe            | https://cdn.evil-updates.com/client.exe  | 1,2 MB

--- Cookies (Sitzungstoken) ---
Domain                   | Name              | Läuft ab            | Secure | HttpOnly
.corporate.com           | SESSION_ID        | 2024-01-16 14:32   | Ja     | Ja
.mega.nz                 | session           | Sitzung             | Ja     | Ja
.protonmail.com          | AUTH-TOKEN        | 2024-02-15 00:00   | Ja     | Ja

Bericht gespeichert unter: /analysis/hindsight_output/Hindsight_Report.xlsx

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

abusing-dpapi-for-credential-access

Extract and decrypt Windows DPAPI-protected secrets (Credential Manager, browser logins/cookies, Wi-Fi credentials, KeePass keys) online or offline using SharpDPAPI, SharpChrome, Mimikatz, or Impacket

abusing-shadow-credentials-for-privesc

Take over Active Directory accounts by writing attacker-controlled public keys to msDS-KeyCredentialLink (Shadow Credentials) with pyWhisker, Whisker, or Certipy, then authenticate via PKINIT to recover the target

achieving-cmmc-level-2-compliance

>-

acquiring-disk-image-with-dd-and-dcfldd

Create forensically sound bit-for-bit disk images with dd or dcfldd on a Linux forensic workstation, preserving evidence integrity through hash verification (MD5/SHA) during acquisition. Use when imaging a suspect drive, USB device, or memory card for investigation, preserving volatile disk evidence during incident response, or producing a verified copy for legal or law-enforcement proceedings before any destructive analysis.

analyzing-active-directory-acl-abuse

Detect dangerous ACL misconfigurations in Active Directory using ldap3

analyzing-android-malware-with-apktool

Perform static analysis of Android APK malware using apktool for resource decompilation, jadx for Java source recovery, and androguard for manifest inspection, dangerous permission-combination detection, and identification of obfuscated code, dynamic code loading, and reflection-based API calls. Use to statically triage a suspicious APK without executing it or to build mobile malware detection rules.

analyzing-api-gateway-access-logs

Parses API Gateway access logs (AWS API Gateway, Kong, Nginx) to detect

analyzing-apt-group-with-mitre-navigator

Query ATT&CK data with attackcti, mitreattack-python, and stix2, then build MITRE ATT&CK Navigator layers and multi-layer heatmap overlays mapping one or more APT groups

analyzing-azure-activity-logs-for-threats

Queries Azure Monitor activity logs and sign-in logs via azure-monitor-query

analyzing-bootkit-and-rootkit-samples

Analyzes bootkit and advanced rootkit malware infecting the Master

analyzing-campaign-attribution-evidence

Systematically evaluate cyber-campaign evidence to attribute an operation to a threat actor, using the Diamond Model and Analysis of Competing Hypotheses (ACH) to weigh infrastructure overlaps, TTP consistency, malware code similarity, and timing/language artifacts into confidence-weighted attribution assessments. Use when an incident investigation needs a defensible attribution confidence level.

analyzing-certificate-transparency-for-phishing

Monitor Certificate Transparency logs using crt.sh and Certstream to

analyzing-cloud-storage-access-patterns

Detect abnormal access in AWS S3, GCS, and Azure Blob Storage by analyzing CloudTrail Data Events, GCS audit logs, and Azure Storage Analytics for after-hours bulk downloads, new-IP access, and API-call spikes (e.g. GetObject) via statistical baselines and time-series anomaly detection. Use when investigating suspected cloud data exfiltration or building related detection rules.

analyzing-cobalt-strike-beacon-configuration

Extract and analyze Cobalt Strike beacon configuration from PE files

analyzing-cobaltstrike-malleable-c2-profiles

Parse and analyze Cobalt Strike Malleable C2 profiles with dissect.cobaltstrike (profiles and beacon-payload configs) and pyMalleableC2 (AST parsing) to extract HTTP/DNS transforms, URIs, headers, sleep/jitter, and injection behavior, then generate network detection signatures. Use when reverse-engineering a captured malleable profile or building detections against Cobalt Strike Beacon traffic.

analyzing-command-and-control-communication

Analyzes malware C2 communication over HTTP, HTTPS, DNS, and custom

analyzing-cyber-kill-chain

Analyzes intrusion activity against the Lockheed Martin Cyber Kill Chain

analyzing-disk-image-with-autopsy

Perform comprehensive forensic analysis of raw (dd), E01, or AFF disk images with Autopsy and The Sleuth Kit, recovering deleted files, examining metadata and embedded artifacts, keyword searching, and building investigation timelines with visual reports. Use for structured analysis of a forensic disk image or when stakeholders need visual reports from evidence.

analyzing-dns-logs-for-exfiltration

Analyzes DNS query logs to detect data exfiltration via DNS tunneling,

analyzing-docker-container-forensics

Investigate compromised Docker containers by analyzing images, layers,

Verwandte Skills