Protocols/MSNP: Difference between revisions
(→Index) |
No edit summary |
||
(13 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{Protocols/MSNP}} | |||
MSNP stands for "Microsoft Notification Protocol", the protocol used on MSN/Windows Live Messenger, all the way to when it was discontinued, and Skype's network used a heavily modified version of MSNP in the past. We not only will fully document the protocol, but will maintain and update it. | |||
If you want to contribute, you can request an account by sending an email to [mailto:accounts@wiki.nina.chat accounts@wiki.nina.chat] with desired username and also a few words on what you have to contribute (for spam control). You should also check the [[Needed]], which is a list of things we are looking for. | |||
If you want to contribute something anonymously or without registering, send it to [mailto:contribute@wiki.nina.chat contribute@wiki.nina.chat]. If anonymity is desired, state so, and your name/email will not be mentioned. | |||
You can also [[Donate|donate]] to help with this MSN/Windows Live revival, because it is a full time job at this point. | |||
= Clients = | |||
* [[Clients/Windows_Live_Messenger|Windows Live Messenger]] | * [[Clients/Windows_Live_Messenger|Windows Live Messenger]] | ||
** [[Clients/Windows_Live_Messenger/Messenger_Plus!|Messenger Plus!]] | ** [[Clients/Windows_Live_Messenger/Messenger_Plus!|Messenger Plus!]] | ||
== Overview | Read additional [https://escargot.chat/support/faq/ frequently asked questions] for clients and the Escargot service. | ||
= Protocol History = | |||
MSNP was first implemented with version 2 - MSNP2 - on July 17 1999. It only used TCP, no webservices or anything like that. | |||
As time went along, MSNP was extended and improved upon, incrementing its version number. By MSNP8, a new authentication system was being used: .NET Passport / Tweener. This was first time something essential was used that wasn't sent via the regular MSNP TCP socket. | |||
From a technical standpoint the MD5 method that was used in [[Protocols/MSNP/MSN Protocol Version 7|MSNP7]] was completely secure even from man in the middle attacks but Microsoft decided that it would be beneficial to MSN Messenger to authenticate directly with the passport servers, and [[Protocols/MSNP/Tweener]] was born. | |||
After MSNP8, other, newer protocol versions were released ([[Protocols/MSNP/MSN Protocol Version 9|MSNP9]], [[Protocols/MSNP/MSN Protocol Version 10|MSNP10]], [[Protocols/MSNP/MSN Protocol Version 11|MSNP11]], [[Protocols/MSNP/MSN Protocol Version 12|MSNP12]], [[Protocols/MSNP/MSN Protocol Version 13|MSNP13]] for WLM 8, et al). Most of the times the protocols introduced a more efficient way of storing contact lists and other properties, but also added new features as new clients were released to the public by the MSN Messenger team. | |||
MSNP's final version was MSNP21, if we consider Windows Live Messenger 2012 the last version. However, MSNP22 existed, it was used on the Metro Messaging app on Windows 8.0, and MSNP24 was used on Skype for a while - although very different from regular old MSNP. | |||
All connections to MSN servers take place over TCP/IP. The client always makes the outgoing connections to the servers. The official port for MSN Messenger is 1863, although there are many places in the protocol where alternate ports could be specified, so this may be subject to change. | |||
The connection to the server must be considered asynchronous - you can send many commands to the server without waiting for a reply, and the server won't necessarily reply to your commands in the order you sent them. The server may also send messages that are not in reply to any particular message from the client. However, sometimes (for example, when logging into a notification server) the protocol requires you to send one command then receive one command, and so on. | |||
There are also several OOB (out-of-band) protocols that take place directly between clients and do not involve the server. These protocols are described in their respective sections, and are not necessary for basic functionality of a client. | |||
= What is MSN Messenger? = | |||
The term 'MSN Messenger' is quite ambiguous, as Microsoft use the term to refer to several different parts of their instant messaging solution. You chat over the 'MSN Messenger network', the most popular program to connect to the MSN Messenger network is 'MSN Messenger', and the language that programs on the MSN Messenger network speak is 'MSNP', the '''M'''icro'''s'''oft '''N'''otification '''P'''rotocol. | |||
== What is the MSN Messenger Network? == | |||
The MSN Messenger network is a presence and instant messaging network from [http://www.microsoft.com Microsoft]. It went online in July 1999, and is neither the first nor the last instant messaging network. MSN Messenger is among the top four proprietary instant messaging networks. As of March 2003, there were far fewer unique users on the MSN Messenger network than on [[Protocols/OSCAR|AOL Instant Messenger]] or [[Protocols/OSCAR|ICQ]] but more than on [[Protocols/YMSG|Yahoo Messenger]]. | |||
== What is the MSN Messenger Protocol? == | |||
The MSN Messenger protocol consists of a series of commands sent between the client and the server. For example, when someone on your contact list signs out, the server sends a message like this to your client: '''FLN example@hotmail.com'''. On receiving this, the client should mark that contact as offline. | |||
The MSN Messenger protocol has undergone several revisions over the years. Microsoft's servers allow clients to use versions 8, 9, 12, 13, 14 & 15 of the protocol. Individual protocol versions are often written as 'MSNP8', 'MSNP9' and 'MSNP12', which stands for '''M'''icro'''s'''oft '''N'''otification '''P'''rotocol and is followed by the version number of the protocol. | |||
This site intends to fully document the MSN Messenger protocol and quirks of MSN Messenger servers so that third party software developers can write their own programs to interact with the network. | |||
The information on the protocol was gathered by reading the official IETF draft, reading various sources, analysing packets, analysing the official client, and writing programs. Most of this work was done by other members of the MSN Messenger research community, which we have just written up. If you have discovered something new about the protocol, please make it known in the [https://escargot.chat/forums/ forum]. | |||
== What is the MSN Client Protocol? == | |||
The MSN Client protocol consists of messages sent between clients. For example, when you say "hello" to a friend, your client sends a message to their client with hello as the body of the message. | |||
Until relatively recently, the MSN client protocol grew quite organically - one version of the official client would behave differently to another, and you just had to guess what behavior was expected by whom. Recently, attempts have been made to impose a version numbering system. | |||
= How does the protocol work? = | |||
MSN Messenger is a presence and instant messaging system. 'Presence' is whether you're online, whether you're sharing a webcam, etc. 'Instant messaging' is talking with other people. Users of presence and instant messaging systems (people, bots, etc.) are referred to as 'principals'. RFC 2778 provides a very good general overview of what a presence and instant messaging system does, and you're advised to read it if you haven't worked on one before. Where possible, technical terms used on this site have been taken from that document. | |||
An MSN Messenger session involves a connection to a 'Notification Server' (or 'NS'), which provides a presence service. The notification server allows you to connect to 'Switchboard Servers' ('SBs'), which provide an instant messaging service. | |||
== Notification Server (NS) == | |||
The connection to a notification server is the basis of an MSN Messenger session, as it handles your presence information: if you are disconnected from the notification server, you are no longer online to your buddies. The main purpose of the notification server is to handle presence information about yourself and the principals whose presence you've subscribed to. | |||
The notification server also performs some other services like notifying you about new e-mail in your [http://www.hotmail.com Hotmail] inbox and letting you create new (or join existing) switchboard sessions. When you're directed to join a switchboard session, you should open a new connection to the switchboard, and keep the notification server open. | |||
Note: The original draft refers to a third type of server known as a 'Dispatch Server', or 'DS'. However, throughout our documentation, the Dispatch Server is just treated as the default notification server. | |||
== Switchboard (SB) == | |||
The switchboard handles instant messaging sessions between principals. In other words, each person in an MSN chat corresponds to a connection to a shared switchboard session. Being in two conversations at once means connecting to two switchboard servers at once. Directly connected conversations between principals are not used in MSN Messenger, and the switchboard acts as a proxy between you and those you are chatting with. | |||
A switchboard session can have as many people in it as you like - there's no equivalent of the one-to-one conversations that there's no way of forcing a session not to accept more than two people. This can be quite awkward because some of the uses for a switchboard session (like initiating a file transfer) | |||
The SB is also where invitations to other services such as file transfer and NetMeeting are sent and received. Mobile paging is one of the only forms of communication that does not take place over a switchboard server. | |||
Note that the SB and the NS are not very tightly integrated. For example, when a principal in a switchboard session change his or her display name, the switchboard still sends out messages and other commands with the old display name. In addition, when a principal disconnects from the NS, all switchboard sessions still remain open until the client explicitly closes them. | |||
== Encoding == | |||
At the lowest level, computers can only send 1s and 0s to each other. In order for two computers to communicate, they must agree on what the 1s and 0s represent. In MSN Messenger (except in file transfer), they represent characters, such as "Latin Capital letter A", "Digital Four", or "Runic letter short-twig-sol". In other words, MSN Messenger is a text-based protocol. | |||
<!-- | |||
= Overview = | |||
Since the original sort of lacked a good overview page, because it just redirected to Version 8, below is the former side bar, which will be turned back into a sidebar later, but for now is a temporary overview/index. | Since the original sort of lacked a good overview page, because it just redirected to Version 8, below is the former side bar, which will be turned back into a sidebar later, but for now is a temporary overview/index. | ||
Line 12: | Line 90: | ||
Some fancy language needs to be here describing everything. | Some fancy language needs to be here describing everything. | ||
* [[Protocols/MSNP/Wishlist|Escargot Wishlist]]: List of things we're after that'd benefit Escargot development and support.** | |||
* [[Protocols/MSNP/Wishlist#Clients|Missing Client Versions]]: Ongoing list of missing builds of client software Escargot targets. Currently only accounts for MSN Messenger software.** | |||
* [[Protocols/MSNP/Activities|MSN/WLM Activities]]: Information about MSN Messenger/WLM Activities. | |||
* [[Clients/Windows_Live_Messenger|Client downloads]]: Versions of MSN/WLM for download. | |||
* [[Protocols/MSNP/Development#Clean_Install|Clean install]]: How to do a clean MSN Messenger/WLM install. | |||
* [[Protocols/MSNP/Clients|Compatibility]]: Escargot server compatibility with MSN Messenger/WLM versions. | |||
* [[Protocols/MSNP/Development#Debug_Logging|Debug logging]]: How to enable various MSN Messenger/WLM logging options to ease your life debugging MSN Messenger/WLM. | |||
* Gateways: | |||
** [[Protocols/MSNP/Gateway|HTTP gateway]]: Information about the MSN Messenger/WLM HTTP gateway. | |||
** [[Protocols/MSNP/XMPP|XMPP gateway]]: Information about the MSN Messenger/WLM XMPP gateway. | |||
* [[Protocols/MSNP/Clients#Identify_Version_from_Setup|Identify MSN Messenger/WLM version from setup]]: How to identify the exact MSN Messenger/WLM version contained in a setup file. | |||
* [[Protocols/MSNP#Documents|MSN/WLM PCAP files]]: PCAP files (Wireshark captures) of MSN Messenger/WLM traffic. | |||
* [[Protocols/MSNP#Polygamy|MSN Polygamy]]: How to enable MSN Polygamy manually. | |||
* [[Protocols/MSNP#Imported.2FImporting|MSNP protocol docs]]: MSNP documentation. | |||
* [[Protocols/MSNP/MSN_Protocol_Version_21|MSNP21 changes (w/ editors notes)]]: Changes introduced in the mess of a protocol that is MSNP21 | |||
* [[Protocols/MSNP/Scenarios/Mac|Messenger:mac Details]]: Technical information about the Messenger:mac client released by Microsoft. | |||
* [[Protocols/MSNP/Scenarios/WebTV|MSNP on WebTV/MSN TV]]: Notes on how MSNP was utilized on Microsoft's WebTV/MSN TV service. | |||
* [[Protocols/MSNP/Reference/Relaying_Party_Suite|Relaying Party Suite]]: Information on Relaying Party Suite, a challenge-response method utilized in MSNP15 and above. | |||
* [[Protocols/MSNP/Reference/Spotlife|Spotlife]]: Information about Spotlife, the system used to solve the NAT problem with the webcam functionality. | |||
* [[Protocols/MSNP/Development#Tools|Tools]]: Tools that may ease your life working with MSN Messenger/WLM. | |||
* [[Protocols/MSNP#URLs_used_by_MSN|URLs used by MSN/WLM]] | |||
--> | |||
= Login logs = | |||
* [[Protocols/MSNP/Clients/Logs/WLM_2009|WLM 2009 v14.0.8117.416]] | |||
* [[Protocols/MSNP/Clients/Logs/WLM_2012|WLM 2012 v16.4.3528.331]] | |||
<!-- | |||
== Index == | == Index == | ||
''Windows Live Network Protocol'' | ''Windows Live Network Protocol'' | ||
Line 35: | Line 143: | ||
* [[Protocols/MSNP/Reference/Error_List|Error List]] | * [[Protocols/MSNP/Reference/Error_List|Error List]] | ||
* [[Protocols/MSNP/Reference/Commands|Commands]] | * [[Protocols/MSNP/Reference/Commands|Commands]] | ||
* [[Protocols/MSNP/Reference/Relaying_Party_Suite|Relaying Party Suite]] | |||
* [[Protocols/MSNP/Reference/Spotlife|Spotlife]] | |||
''Client Logs'' | |||
* [[Protocols/MSNP/Clients/Logs/WLM_2009|WLM 2009]] | |||
* [[Protocols/MSNP/Clients/Logs/WLM_2012|WLM 2012]] | |||
''Scenarios'' | ''Scenarios'' | ||
Line 100: | Line 214: | ||
</pre> | </pre> | ||
Latest revision as of 04:02, 3 December 2024
MSNP Protocol |
Introduction • Terms • Clients |
Reference |
Error List • Commands • Relying Party Suite • Spotlife |
Services |
XMPP • HTTP Gateway • Tabs • Activities |
Documentation |
Development Tools • MSNP Grid |
Polygamy • URLs used by MSN |
Documents |
Protocol Versions |
Version 21 |
Version 18 |
Version 16 |
Version 15 |
Version 14 |
Version 13 |
Version 12 |
Version 11 |
Version 9 |
Version 8 |
Version 2 |
MSNC |
Introduction • P2P • Object Descriptor • Display Pictures • File Transfer |
Scenarios |
Microsoft Messenger for Mac |
MSNP on WebTV (MSNTV) |
MSNP stands for "Microsoft Notification Protocol", the protocol used on MSN/Windows Live Messenger, all the way to when it was discontinued, and Skype's network used a heavily modified version of MSNP in the past. We not only will fully document the protocol, but will maintain and update it.
If you want to contribute, you can request an account by sending an email to accounts@wiki.nina.chat with desired username and also a few words on what you have to contribute (for spam control). You should also check the Needed, which is a list of things we are looking for.
If you want to contribute something anonymously or without registering, send it to contribute@wiki.nina.chat. If anonymity is desired, state so, and your name/email will not be mentioned.
You can also donate to help with this MSN/Windows Live revival, because it is a full time job at this point.
Clients
Read additional frequently asked questions for clients and the Escargot service.
Protocol History
MSNP was first implemented with version 2 - MSNP2 - on July 17 1999. It only used TCP, no webservices or anything like that.
As time went along, MSNP was extended and improved upon, incrementing its version number. By MSNP8, a new authentication system was being used: .NET Passport / Tweener. This was first time something essential was used that wasn't sent via the regular MSNP TCP socket.
From a technical standpoint the MD5 method that was used in MSNP7 was completely secure even from man in the middle attacks but Microsoft decided that it would be beneficial to MSN Messenger to authenticate directly with the passport servers, and Protocols/MSNP/Tweener was born.
After MSNP8, other, newer protocol versions were released (MSNP9, MSNP10, MSNP11, MSNP12, MSNP13 for WLM 8, et al). Most of the times the protocols introduced a more efficient way of storing contact lists and other properties, but also added new features as new clients were released to the public by the MSN Messenger team.
MSNP's final version was MSNP21, if we consider Windows Live Messenger 2012 the last version. However, MSNP22 existed, it was used on the Metro Messaging app on Windows 8.0, and MSNP24 was used on Skype for a while - although very different from regular old MSNP.
All connections to MSN servers take place over TCP/IP. The client always makes the outgoing connections to the servers. The official port for MSN Messenger is 1863, although there are many places in the protocol where alternate ports could be specified, so this may be subject to change.
The connection to the server must be considered asynchronous - you can send many commands to the server without waiting for a reply, and the server won't necessarily reply to your commands in the order you sent them. The server may also send messages that are not in reply to any particular message from the client. However, sometimes (for example, when logging into a notification server) the protocol requires you to send one command then receive one command, and so on.
There are also several OOB (out-of-band) protocols that take place directly between clients and do not involve the server. These protocols are described in their respective sections, and are not necessary for basic functionality of a client.
What is MSN Messenger?
The term 'MSN Messenger' is quite ambiguous, as Microsoft use the term to refer to several different parts of their instant messaging solution. You chat over the 'MSN Messenger network', the most popular program to connect to the MSN Messenger network is 'MSN Messenger', and the language that programs on the MSN Messenger network speak is 'MSNP', the Microsoft Notification Protocol.
What is the MSN Messenger Network?
The MSN Messenger network is a presence and instant messaging network from Microsoft. It went online in July 1999, and is neither the first nor the last instant messaging network. MSN Messenger is among the top four proprietary instant messaging networks. As of March 2003, there were far fewer unique users on the MSN Messenger network than on AOL Instant Messenger or ICQ but more than on Yahoo Messenger.
What is the MSN Messenger Protocol?
The MSN Messenger protocol consists of a series of commands sent between the client and the server. For example, when someone on your contact list signs out, the server sends a message like this to your client: FLN example@hotmail.com. On receiving this, the client should mark that contact as offline.
The MSN Messenger protocol has undergone several revisions over the years. Microsoft's servers allow clients to use versions 8, 9, 12, 13, 14 & 15 of the protocol. Individual protocol versions are often written as 'MSNP8', 'MSNP9' and 'MSNP12', which stands for Microsoft Notification Protocol and is followed by the version number of the protocol.
This site intends to fully document the MSN Messenger protocol and quirks of MSN Messenger servers so that third party software developers can write their own programs to interact with the network.
The information on the protocol was gathered by reading the official IETF draft, reading various sources, analysing packets, analysing the official client, and writing programs. Most of this work was done by other members of the MSN Messenger research community, which we have just written up. If you have discovered something new about the protocol, please make it known in the forum.
What is the MSN Client Protocol?
The MSN Client protocol consists of messages sent between clients. For example, when you say "hello" to a friend, your client sends a message to their client with hello as the body of the message.
Until relatively recently, the MSN client protocol grew quite organically - one version of the official client would behave differently to another, and you just had to guess what behavior was expected by whom. Recently, attempts have been made to impose a version numbering system.
How does the protocol work?
MSN Messenger is a presence and instant messaging system. 'Presence' is whether you're online, whether you're sharing a webcam, etc. 'Instant messaging' is talking with other people. Users of presence and instant messaging systems (people, bots, etc.) are referred to as 'principals'. RFC 2778 provides a very good general overview of what a presence and instant messaging system does, and you're advised to read it if you haven't worked on one before. Where possible, technical terms used on this site have been taken from that document.
An MSN Messenger session involves a connection to a 'Notification Server' (or 'NS'), which provides a presence service. The notification server allows you to connect to 'Switchboard Servers' ('SBs'), which provide an instant messaging service.
Notification Server (NS)
The connection to a notification server is the basis of an MSN Messenger session, as it handles your presence information: if you are disconnected from the notification server, you are no longer online to your buddies. The main purpose of the notification server is to handle presence information about yourself and the principals whose presence you've subscribed to.
The notification server also performs some other services like notifying you about new e-mail in your Hotmail inbox and letting you create new (or join existing) switchboard sessions. When you're directed to join a switchboard session, you should open a new connection to the switchboard, and keep the notification server open.
Note: The original draft refers to a third type of server known as a 'Dispatch Server', or 'DS'. However, throughout our documentation, the Dispatch Server is just treated as the default notification server.
Switchboard (SB)
The switchboard handles instant messaging sessions between principals. In other words, each person in an MSN chat corresponds to a connection to a shared switchboard session. Being in two conversations at once means connecting to two switchboard servers at once. Directly connected conversations between principals are not used in MSN Messenger, and the switchboard acts as a proxy between you and those you are chatting with.
A switchboard session can have as many people in it as you like - there's no equivalent of the one-to-one conversations that there's no way of forcing a session not to accept more than two people. This can be quite awkward because some of the uses for a switchboard session (like initiating a file transfer)
The SB is also where invitations to other services such as file transfer and NetMeeting are sent and received. Mobile paging is one of the only forms of communication that does not take place over a switchboard server.
Note that the SB and the NS are not very tightly integrated. For example, when a principal in a switchboard session change his or her display name, the switchboard still sends out messages and other commands with the old display name. In addition, when a principal disconnects from the NS, all switchboard sessions still remain open until the client explicitly closes them.
Encoding
At the lowest level, computers can only send 1s and 0s to each other. In order for two computers to communicate, they must agree on what the 1s and 0s represent. In MSN Messenger (except in file transfer), they represent characters, such as "Latin Capital letter A", "Digital Four", or "Runic letter short-twig-sol". In other words, MSN Messenger is a text-based protocol.
Login logs