Extracting Browser History Artifacts
When to Use
- When investigating user web activity as part of a forensic examination
- During insider threat investigations to establish patterns of data exfiltration
- When tracing user visits to malicious or policy-violating websites
- For correlating browser activity with other forensic artifacts and timelines
- When investigating phishing attacks to identify which links were clicked
Prerequisites
- Forensic image or access to user profile directories
- SQLite3 for querying browser databases
- Hindsight, BrowsingHistoryView, or DB Browser for SQLite
- Knowledge of browser artifact file locations per OS
- Python 3 with sqlite3 module for automated extraction
- Understanding of Chrome, Firefox, and Edge storage formats
Workflow
Step 1: Locate Browser Artifact Files
# Mount forensic image
mount -o ro,loop,offset=$((2048*512)) /cases/case-2024-001/images/evidence.dd /mnt/evidence
# Chrome artifact locations (Windows)
CHROME_WIN="/mnt/evidence/Users/suspect/AppData/Local/Google/Chrome/User Data/Default"
# Key files: History, Cookies, Login Data, Web Data, Bookmarks, Preferences,
# Cache/, GPUCache/, Local Storage/, Session Storage/, IndexedDB/
# Firefox artifact locations (Windows)
FIREFOX_WIN="/mnt/evidence/Users/suspect/AppData/Roaming/Mozilla/Firefox/Profiles/*.default-release"
# Key files: places.sqlite, cookies.sqlite, formhistory.sqlite, logins.json,
# key4.db, sessionstore.jsonlz4, webappsstore.sqlite
# Edge (Chromium) artifact locations (Windows)
EDGE_WIN="/mnt/evidence/Users/suspect/AppData/Local/Microsoft/Edge/User Data/Default"
# Copy artifacts to working directory
mkdir -p /cases/case-2024-001/browser/{chrome,firefox,edge}
cp -r "$CHROME_WIN"/{History,Cookies,Downloads,"Login Data","Web Data",Bookmarks} \
/cases/case-2024-001/browser/chrome/ 2>/dev/null
cp -r $FIREFOX_WIN/{places.sqlite,cookies.sqlite,formhistory.sqlite,logins.json} \
/cases/case-2024-001/browser/firefox/ 2>/dev/null
cp -r "$EDGE_WIN"/{History,Cookies,Downloads} \
/cases/case-2024-001/browser/edge/ 2>/dev/null
# Hash artifacts for integrity
find /cases/case-2024-001/browser/ -type f -exec sha256sum {} \; \
> /cases/case-2024-001/browser/artifact_hashes.txt
Step 2: Extract Chrome Browsing History and Downloads
# Query Chrome History database
sqlite3 /cases/case-2024-001/browser/chrome/History << 'SQL'
.headers on
.mode csv
.output /cases/case-2024-001/analysis/chrome_history.csv
SELECT
urls.url,
urls.title,
datetime(urls.last_visit_time/1000000-11644473600, 'unixepoch') AS last_visit,
urls.visit_count,
urls.typed_count,
visits.transition & 0xFF AS transition_type
FROM urls
LEFT JOIN visits ON urls.id = visits.url
ORDER BY urls.last_visit_time DESC;
SQL
# Extract Chrome downloads
sqlite3 /cases/case-2024-001/browser/chrome/History << 'SQL'
.headers on
.mode csv
.output /cases/case-2024-001/analysis/chrome_downloads.csv
SELECT
current_path,
tab_url AS source_url,
total_bytes,
datetime(start_time/1000000-11644473600, 'unixepoch') AS start_time,
datetime(end_time/1000000-11644473600, 'unixepoch') AS end_time,
state,
danger_type,
mime_type
FROM downloads
ORDER BY start_time DESC;
SQL
# Extract Chrome search terms
sqlite3 /cases/case-2024-001/browser/chrome/History << 'SQL'
.headers on
.mode csv
.output /cases/case-2024-001/analysis/chrome_searches.csv
SELECT
term,
urls.url,
datetime(urls.last_visit_time/1000000-11644473600, 'unixepoch') AS search_time
FROM keyword_search_terms
JOIN urls ON keyword_search_terms.url_id = urls.id
ORDER BY urls.last_visit_time DESC;
SQL
Step 3: Extract Firefox Browsing History
> 📎 Detailed content (full examples / references / data tables) has been split into `reference.md` in the same directory; use Read to load the relevant section on demand.
1---2name: extracting-browser-history-artifacts3description: "Extract and analyze browser history, cookies, cache, downloads, and related artifacts. Signals: local credentials, browser theft, Chrome password."4zh-signals: "Extracts and analyzes browser history, cookies, cache, downloads, and 信号:本地凭据,浏览器窃取,chrome密码。"5when-to-use: Extracts and analyzes browser history, cookies, cache, downloads, and6 bookmarks from Chrome, Firefox, and Edge using sqlite3, DB Browser for SQLite,7 Hindsight, and NirSoft tools (BrowsingHistoryView, ChromeCacheView, MZCacheView).8 Use when performing digital forensics or incident response on a disk image or9 live system and you need timeline evidence of a user's web activity.10domain: cybersecurity11subdomain: digital-forensics12tags:13- forensics14- browser-forensics15- chrome16- firefox17- edge18- web-history19- artifact-extraction20version: '1.0'21author: mahipal22license: Apache-2.023nist_csf:24- RS.AN-0325- DE.AE-0226- RS.MA-0127mitre_attack:28- T100529- T107430- T111931- T107032- T105933metadata:34 source: https://skillmd.com/skills/dangeroussong/extracting-browser-history-artifacts35---3637# Extracting Browser History Artifacts3839## When to Use40- When investigating user web activity as part of a forensic examination41- During insider threat investigations to establish patterns of data exfiltration42- When tracing user visits to malicious or policy-violating websites43- For correlating browser activity with other forensic artifacts and timelines44- When investigating phishing attacks to identify which links were clicked4546## Prerequisites47- Forensic image or access to user profile directories48- SQLite3 for querying browser databases49- Hindsight, BrowsingHistoryView, or DB Browser for SQLite50- Knowledge of browser artifact file locations per OS51- Python 3 with sqlite3 module for automated extraction52- Understanding of Chrome, Firefox, and Edge storage formats5354## Workflow5556### Step 1: Locate Browser Artifact Files5758```bash59# Mount forensic image60mount -o ro,loop,offset=$((2048*512)) /cases/case-2024-001/images/evidence.dd /mnt/evidence6162# Chrome artifact locations (Windows)63CHROME_WIN="/mnt/evidence/Users/suspect/AppData/Local/Google/Chrome/User Data/Default"64# Key files: History, Cookies, Login Data, Web Data, Bookmarks, Preferences,65# Cache/, GPUCache/, Local Storage/, Session Storage/, IndexedDB/6667# Firefox artifact locations (Windows)68FIREFOX_WIN="/mnt/evidence/Users/suspect/AppData/Roaming/Mozilla/Firefox/Profiles/*.default-release"69# Key files: places.sqlite, cookies.sqlite, formhistory.sqlite, logins.json,70# key4.db, sessionstore.jsonlz4, webappsstore.sqlite7172# Edge (Chromium) artifact locations (Windows)73EDGE_WIN="/mnt/evidence/Users/suspect/AppData/Local/Microsoft/Edge/User Data/Default"7475# Copy artifacts to working directory76mkdir -p /cases/case-2024-001/browser/{chrome,firefox,edge}77cp -r "$CHROME_WIN"/{History,Cookies,Downloads,"Login Data","Web Data",Bookmarks} \78 /cases/case-2024-001/browser/chrome/ 2>/dev/null79cp -r $FIREFOX_WIN/{places.sqlite,cookies.sqlite,formhistory.sqlite,logins.json} \80 /cases/case-2024-001/browser/firefox/ 2>/dev/null81cp -r "$EDGE_WIN"/{History,Cookies,Downloads} \82 /cases/case-2024-001/browser/edge/ 2>/dev/null8384# Hash artifacts for integrity85find /cases/case-2024-001/browser/ -type f -exec sha256sum {} \; \86 > /cases/case-2024-001/browser/artifact_hashes.txt87```8889### Step 2: Extract Chrome Browsing History and Downloads9091```bash92# Query Chrome History database93sqlite3 /cases/case-2024-001/browser/chrome/History << 'SQL'94.headers on95.mode csv96.output /cases/case-2024-001/analysis/chrome_history.csv9798SELECT99 urls.url,100 urls.title,101 datetime(urls.last_visit_time/1000000-11644473600, 'unixepoch') AS last_visit,102 urls.visit_count,103 urls.typed_count,104 visits.transition & 0xFF AS transition_type105FROM urls106LEFT JOIN visits ON urls.id = visits.url107ORDER BY urls.last_visit_time DESC;108SQL109110# Extract Chrome downloads111sqlite3 /cases/case-2024-001/browser/chrome/History << 'SQL'112.headers on113.mode csv114.output /cases/case-2024-001/analysis/chrome_downloads.csv115116SELECT117 current_path,118 tab_url AS source_url,119 total_bytes,120 datetime(start_time/1000000-11644473600, 'unixepoch') AS start_time,121 datetime(end_time/1000000-11644473600, 'unixepoch') AS end_time,122 state,123 danger_type,124 mime_type125FROM downloads126ORDER BY start_time DESC;127SQL128129# Extract Chrome search terms130sqlite3 /cases/case-2024-001/browser/chrome/History << 'SQL'131.headers on132.mode csv133.output /cases/case-2024-001/analysis/chrome_searches.csv134135SELECT136 term,137 urls.url,138 datetime(urls.last_visit_time/1000000-11644473600, 'unixepoch') AS search_time139FROM keyword_search_terms140JOIN urls ON keyword_search_terms.url_id = urls.id141ORDER BY urls.last_visit_time DESC;142SQL143```144145### Step 3: Extract Firefox Browsing History146147```bash148149> 📎 Detailed content (full examples / references / data tables) has been split into `reference.md` in the same directory; use Read to load the relevant section on demand.