The Velociraptor SQLiteHunter Site #
This repository maintains the source for the
Generic.Forensic.SQLiteHunter
VQL artifact. This artifact is
designed to be an efficient and mostly automated artifact to analyze
and collect SQLite based artifacts from various applications on the
endpoint.
The produced artifact is self contained and can be loaded into Velociraptor (https://docs.velociraptor.app) to hunt quickly and efficiently across a large number of endpoints.
You can download the latest artifact pack as a zip file, or as a YAML file and add it manually to Velociraptor.
Parameters #
RuleFilter: If you dont want to run all the rules, you can filter the ones you need using this regular expression.
Rules: Alteratively, the rules may be specified one at the time using a multi-choice selector.
MatchFilename: Rules generally look for SQLite files using known filenames. If this option is unset, we relay on automatic detection to identify the filenames (For example, enumerate the tables in the SQLite file). This makes scanning much slower so by default this setting is enabled.
CustomGlob: Rules default to search for SQLites using known globs. However, if you have a bunch of SQLite files in a different location, you may specify the custom glob to search for files.
DateAfter and DateBefore: These setting allow you to time box the returned rows to only return items that occurred between the specified dates.
FilterRegex: A filter that applies on the entire row (encoded as JSON). This is very useful to find all relevant rows relating to a specific item. For example, if you want to know any rows accessing www.example.com you can specify this filter which will return records like
Visited links
,bookmarks
,favicons
etc.SQLITE_ALWAYS_MAKE_TEMPFILE: By default Velociraptor will make a temporary copy of the SQLite file before parsing it. This ensure the file is not locked and can be freely accessed. If this setting is set to off parsing might be a lot slower as Velociraptor will have to contend with application locks. There is probably no reason to disable this.
AlsoUpload: This option also uploads the raw SQLite files.
Artifact #
name: Generic.Forensic.SQLiteHunter
description: |
Hunt for SQLite files.
SQLite has become the de-facto standard for storing application data,
in many types of applications:
- Web Browsers
- Operating Systems
- Various applications, such as iMessage, TCC etc
This artifact can hunt for these artifacts in a mostly automated way.
More info at https://github.com/Velocidex/SQLiteHunter
NOTE: If you want to use this artifact on just a bunch of files already
collected (for example the files collected using the
Windows.KapeFiles.Targets artifact) you can use the CustomGlob parameter
(for example set it to "/tmp/unpacked/**" to consider all files in the
unpacked directory).
column_types:
- name: Image
type: preview_upload
- name: Payload
type: preview_upload
export: |
LET SPEC <= "H4sIAAA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GACtwrj7wTB9FOsAnJGS3/fbox3UrhkW6ZH6Oc0wv4HXNFD+nOsocGKhiYTki1g5uQXN5A9vz8eNnZ1qnY9ZZbXGIf3D1PgAZd/zhJXtl2HM5hAha5/Fi5mO0oaG+86pCK+HvElb7QvlcLBaCdJ4vXNjaNwoCxa0sDh89FCRsyxhq04gaelv3U59BnJ6ew1SSA/WkXbSoSMB3J37AzktdcCjMM3EQb+BBdTbsc5HrVihn/0Tp+Yik4dkLjQJlDJ2iVJ6SQBOiw7HWcJmWtBeajTggGDomsBTPnM10AcMDQvHfhC7uECSIfNgMqIS6Qjw6U3LWALg3z6N5bb6B8wPiyBIF8SDcs/xmaeCyDwy6xXjxktjDNRXdEludn57/buaQtnjYXAqybzFPA48sgx16n7V9Ki2ATsCh2G1OrvWsv1zS3dCpLsm+gnLKeFF8IiaTLckbQWdkugfPrLdCKqpWSm1Z4EC6avwvaAzgfRV+GaoVkY3yWacUT1FXKwNlMTAvM8N5RWdV+k9cxa5dDx2qXL7uu0pAGg4Ql/1oWWtDe1xw9T/YB7GOTxcFrbQMdNAb4QNfi1g5TXBh7NR4UO99ynlITj8ifFLx2EvV0IHIFe0Iq2qRH6eN2VDCOVaoag7uc5U3+QqkadVwfuSzFTXm4fkHaRSThjVTo9LSWGyOjYQpSjRVmRUEQ33OgvJhovZDPObqn1zMr89GYfg5DSb2FnhanmuYDyE7P7cCohCvQzk68YmQKmZZAeSQ0j7fgi9UPo6Hamm5uZIfKXa/PLDrTvkTBBuCzxkkwnNJqv7JIT0MN1yZ0Utu01Lnn1CYuiFm6rNXbu8XpbUluYFqPKFwYJ05nN/ecTLuJM4lEpwr1DUNLZ2I2gFxtpm4OvX/xsAAP//ijfZOkNcAQA="
LET Specs <= parse_json(data=gunzip(string=base64decode(string=SPEC)))
LET CheckHeader(OSPath) = read_file(filename=OSPath, length=12) = "SQLite forma"
LET Bool(Value) = if(condition=Value, then="Yes", else="No")
-- In fast mode we check the filename, then the header then run the sqlite precondition
LET matchFilename(SourceName, OSPath) = OSPath =~ get(item=Specs.sources, field=SourceName).filename
AND CheckHeader(OSPath=OSPath)
AND Identify(SourceName= SourceName, OSPath= OSPath)
AND log(message=format(format="%v matched by filename %v",
args=[OSPath, get(item=Specs.sources, field=SourceName).filename]))
-- If the user wanted to also upload the file, do so now
LET MaybeUpload(OSPath) = if(condition=AlsoUpload, then=upload(file=OSPath)) OR TRUE
LET Identify(SourceName, OSPath) = SELECT if(
condition=CheckHeader(OSPath=OSPath),
then={
SELECT *
FROM sqlite(file=OSPath, query=get(item=Specs.sources, field=SourceName).id_query)
}) AS Hits
FROM scope()
WHERE if(condition=Hits[0].Check = get(item=Specs.sources, field=SourceName).id_value,
then= log(message="%v was identified as %v",
args=[OSPath, get(item=Specs.sources, field=SourceName).Name]),
else=log(message="%v was not identified as %v (got %v, wanted %v)",
args=[OSPath, get(item=Specs.sources, field=SourceName).Name, str(str=Hits),
get(item=Specs.sources, field=SourceName).id_value]) AND FALSE)
LET ApplyFile(SourceName) = SELECT * FROM foreach(row={
SELECT OSPath FROM AllFiles
WHERE if(condition=MatchFilename, then=matchFilename(SourceName=SourceName, OSPath=OSPath),
else=Identify(SourceName= SourceName, OSPath= OSPath))
}, query={
SELECT *, OSPath FROM sqlite(
file=OSPath, query=get(item=Specs.sources, field=SourceName).SQL)
})
-- Filter for matching files without sqlite checks.
LET FilterFile(SourceName) =
SELECT OSPath FROM AllFiles
WHERE if(condition=MatchFilename,
then=OSPath =~ get(item=Specs.sources, field=SourceName).filename)
-- Build a regex for all enabled categories.
LET all_categories = SELECT if(condition=_value = "All", then=".", else=_value) AS _value
FROM foreach(row=["All","MacOS","Chrome","Browser","Edge","Firefox","Google","Cloud","SyncClient","InternetExplorer","Windows"])
WHERE get(field=_value)
parameters:
- name: RuleFilter
type: regex
description: Only collect rules matching this regex filter.
default: "."
- name: Rules
type: multichoice
description: Only collect these rules
default: '[]'
choices:
- "Chromium Browser Autofill"
- "Chromium Browser Bookmarks"
- "Chromium Browser Cookies"
- "Chromium Browser Extensions"
- "Chromium Browser Favicons"
- "Chromium Browser History"
- "Chromium Browser Media"
- "Chromium Browser Network"
- "Chromium Browser Notifications"
- "Chromium Browser Shortcuts"
- "Chromium Browser Top Sites"
- "Chromium Sessions"
- "Edge Browser Autofill"
- "Edge Browser Collections"
- "Edge Browser History Screenshots"
- "Edge Browser Navigation History"
- "Firefox Cookies"
- "Firefox Downloads"
- "Firefox Favicons"
- "Firefox Form History"
- "Firefox Places"
- "Google Drive Metadata"
- "Google Drive Mirrored Files"
- "Google Drive Mirrored Metadata Files"
- "Google Drive Sync Roots"
- "IE or Edge WebCacheV01"
- "MacOS Applications Cache"
- "MacOS NetworkUsage"
- "MacOS Notes"
- "MacOS XProtect Detections"
- "Windows Activities Cache"
- "Windows Search Service"
- "Windows WPNDatabase - Notifications"
- "iMessage"
- name: MatchFilename
description: |
If set we use the filename to detect the type of sqlite file.
When unset we use heristics (slower)
type: bool
default: Y
- name: CustomGlob
description: Specify this glob to select other files
- name: DateAfter
description: Timebox output to rows after this time.
type: timestamp
default: "1970-01-01T00:00:00Z"
- name: DateBefore
description: Timebox output to rows after this time.
type: timestamp
default: "2100-01-01T00:00:00Z"
- name: FilterRegex
description: Filter critical rows by this regex
type: regex
default: .
- name: All
description: Select all tagrgets
type: bool
default: Y
- name: MacOS
description: Select targets with category MacOS
type: bool
default: N
- name: Chrome
description: Select targets with category Chrome
type: bool
default: N
- name: Browser
description: Select targets with category Browser
type: bool
default: N
- name: Edge
description: Select targets with category Edge
type: bool
default: N
- name: Firefox
description: Select targets with category Firefox
type: bool
default: N
- name: Google
description: Select targets with category Google
type: bool
default: N
- name: Cloud
description: Select targets with category Cloud
type: bool
default: N
- name: SyncClient
description: Select targets with category SyncClient
type: bool
default: N
- name: InternetExplorer
description: Select targets with category InternetExplorer
type: bool
default: N
- name: Windows
description: Select targets with category Windows
type: bool
default: N
- name: SQLITE_ALWAYS_MAKE_TEMPFILE
type: bool
default: Y
- name: AlsoUpload
description: If specified we also upload the identified file.
type: bool
sources:
- name: AllFiles
notebook:
- type: vql
template: |
// This cell generates other cells to preview the collected
// data. DO NOT recalculate this cell - each time new cells
// will be added. Instead delete the notebook and allow
// Velociraptor to recreate the entire notebook.
LET ArtifactsWithResults <=
SELECT pathspec(accessor="fs", parse=Data.VFSPath)[4] AS Artifact ,
pathspec(accessor="fs", parse=Data.VFSPath)[-1][:-5] AS Source ,
stat(accessor="fs", filename=Data.VFSPath + ".index").Size / 8 AS Records
FROM enumerate_flow(client_id=ClientId, flow_id=FlowId)
WHERE Type =~ "Result" AND Records > 0
LET _ <= SELECT notebook_update_cell(notebook_id=NotebookId, type="vql",
input=format(format='''
/*
# Results From %v
*/
SELECT * FROM source(source=%q)
''', args=[Source, Source]),
output=format(format='''
<i>Recalculate</i> to show Results from <b>%v</b> with <b>%v</b> rows
''', args=[Source, Records])) AS NotebookModification
FROM ArtifactsWithResults
/*
# Results Overview
*/
SELECT Source, Records FROM ArtifactsWithResults ORDER BY Source
query: |
LET category_regex <= join(sep="|", array=all_categories._value)
LET RuleFilter <= if(condition=Rules,
then=join(array=Rules, sep="|"),
else=RuleFilter)
LET _ <= log(level="DEBUG", message="Rule Filter is %v", args=RuleFilter)
LET AllGlobs <= filter(list=Specs.globs,
condition="x=> x.tags =~ category_regex AND x.rule =~ RuleFilter")
LET _ <= log(message="Globs for category %v is %v",
args=[category_regex, CustomGlob || AllGlobs.glob])
LET AllFiles <= SELECT OSPath FROM glob(globs=CustomGlob || AllGlobs.glob)
WHERE NOT IsDir AND MaybeUpload(OSPath=OSPath)
SELECT * FROM AllFiles
- name: "iMessage_Profiles"
notebook:
- type: none
output: "iMessage_Profiles - Recalculate to view results"
template: |
/*
# iMessage_Profiles
*/
SELECT * FROM source(source="iMessage_Profiles")
LIMIT 50
query: |
LET Rows = SELECT * FROM ApplyFile(SourceName="iMessage_Profiles")
LET Output = SELECT timestamp(epoch=date / 1000000000 + 978307200) AS Timestamp, *
FROM Rows
WHERE Timestamp > DateAfter AND Timestamp < DateBefore
AND (MessageText, RoomName) =~ FilterRegex
SELECT * FROM
if(condition="iMessage_Profiles" =~ RuleFilter, then={
SELECT * FROM Output
})
- name: "Chromium Browser Autofill_Profiles"
notebook:
- type: none
output: "Chromium Browser Autofill_Profiles - Recalculate to view results"
template: |
/*
# Chromium Browser Autofill_Profiles
*/
SELECT * FROM source(source="Chromium Browser Autofill_Profiles")
LIMIT 50
query: |
LET Rows = SELECT * FROM ApplyFile(SourceName="Chromium Browser Autofill_Profiles")
LET Output = SELECT GUID,
timestamp(epoch= date_modified) AS DateModified,
timestamp(epoch= use_date) AS UseDate,
FirstName, MiddleName, LastName, EmailAddress,
PhoneNumber, CompanyName, StreetAddress,
City, State, ZipCode, UseCount, OSPath
FROM Rows
WHERE UseDate > DateAfter AND UseDate < DateBefore
AND (FirstName, MiddleName, LastName, EmailAddress, CompanyName, StreetAddress) =~ FilterRegex
SELECT * FROM
if(condition="Chromium Browser Autofill_Profiles" =~ RuleFilter, then={
SELECT * FROM Output
})
- name: "Chromium Browser Autofill_Masked Credit Cards"
notebook:
- type: none
output: "Chromium Browser Autofill_Masked Credit Cards - Recalculate to view results"
template: |
/*
# Chromium Browser Autofill_Masked Credit Cards
*/
SELECT * FROM source(source="Chromium Browser Autofill_Masked Credit Cards")
LIMIT 50
query: |
LET Rows = SELECT * FROM ApplyFile(SourceName="Chromium Browser Autofill_Masked Credit Cards")
LET Output = SELECT * FROM Rows
SELECT * FROM
if(condition="Chromium Browser Autofill_Masked Credit Cards" =~ RuleFilter, then={
SELECT * FROM Output
})
- name: "Chromium Browser Bookmarks"
notebook:
- type: none
output: "Chromium Browser Bookmarks - Recalculate to view results"
template: |
/*
# Chromium Browser Bookmarks
*/
SELECT * FROM source(source="Chromium Browser Bookmarks")
LIMIT 50
query: |
LET Rows = SELECT * FROM FilterFile(SourceName="Chromium Browser Bookmarks")
-- Recursive function to report the details of a folder
LET ReportFolder(Data, BaseName) = SELECT * FROM chain(a={
-- First row emit the data about the actual folder
SELECT BaseName + " | " + Data.name AS Name,
timestamp(winfiletime=int(int=Data.date_added) * 10) AS DateAdded,
timestamp(winfiletime=int(int=Data.date_last_used) * 10) AS DateLastUsed,
Data.type AS Type,
Data.url || "" AS URL
FROM scope()
},
b={
-- If this folder has children recurse into it
SELECT * FROM foreach(row={
SELECT _value FROM items(item=Data.children)
}, query={
SELECT * FROM ReportFolder(Data=_value, BaseName=BaseName + " | " + Data.name)
})
})
LET MatchingFiles = SELECT OSPath, parse_json(data=read_file(filename=OSPath)) AS Data
FROM Rows
LET Output = SELECT * FROM foreach(row=MatchingFiles, query={
SELECT * FROM chain(
a={
SELECT OSPath, *, "bookmark_bar" AS Type
FROM ReportFolder(Data=Data.roots.bookmark_bar, BaseName="")
},
b={
SELECT OSPath, *, "other" AS Type
FROM ReportFolder(Data=Data.roots.other, BaseName="")
},
c={
SELECT OSPath, *, "synced" AS Type
FROM ReportFolder(Data=Data.roots.synced, BaseName="")
})
})
SELECT * FROM
if(condition="Chromium Browser Bookmarks" =~ RuleFilter, then={
SELECT * FROM Output
})
- name: "Chromium Browser Cookies_Cookies"
notebook:
- type: none
output: "Chromium Browser Cookies_Cookies - Recalculate to view results"
template: |
/*
# Chromium Browser Cookies_Cookies
*/
SELECT * FROM source(source="Chromium Browser Cookies_Cookies")
LIMIT 50
query: |
LET Rows = SELECT * FROM ApplyFile(SourceName="Chromium Browser Cookies_Cookies")
LET Output = SELECT timestamp(winfiletime=(creation_utc * 10) || 0) AS CreationUTC,
timestamp(winfiletime=(expires_utc * 10) || 0) AS ExpiresUTC,
timestamp(winfiletime=(last_access_utc * 10) || 0) AS LastAccessUTC,
HostKey, Name, Path,
Bool(Value=is_secure) AS IsSecure,
Bool(Value=is_httponly) AS IsHttpOnly,
Bool(Value=has_expires) AS HasExpiration,
Bool(Value=is_persistent) AS IsPersistent,
Priority, SourcePort, OSPath
FROM Rows
WHERE LastAccessUTC > DateAfter AND LastAccessUTC < DateBefore
AND (Name, Path) =~ FilterRegex
SELECT * FROM
if(condition="Chromium Browser Cookies_Cookies" =~ RuleFilter, then={
SELECT * FROM Output
})
- name: "Chromium Browser Extensions"
notebook:
- type: none
output: "Chromium Browser Extensions - Recalculate to view results"
template: |
/*
# Chromium Browser Extensions
*/
SELECT * FROM source(source="Chromium Browser Extensions")
LIMIT 50
query: |
LET Rows = SELECT * FROM FilterFile(SourceName="Chromium Browser Extensions")
-- Resolve the message string against the Locale dict
LET ResolveName(Message, Locale) = get(item=Locale,
field=lowcase(string=parse_string_with_regex(regex="^__MSG_(.+)__$", string=Message).g1),
default=Message).message || Message
-- Read the manifest files
LET ManifestData = SELECT OSPath, parse_json(data=read_file(filename=OSPath)) AS Manifest
FROM Rows
-- Find the Locale file to help with.
LET LocaleData = SELECT *, if(condition=Manifest.default_locale, else=dict(),
then=parse_json(data=read_file(
filename=OSPath.Dirname + "_locales" + Manifest.default_locale + "messages.json"))) AS Locale
FROM ManifestData
LET GetIcon(Manifest) = Manifest.icons.`128` || Manifest.icons.`64` || Manifest.icons.`32` || Manifest.icons.`16`
LET Output = SELECT OSPath, Manifest.author.email AS Email,
ResolveName(Message = Manifest.name, Locale=Locale) AS name,
ResolveName(Message = Manifest.description, Locale=Locale) AS description,
Manifest.oauth2.scopes as Scopes,
Manifest.permissions as Permissions,
Manifest.key as Key, if(condition=GetIcon(Manifest=Manifest),
then=upload(file=OSPath.Dirname + GetIcon(Manifest=Manifest))) AS Image,
Manifest AS _Manifest
FROM LocaleData
WHERE (name, description) =~ FilterRegex
SELECT * FROM
if(condition="Chromium Browser Extensions" =~ RuleFilter, then={
SELECT * FROM Output
})
- name: "Chromium Browser Favicons"
notebook:
- type: none
output: "Chromium Browser Favicons - Recalculate to view results"
template: |
/*
# Chromium Browser Favicons
*/
SELECT * FROM source(source="Chromium Browser Favicons")
LIMIT 50
query: |
LET Rows = SELECT * FROM ApplyFile(SourceName="Chromium Browser Favicons")
LET Output = SELECT ID, IconID,
timestamp(winfiletime= (LastUpdated * 10) || 0) AS LastUpdated,
PageURL, FaviconURL,
upload(accessor="data",
file=_image,
name=format(format="Image%v.png", args=ID)) AS Image,
OSPath as _OSPath
FROM Rows
WHERE LastUpdated > DateAfter AND LastUpdated < DateBefore
SELECT * FROM
if(condition="Chromium Browser Favicons" =~ RuleFilter, then={
SELECT * FROM Output
})
- name: "Chromium Browser History_Visits"
notebook:
- type: none
output: "Chromium Browser History_Visits - Recalculate to view results"
template: |
/*
# Chromium Browser History_Visits
*/
SELECT * FROM source(source="Chromium Browser History_Visits")
LIMIT 50
query: |
LET Rows = SELECT * FROM ApplyFile(SourceName="Chromium Browser History_Visits")
LET Output = SELECT ID,
timestamp(winfiletime=(visit_time * 10) || 0) AS VisitTime,
timestamp(winfiletime=(last_visit_time * 10) || 0) AS LastVisitedTime,
URLTitle, URL, VisitCount, TypedCount,
if(condition=hidden =~ '1', then="Yes", else="No") AS Hidden,
VisitID, FromVisitID,
visit_duration / 1000000 AS VisitDurationInSeconds,
OSPath
FROM Rows
WHERE VisitTime > DateAfter
AND VisitTime < DateBefore
AND (URLTitle, URL) =~ FilterRegex
SELECT * FROM
if(condition="Chromium Browser History_Visits" =~ RuleFilter, then={
SELECT * FROM Output
})
- name: "Chromium Browser History_Downloads"
notebook:
- type: none
output: "Chromium Browser History_Downloads - Recalculate to view results"
template: |
/*
# Chromium Browser History_Downloads
*/
SELECT * FROM source(source="Chromium Browser History_Downloads")
LIMIT 50
query: |
LET Rows = SELECT * FROM ApplyFile(SourceName="Chromium Browser History_Downloads")
LET StateLookup <= dict(`0`='In Progress', `1`='Complete', `2`="Cancelled", `3`="Interrupted", `4`="Interrupted")
LET DangerType <= dict(`0`='Not Dangerous', `1`="Dangerous", `2`='Dangerous URL', `3`='Dangerous Content',
`4`='Content May Be Malicious', `5`='Uncommon Content', `6`='Dangerous But User Validated',
`7`='Dangerous Host', `8`='Potentially Unwanted', `9`='Whitelisted by Policy',
`10`='Download Pending Detailed Verdict', `11`='Blocked By Policy Password Protected', `12`='Blocked By Policy Download Too Large',
`13`='Sensitive Content Warning', `14`='Sensitive Content Blocked', `15`='Deep Scanned Safe',
`16`='Deep Scanned Dangerous But Opened By User', `17`='Prompt For Deep Scanning', `18`='Blocked Unsupported Filetype',
`19`='Dangerous Associated With Account Compromise', `20`='Deep Scan Failed', `21`='Encrypted Archive Prompt for Local Password Scanning',
`22`='Encrypted Archive Prompt for Local Password Scanning Pending Detailed Verdict', `23`='Blocked by Policy Scan Failed')
LET InterruptReason <= dict(`0`= 'No Interrupt', `1`= 'File Error', `2`='Access Denied', `3`='Disk Full',
`5`='Path Too Long',`6`='File Too Large', `7`='Virus', `10`='Temporary Problem', `11`='Blocked',
`12`='Security Check Failed', `13`='Resume Error File Too Short', `14`='File Hash Mismatch', `15`='File Same As Source',
`20`='Network Error', `21`='Operation Timed Out', `22`='Connection Lost', `23`='Server Down',
`24`='Network Request Invalid', `30`='Server Error', `31`='Range Request Error',
`32`='Server Precondition Error', `33`='Unable to get file', `34`='Server Unauthorized',
`35`='Server Certificate Problem', `36`='Server Access Forbidden', `37`='Server Unreachable',
`38`='Content Length Mismatch', `39`='Cross Origin Redirect', `40`='Cancelled', `41`='Browser Shutdown',
`50`='Browser Crashed')
LET Output = SELECT ID, GUID, CurrentPath, TargetPath, OriginalMIMEType, ReceivedBytes, TotalBytes,
timestamp(winfiletime=(start_time * 10) || 0) AS StartTime,
timestamp(winfiletime=(end_time * 10) || 0) AS EndTime,
timestamp(winfiletime=(opened * 10) || 0) AS Opened,
timestamp(winfiletime=(last_access_time * 10) || 0) AS LastAccessTime,
timestamp(epoch=last_modified) AS LastModified,
get(item=StateLookup, field=str(str=state), default="Unknown") AS State,
get(item=DangerType, field=str(str=danger_type), default="Unknown") AS DangerType,
get(item=InterruptReason, field=str(str=interrupt_reason), default="Unknown") AS InterruptReason,
ReferrerURL, SiteURL, TabURL, TabReferrerURL, DownloadURL, OSPath
FROM Rows
WHERE LastAccessTime > DateAfter AND LastAccessTime < DateBefore
AND (SiteURL, DownloadURL, TabURL, TabReferrerURL, ReferrerURL, DownloadURL) =~ FilterRegex
SELECT * FROM
if(condition="Chromium Browser History_Downloads" =~ RuleFilter, then={
SELECT * FROM Output
})
- name: "Chromium Browser History_Keywords"
notebook:
- type: none
output: "Chromium Browser History_Keywords - Recalculate to view results"
template: |
/*
# Chromium Browser History_Keywords
*/
SELECT * FROM source(source="Chromium Browser History_Keywords")
LIMIT 50
query: |
LET Rows = SELECT * FROM ApplyFile(SourceName="Chromium Browser History_Keywords")
LET Output = SELECT KeywordID, URLID,
timestamp(winfiletime=(last_visit_time * 10) || 0) AS LastVisitedTime,
KeywordSearchTerm, Title, URL, OSPath
FROM Rows
WHERE LastVisitedTime > DateAfter AND LastVisitedTime < DateBefore
AND (Title, KeywordSearchTerm, URL) =~ FilterRegex
SELECT * FROM
if(condition="Chromium Browser History_Keywords" =~ RuleFilter, then={
SELECT * FROM Output
})
- name: "Chromium Browser Media_History"
notebook:
- type: none
output: "Chromium Browser Media_History - Recalculate to view results"
template: |
/*
# Chromium Browser Media_History
*/
SELECT * FROM source(source="Chromium Browser Media_History")
LIMIT 50
query: |
LET Rows = SELECT * FROM ApplyFile(SourceName="Chromium Browser Media_History")
LET Output = SELECT ID, URL, WatchTimeSeconds,
Bool(Value=has_video) AS HasVideo,
Bool(Value=has_audio) AS HasAudio,
timestamp(winfiletime=last_updated_time_s || 0) AS LastUpdated,
OriginID, OSPath
FROM Rows
WHERE LastUpdated > DateAfter AND LastUpdated < DateBefore
AND URL =~ FilterRegex
SELECT * FROM
if(condition="Chromium Browser Media_History" =~ RuleFilter, then={
SELECT * FROM Output
})
- name: "Chromium Browser Media_Playback Session"
notebook:
- type: none
output: "Chromium Browser Media_Playback Session - Recalculate to view results"
template: |
/*
# Chromium Browser Media_Playback Session
*/
SELECT * FROM source(source="Chromium Browser Media_Playback Session")
LIMIT 50
query: |
LET Rows = SELECT * FROM ApplyFile(SourceName="Chromium Browser Media_Playback Session")
LET Output = SELECT ID,
timestamp(winfiletime=last_updated_time_s || 0) AS LastUpdated, URL,
duration_ms / 1000 AS DurationInSeconds,
position_ms / 1000 AS PositionInSeconds,
Title, Artist, Album, SourceTitle, OriginID, OSPath
FROM Rows
WHERE LastUpdated > DateAfter AND LastUpdated < DateBefore
AND URL =~ FilterRegex
SELECT * FROM
if(condition="Chromium Browser Media_Playback Session" =~ RuleFilter, then={
SELECT * FROM Output
})
- name: "Chromium Browser Network_Predictor"
notebook:
- type: none
output: "Chromium Browser Network_Predictor - Recalculate to view results"
template: |
/*
# Chromium Browser Network_Predictor
*/
SELECT * FROM source(source="Chromium Browser Network_Predictor")
LIMIT 50
query: |
LET Rows = SELECT * FROM ApplyFile(SourceName="Chromium Browser Network_Predictor")
LET Output = SELECT * FROM Rows
WHERE UserText =~ FilterRegex
SELECT * FROM
if(condition="Chromium Browser Network_Predictor" =~ RuleFilter, then={
SELECT * FROM Output
})
- name: "Chromium Browser Notifications_Site Engagements"
notebook:
- type: none
output: "Chromium Browser Notifications_Site Engagements - Recalculate to view results"
template: |
/*
# Chromium Browser Notifications_Site Engagements
*/
SELECT * FROM source(source="Chromium Browser Notifications_Site Engagements")
LIMIT 50
query: |
LET Rows = SELECT * FROM FilterFile(SourceName="Chromium Browser Notifications_Site Engagements")
LET JSON = SELECT parse_json(data=read_file(filename=OSPath)) AS Data, OSPath FROM Rows
LET Output = SELECT * FROM foreach(row={
SELECT OSPath, Data.profile.content_settings.exceptions AS exceptions FROM JSON
}, query={
SELECT _key AS Site,
timestamp(winfiletime=int(int=_value.last_modified) * 10 || 0) AS LastModified,
timestamp(winfiletime=int(int=_value.setting.lastEngagementTime) * 10 || 0) AS LastEngagementTime,
OSPath
FROM items(item=exceptions.site_engagement)
})
SELECT * FROM
if(condition="Chromium Browser Notifications_Site Engagements" =~ RuleFilter, then={
SELECT * FROM Output
})
- name: "Chromium Browser Notifications_App Banners"
notebook:
- type: none
output: "Chromium Browser Notifications_App Banners - Recalculate to view results"
template: |
/*
# Chromium Browser Notifications_App Banners
*/
SELECT * FROM source(source="Chromium Browser Notifications_App Banners")
LIMIT 50
query: |
LET Rows = SELECT * FROM FilterFile(SourceName="Chromium Browser Notifications_App Banners")
LET JSON = SELECT parse_json(data=read_file(filename=OSPath)) AS Data, OSPath FROM Rows
LET Output = SELECT * FROM foreach(row={
SELECT OSPath, Data.profile.content_settings.exceptions AS exceptions FROM JSON
}, query={
SELECT _key AS Site,
timestamp(winfiletime=int(int=_value.last_modified) * 10 || 0) AS LastModified,
{
SELECT _key AS Site,
timestamp(winfiletime=int(int=_value.couldShowBannerEvents) * 10 || 0) AS CouldShowBannerEvents,
timestamp(winfiletime=int(int=_value.next_install_text_animation.last_shown) * 10 || 0) AS LastShown
FROM items(item=_value.setting)
} AS Setting,
OSPath
FROM items(item=exceptions.app_banner)
})
SELECT * FROM
if(condition="Chromium Browser Notifications_App Banners" =~ RuleFilter, then={
SELECT * FROM Output
})
- name: "Chromium Browser Notifications_Notification Preferences"
notebook:
- type: none
output: "Chromium Browser Notifications_Notification Preferences - Recalculate to view results"
template: |
/*
# Chromium Browser Notifications_Notification Preferences
*/
SELECT * FROM source(source="Chromium Browser Notifications_Notification Preferences")
LIMIT 50
query: |
LET Rows = SELECT * FROM FilterFile(SourceName="Chromium Browser Notifications_Notification Preferences")
LET ContentSettings <= array(`0`="Default",`1`="Allow",`2`="Block",`3`="Ask",`4`="Session Only",`5`="Detect Important Content")
LET JSON = SELECT parse_json(data=read_file(filename=OSPath)) AS Data, OSPath FROM Rows
LET Output = SELECT * FROM foreach(row={
SELECT OSPath, Data.profile.content_settings.exceptions AS exceptions FROM JSON
}, query={
SELECT _key AS Site,
timestamp(winfiletime=int(int=_value.last_modified) * 10 || 0) AS LastModified,
ContentSettings[_value.setting] AS Setting,
OSPath
FROM items(item=exceptions.notifications)
})
SELECT * FROM
if(condition="Chromium Browser Notifications_Notification Preferences" =~ RuleFilter, then={
SELECT * FROM Output
})
- name: "Chromium Browser Notifications_Notification Interactions"
notebook:
- type: none
output: "Chromium Browser Notifications_Notification Interactions - Recalculate to view results"
template: |
/*
# Chromium Browser Notifications_Notification Interactions
*/
SELECT * FROM source(source="Chromium Browser Notifications_Notification Interactions")
LIMIT 50
query: |
LET Rows = SELECT * FROM FilterFile(SourceName="Chromium Browser Notifications_Notification Interactions")
LET JSON = SELECT parse_json(data=read_file(filename=OSPath)) AS Data, OSPath FROM Rows
LET S = scope()
LET Output = SELECT * FROM foreach(row={
SELECT OSPath, Data.profile.content_settings.exceptions AS exceptions FROM JSON
}, query={
SELECT _key AS URL,
timestamp(winfiletime=int(int=_value.last_modified) * 10 || 0) AS LastModified,
_value.display_count as DisplayCount,
_value.click_count as ClickCount,
OSPath
FROM items(item=S.notification_interactions || dict())
})
SELECT * FROM
if(condition="Chromium Browser Notifications_Notification Interactions" =~ RuleFilter, then={
SELECT * FROM Output
})
- name: "Chromium Browser Shortcuts"
notebook:
- type: none
output: "Chromium Browser Shortcuts - Recalculate to view results"
template: |
/*
# Chromium Browser Shortcuts
*/
SELECT * FROM source(source="Chromium Browser Shortcuts")
LIMIT 50
query: |
LET Rows = SELECT * FROM ApplyFile(SourceName="Chromium Browser Shortcuts")
LET Output = SELECT ID,
timestamp(winfiletime= (last_access_time * 10) || 0) AS LastAccessTime,
TextTyped, FillIntoEdit, URL, Contents,
Description, Type, Keyword, TimesSelectedByUser, OSPath
FROM Rows
WHERE LastAccessTime > DateAfter AND LastAccessTime < DateBefore
AND (Contents, Description) =~ FilterRegex
SELECT * FROM
if(condition="Chromium Browser Shortcuts" =~ RuleFilter, then={
SELECT * FROM Output
})
- name: "Chromium Sessions_Sessions"
notebook:
- type: none
output: "Chromium Sessions_Sessions - Recalculate to view results"
template: |
/*
# Chromium Sessions_Sessions
*/
SELECT * FROM source(source="Chromium Sessions_Sessions")
LIMIT 50
query: |
LET Rows = SELECT * FROM ApplyFile(SourceName="Chromium Sessions_Sessions")
LET Output = SELECT timestamp(winfiletime=(creation_utc * 10) || 0) AS CreationUTC,
timestamp(winfiletime=(expires_utc * 10) || 0) AS ExpiresUTC,
timestamp(winfiletime=(last_access_utc * 10) || 0) AS LastAccessUTC,
HostKey, Name, Path,
Bool(Value=is_secure) AS IsSecure,
Bool(Value=is_httponly) AS IsHttpOnly,
Bool(Value=has_expires) AS HasExpiration,
Bool(Value=is_persistent) AS IsPersistent,
Priority, SourcePort, OSPath
FROM Rows
WHERE LastAccessUTC > DateAfter AND LastAccessUTC < DateBefore
AND (Name, Path) =~ FilterRegex
SELECT * FROM
if(condition="Chromium Sessions_Sessions" =~ RuleFilter, then={
SELECT * FROM Output
})
- name: "Chromium Browser Top Sites"
notebook:
- type: none
output: "Chromium Browser Top Sites - Recalculate to view results"
template: |
/*
# Chromium Browser Top Sites
*/
SELECT * FROM source(source="Chromium Browser Top Sites")
LIMIT 50
query: |
LET Rows = SELECT * FROM ApplyFile(SourceName="Chromium Browser Top Sites")
LET Output = SELECT * FROM Rows
WHERE ( URL =~ FilterRegex OR Title =~ FilterRegex )
SELECT * FROM
if(condition="Chromium Browser Top Sites" =~ RuleFilter, then={
SELECT * FROM Output
})
- name: "Edge Browser Autofill_CombinedAutofill"
notebook:
- type: none
output: "Edge Browser Autofill_CombinedAutofill - Recalculate to view results"
template: |
/*
# Edge Browser Autofill_CombinedAutofill
*/
SELECT * FROM source(source="Edge Browser Autofill_CombinedAutofill")
LIMIT 50
query: |
LET Rows = SELECT * FROM ApplyFile(SourceName="Edge Browser Autofill_CombinedAutofill")
LET Output = SELECT timestamp(epoch=date_last_used) AS DateLastUsed, *
FROM Rows
WHERE DateLastUsed > DateAfter AND DateLastUsed < DateBefore
SELECT * FROM
if(condition="Edge Browser Autofill_CombinedAutofill" =~ RuleFilter, then={
SELECT * FROM Output
})
- name: "Edge Browser Collections_Collections, Items, and Comments"
notebook:
- type: none
output: "Edge Browser Collections_Collections, Items, and Comments - Recalculate to view results"
template: |
/*
# Edge Browser Collections_Collections, Items, and Comments
*/
SELECT * FROM source(source="Edge Browser Collections_Collections, Items, and Comments")
LIMIT 50
query: |
LET Rows = SELECT * FROM ApplyFile(SourceName="Edge Browser Collections_Collections, Items, and Comments")
LET ExtractImage(Data) = base64decode(
string=split(string=parse_json(data=Data).image, sep=",")[1])
LET Output = SELECT *,
timestamp(epoch=Collection_CreationUTC) AS Collection_CreationUTC,
timestamp(epoch=Collection_ModifiedUTC) AS Collection_ModifiedUTC,
timestamp(epoch=ColletionSync_DateLastSynced) AS ColletionSync_DateLastSynced,
timestamp(epoch=Item_CreationUTC) AS Item_CreationUTC,
timestamp(epoch=Item_ModifiedUTC) AS Item_ModifiedUTC,
parse_json(data= Item_Source) AS Item_Source,
upload(accessor="data",
file=ExtractImage(Data=Image),
name=format(format="Screenshot_%v.png", args=item_id)) AS Image,
timestamp(epoch=ItemSync_DaeLastSynced) AS ItemSync_DaeLastSynced
FROM Rows
SELECT * FROM
if(condition="Edge Browser Collections_Collections, Items, and Comments" =~ RuleFilter, then={
SELECT * FROM Output
})
- name: "Edge Browser Navigation History_Navigation History"
notebook:
- type: none
output: "Edge Browser Navigation History_Navigation History - Recalculate to view results"
template: |
/*
# Edge Browser Navigation History_Navigation History
*/
SELECT * FROM source(source="Edge Browser Navigation History_Navigation History")
LIMIT 50
query: |
LET Rows = SELECT * FROM ApplyFile(SourceName="Edge Browser Navigation History_Navigation History")
LET Output = SELECT ID,
timestamp(epoch=`Last Visited Time`) AS `Last Visited Time`,
Title, URL, VisitCount, OSPath
FROM Rows
WHERE `Last Visited Time` > DateAfter
AND `Last Visited Time` < DateBefore
AND (Title, URL) =~ FilterRegex
SELECT * FROM
if(condition="Edge Browser Navigation History_Navigation History" =~ RuleFilter, then={
SELECT * FROM Output
})
- name: "Edge Browser History Screenshots_Screenshots"
notebook:
- type: none
output: "Edge Browser History Screenshots_Screenshots - Recalculate to view results"
template: |
/*
# Edge Browser History Screenshots_Screenshots
*/
SELECT * FROM source(source="Edge Browser History Screenshots_Screenshots")
LIMIT 50
query: |
LET Rows = SELECT * FROM ApplyFile(SourceName="Edge Browser History Screenshots_Screenshots")
LET Output = SELECT *,
timestamp(winfiletime=VisitTime * 10) AS VisitTime,
VisitTime AS VisitTimeInt,
upload(accessor="data",
file=Image,
name=format(format="Screenshot_%v.png", args=VisitID)) AS Image
FROM Rows
SELECT * FROM
if(condition="Edge Browser History Screenshots_Screenshots" =~ RuleFilter, then={
SELECT * FROM Output
})
- name: "Firefox Places"
notebook:
- type: none
output: "Firefox Places - Recalculate to view results"
template: |
/*
# Firefox Places
*/
SELECT * FROM source(source="Firefox Places")
LIMIT 50
query: |
LET Rows = SELECT * FROM ApplyFile(SourceName="Firefox Places")
LET BookmarkTypes <= dict(`1`="URL", `2`="Folder", `3`="Separator")
LET Output = SELECT ID, ParentID,
get(item= BookmarkTypes, field=str(str=type), default="Unknown") AS Type,
timestamp(epoch=dateAdded) AS DateAdded,
timestamp(epoch=lastModified) AS LastModified,
Position, Title, URL, ForeignKey, OSPath
FROM Rows
WHERE LastModified > DateAfter AND LastModified < DateBefore
AND (Title, URL) =~ FilterRegex
SELECT * FROM
if(condition="Firefox Places" =~ RuleFilter, then={
SELECT * FROM Output
})
- name: "Firefox Places_Downloads"
notebook:
- type: none
output: "Firefox Places_Downloads - Recalculate to view results"
template: |
/*
# Firefox Places_Downloads
*/
SELECT * FROM source(source="Firefox Places_Downloads")
LIMIT 50
query: |
LET Rows = SELECT * FROM ApplyFile(SourceName="Firefox Places_Downloads")
LET Output = SELECT PlaceID, Content,
timestamp(epoch=dateAdded) AS DateAdded,
timestamp(epoch=lastModified) AS LastModified,
OSPath
FROM Rows
WHERE LastModified > DateAfter AND LastModified < DateBefore
AND Content =~ FilterRegex
SELECT * FROM
if(condition="Firefox Places_Downloads" =~ RuleFilter, then={
SELECT * FROM Output
})
- name: "Firefox Places_History"
notebook:
- type: none
output: "Firefox Places_History - Recalculate to view results"
template: |
/*
# Firefox Places_History
*/
SELECT * FROM source(source="Firefox Places_History")
LIMIT 50
query: |
LET Rows = SELECT * FROM ApplyFile(SourceName="Firefox Places_History")
LET VisitType <= dict(`1`='TRANSITION_LINK', `2`='TRANSITION_TYPED', `3`='TRANSITION_BOOKMARK',
`4`='TRANSITION_EMBED', `5`= 'TRANSITION_REDIRECT_PERMANENT', `6`='TRANSITION_REDIRECT_TEMPORARY',
`7`='TRANSITION_DOWNLOAD', `8`='TRANSITION_FRAMED_LINK', `9`='TRANSITION_RELOAD')
LET Output = SELECT VisitID, FromVisitID,
timestamp(epoch= last_visit_date) AS LastVisitDate,
VisitCount, URL, Title, Description,
get(item= VisitType, field=str(str=visit_type), default="Unknown") AS VisitType,
Bool(Value=hidden) AS Hidden,
Bool(Value=typed) AS Typed,
Frecency, PreviewImageURL, OSPath
FROM Rows
WHERE LastVisitDate > DateAfter AND LastVisitDate < DateBefore
AND (Title, URL, Description) =~ FilterRegex
SELECT * FROM
if(condition="Firefox Places_History" =~ RuleFilter, then={
SELECT * FROM Output
})
- name: "Firefox Cookies"
notebook:
- type: none
output: "Firefox Cookies - Recalculate to view results"
template: |
/*
# Firefox Cookies
*/
SELECT * FROM source(source="Firefox Cookies")
LIMIT 50
query: |
LET Rows = SELECT * FROM ApplyFile(SourceName="Firefox Cookies")
LET Output = SELECT ID, Host, Name, Value,
timestamp(epoch= creationTime) AS CreationTime,
timestamp(epoch= lastAccessed) AS LastAccessedTime,
timestamp(epoch= expiry) AS Expiration,
Bool(Value= isSecure) AS IsSecure,
Bool(Value= isHttpOnly) AS IsHTTPOnly, OSPath
FROM Rows
WHERE LastAccessedTime > DateAfter
AND LastAccessedTime < DateBefore
AND ( Name =~ FilterRegex OR Value =~ FilterRegex )
SELECT * FROM
if(condition="Firefox Cookies" =~ RuleFilter, then={
SELECT * FROM Output
})
- name: "Firefox Downloads"
notebook:
- type: none
output: "Firefox Downloads - Recalculate to view results"
template: |
/*
# Firefox Downloads
*/
SELECT * FROM source(source="Firefox Downloads")
LIMIT 50
query: |
LET Rows = SELECT * FROM ApplyFile(SourceName="Firefox Downloads")
LET Output = SELECT ID, Name, MIMEType, Source, Target,
timestamp(epoch= startTime) AS StartTime,
timestamp(epoch= endTime) AS EndTime,
timestamp(epoch= expiry) AS Expiration,
CurrentBytes, MaxBytes, OSPath
FROM Rows
WHERE StartTime > DateAfter
AND StartTime < DateBefore
AND Name =~ FilterRegex
SELECT * FROM
if(condition="Firefox Downloads" =~ RuleFilter, then={
SELECT * FROM Output
})
- name: "Firefox Favicons"
notebook:
- type: none
output: "Firefox Favicons - Recalculate to view results"
template: |
/*
# Firefox Favicons
*/
SELECT * FROM source(source="Firefox Favicons")
LIMIT 50
query: |
LET Rows = SELECT * FROM ApplyFile(SourceName="Firefox Favicons")
LET Output = SELECT ID, PageURL, FaviconURL,
timestamp(epoch= expire_ms) AS Expiration,
OSPath
FROM Rows
SELECT * FROM
if(condition="Firefox Favicons" =~ RuleFilter, then={
SELECT * FROM Output
})
- name: "Firefox Form History"
notebook:
- type: none
output: "Firefox Form History - Recalculate to view results"
template: |
/*
# Firefox Form History
*/
SELECT * FROM source(source="Firefox Form History")
LIMIT 50
query: |
LET Rows = SELECT * FROM ApplyFile(SourceName="Firefox Form History")
LET Output = SELECT ID, FieldName, Value, TimesUsed,
timestamp(epoch= firstUsed) AS FirstUsed,
timestamp(epoch= lastUsed) AS LastUsed,
GUID, OSPath
FROM Rows
WHERE LastUsed > DateAfter AND LastUsed < DateBefore
AND ( FieldName =~ FilterRegex OR Value =~ FilterRegex )
SELECT * FROM
if(condition="Firefox Form History" =~ RuleFilter, then={
SELECT * FROM Output
})
- name: "Google Drive Metadata_File Metadata"
notebook:
- type: none
output: "Google Drive Metadata_File Metadata - Recalculate to view results"
template: |
/*
# Google Drive Metadata_File Metadata
*/
SELECT * FROM source(source="Google Drive Metadata_File Metadata")
LIMIT 50
query: |
LET Rows = SELECT * FROM ApplyFile(SourceName="Google Drive Metadata_File Metadata")
LET Output = SELECT timestamp(epoch=modified_date ) AS Timestamp, *
FROM Rows
WHERE
if(condition=DateAfter, then=Timestamp > DateAfter, else=TRUE) AND
if(condition=DateBefore, then=Timestamp < DateBefore, else=TRUE) AND
(local_title, mime_type) =~ FilterRegex
SELECT * FROM
if(condition="Google Drive Metadata_File Metadata" =~ RuleFilter, then={
SELECT * FROM Output
})
- name: "Google Drive Metadata_Deleted Items"
notebook:
- type: none
output: "Google Drive Metadata_Deleted Items - Recalculate to view results"
template: |
/*
# Google Drive Metadata_Deleted Items
*/
SELECT * FROM source(source="Google Drive Metadata_Deleted Items")
LIMIT 50
query: |
LET Rows = SELECT * FROM ApplyFile(SourceName="Google Drive Metadata_Deleted Items")
LET Output = SELECT * FROM Rows
SELECT * FROM
if(condition="Google Drive Metadata_Deleted Items" =~ RuleFilter, then={
SELECT * FROM Output
})
- name: "Google Drive Mirrored Files_Mirrored Items"
notebook:
- type: none
output: "Google Drive Mirrored Files_Mirrored Items - Recalculate to view results"
template: |
/*
# Google Drive Mirrored Files_Mirrored Items
*/
SELECT * FROM source(source="Google Drive Mirrored Files_Mirrored Items")
LIMIT 50
query: |
LET Rows = SELECT * FROM ApplyFile(SourceName="Google Drive Mirrored Files_Mirrored Items")
LET Output = SELECT timestamp(epoch=local_mtime_ms ) AS Timestamp, *
FROM Rows
WHERE
if(condition=DateAfter, then=Timestamp > DateAfter, else=TRUE) AND
if(condition=DateBefore, then=Timestamp < DateBefore, else=TRUE) AND
(local_filename, cloud_filename, volume) =~ FilterRegex
SELECT * FROM
if(condition="Google Drive Mirrored Files_Mirrored Items" =~ RuleFilter, then={
SELECT * FROM Output
})
- name: "Google Drive Mirrored Metadata Files_Mirrored Metadata Items"
notebook:
- type: none
output: "Google Drive Mirrored Metadata Files_Mirrored Metadata Items - Recalculate to view results"
template: |
/*
# Google Drive Mirrored Metadata Files_Mirrored Metadata Items
*/
SELECT * FROM source(source="Google Drive Mirrored Metadata Files_Mirrored Metadata Items")
LIMIT 50
query: |
LET Rows = SELECT * FROM ApplyFile(SourceName="Google Drive Mirrored Metadata Files_Mirrored Metadata Items")
LET Output = SELECT timestamp(epoch=modified_date ) AS Timestamp, *
FROM Rows
WHERE
if(condition=DateAfter, then=Timestamp > DateAfter, else=TRUE) AND
if(condition=DateBefore, then=Timestamp < DateBefore, else=TRUE) AND
(local_title, mime_type) =~ FilterRegex
SELECT * FROM
if(condition="Google Drive Mirrored Metadata Files_Mirrored Metadata Items" =~ RuleFilter, then={
SELECT * FROM Output
})
- name: "Google Drive Sync Roots_Sync Folders"
notebook:
- type: none
output: "Google Drive Sync Roots_Sync Folders - Recalculate to view results"
template: |
/*
# Google Drive Sync Roots_Sync Folders
*/
SELECT * FROM source(source="Google Drive Sync Roots_Sync Folders")
LIMIT 50
query: |
LET Rows = SELECT * FROM ApplyFile(SourceName="Google Drive Sync Roots_Sync Folders")
LET Output = SELECT *
FROM Rows
WHERE (root_path, title, media_id) =~ FilterRegex
SELECT * FROM
if(condition="Google Drive Sync Roots_Sync Folders" =~ RuleFilter, then={
SELECT * FROM Output
})
- name: "IE or Edge WebCacheV01_All Data"
notebook:
- type: none
output: "IE or Edge WebCacheV01_All Data - Recalculate to view results"
template: |
/*
# IE or Edge WebCacheV01_All Data
*/
SELECT * FROM source(source="IE or Edge WebCacheV01_All Data")
LIMIT 50
query: |
LET Rows = SELECT * FROM FilterFile(SourceName="IE or Edge WebCacheV01_All Data")
LET MatchingFiles = SELECT OSPath FROM Rows
LET S = scope()
LET Containers(OSPath) = SELECT Table
FROM parse_ese_catalog(file=OSPath)
WHERE Table =~ "Container_"
GROUP BY Table
LET AllHits(OSPath) = SELECT * FROM foreach(row={
SELECT * FROM Containers(OSPath=OSPath)
}, query={
SELECT timestamp(winfiletime=ExpiryTime) AS ExpiryTime,
timestamp(winfiletime=ModifiedTime) AS ModifiedTime,
timestamp(winfiletime=AccessedTime) AS AccessedTime,
S.Url AS Url, *
FROM parse_ese(file=OSPath, table=Table)
})
LET Output = SELECT * FROM foreach(row=MatchingFiles, query={
SELECT * FROM AllHits(OSPath=OSPath)
})
WHERE AccessedTime > DateAfter AND AccessedTime < DateBefore
AND Url =~ FilterRegex
SELECT * FROM
if(condition="IE or Edge WebCacheV01_All Data" =~ RuleFilter, then={
SELECT * FROM Output
})
- name: "IE or Edge WebCacheV01_Highlights"
notebook:
- type: none
output: "IE or Edge WebCacheV01_Highlights - Recalculate to view results"
template: |
/*
# IE or Edge WebCacheV01_Highlights
*/
SELECT * FROM source(source="IE or Edge WebCacheV01_Highlights")
LIMIT 50
query: |
LET Rows = SELECT * FROM FilterFile(SourceName="IE or Edge WebCacheV01_Highlights")
LET Output = SELECT * FROM foreach(row=MatchingFiles, query={
SELECT AccessedTime, ModifiedTime, ExpiryTime, Url
FROM AllHits(OSPath=OSPath)
})
WHERE AccessedTime > DateAfter AND AccessedTime < DateBefore
AND Url =~ FilterRegex
SELECT * FROM
if(condition="IE or Edge WebCacheV01_Highlights" =~ RuleFilter, then={
SELECT * FROM Output
})
- name: "MacOS Applications Cache"
notebook:
- type: none
output: "MacOS Applications Cache - Recalculate to view results"
template: |
/*
# MacOS Applications Cache
*/
SELECT * FROM source(source="MacOS Applications Cache")
LIMIT 50
query: |
LET Rows = SELECT * FROM ApplyFile(SourceName="MacOS Applications Cache")
LET Output = SELECT
time_stamp AS Timestamp,
OSPath.Base AS Application,
entry_ID AS EntryID,
version AS Version,
hash_value AS Hash,
storage_policy AS StoragePolicy,
request_key AS URL,
plist(file=request_object, accessor="data") AS Request,
plist(file=response_object, accessor="data") AS Response,
partition AS Partition,
OSPath
FROM Rows
WHERE Timestamp > DateAfter AND Timestamp < DateBefore
AND Application =~ FilterRegex
SELECT * FROM
if(condition="MacOS Applications Cache" =~ RuleFilter, then={
SELECT * FROM Output
})
- name: "MacOS NetworkUsage"
notebook:
- type: none
output: "MacOS NetworkUsage - Recalculate to view results"
template: |
/*
# MacOS NetworkUsage
*/
SELECT * FROM source(source="MacOS NetworkUsage")
LIMIT 50
query: |
LET Rows = SELECT * FROM ApplyFile(SourceName="MacOS NetworkUsage")
LET Output = SELECT timestamp(epoch= ZTIMESTAMP + 978307200) AS Timestamp,
timestamp(epoch= ZFIRSTTIMESTAMP + 978307200) AS FirstTimestamp,
timestamp(epoch= LIVE_USAGE_TIMESTAMP + 978307200) AS LiveUsageTimestamp,
ZBUNDLENAME AS BundleID,
ZPROCNAME AS ProcessName,
ZWIFIIN AS WifiIn,
ZWIFIOUT AS WifiOut,
ZWWANIN AS WanIn,
ZWWANOUT AS WandOut,
ZWIREDIN AS WiredIn,
ZWIREDOUT AS WiredOut,
ZXIN AS _XIn,
ZXOUT AS _XOut,
Z_PK AS LiveUsageTableID
FROM Rows
SELECT * FROM
if(condition="MacOS NetworkUsage" =~ RuleFilter, then={
SELECT * FROM Output
})
- name: "MacOS Notes"
notebook:
- type: none
output: "MacOS Notes - Recalculate to view results"
template: |
/*
# MacOS Notes
*/
SELECT * FROM source(source="MacOS Notes")
LIMIT 50
query: |
LET Rows = SELECT * FROM ApplyFile(SourceName="MacOS Notes")
LET Output = SELECT Key AS _Key,
OSPath[1] AS User,
Note,
Title,
Snippet,
NoteID AS _NoteID,
timestamp(cocoatime=CreatedTS) AS CreatedTime,
timestamp(cocoatime=LastOpenedDate) AS LastOpenedTime,
timestamp(cocoatime=DirModificationDate) AS LastDirModifcation,
Account AS _Account,
Directory,
DirectoryID,
AttachmentName,
AttachmentSize,
AttachmentUUID,
if(condition=AttachmentUUID,
then=OSPath[:2] + '/Library/Group Containers/group.com.apple.notes/Accounts/LocalAccount/Media/' + AttachmentUUID + '/' + AttachmentName) AS AttachmentLocation,
AccountName AS _AccountName,
AccountID AS _AccountID,
AccountType AS _AccountType,
gunzip(string=Data) AS Data,
OSPath
FROM Rows
WHERE LastOpenedTime > DateAfter AND LastOpenedTime < DateBefore
AND ( Title =~ FilterRegex OR Data =~ FilterRegex )
SELECT * FROM
if(condition="MacOS Notes" =~ RuleFilter, then={
SELECT * FROM Output
})
- name: "MacOS XProtect Detections"
notebook:
- type: none
output: "MacOS XProtect Detections - Recalculate to view results"
template: |
/*
# MacOS XProtect Detections
*/
SELECT * FROM source(source="MacOS XProtect Detections")
LIMIT 50
query: |
LET Rows = SELECT * FROM ApplyFile(SourceName="MacOS XProtect Detections")
LET Output = SELECT *
FROM Rows
WHERE dt > DateAfter
AND dt < DateBefore
AND (violated_rule, exec_path, responsible_path, responsible_signing_id,
exec_cdhash, exec_sha256, responsible_cdhash, responsible_sha256 ) =~ FilterRegex
SELECT * FROM
if(condition="MacOS XProtect Detections" =~ RuleFilter, then={
SELECT * FROM Output
})
- name: "Windows Activities Cache_ActivityPackageId"
notebook:
- type: none
output: "Windows Activities Cache_ActivityPackageId - Recalculate to view results"
template: |
/*
# Windows Activities Cache_ActivityPackageId
*/
SELECT * FROM source(source="Windows Activities Cache_ActivityPackageId")
LIMIT 50
query: |
LET Rows = SELECT * FROM ApplyFile(SourceName="Windows Activities Cache_ActivityPackageId")
LET Output = SELECT format(format="%0X-%0X-%0X-%0X-%0X", args=[
ActivityId[0:4], ActivityId[4:6], ActivityId[6:8],
ActivityId[8:10], ActivityId[10:] ]) AS ActivityId,
Platform, PackageName, ExpirationTime, OSPath
FROM Rows
SELECT * FROM
if(condition="Windows Activities Cache_ActivityPackageId" =~ RuleFilter, then={
SELECT * FROM Output
})
- name: "Windows Activities Cache_Clipboard"
notebook:
- type: none
output: "Windows Activities Cache_Clipboard - Recalculate to view results"
template: |
/*
# Windows Activities Cache_Clipboard
*/
SELECT * FROM source(source="Windows Activities Cache_Clipboard")
LIMIT 50
query: |
LET Rows = SELECT * FROM ApplyFile(SourceName="Windows Activities Cache_Clipboard")
LET Output = SELECT
CreatedTime,
timestamp(epoch=LastModifiedTime) AS LastModifiedTime,
timestamp(epoch=LastModifiedOnClient) AS LastModifiedOnClient,
StartTime,
EndTime,
Payload,
OSPath[1] AS User,
base64decode(string=parse_json_array(data=ClipboardPayload)[0].content) AS ClipboardPayload,
OSPath AS Path,
Mtime
FROM Rows
WHERE StartTime > DateAfter
AND StartTime < DateBefore
AND ClipboardPayload =~ FilterRegex
SELECT * FROM
if(condition="Windows Activities Cache_Clipboard" =~ RuleFilter, then={
SELECT * FROM Output
})
- name: "Windows WPNDatabase - Notifications_Notifications"
notebook:
- type: none
output: "Windows WPNDatabase - Notifications_Notifications - Recalculate to view results"
template: |
/*
# Windows WPNDatabase - Notifications_Notifications
*/
SELECT * FROM source(source="Windows WPNDatabase - Notifications_Notifications")
LIMIT 50
query: |
LET Rows = SELECT * FROM ApplyFile(SourceName="Windows WPNDatabase - Notifications_Notifications")
LET Output = SELECT *, Parent || "" AS Parent,
timestamp(winfiletime= ArrivalTime) AS ArrivalTime,
if(condition= ExpirationTime > 0,
then=timestamp(winfiletime= ExpirationTime),
else='Expired') AS ExpirationTime,
format(format="%02x", args=ActivityId) As ActivityId,
WNSId || "" AS WNSId,
if(condition= WNSCreatedTime > 0,
then=timestamp(winfiletime= WNSCreatedTime),
else='') AS WNSCreatedTime,
if(condition= WNSExpirationTime > 0,
then=timestamp(winfiletime= WNSExpirationTime),
else='') AS WNSExpirationTime,
upload(accessor="data",
file=Payload,
name=format(format="Payload%v.png", args=ID)) AS Payload
FROM Rows
SELECT * FROM
if(condition="Windows WPNDatabase - Notifications_Notifications" =~ RuleFilter, then={
SELECT * FROM Output
})
- name: "Windows Search Service_SystemIndex_Gthr"
notebook:
- type: none
output: "Windows Search Service_SystemIndex_Gthr - Recalculate to view results"
template: |
/*
# Windows Search Service_SystemIndex_Gthr
*/
SELECT * FROM source(source="Windows Search Service_SystemIndex_Gthr")
LIMIT 50
query: |
LET Rows = SELECT * FROM FilterFile(SourceName="Windows Search Service_SystemIndex_Gthr")
LET MatchingFiles = SELECT OSPath FROM Rows
LET FormatTimeB(T) = timestamp(winfiletime=parse_binary(
filename=T, accessor="data", struct="uint64b"))
LET FormatTime(T) = timestamp(winfiletime=parse_binary(
filename=T, accessor="data", struct="uint64"))
LET FormatSize(T) = parse_binary(
filename=T, accessor="data", struct="uint64")
LET Output = SELECT * FROM foreach(row=MatchingFiles, query={
SELECT ScopeID, DocumentID, SDID,
FormatTimeB(T=LastModified) AS LastModified,
FileName
FROM parse_ese(file=OSPath, table= "SystemIndex_Gthr")
})
WHERE LastModified > DateAfter AND LastModified < DateBefore
AND FileName =~ FilterRegex
SELECT * FROM
if(condition="Windows Search Service_SystemIndex_Gthr" =~ RuleFilter, then={
SELECT * FROM Output
})
- name: "Windows Search Service_SystemIndex_GthrPth"
notebook:
- type: none
output: "Windows Search Service_SystemIndex_GthrPth - Recalculate to view results"
template: |
/*
# Windows Search Service_SystemIndex_GthrPth
*/
SELECT * FROM source(source="Windows Search Service_SystemIndex_GthrPth")
LIMIT 50
query: |
LET Rows = SELECT * FROM FilterFile(SourceName="Windows Search Service_SystemIndex_GthrPth")
LET Output = SELECT * FROM foreach(row=MatchingFiles, query={
SELECT Scope, Parent, Name
FROM parse_ese(file=OSPath, table= "SystemIndex_GthrPth")
})
WHERE Name =~ FilterRegex
SELECT * FROM
if(condition="Windows Search Service_SystemIndex_GthrPth" =~ RuleFilter, then={
SELECT * FROM Output
})
- name: "Windows Search Service_SystemIndex_PropertyStore"
notebook:
- type: none
output: "Windows Search Service_SystemIndex_PropertyStore - Recalculate to view results"
template: |
/*
# Windows Search Service_SystemIndex_PropertyStore
*/
SELECT * FROM source(source="Windows Search Service_SystemIndex_PropertyStore")
LIMIT 50
query: |
LET Rows = SELECT * FROM FilterFile(SourceName="Windows Search Service_SystemIndex_PropertyStore")
LET X = scope()
-- The PropertyStore columns look like
-- <random>-ProperName so we strip the
-- random part off to display it properly.
LET FilterDict(Dict) = to_dict(item={
SELECT split(sep_string="-", string=_key)[1] || _key AS _key, _value
FROM items(item=Dict)
})
LET PropStore(OSPath) = SELECT *,
FormatTime(T=X.System_Search_GatherTime) AS System_Search_GatherTime,
FormatSize(T=X.System_Size) AS System_Size,
FormatTime(T=X.System_DateModified) AS System_DateModified,
FormatTime(T=X.System_DateAccessed) AS System_DateAccessed,
FormatTime(T=X.System_DateCreated) AS System_DateCreated
FROM foreach(row={
SELECT *, FilterDict(Dict=_value) AS _value
FROM items(item={
SELECT * FROM parse_ese(file=OSPath, table="SystemIndex_PropertyStore")
})
}, column="_value")
LET Output = SELECT * FROM foreach(row=MatchingFiles, query={
SELECT *
FROM PropStore(OSPath=OSPath)
})
WHERE System_DateAccessed > DateAfter AND System_DateAccessed < DateBefore
SELECT * FROM
if(condition="Windows Search Service_SystemIndex_PropertyStore" =~ RuleFilter, then={
SELECT * FROM Output
})
- name: "Windows Search Service_SystemIndex_PropertyStore_Highlights"
notebook:
- type: none
output: "Windows Search Service_SystemIndex_PropertyStore_Highlights - Recalculate to view results"
template: |
/*
# Windows Search Service_SystemIndex_PropertyStore_Highlights
*/
SELECT * FROM source(source="Windows Search Service_SystemIndex_PropertyStore_Highlights")
LIMIT 50
query: |
LET Rows = SELECT * FROM FilterFile(SourceName="Windows Search Service_SystemIndex_PropertyStore_Highlights")
LET Output = SELECT * FROM foreach(row=MatchingFiles, query={
SELECT WorkID,
System_Search_GatherTime,
System_Size,
System_DateModified,
System_DateCreated,
X.System_FileOwner AS System_FileOwner,
X.System_ItemPathDisplay AS System_ItemPathDisplay,
X.System_ItemType AS System_ItemType,
X.System_FileAttributes AS System_FileAttributes,
X.System_Search_AutoSummary AS System_Search_AutoSummary
FROM PropStore(OSPath=OSPath)
})
WHERE System_DateAccessed > DateAfter AND System_DateAccessed < DateBefore
SELECT * FROM
if(condition="Windows Search Service_SystemIndex_PropertyStore_Highlights" =~ RuleFilter, then={
SELECT * FROM Output
})
- name: "Windows Search Service_BrowsingActivity"
notebook:
- type: none
output: "Windows Search Service_BrowsingActivity - Recalculate to view results"
template: |
/*
# Windows Search Service_BrowsingActivity
*/
SELECT * FROM source(source="Windows Search Service_BrowsingActivity")
LIMIT 50
query: |
LET Rows = SELECT * FROM FilterFile(SourceName="Windows Search Service_BrowsingActivity")
LET Output = SELECT * FROM foreach(row=MatchingFiles, query={
SELECT X.ItemPathDisplay AS ItemPathDisplay,
X.Activity_ContentUri AS Activity_ContentUri,
X.Activity_Description AS Activity_Description
FROM PropStore(OSPath=OSPath)
WHERE Activity_ContentUri
})
SELECT * FROM
if(condition="Windows Search Service_BrowsingActivity" =~ RuleFilter, then={
SELECT * FROM Output
})
- name: "Windows Search Service_UserActivityLogging"
notebook:
- type: none
output: "Windows Search Service_UserActivityLogging - Recalculate to view results"
template: |
/*
# Windows Search Service_UserActivityLogging
*/
SELECT * FROM source(source="Windows Search Service_UserActivityLogging")
LIMIT 50
query: |
LET Rows = SELECT * FROM FilterFile(SourceName="Windows Search Service_UserActivityLogging")
LET Output = SELECT * FROM foreach(row=MatchingFiles, query={
SELECT X.System_ItemPathDisplay AS System_ItemPathDisplay,
FormatTime(T=X.ActivityHistory_StartTime) AS ActivityHistory_StartTime,
FormatTime(T=X.ActivityHistory_EndTime) AS ActivityHistory_EndTime,
X.ActivityHistory_AppId AS ActivityHistory_AppId
FROM PropStore(OSPath=OSPath)
WHERE ActivityHistory_AppId
})
WHERE ActivityHistory_StartTime > DateAfter
AND ActivityHistory_StartTime < DateBefore
SELECT * FROM
if(condition="Windows Search Service_UserActivityLogging" =~ RuleFilter, then={
SELECT * FROM Output
})
docs/../static/artifact/SQLiteHunter.yaml