Difference between pages "Prefetch" and "Google Chrome"

From ForensicsWiki
(Difference between pages)
Jump to: navigation, search
 
(Extension Cookies)
 
Line 1: Line 1:
{{Expand}}
+
Google Chrome is a [[Web Browser|web browser]] developed by Google Inc.
Windows Prefetch files, introduced in [[Windows|Windows XP]], are designed to speed up the application startup process. Prefetch files contain the name of the executable, a Unicode list of DLLs used by that executable, a count of how many times the executable has been run, and a timestamp indicating the last time the program was run. Although Prefetch is present in Windows 2003, by default it is only enabled for boot prefetching. The feature is also found in [[Windows|Windows Vista]], where it has been augmented with [[SuperFetch]], [[ReadyBoot]], and [[ReadyBoost]]. For SSD drives Prefetch is disabled by default [http://blogs.msdn.com/b/e7/archive/2009/05/05/support-and-q-a-for-solid-state-drives-and.aspx].
+
  
The Prefetch files are stored in the directory:
+
== Configuration ==
 +
The Google Chrome configuration can be found in the '''Preferences''' file.
 +
 
 +
On Linux
 
<pre>
 
<pre>
%SystemRoot%\Prefetch
+
/home/$USER/.config/google-chrome/Default/Preferences
 
</pre>
 
</pre>
  
The following files can be found in the Prefetch directory:
+
On MacOS-X
* <tt>*.pf</tt>, which are Prefetch files;
+
<pre>
* <tt>Ag*.db</tt> and <tt>Ag*.db.trx</tt>, which are [[SuperFetch]] files;
+
/Users/$USER/Library/Application Support/Google/Chrome/Default/Preferences
* <tt>Layout.ini</tt>;
+
</pre>
* <tt>PfPre_*.db</tt>;
+
* <tt>PfSvPerfStats.bin</tt>
+
  
From [http://msdn.microsoft.com/en-us/library/windows/hardware/dn653317(v=vs.85).aspx]:
+
On Windows XP
* [[SuperFetch]]; analyzes per-machine usage patterns over time and optimizes the data that is kept in memory.
+
<pre>
* [[ReadyBoot]]; decreases boot time (the time from turning power on to reaching the log-on screen) by preloading the files and startup programs needed per-machine into a cache.
+
C:\Documents and Settings\%USERNAME%\Local Settings\Application Data\Google\Chrome\User Data\Default\Preferences
* [[ReadyBoost]]; supports the use of flash storage devices like Universal Serial Bus (USB) flash drives and Secure Digital (SD) flash cards to boost PC performance.
+
</pre>
* [[ReadyDrive]]; supports hybrid hard disk drives.
+
  
A Prefetch file contains the name of the application, a dash, and then an eight character hash of the location from which that application was run, and a <tt>.pf</tt> extension. The filenames should be all uppercase except for the extension. E.g. a filename for [[md5deep]] would look like: <tt>MD5DEEP.EXE-4F89AB0C.pf</tt>. If an application is run from two different locations on the drive (i.e. the user runs <tt>C:\md5deep.exe</tt> and then <tt>C:\Apps\Hashing\md5deep.exe</tt>), there will be two different prefetch files in the Prefetch folder. According to MSDN up to 128 Prefetch files can be stored in the Prefetch directory [http://blogs.msdn.com/ryanmy/archive/2005/05/25/421882.aspx].
+
On Windows Vista and later
 +
<pre>
 +
C:\Users\%USERNAME%\AppData\Local\Google\Chrome\User Data\Default\Preferences
 +
</pre>
  
== File format ==
+
Or for '''Chromium'''
Each Prefetch file has a 4-byte signature (at offset 4) "SCCA" (or in hexadecimal notation 0x53 0x43 0x43 0x41). The signature is assumed to be preceded by a 4-byte format version indicator:
+
* 17 (0x00000011) for [[Windows XP]] and [[Windows 2003]]
+
* 23 (0x00000017) for [[Windows Vista]], [[Windows 2008]], [[Windows 7]] and [[Windows 2012]] (note Windows 2012 has not been confirmed)
+
* 26 (0x0000001a) for [[Windows 8|Windows 8.1]] (note this could be Windows 8 as well but has not been confirmed)
+
  
For more information about the file format see: [[Windows Prefetch File Format]]
+
On Linux
 +
<pre>
 +
/home/$USER/.config/chromium/Default/Preferences
 +
</pre>
  
== Metadata ==
+
On MacOS-X
The Prefetch file contains various metadata.
+
<pre>
* The executable's name, up to 29 characters.
+
/Users/$USER/Library/Application Support/Chromium/Default/Preferences
* The run count, or number of times the application has been run.
+
</pre>
* Volume related information, like volume path and volume serial number.
+
* The size of the Prefetch file (sometimes referred to as end of file (EOF)).
+
* The files and directories that were used doing the application's start-up.
+
  
=== Timestamps ===
+
On Windows XP
The Prefetch file contains 2 types of timestamps
+
<pre>
* The time when the application was last ran (executed). Version 26 of the Prefetch format maintains 7 previous last run times.
+
C:\Documents and Settings\%USERNAME%\Local Settings\Application Data\Chromium\User Data\Default\Preferences
* The volume creation time (part of the volume information) of the volume the Prefetch file was created on.
+
</pre>
 +
 
 +
On Windows Vista and later
 +
<pre>
 +
C:\Users\%USERNAME%\AppData\Local\Chromium\User Data\Default\Preferences
 +
</pre>
 +
 
 +
=== Plugins ===
  
The file system creation time of the Prefetch file indicates the first time the application was executed. Both the file system modification time of the Prefetch file and the embedded last run time indicate the last time the application was executed.
+
Information about plugins can be found under the "plugins section" of the Preferences file.
  
== Prefetch hash ==
+
=== DNS Prefetching ===
There are multiple known hashing functions to be used for prefetch file filename hashing, namely:
+
* SCCA XP hash function; used on Windows XP and Windows 2003
+
* SCCA Vista hash function; used on Windows Vista
+
* SCCA 2008 hash function; used on Windows 2008, Windows 7, (possibly: Windows 2012) and Windows 8 (including 8.1)
+
  
=== SCCA XP hash function ===
+
DNS is prefetched for related sites, e.g. links on the page.
A Python implementation of the SCCA XP hash function:
+
This behavior is controlled by the setting "Predict network actions to improve page load performance", which is enabled by default.
  
 +
If enabled the Preferences file contains:
 
<pre>
 
<pre>
def ssca_xp_hash_function(filename):
+
  "dns_prefetching": {
    hash_value = 0
+
      "enabled": true,
    for character in filename:
+
</pre>
        hash_value = ((hash_value * 37) + ord(character)) % 0x100000000
+
        hash_value = (hash_value * 314159269) % 0x100000000
+
        if hash_value > 0x80000000:
+
            hash_value = 0x100000000 - hash_value
+
  
    return (abs(hash_value) % 1000000007) % 0x100000000
+
If disabled the Preferences file contains:
 +
<pre>
 +
  "dns_prefetching": {
 +
      "enabled": false,
 
</pre>
 
</pre>
  
=== SCCA Vista hash function ===
+
== Start-up DNS queries ==
A Python implementation of the SCCA Vista hash function:
+
  
 +
When Chrome starts it queries for several non-existing hostnames that consists of a 10 random characters, E.g.
 
<pre>
 
<pre>
def ssca_vista_hash_function(filename):
+
ttrgoiknff.mydomain.com
    hash_value = 314159
+
bxjhgftsyu.mydomain.com
    for character in filename:
+
yokjbjiagd.mydomain.com
        hash_value = ((hash_value * 37) + ord(character)) % 0x100000000
+
    return hash_value
+
 
</pre>
 
</pre>
  
=== SCCA 2008 hash function ===
+
This is used to determine if your ISP is hijacking NXDOMAIN results [http://www.google.com/support/forum/p/Chrome/thread?tid=3511015c72a7b314&hl=en].
A Python implementation of the SCCA 2008 hash function:
+
  
 +
== Disk Cache ==
 +
Google Chrome uses multiple caches, from [http://src.chromium.org/viewvc/chrome/trunk/src/net/base/cache_type.h?view=markup]:
 
<pre>
 
<pre>
def ssca_2008_hash_function(filename):
+
// The types of caches that can be created.
     hash_value = 314159
+
enum CacheType {
     filename_index = 0
+
     DISK_CACHE,  // Disk is used as the backing storage.
     filename_length = len(filename)
+
     MEMORY_CACHE,  // Data is stored only in memory.
     while filename_index + 8 < filename_length:
+
     MEDIA_CACHE,  // Optimized to handle media files.
        character_value = ord(filename[filename_index + 1]) * 37
+
     APP_CACHE,  // Backing store for an AppCache.
        character_value += ord(filename[filename_index + 2])
+
    SHADER_CACHE, // Backing store for the GL shader cache.
        character_value *= 37
+
    PNACL_CACHE, // Backing store the PNaCl translation cache
        character_value += ord(filename[filename_index + 3])
+
};
        character_value *= 37
+
</pre>
        character_value += ord(filename[filename_index + 4])
+
        character_value *= 37
+
        character_value += ord(filename[filename_index + 5])
+
        character_value *= 37
+
        character_value += ord(filename[filename_index + 6])
+
        character_value *= 37
+
        character_value += ord(filename[filename_index]) * 442596621
+
        character_value += ord(filename[filename_index + 7])
+
        hash_value = ((character_value - (hash_value * 803794207)) % 0x100000000)
+
        filename_index += 8
+
  
    while filename_index < filename_length:  
+
The Google Chrome disk cache can be found in:
      hash_value = (((37 * hash_value) + ord(filename[filename_index])) % 0x100000000)
+
      filename_index += 1
+
  
    return hash_value
+
On Linux
 +
 
 +
<pre>
 +
/home/$USER/.cache/chromium/Default/Cache/
 +
/home/$USER/.cache/google-chrome/Default/Cache/
 +
/home/$USER/.config/chromium/Default/Cache/
 +
/home/$USER/.config/google-chrome/Default/Cache/
 
</pre>
 
</pre>
  
== Registry Keys ==
 
 
<pre>
 
<pre>
Key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters
+
/home/$USER/.cache/chromium/Default/Media Cache/
 +
/home/$USER/.cache/google-chrome/Default/Media Cache/
 +
/home/$USER/.config/chromium/Default/Media Cache/
 +
/home/$USER/.config/google-chrome/Default/Media Cache/
 
</pre>
 
</pre>
  
The EnablePrefetcher Registry value can be used to disable prefetch.
+
<pre>
 +
/home/$USER/.config/chromium/Default/Application Cache/Cache/
 +
/home/$USER/.config/google-chrome/Default/Application Cache/Cache/
 +
</pre>
  
== See Also ==
+
<pre>
* [[Prefetch XML]]
+
/home/$USER/.config/chromium/Default/GPUCache/
* [[ReadyBoot]]
+
/home/$USER/.config/google-chrome/Default/GPUCache/
* [[SuperFetch]]
+
</pre>
* [[Windows]]
+
* [[Windows Prefetch File Format]]
+
  
== External Links ==
+
<pre>
* [http://msdn.microsoft.com/msdnmag/issues/01/12/XPKernel/default.aspx More detail from Microsoft]
+
/home/$USER/.cache/chromium/PnaclTranslationCache/
* [http://en.wikipedia.org/wiki/Prefetcher Wikipedia Prefetcher]
+
/home/$USER/.cache/google-chrome/PnaclTranslationCache/
* [http://msdn.microsoft.com/en-us/library/ms940847(v=winembedded.5).aspx MSDN: Disabling Prefetch]
+
</pre>
* [http://www.microsoft.com/whdc/driver/kernel/XP_kernel.mspx Kernel Enhancements for Windows XP], by [[Microsoft]], January 13, 2003 (Microsoft's description of Prefetch when Windows XP was introduced)
+
* [http://blogs.msdn.com/b/ryanmy/archive/2005/05/25/421882.aspx Misinformation and the The Prefetch Flag], MSDN Blogs, May 25, 2005
+
* [http://windowsir.blogspot.ch/2005/07/prefetch-file-metadata.html Prefetch file metadata], by [[Harlan Carvey]], July 13, 2005
+
* [http://windowsir.blogspot.ch/2006/04/prefetch-files-revisited.html Prefetch files, revisited], by [[Harlan Carvey]], April 13, 2006
+
* [http://blogs.msdn.com/b/e7/archive/2009/05/05/support-and-q-a-for-solid-state-drives-and.aspx Support and Q&A for Solid-State Drives], by Steven Sinofsky, May 5, 2009
+
* [http://computer-forensics.sans.org/blog/2009/08/05/de-mystifying-defrag-identifying-when-defrag-has-been-used-for-anti-forensics-part-1-windows-xp/ De-mystifying Defrag: Identifying When Defrag Has Been Used for Anti-Forensics (Part 1 - Windows XP)], by [[Chad Tilbury]], August 5, 2009
+
* [http://www.swiftforensics.com/2010/04/the-windows-prefetchfile.html Windows Prefetch File (old blog entry from 42 LLC)], by [[Yogesh Khatri]], April 14, 2010
+
* [http://msdn.microsoft.com/en-us/library/windows/hardware/dn653317(v=vs.85).aspx Windows PC Accelerators], by Microsoft, October 8, 2010
+
* [http://www.dfinews.com/articles/2010/12/decoding-prefetch-files-forensic-purposes-part-1 Decoding Prefetch Files for Forensic Purposes: Part 1], by [[Mark Wade]], December 8, 2010
+
* [http://crucialsecurityblog.harris.com/2011/04/11/prefetch-files-at-face-value/ Prefetch Files at Face Value], by [[Mark Wade]], April 11, 2011
+
* [http://kitrap08.blogspot.hk/2011/07/windows-logical-prefetcher.html Windows Logical Prefetcher], TTS blog, July 30, 2011 (article is in Russian)
+
* [http://labit.in/pliki-prefetch-w-windows/ Prefetch i niedokładny licznik] by Paweł Hałdrzyński, August 20, 2011 (article in Polish; uncertain about the year of publication)
+
* [http://windowsir.blogspot.ch/2012/03/prefetch-analysis-revisited.html Prefetch Analysis, Revisited], by [[Harlan Carvey]], March 8, 2012
+
* [http://windowsir.blogspot.ch/2012/03/prefetch-analysis-revisitedagain.html Prefetch Analysis, Revisited...Again...], by [[Harlan Carvey]], March 15, 2012
+
* [http://www.hexacorn.com/blog/2012/06/13/prefetch-hash-calculator-a-hash-lookup-table-xpvistaw7w2k3w2k8/ Prefetch Hash Calculator + a hash lookup table xp/vista/w7/w2k3/w2k8], Hexacorn blog, June 13, 2012
+
* [http://www.hexacorn.com/blog/2012/10/29/prefetch-file-names-and-unc-paths/ Prefetch file names and UNC paths], Hexacorn blog, October 29, 2012
+
* [http://journeyintoir.blogspot.ch/2012/12/ntosboot-prefetch-file.html NTOSBOOT Prefetch File], by [[Corey Harrell]], December 5, 2012
+
* [http://www.invoke-ir.com/2013/09/whats-new-in-prefetch-for-windows-8.html What's New in the Prefetch for Windows 8??], by Jared Atkinson, September 21, 2013
+
* [http://www.swiftforensics.com/2013/10/windows-prefetch-pf-files.html?m=1 Windows Prefetch (.PF) files], by [[Yogesh Khatri]], October 21, 2013
+
* [http://resources.infosecinstitute.com/windows-systems-artifacts-digital-forensics-part-iii-prefetch-files/ Windows Systems and Artifacts in Digital Forensics: Part III: Prefetch Files], by Ivan Dimov, November 21, 2013
+
* [http://i.imgur.com/riuljsK.jpg Prefetch 101 - a Windows 8 Prefetch file walkthrough], by Jared Atkinson, 2014
+
  
== Tools ==
+
On MacOS-X
 +
<pre>
 +
/Users/$USER/Caches/Chromium/Default/Cache/
 +
/Users/$USER/Caches/Google/Chrome/Default/Cache/
 +
</pre>
  
=== Commercial ===
+
On Windows XP
 +
<pre>
 +
C:\Documents and Settings\%USERNAME%\Local Settings\Application Data\Chromium\User Data\Cache\
 +
C:\Documents and Settings\%USERNAME%\Local Settings\Application Data\Google\Chrome\User Data\Cache\
 +
</pre>
  
=== Free - Non Open Source ===
+
On Windows Vista and later
* [http://www.woanware.co.uk/forensics/prefetchforensics.html PrefetchForensics], PrefetchForensics is an application to extract information from Windows Prefetch files
+
<pre>
* [http://redwolfcomputerforensics.com/index.php?option=com_content&task=view&id=42&Itemid=55 Prefetch-Parser], Parse the prefetch files and display information
+
C:\Users\%USERNAME%\AppData\Local\Google\Chromium\Default\Cache\
* [http://www.mitec.cz/wfa.html Windows File Analyzer] - Parses Prefetch files, thumbnail databases, shortcuts, index.dat files, and the recycle bin
+
C:\Users\%USERNAME%\AppData\Local\Google\Chrome\User Data\Default\Cache\
* [http://www.tzworks.net/prototype_page.php?proto_id=1 Windows Prefetch Parser (pf)], Free tool that can be run on Windows, Linux or Mac OS-X
+
</pre>
  
 +
The Chrome Cache contains different files with the following file names:
 +
* index
 +
* data_#; where # contains a decimal digit.
 +
* f_######; where # contains a hexadecimal digit.
 +
 +
For more info see Chrome developers site [http://www.chromium.org/developers/design-documents/network-stack/disk-cache].
 +
 +
== History ==
 +
Chrome stores the history of visited sites in a file named '''History'''. This file uses the [[SQLite database format]].
 +
 +
The '''History''' file can be found in same location as the '''Preferences''' file.
 +
 +
There is also '''Archived History''' that predates information in the '''History''' file.
 +
Note that the '''Archived History''' only contains visits.
 +
 +
=== Timestamps ===
 +
The '''History''' file uses the different timestamps.
 +
 +
==== visits.visit_time ====
 +
 +
The '''visits.visit_time''' is in (the number of) microseconds since January 1, 1601 UTC
 +
 +
Some Python code to do the conversion into human readable format:
 +
<pre>
 +
date_string = datetime.datetime( 1601, 1, 1 )
 +
            + datetime.timedelta( microseconds=timestamp )
 +
</pre>
 +
 +
Note that this timestamp is not the same as a Windows filetime which is (the number of) 100 nanoseconds since January 1, 1601 UTC
 +
 +
==== downloads.start_time ====
 +
 +
The '''downloads.start_time''' is in (the number of) seconds since January 1, 1970 UTC
 +
 +
Some Python code to do the conversion into human readable format:
 +
<pre>
 +
date_string = datetime.datetime( 1970, 1, 1 )
 +
            + datetime.timedelta( seconds=timestamp )
 +
</pre>
 +
 +
=== Example queries ===
 +
Some example queries:
 +
 +
To get an overview of the visited sites:
 +
<pre>
 +
SELECT datetime(((visits.visit_time/1000000)-11644473600), "unixepoch"), urls.url, urls.title FROM urls, visits WHERE urls.id = visits.url;
 +
</pre>
 +
 +
Note that the visit_time conversion looses precision.
 +
 +
To get an overview of the downloaded files:
 +
<pre>
 +
SELECT datetime(downloads.start_time, "unixepoch"), downloads.url, downloads.full_path, downloads.received_bytes, downloads.total_bytes FROM downloads;
 +
</pre>
 +
 +
How the information of the downloaded files is stored in the database can vary per version of Chrome as of version 26:
 +
<pre>
 +
SELECT datetime(((downloads.start_time/1000000)-11644473600), "unixepoch"), downloads.target_path, downloads_url_chains.url, downloads.received_bytes, downloads.total_bytes \
 +
FROM downloads, downloads_url_chains WHERE downloads.id = downloads_url_chains.id;
 +
</pre>
 +
 +
== Cookies ==
 +
Chrome stores the cookies in a file named '''Cookies'''. This file uses the [[SQLite database format]].
 +
 +
=== Extension Cookies ===
 +
Chrome stores the cookies used by extensions in a file named '''Extension Cookies'''. This file uses the [[SQLite database format]].
 +
 +
<pre>
 +
SELECT datetime(((cookies.creation_utc/1000000)-11644473600), "unixepoch"), cookies.host_key, cookies.name, cookies.value, cookies.path, \
 +
datetime(((cookies.expires_utc/1000000)-11644473600), "unixepoch"), cookies.secure, cookies.httponly, datetime(((cookies.last_access_utc/1000000)-11644473600), "unixepoch"), \
 +
cookies.has_expires, cookies.persistent, cookies.priority FROM cookies;
 +
</pre>
 +
 +
== See Also ==
 +
 +
* [[SQLite database format]]
 +
 +
== External Links ==
 +
* [http://en.wikipedia.org/wiki/Google_Chrome Wikipedia article on Google Chrome]
 +
* [http://www.chromium.org/user-experience/user-data-directory The Chromium Projects - User Data Directory]
 +
* [http://www.chromium.org/developers/design-documents/network-stack/disk-cache Chrome Disk Cache]
 +
* [http://www.google.com/support/forum/p/Chrome/thread?tid=3511015c72a7b314&hl=en Chrome support forum article random 10 character hostnames on startup]
 +
* [http://www.useragentstring.com/pages/Chrome/ Chrome User Agent strings]
 +
* [http://computer-forensics.sans.org/blog/2010/01/21/google-chrome-forensics/ Google Chrome Forensics] by [[Kristinn Guðjónsson]], January 21, 2010
 +
* [http://linuxsleuthing.blogspot.ch/2013/02/cashing-in-on-google-chrome-cache.html?m=1 Cashing in on the Google Chrome Cache], [[John Lehr]], February 24, 2013
 +
* [http://www.obsidianforensics.com/blog/history-index-files-removed-from-chrome/ History Index files removed from Chrome v30], by Ryan Benson, October 2, 2013
 +
* [https://hindsight-internet-history.googlecode.com/files/Evolution_of_Chrome_Databases.png Evolution of Chrome Databases], by Ryan Benson, November 12, 2013
 +
 +
== Tools ==
 
=== Open Source ===
 
=== Open Source ===
* [https://code.google.com/p/prefetch-tool/ prefetch-tool], Script to extract information from windows prefetch folder
+
* [https://code.google.com/p/hindsight-internet-history/ hindsight-internet-history]
* [http://bitbucket.cassidiancybersecurity.com/prefetch-parser prefetch-parser], Standalone Python tools that parses Windows prefetch files and extracts all known and forensically relevant artefacts contained.
+
  
[[Category:Windows]]
+
[[Category:Applications]]
 +
[[Category:Web Browsers]]

Revision as of 06:16, 30 April 2014

Google Chrome is a web browser developed by Google Inc.

Configuration

The Google Chrome configuration can be found in the Preferences file.

On Linux

/home/$USER/.config/google-chrome/Default/Preferences

On MacOS-X

/Users/$USER/Library/Application Support/Google/Chrome/Default/Preferences

On Windows XP

C:\Documents and Settings\%USERNAME%\Local Settings\Application Data\Google\Chrome\User Data\Default\Preferences

On Windows Vista and later

C:\Users\%USERNAME%\AppData\Local\Google\Chrome\User Data\Default\Preferences

Or for Chromium

On Linux

/home/$USER/.config/chromium/Default/Preferences

On MacOS-X

/Users/$USER/Library/Application Support/Chromium/Default/Preferences

On Windows XP

C:\Documents and Settings\%USERNAME%\Local Settings\Application Data\Chromium\User Data\Default\Preferences

On Windows Vista and later

C:\Users\%USERNAME%\AppData\Local\Chromium\User Data\Default\Preferences

Plugins

Information about plugins can be found under the "plugins section" of the Preferences file.

DNS Prefetching

DNS is prefetched for related sites, e.g. links on the page. This behavior is controlled by the setting "Predict network actions to improve page load performance", which is enabled by default.

If enabled the Preferences file contains:

   "dns_prefetching": {
      "enabled": true,

If disabled the Preferences file contains:

   "dns_prefetching": {
      "enabled": false,

Start-up DNS queries

When Chrome starts it queries for several non-existing hostnames that consists of a 10 random characters, E.g.

ttrgoiknff.mydomain.com
bxjhgftsyu.mydomain.com
yokjbjiagd.mydomain.com

This is used to determine if your ISP is hijacking NXDOMAIN results [1].

Disk Cache

Google Chrome uses multiple caches, from [2]:

// The types of caches that can be created.
enum CacheType {
    DISK_CACHE,  // Disk is used as the backing storage.
    MEMORY_CACHE,  // Data is stored only in memory.
    MEDIA_CACHE,  // Optimized to handle media files.
    APP_CACHE,  // Backing store for an AppCache.
    SHADER_CACHE, // Backing store for the GL shader cache.
    PNACL_CACHE, // Backing store the PNaCl translation cache
};

The Google Chrome disk cache can be found in:

On Linux

/home/$USER/.cache/chromium/Default/Cache/
/home/$USER/.cache/google-chrome/Default/Cache/
/home/$USER/.config/chromium/Default/Cache/
/home/$USER/.config/google-chrome/Default/Cache/
/home/$USER/.cache/chromium/Default/Media Cache/
/home/$USER/.cache/google-chrome/Default/Media Cache/
/home/$USER/.config/chromium/Default/Media Cache/
/home/$USER/.config/google-chrome/Default/Media Cache/
/home/$USER/.config/chromium/Default/Application Cache/Cache/
/home/$USER/.config/google-chrome/Default/Application Cache/Cache/
/home/$USER/.config/chromium/Default/GPUCache/
/home/$USER/.config/google-chrome/Default/GPUCache/
/home/$USER/.cache/chromium/PnaclTranslationCache/
/home/$USER/.cache/google-chrome/PnaclTranslationCache/

On MacOS-X

/Users/$USER/Caches/Chromium/Default/Cache/
/Users/$USER/Caches/Google/Chrome/Default/Cache/

On Windows XP

C:\Documents and Settings\%USERNAME%\Local Settings\Application Data\Chromium\User Data\Cache\
C:\Documents and Settings\%USERNAME%\Local Settings\Application Data\Google\Chrome\User Data\Cache\

On Windows Vista and later

C:\Users\%USERNAME%\AppData\Local\Google\Chromium\Default\Cache\
C:\Users\%USERNAME%\AppData\Local\Google\Chrome\User Data\Default\Cache\

The Chrome Cache contains different files with the following file names:

  • index
  • data_#; where # contains a decimal digit.
  • f_######; where # contains a hexadecimal digit.

For more info see Chrome developers site [3].

History

Chrome stores the history of visited sites in a file named History. This file uses the SQLite database format.

The History file can be found in same location as the Preferences file.

There is also Archived History that predates information in the History file. Note that the Archived History only contains visits.

Timestamps

The History file uses the different timestamps.

visits.visit_time

The visits.visit_time is in (the number of) microseconds since January 1, 1601 UTC

Some Python code to do the conversion into human readable format:

date_string = datetime.datetime( 1601, 1, 1 )
            + datetime.timedelta( microseconds=timestamp )

Note that this timestamp is not the same as a Windows filetime which is (the number of) 100 nanoseconds since January 1, 1601 UTC

downloads.start_time

The downloads.start_time is in (the number of) seconds since January 1, 1970 UTC

Some Python code to do the conversion into human readable format:

date_string = datetime.datetime( 1970, 1, 1 )
            + datetime.timedelta( seconds=timestamp )

Example queries

Some example queries:

To get an overview of the visited sites:

SELECT datetime(((visits.visit_time/1000000)-11644473600), "unixepoch"), urls.url, urls.title FROM urls, visits WHERE urls.id = visits.url;

Note that the visit_time conversion looses precision.

To get an overview of the downloaded files:

SELECT datetime(downloads.start_time, "unixepoch"), downloads.url, downloads.full_path, downloads.received_bytes, downloads.total_bytes FROM downloads;

How the information of the downloaded files is stored in the database can vary per version of Chrome as of version 26:

SELECT datetime(((downloads.start_time/1000000)-11644473600), "unixepoch"), downloads.target_path, downloads_url_chains.url, downloads.received_bytes, downloads.total_bytes \
FROM downloads, downloads_url_chains WHERE downloads.id = downloads_url_chains.id;

Cookies

Chrome stores the cookies in a file named Cookies. This file uses the SQLite database format.

Extension Cookies

Chrome stores the cookies used by extensions in a file named Extension Cookies. This file uses the SQLite database format.

SELECT datetime(((cookies.creation_utc/1000000)-11644473600), "unixepoch"), cookies.host_key, cookies.name, cookies.value, cookies.path, \
datetime(((cookies.expires_utc/1000000)-11644473600), "unixepoch"), cookies.secure, cookies.httponly, datetime(((cookies.last_access_utc/1000000)-11644473600), "unixepoch"), \
cookies.has_expires, cookies.persistent, cookies.priority FROM cookies;

See Also

External Links

Tools

Open Source