Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Windows.Forensics.NotificationsDatabase.yaml #959

Merged
merged 1 commit into from
Dec 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Windows.Forensics.NotificationsDatabase
author: Zane Gittins
description: |
Parses the Win10/11 notifications database, which contains events for badges, tiles, and toasts shown to each user.

# Can be CLIENT, CLIENT_EVENT, SERVER, SERVER_EVENT or NOTEBOOK
type: CLIENT

parameters:
- name: UserRegex
default: .
- name: SearchGlob
default: "C:/Users/*/AppData/Local/Microsoft/Windows/Notifications/wpndatabase.db"

sources:
- precondition:
SELECT OS From info() where OS = 'windows'

query: |
LET Files <= SELECT *
FROM glob(globs=SearchGlob)
WHERE OSPath =~ UserRegex
LET Notifications <= SELECT *
FROM foreach(
row=Files,
query={
SELECT *
FROM sqlite(file=OSPath,
accessor="auto",
query="SELECT * FROM Notification")
})
LET Handlers <= SELECT *
FROM foreach(
row=Files,
query={
SELECT *
FROM sqlite(file=OSPath,
accessor="auto",
query="SELECT * FROM NotificationHandler")
})
LET Results = SELECT *, {
SELECT *
FROM Handlers
WHERE RecordId = HandlerId
} AS HandlerInfo
FROM Notifications
SELECT Id,
HandlerInfo.PrimaryId AS Application,
HandlerId,
Type,
timestamp(winfiletime=ExpiryTime) AS ExpiryTime,
timestamp(winfiletime=ArrivalTime) AS ArrivalTime,
Payload AS PayloadRaw,
Tag,
Group,
DataVersion,
PayloadType,
HandlerInfo
FROM Results
Loading