analyzing-browser-forensics-with-hindsight
使用 Hindsight 分析基于 Chromium 的浏览器痕迹,从 Chrome、Edge、Brave 和 Opera 中提取浏览历史、下载记录、Cookie、缓存内容、自动填充数据、已保存密码和浏览器扩展,用于取证调查。
Best use case
analyzing-browser-forensics-with-hindsight is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
使用 Hindsight 分析基于 Chromium 的浏览器痕迹,从 Chrome、Edge、Brave 和 Opera 中提取浏览历史、下载记录、Cookie、缓存内容、自动填充数据、已保存密码和浏览器扩展,用于取证调查。
Teams using analyzing-browser-forensics-with-hindsight should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/analyzing-browser-forensics-with-hindsight/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How analyzing-browser-forensics-with-hindsight Compares
| Feature / Agent | analyzing-browser-forensics-with-hindsight | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
使用 Hindsight 分析基于 Chromium 的浏览器痕迹,从 Chrome、Edge、Brave 和 Opera 中提取浏览历史、下载记录、Cookie、缓存内容、自动填充数据、已保存密码和浏览器扩展,用于取证调查。
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# 使用 Hindsight 分析浏览器取证
## 概述
Hindsight 是一款开源浏览器取证(Browser Forensics)工具,专为解析 Google Chrome 和其他基于 Chromium 的浏览器(Microsoft Edge、Brave、Opera、Vivaldi)的痕迹而设计。它从多个浏览器数据库文件中提取和关联数据,创建统一的网络活动时间线。Hindsight 可以解析 URL、下载历史、缓存记录、书签、自动填充记录、已保存密码、浏览器偏好设置、浏览器扩展、HTTP Cookie、本地存储(HTML5 Cookie)、登录数据以及会话/标签信息。该工具以多种输出格式(XLSX、JSON、SQLite)生成按时间顺序排列的时间线,使调查人员能够重建用户网络活动,适用于事件响应(Incident Response)、内部威胁调查和刑事案件。
## 前置条件
- Python 3.8+ 并安装 Hindsight(`pip install pyhindsight`)
- 可访问取证镜像中的浏览器配置文件目录
- 浏览器配置文件数据(未使用操作系统级加密)
- 用于分析的 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/ |
## 关键痕迹文件
| 文件 | 内容 |
|------|------|
| History | URL 访问记录、下载记录、关键词搜索 |
| Cookies | 带域名、过期时间和值的 HTTP Cookie |
| Web Data | 自动填充条目、已保存的信用卡 |
| Login Data | 已保存的用户名/密码(已加密) |
| Bookmarks | JSON 格式的书签树 |
| Preferences | 浏览器配置和扩展 |
| Local Storage/ | 每个域名的 HTML5 本地存储 |
| Session Storage/ | 每个域名的会话专属存储 |
| Network Action Predictor | 之前输入过的 URL |
| Shortcuts | 地址栏快捷方式和预测 |
| Top Sites | 常访问的网站 |
## 运行 Hindsight
### 命令行
```bash
# 基本的 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
```
### Web 界面
```bash
# 启动 Hindsight Web 界面
hindsight_gui.exe
# 访问 http://localhost:8080
# 上传或指向浏览器配置文件目录
# 配置输出格式和分析选项
# 生成并下载报告
```
## 痕迹分析详情
### URL 历史与访问记录
```sql
-- 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')
```
### 下载历史
```sql
-- 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
```
### Cookie 分析
```sql
-- 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 分析脚本
```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):
"""Convert Chrome timestamp to 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:
"""Analyze Chrome History database for forensic evidence."""
history_db = os.path.join(profile_path, "History")
if not os.path.exists(history_db):
return {"error": "History database not found"}
os.makedirs(output_dir, exist_ok=True)
conn = sqlite3.connect(f"file:{history_db}?mode=ro", uri=True)
# URL visits with timestamps
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()]
# Keyword searches
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("Usage: python process.py <chrome_profile_path> <output_dir>")
sys.exit(1)
analyze_chrome_history(sys.argv[1], sys.argv[2])
if __name__ == "__main__":
main()
```
## 参考资料
- Hindsight GitHub: https://github.com/obsidianforensics/hindsight
- Chrome 取证指南: https://allenace.medium.com/hindsight-chrome-forensics-made-simple-425db99fa5ed
- 浏览器取证工具: https://www.cyberforensicacademy.com/blog/browser-forensics-tools-how-to-extract-user-activity
- Chromium 源码 (History): https://source.chromium.org/chromium/chromium/src/+/main:components/history/Related Skills
performing-sqlite-database-forensics
对 SQLite 数据库执行取证分析,从空闲列表(Freelist)和 WAL 文件中恢复已删除记录,解码编码时间戳,并从浏览器历史、即时通讯应用和移动设备数据库中提取证据。
performing-network-forensics-with-wireshark
使用 Wireshark 和 tshark 捕获并分析网络流量,重建网络事件、提取制品并识别恶意通信。
performing-mobile-device-forensics-with-cellebrite
使用 Cellebrite UFED 和开源工具获取和分析移动设备数据,提取通信记录、位置数据和应用程序制品。
performing-memory-forensics-with-volatility3
使用 Volatility 3 分析易失性内存转储,以提取运行中的进程、网络连接、加载的模块以及恶意活动的证据。
performing-memory-forensics-with-volatility3-plugins
使用 Volatility3 插件分析内存转储,检测 Windows、Linux 和 macOS 内存镜像中的注入代码、Rootkit、凭据窃取和恶意软件痕迹。
performing-linux-log-forensics-investigation
对 Linux 系统日志(包括 syslog、auth.log、systemd journal、kern.log 和应用程序日志)进行取证调查,以重建用户活动、检测未授权访问并在被入侵的 Linux 系统上建立事件时间线。
performing-endpoint-forensics-investigation
对受损端点执行数字取证调查,包括内存获取、磁盘镜像、工件分析和时间线重建。 适用于调查安全事件、为法律诉讼收集证据或分析端点受损范围的场景。 适用于涉及端点取证、内存分析、磁盘取证或事件调查的请求。
performing-disk-forensics-investigation
使用取证镜像、文件系统分析、产物恢复和时间线重建进行磁盘取证调查,以支持事件响应案例。 使用 FTK Imager、Autopsy 和 The Sleuth Kit 等工具进行证据采集、已删除文件恢复和产物检查。 适用于磁盘取证、硬盘分析、取证镜像、文件恢复、证据采集或数字取证调查等请求场景。
performing-cloud-native-forensics-with-falco
使用 Falco YAML 规则在容器和 Kubernetes 中进行运行时威胁检测,监控系统调用以检测 shell 生成、文件篡改、网络异常和权限提升。通过 Falco gRPC API 管理 Falco 规则并解析 Falco 告警输出。适用于构建容器运行时安全或调查 k8s 集群入侵。
performing-cloud-forensics-with-aws-cloudtrail
使用 CloudTrail 日志对 AWS 环境执行取证调查,重建攻击者活动、识别受损凭据并分析 API 调用模式。
performing-cloud-forensics-investigation
通过收集和分析来自 AWS、Azure 和 GCP 服务的日志、快照和元数据,在云环境中开展取证调查。
extracting-browser-history-artifacts
从 Chrome、Firefox 和 Edge 中提取并分析浏览器历史记录、Cookie、缓存、下载记录和书签,以获取用户网络活动的取证证据。