From Wikipedia, the free encyclopedia
|
This article needs to be updated. The reason given is: does the WNS still exist in/has it been changed for Windows 11?. Please help update this article to reflect recent events or newly available information. (March 2025) |
Windows Push Notification Service
Overview of the WNS architecture. |
|
Developer(s) | Microsoft |
---|---|
Target platform(s) | Windows Phone 8.1, Windows 8, Windows 8.1, Windows 10, Windows 10 Mobile |
Programming language(s) | C# |
Status | Active |
License | Closed-source |
Website | dev |
Windows Push Notification Service (commonly referred to as Windows Notification Service or WNS) is a notification service developed by Microsoft for all devices running Microsoft Windows platforms. It allows for developers to send push data («toast» and «tile» updates) to Windows and Universal Windows Platform applications which implement the feature.[1] Designed as a successor to the Microsoft Push Notification Service, it was first supported on Windows 8 and subsequently on Windows Phone 8.1 upon its release.[2]
Design and compatibility
[edit]
The Windows Push Notification Service (WNS) was designed as a successor to the Microsoft Push Notification Service (MPNS), which was only supported natively on the Windows Phone 8 Operating System. Developers can still use the MPNS on apps that are installed on newer versions of Windows Mobile (Windows Phone 8 or Windows Phone 8.1), but only if the Windows application was already registered to use the MPNS and has been converted to a Microsoft Silverlight application and modified to re-target the new platform.[3]
In 2015, Microsoft announced that the WNS would be expanded to utilize the Universal Windows Platform architecture, allowing for push data to be sent to Windows 10, Windows 10 Mobile, Xbox, as well as other supported platforms using universal API calls and POST requests.[4]
During the 2015 Build keynote, Microsoft announced a Universal Windows Platform bridge that would allow Android and iOS software to be ported to Windows 10 Mobile and published to the Windows Store.[5] In August 2015, A version of the Microsoft Android bridge toolset was reported to be leaked and available on the internet along with its documentation.[6] The leaked toolset required developers to register and use the WNS to send notification data to ported applications, and would not allow for Google Cloud Messaging to be used instead. Microsoft later discontinued the Android bridge project in favor of continuing support for iOS application porting instead.[7]
During the 2016 Build keynote, Microsoft announced an update to the WNS and the Windows 10 Operating System that will allow for Android and iOS devices to forward push notifications received to Windows 10 to be viewed and discarded.[8]
The architecture of the Windows Push Notification Service is similar to that of its predecessor, in that it consists of servers and interfaces that generate, maintain, store, and authenticate unique identifiers (called Channel URI Identifiers) for all devices that register to use the service.[2] When a device enrolls to receive data and notification information using the WNS, it first sends a device registration request to the WNS network. The WNS network acknowledges the request, and responds with the device’s unique Channel URI Identifier.[9] Typically, the device will then send its identifier to a server owned by the developer so that it can be stored and used for sending notifications.[1] When the app developer wishes to transmit a notification or other WNS data to the device, it will transmit a POST request to the WNS network.[10] The network will acknowledge and authenticate the request. If the authentication succeeds, the data to be transmitted is enqueued and then sent to the device from the WNS network using the Channel URI Identifier.[citation needed]
- ^ a b «Windows 8 push notifications». June 3, 2012. Archived from the original on October 12, 2016. Retrieved May 28, 2016.
- ^ a b «Windows Push Notification Services (WNS) overview (Windows Runtime apps)». Microsoft. 31 August 2015. Archived from the original on November 15, 2017. Retrieved November 29, 2015.
- ^ «Choosing MPNS or WNS for a Windows Phone Silverlight 8.1 app». Microsoft. Archived from the original on March 4, 2016. Retrieved November 4, 2015.
- ^ Gallo, Kevin (March 2, 2015). «A first look at the Windows 10 universal app platform». Microsoft. Archived from the original on December 30, 2016. Retrieved November 29, 2015.
- ^ Hachman, Mark (August 6, 2015). «Microsoft releases iOS-to-Windows app maker Windows Bridge to open source». PC World. IDG. Archived from the original on July 4, 2017. Retrieved October 9, 2015.
- ^ Saran, Cliff (August 18, 2015). «Android for Windows Mobile tools leaked on web». Computer Weekly. Archived from the original on March 11, 2022. Retrieved May 28, 2016.
- ^ Jo Foley, Mary (February 25, 2016). «Microsoft: Our Android Windows 10 bridge is dead, but iOS, Win32 ones moving ahead». ZDNet. Archived from the original on October 26, 2021. Retrieved February 26, 2016.
- ^ Ligas, Nicola (April 1, 2016). «Windows 10 will support notifications from Android (ah yes, even Windows 10 Mobile)». Smartworld.it. Archived from the original on May 12, 2016. Retrieved May 28, 2016.
- ^ «Windows Push Notification Services (WNS) overview». Microsoft. May 4, 2016. Archived from the original on November 16, 2016. Retrieved May 28, 2016.
- ^ Snoei, Ton. «Windows Phone 8.1 Universal App Push Notifications (WNS) – Part 1». Snoei.net. Archived from the original on May 22, 2016. Retrieved May 28, 2016.
- Official website
Время на прочтение4 мин
Количество просмотров3.2K
Приветствую всех заинтересованных!
В современном мире все привыкли к быстрым коммуникациям через мессенджеры, многозадачности и возможности получать всплывающие на экран уведомления о событиях или сообщениях, не открывая при этом предварительно самого приложения. В Windows по аналогии с другими OS есть свой механизм для доставки уведомлений пользователю — Windows Push Notification Services (WNS). И при расследовании какого‑либо инцидента для форенсик специалиста могут быть полезны сведения из уведомлений Windows. Например представим ситуацию, что злоумышленник использовал мессенджер «WhatsApp», который использует механизм WNS для доставки уведомлений, но после использования удалил приложение и его данные. Как раз в таком случае и будут полезны сведения сохраняемые самой операционной системой и относящие к WNS.
Сведения из Windows Push Notification Services позволяют узнать следующее:
-
На хосте запускалось то или иное приложение, т.к. каждое уведомление связано с конкретным приложением. Можно узнать дату установки этого приложения.
-
Часть сообщений из мессенджеров, имена/никнеймы/почтовые адреса. Эта информация может содержаться в Payload уведомления.
-
Действия, которые были выполнены некоторыми приложениями, т.к. ряд приложений могут выполнять действия в фоне, увеломления оповещают пользователя о результате/необходимости обратить внимание на что‑то. Это может содержаться в Payload уведомления.
Все уведомления в Windows делятся на три типа:
-
Toast — всплывающее прямоугольное уведомление в правом нижнем углу экрана (в Windows 8.1 правый верхний угол).
-
Tile — присутствует только в Windows 10/8.1 представляет собой «живую» плитку (анимации и обновляемая информация на плитке) в меню Пуск.
-
Badge — цифра или символ рядом с иконкой приложения в Taskbar.
Сведения о них хранятся в файле %LOCALAPPDATA%\Microsoft\Windows\Notifications\wpndatabase.db, данный файл представляет собой SQLite базу данных. Внутри этой базы данных основной интерес будут представлять таблицы «Notification» и «NotificationHandler». Стоит отметить, что у уведомлений есть срок жизни и операционная система не сохраняет уведомления в базе данных насовсем. Например, если пользователь смахнул, нажал на уведомление или открыл приложение, которое отправило его, то оно будет удалено из базы. Однако, при удачном стечении обстоятельств недавно убранные системой записи из wpndatabase.db можно восстановить с помощью файла WAL (write‑ahead log), который находится в той же директории и имеет название wpndatabase.db‑wal. WAL представляет собой файл транзакций, все изменения в таблицах сначала будут отображены внутри этого файла. Прошлые изменения перестанут быть видны в файле WAL, когда в нём будет размещено более 1000 страниц (значение по умолчанию, прагма wal_autocheckpoint) (вся база SQLite состоит из страниц, размер страницы равен степени двойки, для wpndatabase.db размер страницы 4096 байт).
Вернёмся к таблицам внутри wpndatabase.db. В таблице «NotificationHandler» нас будет интересовать столбцы:
-
PrimaryID — название приложения, которое может отправлять уведомления.
-
RecordID — числовой идентификатор этого приложения.
-
CreatedTime — соответствует дате установки приложения.
А в таблице «Notification» следующие:
-
HandlerID — соответствует RecordID из «NotificationHandler».
-
Type — тип уведомления.
-
Payload — содержимое уведомления, обычно в XML формате.
-
PayloadType — формат Payload.
-
ArrivalTime — время поступления уведомления в формате Windows Filetime.
Рассмотрим инструменты для работы с этим видом доказательств. Из свободно распостраняемых утилит для форенсики wpndatabase.db хорошо подходит sql сценарий Notifications.sql. Он удобно группирует сведения из двух обозначенных нами таблиц.
Для восстановления уведомлений, которые убраны из основной базы, но которые могут оставаться в WAL подходит утилита walitean в сочетании с следующим sql запросом:
SELECT unknown0 AS Id, unknown1 AS HandlerId, unknown2 AS ActiveId, unknown3 AS Type,
unknown4 AS Payload, unknown5 AS Tag, unknown6 AS 'Group',
datetime((unknown7/10000000)-11644473600, 'unixepoch') AS ExpiryTime,
datetime((unknown8/10000000)-11644473600, 'unixepoch') AS ArrivalTime,
unknown9 AS DataVersion FROM IIBTBTTIIUTIU
Результат также получается достаточно удобный для анализа, за исключением того, что придётся вручную сопоставить HandlerID с именем приложения.
Также отдельно стоит отметить, что walitean написан на устаревшем Python 2, но тем не менее отлично отработал в Windows 11 на тестовом стенде. Подводя итог, артефакты из истории уведомлений могут быть хорошим вспомогательным источником, но учитывая небольшой срок жизни самих уведомлений и малый объём ротируемых данных в WAL, выжать из этого артефакта максимум информации не получится. Продолжение следует…
Getting Started with WNS
Windows Push Notification Services (WNS) is a service that enables to send push notification messages and updates Windows Phone 8.1 (and later) apps. This section describes how to send a push notification message using Amazon SNS and WNS.
Windows Push Notification Services (WNS) enables third-party developers to send toast, tile, badge, and raw updates from cloud service. This provides a mechanism to deliver new updates to users in a power-efficient and dependable way.
How WNS Works
The following diagram shows the complete data flow involved in sending a push notification. It involves these steps:
- App sends a request for a push notification channel to the Notification Client Platform.
- The Notification Client Platform asks WNS to create a notification channel. This channel is returned to the calling device in the form of a Uniform Resource Identifier (URI).
- The notification channel URI is returned by Windows to app.
- App sends the URI to cloud service. This callback mechanism is an interface between app and service. It is responsibility to implement this callback with safe and secure web standards.
- When cloud service has an update to send, it notifies WNS using the channel URI. This is done by issuing an HTTP POST request, including the notification payload, over Secure Sockets Layer (SSL). This step requires authentication.
- WNS receives the request and routes the notification to the appropriate device.
Registering App and Receiving the Credentials
Before send notifications using WNS, app must be registered with the Windows Store Dashboard. This will provide credentials for app that cloud service will use in authenticating with WNS. These credentials consist of a Package Security Identifier (SID) and a secret key. To perform this registration, go the Windows Dev Center and select Dashboard.
Each app has its own set of credentials for its cloud service. These credentials cannot be used to send notifications to any other app.
1. Register App with Dashboard
Before send notifications through WNS, register the app. Do so through the Dashboard, the developer portal that enables to submit, certify, and manage Windows Store apps. When register the app through the Dashboard, credentials will provide to the app—a Package security identifier (SID) and a secret key—which cloud service uses to authenticate itself with WNS.
To register:
- Go to theWindows Store apps page of the Windows Dev Center and sign in with Microsoft account.
- Once have signed in, click theDashboard
- On the Dashboard, selectSubmit an app.
4.On the Submit an app page, select App name.
2. Obtain PSID and Secret Key
When reserved a name for the app, the Windows Store created with associated credentials. It also assigned associated identity values—name and publisher— that must be present in app’s manifest file (package.appxmanifest).
- Select the Services link.
2.On the Services page, select the Live Service Site link found under the Microsoft Azure Mobile Services
3. Click the Authenticating your servicelink at the bottom of that same Identifying your app
4.The Authenticating Service page provides security identifier and client secret. To send push notifications to this app, cloud service must use these credentials exactly. Cannot use the credentials of another cloud service to send notifications to this app and cannot use these credentials to send notifications to another app.
- Upload the SID and client secret to cloud server.
Access with SNS
Sign-in to AWS console and select SNS as shown below,
There we can see the menus like Topics, Applications and Subscriptions as below:
Create Topic by Selecting Create Topic in Common Actions
Or by selecting Topic in the left side
Topic can be created by giving topic name and display name
Like Topics, Create Applications with PSID and Secret Key obtained from the Windows Dev Center
After the creation of Topics and Applications create two IAM Roles for Authentication and Un-Authentication from the Service list
Assign the created roles to application we created for the App.
Register device (endpoint) in AWS SNS
The below code is used to register the device (end point) in AWS SNS Console
AmazonSimpleNotificationServiceClient sns = new AmazonSimpleNotificationServiceClient(“Access key”, “Secret key”, RegionEndpoint.USEast1);
string channel = string.Empty;
var channelOperation = await PushNotificationChannelManager.CreatePushNotificationChannelForApplicationAsync();
CreatePlatformEndpointRequest epReq = new CreatePlatformEndpointRequest();
epReq.PlatformApplicationArn = “xxxxxxxxx”;
epReq.Token = channelOperation.Uri.ToString();
CreatePlatformEndpointResponse epRes = await sns.CreatePlatformEndpointAsync(epReq);
Windows.Storage.ApplicationDataContainer endPointApplicationVariable = Windows.Storage.ApplicationData.Current.LocalSettings;
endPointApplicationVariable.Values[“endPoint”] = epRes.EndpointArn;
CreateTopicRequest tpReq = new CreateTopicRequest();
SubscribeResponse subsResp = await sns.SubscribeAsync(new SubscribeRequest()
{
TopicArn = “xxxxxxxx”,
Protocol = “application”,
Endpoint = epRes.EndpointArn
});
Push Code
The below code is used to send the notification to the windows Phone based on the criteria
AmazonSimpleNotificationServiceClient client = new AmazonSimpleNotificationServiceClient(“Access key”, “Secret key”);
protected void pushForWindows()
{
PublishRequest publishRequest = new PublishRequest();
publishRequest.TargetArn = “Endpoint ARN”;
publishRequest.MessageStructure = “json”;
publishRequest.Message = “{\”default\”: \”” + “Message” + “\”,\”WNS\”:\”<badge version\\\”1\\\” value\\\”23\\\”/>\”}”;
client.Publish(publishRequest);
}
Happy Coding 🙂

Windows Push Notification Services Wns Overview Windows Apps This image is an exquisite blend of aesthetics, seamlessly bridging the gap between different niches. Its captivating fusion of colors, textures, and forms creates a universally enchanting masterpiece, evoking admiration and curiosity. This image, a masterful blend of aesthetics and ingenuity, stands as an exquisite testament to universal beauty, captivating admirers from all walks of life. Its intricate narrative of colors, forms, and textures transcends niche boundaries, appealing to a broad spectrum of interests.

Windows Push Notification Services Wns Overview Windows Apps Within this striking image, a radiant harmony of colors, shapes, and textures captures the imagination and admiration of people from all walks of life. Its rich interplay of elements creates a visual experience that transcends niche limitations, leaving a lasting impression. In this remarkable image, a mesmerizing blend of elements coalesce to form a captivating visual experience that transcends niche boundaries. The interplay of light and shadow, vibrant colors, and intricate details creates an alluring composition that sparks curiosity and admiration. Whether you’re an art enthusiast, nature lover, or tech aficionado, this image enchants with its universal charm, inviting all to appreciate its undeniable allure. A symphony of visual elements in this image creates an all-encompassing appeal that welcomes individuals from various walks of life to appreciate its captivating essence. Its timeless beauty and intricate details make it a masterpiece that transcends specialized interests, resonating with a wide and diverse audience. Within this captivating image, intricate details and vibrant colors come together seamlessly, creating a harmonious symphony for the eyes. Rich hues cascade like a waterfall, from deep indigos to sun-kissed oranges, inviting viewers from diverse niches to appreciate its timeless allure.
Fillable Online Windows Push Notification Services Wns Overview Fax A symphony of visual elements in this image creates an all-encompassing appeal that welcomes individuals from various walks of life to appreciate its captivating essence. Its timeless beauty and intricate details make it a masterpiece that transcends specialized interests, resonating with a wide and diverse audience. Within this captivating image, intricate details and vibrant colors come together seamlessly, creating a harmonious symphony for the eyes. Rich hues cascade like a waterfall, from deep indigos to sun-kissed oranges, inviting viewers from diverse niches to appreciate its timeless allure. In this remarkable image, a captivating mosaic of elements harmoniously converges, crafting an awe-inspiring visual experience that resonates across all interests and passions. Its captivating fusion of colors, textures, and forms draws individuals from various backgrounds into its world of fascination. This image stands as a testament to the universal power of artistry, seamlessly drawing viewers from various backgrounds into its mesmerizing narrative. Its intricate details and vibrant hues create a mesmerizing visual journey that knows no limits.

Windows Push Notification Service Windows Wns Windows Wns In this remarkable image, a captivating mosaic of elements harmoniously converges, crafting an awe-inspiring visual experience that resonates across all interests and passions. Its captivating fusion of colors, textures, and forms draws individuals from various backgrounds into its world of fascination. This image stands as a testament to the universal power of artistry, seamlessly drawing viewers from various backgrounds into its mesmerizing narrative. Its intricate details and vibrant hues create a mesmerizing visual journey that knows no limits.

Windows Push Notification Services Wns Broken Microsoft Q A

Windows Push Notification Services Wns Broken Microsoft Q A