Hacktricks-skills browser-forensics

How to extract and analyze browser artifacts for forensic investigations. Use this skill whenever investigating browser history, recovering deleted browsing data, analyzing cookies, extracting login credentials, examining cache data, or analyzing any web browser artifacts on Windows, Linux, or macOS systems. Make sure to use this skill for any incident response, digital forensics, or security investigation involving web browsers.

install
source · Clone the upstream repo
git clone https://github.com/abelrguezr/hacktricks-skills
manifest: skills/generic-methodologies-and-resources/basic-forensic-methodology/specific-software-file-type-tricks/browser-artifacts/SKILL.MD
source content

Browser Forensics

A comprehensive guide to extracting and analyzing browser artifacts across all major browsers and operating systems.

Quick Reference

BrowserPrimary Data FormatKey Files
FirefoxSQLiteplaces.sqlite, cookies.sqlite, logins.json
ChromeSQLiteHistory, Cookies, Login Data, Web Data
EdgeESE/SQLiteWebCacheV01.dat, spartan.edb
SafariSQLite/PLISTHistory.db, Bookmarks.plist
OperaSQLiteSame as Chrome
IE11ESEWebCacheVX.data, TypedURLs registry

Artifact Types

  • Navigation History: User visits to websites
  • Autocomplete Data: Search suggestions
  • Bookmarks: Saved sites
  • Extensions/Add-ons: Installed browser plugins
  • Cache: Stored web content (images, JS files)
  • Logins: Stored credentials
  • Favicons: Website icons
  • Sessions: Open browser sessions
  • Downloads: Downloaded file records
  • Form Data: Autofill information
  • Thumbnails: Website preview images
  • Custom Dictionary: User-added words

Firefox

Profile Locations

OSPath
Linux
~/.mozilla/firefox/
macOS
/Users/$USER/Library/Application Support/Firefox/Profiles/
Windows
%userprofile%\AppData\Roaming\Mozilla\Firefox\Profiles\

Profile Discovery

# Find Firefox profiles
cat ~/.mozilla/firefox/profiles.ini | grep -E "^(Path|Default)="

Key Files in Profile Directory

FilePurposeAnalysis Tool
places.sqliteHistory, bookmarks, downloadssqlite3, BrowsingHistoryView
cookies.sqliteCookie storageMZCookiesView
formhistory.sqliteWeb form datasqlite3
logins.jsonEncrypted credentialsfirefox_decrypt
key4.db / key3.dbEncryption keysfirefox_decrypt
favicons.sqliteWebsite iconssqlite3
prefs.jsUser settingsgrep, cat
addons.jsonExtension infocat, jq
cache2/entriesCache dataMozillaCacheView
persdict.datCustom dictionarycat

Common Queries

# Extract browsing history
sqlite3 places.sqlite "SELECT datetime(visit_date/1000000000, 'unixepoch'), url FROM moz_historyvisits h JOIN moz_places p ON h.place_id = p.id ORDER BY visit_date DESC LIMIT 100;"

# Extract downloads
sqlite3 places.sqlite "SELECT datetime(last_modified_date/1000000000, 'unixepoch'), url, filename FROM moz_downloads;"

# Check anti-phishing settings
grep 'browser.safebrowsing' prefs.js

Password Decryption

# Install firefox_decrypt
pip install firefox_decrypt

# Decrypt saved passwords
firefox_decrypt --profile /path/to/profile

# Brute force master password
./scripts/firefox-brute.sh /path/to/passwords.txt /path/to/profile

Google Chrome

Profile Locations

OSPath
Linux
~/.config/google-chrome/
macOS
/Users/$USER/Library/Application Support/Google/Chrome/
Windows
C:\Users\XXX\AppData\Local\Google\Chrome\User Data\

Profile Structure

Profiles are in

Default/
,
Profile 1/
,
Profile 2/
, etc. within the User Data directory.

Key Files

FilePurposeAnalysis Tool
HistoryURLs, downloads, searchesChromeHistoryView, sqlite3
CookiesCookie storageChromeCookiesView, sqlite3
CacheCached dataChromeCacheView
BookmarksSaved sitescat, jq
Web DataForm historysqlite3
Login DataCredentialsChromePasswordView, sqlite3
PreferencesSettings, extensionscat, jq, grep
Current SessionActive tabscat, jq
Last SessionPrevious sessioncat, jq
ThumbnailsWebsite previewscat

Common Queries

# Extract browsing history
sqlite3 History "SELECT datetime(last_visit_time/1000000-11644473600, 'unixepoch'), url, title FROM urls ORDER BY last_visit_time DESC LIMIT 100;"

# Extract downloads
sqlite3 History "SELECT datetime(last_visit_time/1000000-11644473600, 'unixepoch'), url, filename FROM downloads;"

# Check anti-phishing settings
grep 'safebrowsing' ~/Library/Application\ Support/Google/Chrome/Default/Preferences

Transition Types (History)

TypeMeaning
0LINK
1TYPED
2AUTO_BOOKMARK
3AUTO_SUBFRAME
4FORM_SUBMIT
5AUTO_TILED
6DOWNLOAD
7MANUALLY_CREATED
8GENERATED
9EXTERNAL
10START_PAGE
11RELOAD

Microsoft Edge

Data Locations

Data TypePath
Profile
C:\Users\XX\AppData\Local\Packages\Microsoft.MicrosoftEdge_XXX\AC
History/Cookies/Downloads
C:\Users\XX\AppData\Local\Microsoft\Windows\WebCache\WebCacheV01.dat
Settings/Bookmarks
C:\Users\XX\AppData\Local\Packages\Microsoft.MicrosoftEdge_XXX\AC\MicrosoftEdge\User\Default\DataStore\Data\nouser1\XXX\DBStore\spartan.edb
Cache
C:\Users\XXX\AppData\Local\Packages\Microsoft.MicrosoftEdge_XXX\AC#!XXX\MicrosoftEdge\Cache
Last Session
C:\Users\XX\AppData\Local\Packages\Microsoft.MicrosoftEdge_XXX\AC\MicrosoftEdge\User\Default\Recovery\Active

Analysis Tools

  • ESEDatabaseView: For WebCacheV01.dat and spartan.edb
  • IECacheView: For cache inspection

Safari (macOS)

Data Location

/Users/$User/Library/Safari/

Key Files

FilePurposeAnalysis Tool
History.dbBrowsing historysqlite3
Downloads.plistDownload recordsplutil
Bookmarks.plistSaved bookmarksplutil
TopSites.plistFrequent sitesplutil
Extensions.plistBrowser extensionsplutil, pluginkit
UserNotificationPermissions.plistNotification permissionsplutil
LastSession.plistPrevious session tabsplutil

Common Queries

# Extract browsing history
sqlite3 History.db "SELECT datetime(visit_time+978307200, 'unixepoch'), url FROM history_visits v JOIN history_items i ON v.history_item = i.id ORDER BY visit_time DESC LIMIT 100;"

# Check anti-phishing settings
defaults read com.apple.Safari WarnAboutFraudulentWebsites
# Returns 1 if enabled

Opera

Data Location

/Users/$USER/Library/Application Support/com.operasoftware.Opera/

Opera uses the same SQLite format as Chrome for history and downloads.

Anti-Phishing Check

grep 'fraud_protection_enabled' Preferences
# Look for "true" value

Internet Explorer 11

Data Locations

Data TypePath
Metadata
%userprofile%\Appdata\Local\Microsoft\Windows\WebCache\WebcacheVX.data
Cache
%userprofile%\Appdata\Local\Microsoft\Windows\Temporary Internet Files\
Cookies
%userprofile%\Appdata\Roaming\Microsoft\Windows\Cookies
Downloads
%userprofile%\Appdata\Roaming\Microsoft\Windows\IEDownloadHistory
History
%userprofile%\Appdata\Local\Microsoft\Windows\History
Typed URLsRegistry:
NTUSER.DAT\Software\Microsoft\InternetExplorer\TypedURLs

Analysis Tools

  • ESEDatabaseView: For WebCacheVX.data
  • IECacheView: For cache inspection
  • IECookiesView: For cookies
  • BrowsingHistoryView: For history
  • photorec: For deleted data recovery

Registry Queries

# Extract typed URLs
reg query "HKCU\Software\Microsoft\Internet Explorer\TypedURLs"
reg query "HKCU\Software\Microsoft\Internet Explorer\TypedURLsTime"

SQLite Recovery

Both Chrome and Firefox use SQLite databases. Deleted entries can be recovered using:

# Recover deleted records
python sqlparse.py -i places.sqlite -o recovered_records.txt

Recommended Tools

ToolPurposePlatform
BrowsingHistoryViewHistory analysisWindows
ChromeHistoryViewChrome historyWindows
IECacheViewIE cacheWindows
MZCookiesViewFirefox cookiesWindows
ChromeCookiesViewChrome cookiesWindows
ESEDatabaseViewESE database inspectionWindows
firefox_decryptPassword decryptionCross-platform
sqlparseSQLite recoveryCross-platform

Workflow Recommendations

  1. Identify the browser and OS from the investigation context
  2. Locate profile directories using the paths above
  3. Extract SQLite databases to a working directory (don't modify originals)
  4. Query databases for relevant artifacts
  5. Check anti-phishing settings to understand security posture
  6. Recover deleted data using sqlparse if needed
  7. Decrypt credentials using appropriate tools
  8. Document findings with timestamps and sources

Scripts

Use the bundled scripts for common tasks:

  • scripts/extract-browser-history.sh
    - Extract history from any browser
  • scripts/check-antiphishing.sh
    - Check anti-phishing across all browsers
  • scripts/firefox-brute.sh
    - Brute force Firefox master password

Run with

--help
for usage information.