Communitygithub.com

Hindsight를 활용한 브라우저 포렌식 분석

Chromium 기반 브라우저(Chrome, Edge, Brave, Opera, Vivaldi)의 데이터베이스를 Hindsight로 파싱하여 방문 기록, 다운로드, 쿠키, 캐시, 자동 완성, 저장된 비밀번호, 확장 프로그램 등을 통합 타임라인(XLSX, JSON, SQLite)으로 추출 및 상관 분석합니다. 침해 대응, 내부자 위협 조사, 형사 사건에서 사용자 브라우저 활동을 재구성해야 할 때 사용합니다.

Hindsight를 활용한 브라우저 포렌식 분석란 무엇인가요?

Hindsight는 오픈소스 브라우저 포렌식 도구로, Google Chrome 및 기타 Chromium 기반 브라우저(Microsoft Edge, Brave, Opera, Vivaldi)의 아티팩트를 파싱하여 웹 활동에 대한 통합 타임라인을 생성합니다. URL 방문 기록, 다운로드 내역, 캐시 기록, 북마크, 자동 완성, 저장된 비밀번호, 브라우저 환경 설정, 확장 프로그램, HTTP 쿠키, HTML5 로컬 스토리지, 로그인 데이터, 세션 및 탭 정보 등 다양한 데이터를 추출합니다. 결과는 XLSX, JSON, SQLite 형식으로 출력되며, 조사관이 침해 대응, 내부자 위협 조사, 형사 사건에서 사용자의 웹 활동을 재구성할 수 있도록 돕습니다. Python 3.8+ 환경에서 pip install pyhindsight로 설치할 수 있으며, CLI와 웹 UI 두 가지 방식으로 실행 가능합니다.

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

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

Hindsight를 활용한 브라우저 포렌식 분석은(는) 무엇을 하나요?

개요

Hindsight는 Google Chrome 및 기타 Chromium 기반 브라우저(Microsoft Edge, Brave, Opera, Vivaldi)의 아티팩트를 파싱하기 위한 오픈소스 브라우저 포렌식 도구입니다. 여러 브라우저 데이터베이스 파일에서 데이터를 추출하고 상관 분석하여 통합된 웹 활동 타임라인을 생성합니다. Hindsight는 URL, 다운로드 기록, 캐시 기록, 북마크, 자동 완성 기록, 저장된 비밀번호, 브라우저 환경 설정, 확장 프로그램, HTTP 쿠키, Local Storage(HTML5 쿠키), 로그인 데이터, 세션/탭 정보를 파싱할 수 있습니다. 이 도구는 XLSX, JSON, SQLite 등 여러 출력 형식으로 시간순 타임라인을 생성하여, 조사관이 침해 대응, 내부자 위협 조사, 형사 사건에서 사용자 웹 활동을 재구성할 수 있도록 합니다.

사용 시기

  • 브라우저 포렌식을 Hindsight로 분석해야 하는 보안 사고를 조사할 때
  • 이 도메인에 대한 탐지 규칙 또는 위협 헌팅 쿼리를 구축할 때
  • SOC 분석가가 이 분석 유형에 대한 구조화된 절차가 필요할 때
  • 관련 공격 기법에 대한 보안 모니터링 커버리지를 검증할 때

사전 요구 사항

  • Python 3.8+ 및 Hindsight 설치 (pip install pyhindsight)
  • 포렌식 이미지에서 브라우저 프로필 디렉터리에 접근 가능
  • (OS 수준 암호화로 암호화되지 않은) 브라우저 프로필 데이터
  • 분석을 위한 Timeline Explorer 또는 스프레드시트 애플리케이션

브라우저 프로필 위치

브라우저Windows 프로필 경로
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/

주요 아티팩트 파일

파일내용
HistoryURL 방문, 다운로드, 키워드 검색
Cookies도메인, 만료일, 값을 포함한 HTTP 쿠키
Web Data자동 완성 항목, 저장된 신용카드 정보
Login Data저장된 사용자 이름/비밀번호 (암호화됨)
BookmarksJSON 북마크 트리
Preferences브라우저 구성 및 확장 프로그램
Local Storage/도메인별 HTML5 Local Storage
Session Storage/도메인별 세션 저장소
Network Action Predictor이전에 입력한 URL
Shortcuts옴니박스 바로 가기 및 예측
Top Sites자주 방문한 사이트

Hindsight 실행

명령줄

# Chrome 프로필 기본 분석
hindsight.exe -i "C:\Evidence\Users\suspect\AppData\Local\Google\Chrome\User Data\Default" -o C:\Output\chrome_analysis

# 브라우저 유형 지정
hindsight.exe -i "/path/to/profile" -o /output/analysis -b Chrome

# JSON 출력 형식
hindsight.exe -i "C:\Evidence\Chrome\Default" -o C:\Output\chrome --format jsonl

# 캐시 파싱 포함 (느리지만 더 완전함)
hindsight.exe -i "C:\Evidence\Chrome\Default" -o C:\Output\chrome --cache

웹 UI

# Hindsight 웹 인터페이스 시작
hindsight_gui.exe
# http://localhost:8080 으로 이동
# 브라우저 프로필 디렉터리 업로드 또는 경로 지정
# 출력 형식 및 분석 옵션 구성
# 보고서 생성 및 다운로드

아티팩트 분석 세부 사항

URL 기록 및 방문

-- Chrome History 데이터베이스 스키마 (주요 테이블)
-- urls 테이블: id, url, title, visit_count, typed_count, last_visit_time
-- visits 테이블: id, url, visit_time, from_visit, transition, segment_id

-- 타임스탬프는 Chrome/WebKit 형식: 1601-01-01 이후의 마이크로초
-- 변환: datetime((visit_time/1000000)-11644473600, 'unixepoch')

다운로드 기록

-- downloads 테이블: 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

쿠키 분석

-- cookies 테이블: 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 분석 스크립트

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):
    """Chrome 타임스탬프를 datetime으로 변환합니다."""
    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:
    """법의학 증거를 위해 Chrome History 데이터베이스를 분석합니다."""
    history_db = os.path.join(profile_path, "History")
    if not os.path.exists(history_db):
        return {"error": "History 데이터베이스를 찾을 수 없습니다"}

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

    # 타임스탬프가 포함된 URL 방문
    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()]

    # 다운로드
    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()]

    # 키워드 검색
    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("사용법: python process.py <chrome_profile_path> <output_dir>")
        sys.exit(1)
    analyze_chrome_history(sys.argv[1], sys.argv[2])


if __name__ == "__main__":
    main()

참고 자료

예제 출력

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

Hindsight v2024.01 - Chrome/Chromium 브라우저 포렌식 분석
================================================================

프로필: /evidence/chrome-profile (Chrome 120.0.6099.130)
OS: Windows 10

[+] History 데이터베이스 파싱 중...
    URL 레코드:          12,456
    다운로드 레코드:     234
    검색어:             567

[+] Cookies 데이터베이스 파싱 중...
    쿠키 레코드:        8,923
    암호화된 쿠키:      6,712

[+] Web Data (자동 완성) 파싱 중...
    자동 완성 항목:     1,234
    신용카드 항목:      2 (암호화됨)

[+] Login Data 파싱 중...
    저장된 자격 증명:   45 (암호화됨)

[+] Bookmarks 파싱 중...
    북마크 항목:        189

--- 방문 기록 (최근 10개 항목) ---
타임스탬프 (UTC)          | URL                                          | 제목                        | 방문 횟수
2024-01-15 14:32:05.123  | https://mail.corporate.com/inbox             | 회사 메일                   | 45
2024-01-15 14:33:12.456  | https://drive.google.com/file/d/1aBcDe...    | Q4_Financial_Report.xlsx    | 1
2024-01-15 14:35:44.789  | https://mega.nz/folder/xYz123               | MEGA - 보안 클라우드        | 3
2024-01-15 14:36:01.234  | https://mega.nz/folder/xYz123#upload        | MEGA - 업로드               | 8
2024-01-15 14:42:15.567  | https://pastebin.com/raw/kL9mN2pQ           | Pastebin (raw)              | 1
2024-01-15 15:01:33.890  | https://192.168.1.50:8443/admin              | 관리자 패널                 | 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 로그인                  | 5
2024-01-15 16:00:00.333  | https://whatismyipaddress.com                | 내 IP는?                    | 1
2024-01-15 16:05:12.444  | https://protonmail.com/inbox                 | ProtonMail                  | 3

--- 다운로드 (의심스러운 항목) ---
타임스탬프 (UTC)          | 파일명                      | URL 출처                                 | 크기
2024-01-15 14:33:15.000  | Q4_Financial_Report.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

--- 쿠키 (세션 토큰) ---
도메인                   | 이름              | 만료일            | 보안  | HttpOnly
.corporate.com           | SESSION_ID        | 2024-01-16 14:32   | 예    | 예
.mega.nz                 | session           | 세션              | 예    | 예
.protonmail.com          | AUTH-TOKEN        | 2024-02-15 00:00   | 예    | 예

보고서 저장 위치: /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,

관련 스킬