Yahoo! Messenger Protocol

Yahoo! Messenger Protocol

The Yahoo! Messenger Protocol is the underlying network protocol used by the Yahoo! Messenger instant messaging client, for Yahoo!. Yahoo! Instant Messager supports many features beyond just messaging, including off-line messaging, file transfer, chat, conferencing, voice chat, webcams and avatars.

Overview

The purpose of the YMSG protocol is to provide a language and series of conventions for software communicating with Yahoo!'s Instant Messaging service. In essence YMSG performs the same role for IM as HTTP does for the World Wide Web. Unlike HTTP, however, YMSG is a proprietary standard, aligned only with a single messaging service provider (namely, Yahoo!). Rival messaging services have their own protocols, some based on open standards, others proprietary, each effectively fulfilling the same role with different mechanics.

One of the fundamental tenets of instant messaging is the notion that users can see when someone is connected to the network — known in the jargon as 'presence'. Yahoo!'s protocol uses the mechanics of a standard internet connection to achieve presence, the same connection it uses to send and receive data. In order for each user to remain 'visible' to other users on the service, signaling their availability, their Yahoo! IM client software must maintain a functional, open, network connection linking the client to Yahoo!'s IM servers.

As some organizations block communication on the port used by Yahoo! IM, either because they choose to whitelist certain types of internet usage (only web surfing and email, for example) or because they seek to blacklist instant messaging services, Yahoo! provides an alternative route for connecting to their service which mimics the HTTP protocol used by the World Wide Web. Unfortunately, as HTTP has no inherent sense of a persistent connection, Yahoo! instead relies on the client frequently contacting the server in order to approximate the sense of a connection required to give each user presence on the IM network.

Originally the YMSG login procedure suffered from a security flaw known as a replay attack, in which a given password (or other authentication information) is always identically scrambled when sent across the network. This allows any attacker who witnesses the transmission to merely reproduce the message verbatim in order to successfully log in, without actually needing to know the original password (or other details) which generated it. But some time around 2000 or 2001 Yahoo! upgraded its service to introduce a random element to each login attempt, defeating any further potential for replay attacks.

With the exception of the login authentication details, data sent over a YMSG connection is not encrypted. YMSG uses a binary format in which the text portions of the data are transmitted in plain view. Therefore, while it is difficult for an attacker to seize control of a Yahoo! IM account, it is quite easy for them to read all messages sent to and from the account holder, along with other details such as the list of friends, if the attacker has control of one of the computers through which the data is routed.

Technical Overview

The YMSG protocol communicates between the client application, and a server, using a TCP/IP connection on port 5050 by default. Other ports may be used if this port is blocked. Alternatively, an HTTP route is also available for clients behind a well secured firewall, with HTTP requests being used to upload messages from the client, while downloading all messages which have accumulated on the server since the last request.

The client remains logged in for as long as the TCP/IP connection is kept open. Or, in the case of a client connected via HTTP, until the client fails to send a request for some time ('ping' messages are sent every thirty seconds or so).

Messages consist of a twenty byte header, followed by a variable length table of key/value pairs, where the key is an ASCII representation of a numeric code representing the field type, and the value is its associated data. A two byte separator, the hexadecimal values c0 80, are used to delimit each entry in this table.

Some parts of YMSG rely on other protocols. For example, file transfer is initially negotiated using YMSG, but the actual transfer of the file is done via HTTP. Webcams too use YMSG to discover and request permission to view a webcam, but HTTP to actually feed JPEG 2000 images from one client to another. Chatroom categories, rooms and lobbies are retrieved using HTTP as XML documents. Regular webcam connections use H.323. Yahoo! with voice uses SIP. For calls, VoIP is handled indirectly by Yahoo! servers so the chat client doesn't have direct access to it.

The chatroom categories can be retrieved from [http://insider.msg.yahoo.com/ycontent/?chatcat here] .

Login

The login process for YMSG is quite complex. First the client introduces itself with a message containing its username. The server responds with a rather long seed value, which looks like a mathematical equation. The client feeds this into a rather involved algorithm, along with the account's password, to produce two response values looking like variable assignments which are sent to the server. If these values match the server's expectations, the client is admitted and sent data associated with that account (such as buddy/friends lists).

Although the seed value looks like an equation, it is in reality little more than a series of instructions in which the operands control lookups into a series of in-built tables, and the operators determine which logic operation to perform. SHA1 is also used to create two message digest data arrays, which are then encoded using a table to resemble software variable assignments.

ee also

*Comparison of instant messaging clients
*Comparison of instant messaging protocols

External links

* [http://jymsg9.sourceforge.net YMSG Java API - Yahoo! Instant Messenger Support for Java]
* [http://hamsam.sourceforge.net Hamsam - Multi-protocol instant messaging API for Java]
* [http://libyahoo2.sourceforge.net libyahoo2 - A C library for Yahoo! Messenger]
* [http://cpan.uwinnipeg.ca/htdocs/Net-YMSG/Net/YMSG.html Net::YMSG - Perl Interface to the Yahoo! Messenger IM protocol]
* [http://www.venkydude.com/articles/yahoo.htm Yahoo Messenger Protocol]
* [http://www.ycoderscookbook.com/ Yahoo! Coders Cookbook]


Wikimedia Foundation. 2010.

Игры ⚽ Нужно сделать НИР?

Look at other dictionaries:

  • Yahoo! Messenger — Infobox Software name = Yahoo! Messenger caption = Yahoo! Messenger Beta for Windows Vista displaying Contact List collapsible = Yes developer = Yahoo! latest preview version = 1.2.1.1046 (Windows Vista) / 3.0b3 build 126432 (Mac OS X) latest… …   Wikipedia

  • Yahoo! — This article is about the corporation. For the search engine, see Yahoo! Search. For other uses, see Yahoo (disambiguation). Yahoo! Inc. Type Public Traded as NASDAQ:  …   Wikipedia

  • Yahoo! Mail — A screenshot of a Yahoo! Mail inbox Developer(s) …   Wikipedia

  • Yahoo! Voice — Infobox Software name = Yahoo! Voice caption = developer = Yahoo! operating system = Microsoft Windows Mac OS X genre = VoIP, Internet Phone service license = website = [http://voice.yahoo.com/ voice.yahoo.com] Yahoo! Voice is a Voice over IP PC… …   Wikipedia

  • Windows Live Messenger — Windows Live Messenger …   Wikipedia

  • Microsoft Notification Protocol — This article is about the technical details of Microsoft s IM protocol. For the service itself, see .NET Messenger Service. Microsoft Notification Protocol (MSNP, also known as the Mobile Status Notification Protocol) is an instant messaging… …   Wikipedia

  • OSCAR protocol — OSCAR or Open System for CommunicAtion in Realtime is AOL s flagship instant messaging and presence information protocol. Currently, OSCAR is in use for AOL s two main instant messaging systems: ICQ and AIM. Despite its name, the specifications… …   Wikipedia

  • Windows Live Web Messenger — Screenshot of Windows Live Web Messenger beta URL …   Wikipedia

  • Microsoft Messenger for Mac — Sign In screen of Messenger for Mac v8.0.0 on Mac OS X 10.6.4 Snow Leopard …   Wikipedia

  • Windows Live Messenger — Para el cliente incluido en Windows XP, véase Windows Messenger. Windows Live Messenger Desarrollador Microsoft http://explore.live.com/windows live messenger …   Wikipedia Español

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”