1. Introduction
The Windows Push Notification service (henceforth, WPN) appeared in the first release of Windows 10, although it was heavily based in Windows 8’s Windows Notification Service [
1]. As its name implies, it is a service that allows notifications to be delivered to a Windows 10 OS. Specifically, WPN allows applications to
push notification data to the end user. Notifications can manifest themselves through three different graphical outputs: badges, tiles and toasts, plus a non-graphic mode, named
raw. A badge is usually a tiny symbol, often a number that appears in one corner of the application’s icon signaling a notification, for example, the number of new email messages. Although badges fit more naturally mobile OS such as iOS and Android, mostly because the limited screen space of these platforms is filled with applications’ icons, badges are also used by Windows 10 in both the task bar and in the system tray. For example, the Microsoft Teams application resorts to a bottom-right badge in the application icon displayed in a Windows’ task bar to report the network connectivity of the local computer to the Teams service. Other applications use it on the system tray. Examples include the Dropbox client software that notifies the user of an update operation on files by displaying a blue and white update symbol, and Microsoft’s OneDrive that reports some statuses such as paused, synchronizing or lack of network connectivity as shown in
Figure 1. These symbols are from a limited set, as they are part of the notification API. Likewise, a numeric badge can have a value between 1 and 99, with values above 99 represented as 99+.
Figure 2 displays examples of badges as they appear in Windows 10 taskbar. Specifically, the left badge signals that Microsoft Teams has one new event to report (e.g., a newly received message), while the center badge reports on a new message by the Facebook Messenger client. Finally, the right-most badge alerts that there are six events to process from Windows Your Phone, which can correspond to newly received SMS (Short Text Messages) or notifications from the coupled Android smartphone [
2].
Tiles first appeared with Windows 8, when Microsoft decided to overhaul the interface of the OS, namely the start menu, introducing the
Metro interface, along with a new type of applications called
Metro Apps, guiding Windows 8 for touch interfaces [
3]. Tiles are rectangular shapes in the screen, each one linked to an application, which can feed the tile with new content, hence the alternate designation of
live tiles. In Windows 10, although Microsoft introduced new changes to the start interface, live tiles were kept, now being linked to
Universal Windows Platform (UWP) applications. In this context, each tile is a live representation of its linked application. Examples of live tiles include Microsoft Photos, which rotatively displays, within the tile, photos existing in the device, or the Weather application which displays the weather forecast for the user’s location. This is the case shown in
Figure 3, where the weather prediction for the city of Leiria, Portugal is shown for three days. As we shall see later in
Section 3.5, live tiles were removed from a Windows 11 interface.
Toasts are rectangular shaped boxes that pop up from the right bottom corner of the screen. An example of a toast is given in
Figure 4. The name stems from the rogue similarity of toasts popping out of a toaster. Toasts are sometimes also designated as
banners. By default, toasts are shown for five seconds, although this can be changed in Windows
Ease of Access/Display up to a maximum of five minutes. There are a wide variety of toasts, some of them interactive, such as
Quick reply text box,
Progress Bar, and
Context menu actions, among many others [
4]. This class of interactive toasts are also known as
actionable notifications. There are four different types of toast notifications: (i)
local, (ii)
scheduled, (iii)
periodic, and (iv)
push. Local toast notifications are produced by local applications. Examples include a mail client alerting the reception of a new email, or a social network application notifying a new message. Scheduled notifications are delivered by calendar-based applications that run within the browser, for example Google Calendar, to remind the user of an upcoming event. Periodic notifications are used by applications that deal with periodically changing data, such as weather or stock prices. Finally, a push notification originates from a cloud server. These cloud notifications are used, for example, by news applications to alert of a breaking news, or by a communication application such as Microsoft’s Your Phone (
https://www.microsoft.com/en-us/p/your-phone/9nmpj99vjbwv, accessed on 28 January 2022) to alert of an incoming call or message. Push mode is the only one to support
raw notifications that is a notification that goes directly from a cloud service to the application, without any graphical display. The application processes the notification, triggering the reaction it deems most appropriate, which can include toast notifications.
An important element in the toast notification chain is the Windows Action Center. As the name implies, it acts as a central repositories for toast notifications, stocking toasts that can later on be reviewed by the user. Additionally, when the user is engaged on a task that should not be interrupted with toasts—e.g., displaying a full screen Powerpoint presentation—incoming toasts are silently redirected to the Action Center to avoid disturbing the user. Furthermore, applications can deliver the so-called
ghost toasts that do not pop up on the screen, but instead go directly to the Action Center. An example of Windows 10 Action Center is shown in
Figure 5, where besides a panel for fast access to settings (e.g., Night Light, Network, etc.), there is a toast message from the Dropbox application. Note that the
Focus Assist section in the panel (bottom right) allows one to control how notifications are treated: when clicked once, the mode switches to
Priority only, while an additional click activates the
Alarm only mode. A third click loops back to the original mode of
Focus assist Off. Windows Action Center display is activated by clicking in the message shape icon, which is highlighted by the squared red box at the bottom right of
Figure 5. Another click and it gets closed.
The main motivation to study Windows notifications from a digital forensic perspective is that notifications can harbor data that might be relevant to forensic investigations of Windows 10 devices and user(s). For example, an email client toast notification might hold data and metadata—sender, date/time—about incoming emails. Although the amount of data are limited, it might be useful when common forensic artifacts have provided no valuable data, or the machine was cleaned with anti-forensic software [
5,
6]. Additional details about anti-forensic software are presented in
Section 3.1.
In this paper, we analyze the WPN service from a digital forensic perspective: the goal is to identify and extract the forensic artifacts when a post mortem analysis is performed in a Windows 10 machine. The main contributions of this paper are: Identification of forensic artifacts linked to WPN in both Windows 10 and Windows 11; development of an open source Python 3 script able to extract WPN’s forensic artifacts; and implementation of a Jython extension module for the forensic software Autopsy. This module interacts with the Python 3 script to collect and display WPN’s artifacts within Autopsy.
The remainder of this paper is organized as follows:
Section 2 presents some related work regarding the Windows Notification system, while
Section 3 details the services, files and databases that comprise WPN.
Section 4 presents the Notification Analyzer software, comprising an autonomous Python 3 script and Autopsy’s specific Jython module. In
Section 5, experimental results highlighting extracted and recovered data are presented.
Section 6 describes other sources of notifications with a potential interest for digital forensics, namely Windows event logs and caches of browsers. Finally,
Section 7 concludes the paper and traces venues for future work.
3. WPN’s Services, Executables and Data Repositories
In this section, we analyze the main components of WPN, namely the Windows services and the executables that implements WPN, as well as the data repositories. First, we briefly describe Materials and Methods.
3.1. Materials and Methods
To study WPN and its components, we used two regular laptops: one with Windows 10–1909 and another one with Windows 11–21H2. To detect activity linked to WPN, we resorted to Windows Sysinternals’ Process Monitor as it allows for monitoring in real-time Registry and file systems operations of processes and threads. We also resorted to the HxD Hex Editor to identify and interpret binary content, as well as Windows Sysinternals’ Strings utility. To inspect the SQLite 3 databases, we used the Db Browser for SQLite application. The Registry analysis was performed with Windows own Regedit. We used the jsonform option of the versatile SFK (Swiss File Knife) versatile utility to format JSON content. To interact with WPN to produce graphical output, namely toasts, we resorted to winrt and win10toast Python 3 modules.
The methodology involved the generation of notifications and the subsequent analysis. For this purpose, several applications were used, namely Microsoft’s Your Phone, as it can easily be triggered to produce notifications. Other applications were Microsoft Outlook and web browsers such as Brave and Google Chrome. After triggering notifications, the hosting Windows system was analyzed, with focus in the WPN’s associated directories.
The open source anti-forensic tool BleachBit version 4.4.2 (
https://www.bleachbit.org/, accessed on 28 January 2022) that supports Linux and Windows, was also used to study its impact on Windows notifications. In its default configuration, BleachBit does not support the notification system, and thus no artifacts are removed. Moreover, when additional settings are enabled through the
Winapp2.ini extension, (
https://github.com/MoscaDotTo/Winapp2, accessed on 28 January 2022) the action
Notification of BleachBit still does not remove the SQLite3 databases of WPN services. However, actions exist to clean the data storage notifications from applications such as Windows Edge or Google Chrome. In the case of the two browsers, these actions delete the levelDB database that holds the notifications. An example of those actions is depicted in
Figure 6.
3.2. Services and Executable Files
WPN relies on two services:
a system service, referred to as a
Windows Push Notification System Service and
a user service known as
Windows Push Notification User Service. The system service has the following description text:
This service runs in session 0 and hosts the notification platform and connection provider which handles the connection between the device and WNS server.
Table 1 lists the executable file, the command line parameters and the dynamic link libraries (DLL) directly related to WPN that are loaded by the system service. This service handles notifications related to Windows OS functionalities such as Windows Defender, Windows Update and Bluetooth device pairing, to name just a few.
The user service is described as follows in the Windows 10 service area:
This service hosts a Windows notification platform which provides support for local and push notifications. Supported notifications are tile, toast and raw.
Table 2 shows the executable path and its command line parameters, as well as the WPN related DLL loaded by the service. This service is linked to the current logged in user and handles the delivery of notifications to the end user.
3.3. Databases
For each of the WPN service processes, there is a SQLite3 database whose main filename is
wpndatabase.db, and has two associated files
wpndatabase.db-shm and
wpndatabase.db-wal. Specifically, there is one database for the system notification and another one for each user’s account on the machine. Paths for both the system and per-user accounts are shown in
Table 3.
The system WPN database files are kept in C:\Windows\System32\config\systemprofile\AppData\Local\Microsoft\Windows\Notifications. The per user WPN database files are held in the \%LOCALAPPDATA\%\Microsoft\Windows\Notifications directory, where \%LOCALAPPDATA\% is an environment variable that maps to C:\Users\username\AppData\Local\, with username being the login name of the user and considering that Windows is installed in the C: drive. This means that there is a database for each user account, and thus data kept in the database can be linked to individual accounts. This user attribution is of special importance in digital forensics in systems that can have multiple users, as it is the case of Windows machines.
As the
wpndatabase.db databases are identical in their structure, next, we focus on the user’s database, as it is the one that has the most meaningful forensic data, such as Outlook emails and calendar notifications. Each
wpndatabase.db database has eight tables, whose names are listed in
Table 4.
In our testing, the tables
NotificationData and
TransientTable remained empty. As the table
NotificationData has solely three fields—
NotificationId,
Key (text), and
Value (text)—appropriate to store key/value pairs, we hypothesize that it might be a leftover from previous versions of Windows. As the name appears to suggest, the
TransientTable might be used for transient data of the notification system. The
Metadata table holds some configuration values. An example is given in
Table 5. Note that the record
currentNotificationId is the current notification ID and gives an indication of the number of notifications processed so far (89591 for the given example). Records suffixed with
maxCount define limits. For example,
toast:maxCount regulates the maximum number of toasts that are kept in a Windows Action Center.
From a digital forensic perspective, the table
Notification holds the most meaningful data. This table has 14 fields, listed in
Table 6. Next, we solely focus on fields with relevant value for digital forensics.
The
HandlerID field holds the ID of the application that handles the notification. This ID corresponds to the
RecordID of table
NotificationHandler. Examples of handlers, extracted from the
NotificationHandler, are shown in
Table 7. It should be noted that there is a large number of handlers. In the studied systems, we found over 238 handlers defined in the
NotificationHandler table. The number of handlers depends on the installed applications. In the given case, 143 notification handlers were created by Windows 10, as their creation time is the same as Windows 10 OS installation time or Windows 10 last version update. The creation time of a notification handler is kept in the field
CreatedTime of the
NotificationHandler table. Other notification handlers are created by UWP applications which are installed on the system.
Another field of table NotificationHandler is Type. It is a text field that represents the type of notification, which can hold one of the following qualifiers: badge, tile, toast and toastCondensed. Data that comprise the notification are kept in yet another text field of the Notification table: Payload. These data are in a XML-like format, and the fields they harbor depend on the source application. A shortened example of a toast from the Facebook Messenger Windows UWP application is shown in Listing 1. From the payload, one can extract that the message comes from Jane Doe and has the content “Almost done!”. Toast payloads are definitely the most interesting ones as they can come from messaging applications such as Facebook Messenger, Microsoft Outlook, and Google Calendar, just to name a few. This can yield valuable information, as an email notification from Microsoft Outlook holds the sender and the initial part of the subject. The same goes for Facebook Messenger toasts that identify the sender and hold the initial part of the message. Obviously, the amount of data are limited, and as stated earlier, its usefulness is limited and restricted to scenarios where other sources of forensic data are not available. On the contrary, toastCondensed are of low use, as they have a NULL payload, at least in the corresponding entry in the table.
Listing 1. Shortened example of a toast from the Facebook Messenger Windows UWP application. |
|
There are two important date/time fields in table Notification: ArrivalTime and ExpiryTime. Both are expressed in Microsoft Filetime 64-bit format, that is, as the number of 100-nanosecond intervals elapsed since 1 January 1601, 0:00 UTC. The former refers to the arrival of the notification, while ExpiryTime field indicates when the notification is set to expire. By default, a notification is set to last for a maximum of three days, but this can be set to a much lower value by the source application.
3.4. The Wpnidm Directory
Within the notification data directories, there is a subdirectory named wpnidm. This directory exists in the system-wide notification and in the per-user account data repositories. In the analyzed systems, although the system-wide wpnidm directory was empty, the per-user wpnidm held JPG, PNG and IMG images.
These images are from toast notifications and tiles. For example, to notify of a new message, the Facebook Messenger application for Windows adds a thumbnail of the profile photo of the Facebook account of the sender (
https://www.microsoft.com/en-us/p/messenger/9wzdncrf0083, accessed on 28 January 2022). This thumbnail, as well as the full sized profile image, is kept in the
wpnidm directory. The name of all files kept in the
wpnidm directory is an at most 8-wide hexadecimal number (e.g.,
a3ac0253.jpg), which is a 32-bit number. We could not figure out how the filenames are created, although we ruled out that they do not correspond to the CRC32 digest hash of the content of the respective file. Interestingly, some of the profile photos are repeated several times, with different and unrelated names (e.g.,
a3ac0253.jpg and
e1979169.jpg). After some research, we found out that the content of the
wpnidm directory is mapped into the registry, more precisely at the following key path:
\HKEY\_USERS\S-1-5-21-XX-XX-XX-SID\Software\Microsoft\Windows\CurrentVersion\PushNotifications\wpnidm. Under this key, there is one subkey for each file that exists in the
wpnidm directory. Each subkey has the same name as the file, minus the extension. Within this subkey, several data fields exist. These data fields are listed jointly with a brief description in
Table 8. For some of the entries, the
Url entry points to an online version of the image file, accessible without authentication. However, for some other entries of the same image, attempts to access the
Url yield a
URL signature expired. We hypothesize that an image duplicate is created when the URL for the previously valid image expires, this behavior explaining the existence of several duplicates of images. The content of a wpnidm key is shown in
Figure 7.
3.5. Notifications in Windows 11
We now briefly review both notification services, System and per-user account, in Windows 11. For this purpose, we analyze Windows 11 Home, version 21H2, build 22000.318, which was installed in a computer as an upgrade of Windows 10.
At the user level, there is one major change: Windows no longer has live tiles in the start menu. This is one of the modifications of the so-called
start menu overhaul, which, in Windows 11, is unmovable at the bottom center of the screen. Another modification is the now rounded corner in Windows 11’s windows.
Figure 8 shows a toast notifications with a clickable URL. Another major change is related to the user interface of Action Center, which is now less cluttered than it was in Windows 10, as shown in
Figure 9.
Internally, we noticed only a single major change in the
wpndatabase.db databases: the addition of a table called
TimedNotification. However, as this table remained empty in our testing environment, we could not figure out its real purpose, besides the indication given by its name.
Table 9 lists the fields and datatypes of the
TimedNotification table. Interestingly, support for tiles was left untouched in the
wpndatabase.db files, and in fact there are still applications that resort to tiles, such as Bing.Weather and Microsoft Office OneNote.
7. Conclusions
Windows Push Notification is a Windows 10 service that delivers various types of notifications—badges, tiles and toasts—to applications and to logged on users. As notifications are kept in a per-user wpndatabase.db SQLite 3 database, although for a short timespan, it is possible to access the last notifications delivered to the respective user. Moreover, resorting to record recovering methodologies for SQLite 3 allows the recuperation of database records that might contain relevant artifacts for the case in examination.
The forensic value of notifications will depend on the installed applications and on the respective usage of these applications at the computer under analysis. For instance, a user that employs a messaging application such as Facebook Messenger UWP, and the user’s notification database, might hold some relevant received messages that can help forensic practitioners.
The NotifAnalyzer and the associated WNA module for Autopsy parse all Windows 10s wpndatabase.db databases, showing within Autopsy data from the most relevant tables of the database—Notification and NotificationHandler. Additionally, by resorting to four different record recovery methods, the software allows for the recuperation of older records that can yield potentially valuable data for the forensic examination.
Another source of notification messages is Windows Event Logs, namely the Microsoft-Windows-PushNotification-Platform\%4Operational.evtx event log. However, the log contains mostly control messages, with few or no user data, and thus has minor forensic value. Additionally, messages are presented in hex format, and encoded in base64, with some of them having additional internal payload, also encoded. Encoding makes for a difficult indexation, hardening searches.
Web applications, such as email clients and calendars, running within browsers can also trigger notifications. For Chromium-based browsers, these notifications are kept in LevelDB and can be recovered. Depending on the web application, some data with forensic value can be retrieved.
Our analysis of the first release of Windows 11 Home edition reveals that WPN infrastructure remains the same, with the exception of the addition of the TimeNotification in the wpndatabase.db databases.
Due to the limited scope and timespan of the data, it is not expectable that Windows 10/11’s notifications can yield a large volume of meaningful forensic artifacts. Nonetheless, in situations where other more traditional sources of data are not available or have failed to deliver useful data, notifications can still provide valuable artifacts.
As future work, we plan to add reporting to the module, using Autopsy’s support, and keep accompanying the evolution of Windows 10/11’s notification service to incorporate changes and evolution to the underlying databases.