已阅读5页,还剩13页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
外文原文AStudyofInternetInstantMessagingandChatProtocolsInstantmessaging(IM)andInternetchatcommunicationhaveseenenormousgrowthoverthelastseveralyears.IMistheprivatenetworkcommunicationbetweentwousers,whereasachatsessionisthenetworkcommunicationbetweentwoormoreusers.Chatsessionscaneitherbeprivate,whereeachuserisinvitedtojointhesession,orpublic,whereanyonecanjointhesession.Thereareontheorderof100millionInternetIMusers,whereauserisdefinedasauniquenameononeofthemajorpublicIMnetworksAOLInstantMessenger(AIM),MicrosoftMessenger(MSN),orYahoo!Messenger(YMSG).Todate,littlehasbeendocumentedaboutthenetworkprotocolsusedbythesesystems.Theprotocolsarenotstandardized,manyofthemareproprietary,andtheyareevenseenasacontrolpointinthisbusinessbythecompaniesinvolved.ThisisdemonstratedbytherepeatedattemptsoftheIMservicestolockoutusersofothersystems,inanattempttokeeptheircustomersprivate.However,enoughinformationisavailabletodeterminethebroadcharacteristicsofthesesystems.WehavealsousedpackettracingofIMtrafficinordertogleanfurtherdetailsintotheseprotocolsandsystems.InthisarticlewepresentanoverviewofIMprotocolsasexemplifiedbythethreepopularsystems:AIM,MSN,andYMSG.Whileeachhasbeendesignedandimplementedseparately,theoverallgroupexhibitssimilarcharacteristicswithrespecttonetworkandsystemarchitecture.Forexample,alloftheIMprotocolsallowauthenticatingwithacentralserver,engaginginprivatemessages,andconversinginpublicchatrooms.Inaddition,someIMsystemsallowfiletransfers,Webcamusage,usingprivacycontrols,maintainingbuddylists,voicechatsessions,andotheroptions.Wediscussthesetopicsinmoredetailinthesectionstofollow.WeanalyzethemostrecentIMclientsavailable.However,allofthemajorIMprotocolshaveundergonesignificantrevisionsovertheyears,andchangestotheprotocolsoccuronaregularbasis.Aswithallnetworkedapplications,IMandchatprotocolshavealargepotentialdesignspace.ThissurveyhelpsexposesomeofthedimensionsavailabletoaprotocoldesignerandhowexistingIMsystemschosetodecidethem.Wherepossible,wedescribeadvantagesanddisadvantagesofeachdesignchoice,especiallywhenthechoiceaffectssecurity.FeaturesandFunctionsMostIMsystems,includingthethreethatweanalyzeherein,useaclient-serverarchitecture.IMproviderstypicallyhostasetofserversthatcustomerslogintoandexchangemessageswith.AfundamentalissuefacedbyIMserviceproviders,andthusdesignersoftheprotocols,ishowthesystemswillscalewithlargenumbersofusers.Ideally,eachproviderdesirestohavemillionsofcustomersloggedontotheirsystemsateachtime.Thisinturnrequiresthatorganizationshaveasystemarchitecturethatcanscalewiththenumberofusers.Twoapproachesareavailablehere:symmetricandasymmetric.Inasymmetricarchitecture,eachserverperformsidenticalfunctions,suchthataclientneednotdistinguishwhichserveritcontactstoengageinanactivitywith.Inanasymmetricapproach,eachserverisdedicatedtoaparticularactivitysuchasloggingin,discoveringotherusersonthenetwork,maintainingachatroom,orforwardinganinstantmessage.Theclient-serverarchitectureallowsIMserviceproviderstokeepsomedegreeofcontrolovertheirusers.Onthepositiveside,ithelpsovercomesomeofthetechnicalissuesassociatedwithtraversingthefirewallsthattheclientsareoftenbehind.Onthenegativeside,sincebothcontrolanddatapathsgothroughthecentralservers,scalingtheservicetomillionsofusersisdifficult.Thescalabilityissueisparticularlydifficultforvoicechatsessions.AsIMservicesarebeginningtosupportvoice-chatcommunications,peer-to-peerdatapathsarebeingused.AIMusesaclient-serverarchitecturefornormaloperationsbutusesapeer-to-peerapproachforvoice-chatsessionswheretheinitiatortalksdirectlytotherecipientaftercoordinatingthroughthesystem.Twoclientsthuscommunicatedirectly,withoutusingachatroom,usingaproprietaryvoiceprotocol.YMSGalsousesaclient-serverarchitecturefornormaloperationsaswellasvoice-chatservice.YMSGvoicetrafficisroutedthroughacentralizedvoice-chatserver.Clientsfirstcontactasetupserver“”whichthenredirectstheclienttothevoice-chathostingserver.OnebenefitoftheYMSGcentralizedvoiceserverapproachisthatitcansupportmultipleuserswithinthesamevoice-chatsessionandeachusercanspecifytheirownvoicespecificationwiththecentralvoiceserverbasedontheirnetworkspeed.MSNusesaclient-serverarchitecturefornormaloperationsandpeer-to-peerforvoice-chatcommunication.MSNvoice-chatsessionsarealsolimitedbetweentwousers.Allthreeservicesprovidearangeofadministrativeandmanagementfunctions.MostIMsystemshavemechanismsformaintaininglistsoffriends(andevenenemies).Thesearetypicallycalled“buddylists,”“allowlists,”and“blocklists.”Theselistsaremaintainedaspersistentstateontheserver,whichtheclientssynchronizewithwhentheylogin.Thelistsareusedforseveralpurposes.Buddylistsidentifypeoplethatauserwishestomonitorthepresenceof(forexample,tobenotifiedwhentheylogin).Blocklistsidentifypeoplethatauserwishestobeisolatedfrom,sothattheuserisnotbotheredorharassedbythosepeople.Blocklistsareaformofblacklisting;somesystemshavethecomplementaryfeatureofawhitelistcalledallowlists,whichspecifythatonlypeopleonthelistmaycommunicatewiththeuser.AIM,YMSG,andMSNallhavebuddylistsandblocklists.AIMandMSNalsohaveallowlists.MSNevenhas“reverseforwardlists,”whichinformsyouofthoseusersthathaveyouontheirforward(allow)lists.AIMhasanadditionalfeaturethatspecifiesagranularityofblocking,calledawarning.Warningsaresentinresponsetoreceivedmessagesthattheclientfindsunpleasantorinappropriate.Recipientsofwarningmessagesarepenalizedbyhavingtheirsendingratelowered.Warninglevelsdegradeslowlyovertime.AusabilityfeaturethatsomeIMsystemsprovideismetamessagesthatindicatethattheotheruserinanIMsessionistyping.Thisimprovesinteractivity,allowingtheusertorealizethattheotherpartyisintheprocessofcomposingamessageandpotentiallyholdoffontheirowntyping.The“typing”messagesareconsequentlyamessagetypeintheIMprotocol.AIM,YMSG,andMSNhavesuchmessagetypes.AIMevenhasthreegranularities:typing,nottyping,andtypedbuterased.OneoptionYMSGprovidesthattheothersdonotistheabilitytosendIMstousersthatarenotcurrentlyloggedontothesystem.Thesystemsavesthemessagesonpersistentstorageandthendeliversthemtotherecipientwhenthatpersonlogsontotheservice.AninterestingfeatureofferedbyAIMistheabilitytoengageinsecurecommunicationsbyencryptingtheIMsession.ClientscanobtainpublickeysfromAOL,aswellasthecorrespondingcertificatestoverifythem.SecureinstantmessagesaredoneusingSSLandthetwopeerpublickeys.Securechatroomsarecreatedusingashared256-bitAESsecretkeychosenbythechatroomcreator;invitationstothechatroomincludethesecretkey.YMSGandMSNdonothaveanysimilarcapability.Peer-to-peertextcommunicationisalsoofferedbysomesystemsusingdirectTCPconnectionsbetweenclients,sometimescalled“sidechats.”AIMandYMSGhavethisfeature,butMSNdoesnot.SystemArchitectureAllthreecommercialsystemsuseserverclustersforscalability.AIMandMSNtaketheasymmetricapproach.AIMdefinesseveraltypesofservers:login,BOS(basicOSCARservices),icon,usersearch,chatroomsetup,andchatroomhosting.MSNdefinesthreetypes:dispatch,notification,andswitchboard.Wedescribehowtheseserversareusedinmoredetailbelow.Incontrast,YMSGtakesthesymmetricapproach.Clientsneedonlycontactonetypeofserverandthenrouteallkindsofactivitiesthoughthatparticularserver.Forexample,YMSGconnectstoarandomserverinthecs#.domain,where#isatwo-digitdecimalnumber.Allsubsequentcommunicationisroutedthroughthatserver.SessionDistributionWenowexamineindetailhowthedifferentsystemsdistributesessionsacrosstheserversinresponsetodifferentactions.TheAIMsystemarchitectureisdepictedinFig.1.InAIM,aftertheclientlogsinwiththemainauthenticationserver(step1inFig.1),theclientisdirectedtoaBOSserver.TheclientopensasingleTCPconnectiontotheBOSserver(step2),whichiseffectivelythecontrolchannel.Mostsubsequentcommunicationoccursoverthisconnection,suchasbasicinstantmessages.Persistentconnectionsarealsomadetotheemailserver(step3)andtheuserinterestserver(step4).Newservices(checkingemailstatus,lookingupauser,etc.)requiresendingaservicerequesttotheBOSserver,whichreplieswithanewIPaddressandTCPportnumbertocontactforthatparticularservice.Anewconnectionisthenmadetothatserver.Theexceptioniswhenauserwishestojoinorcreateachatroomsession.Inthiscase,theclientfirstcontactstheBOSservertogetaccesstothechatroomsetupserver(step5),whichgrantspermissiontoachatroom.ThecredentialsfromthechatroomsetupserverarethenpresentedtotheBOSserver(step6),whichthenpointstheclienttoaparticularchatroomserver(step7).EachchatroomsessionismaintainedusingaseparateTCPconnection.Theconnectiontothechatroomsetupserverpersistsuntilseveralminutesafterallchatroomsessionsareended.TheBOSservercanforceaclienttoswitchtoanotherBOSserverthroughamigrationmessage.In1998,AOLpurchasedMirabilisLtd.,thecreatoroftheICQinstant-messagingsoftware,andconvertedtheAIMnetworktouseaversionoftheICQOSCARprotocol.OSCAR,whichstandsforOpenSystemforCommunicationinRealtime,issomewhatmisleading,sinceAOLhasneverpublishedthespecificationsoftheprotocol.TherearesomedifferencesbetweenfeaturessupportedbyICQandAIMbutoveralltheunderlyingprotocolisthesame.Figure1.AIMsystemarchitecture.TheMSNsystemarchitectureisshowninFig.2.MSNalsohasanasymmetricarchitecture,butwithonlythreetypesofservers:dispatch,notification,andswitchboard.Aclientinitiallycontactsthewell-knowndispatchserver(step1inFig.2)ifitdoesnotknowofanynotificationservers.Thedispatchserverthenredirectstheclienttoanotificationserver.Theclientthenopensasingleconnectiontothenotificationserver(step2)andmaintainsthisconnectionaslongastheclientisloggedintothesystem.ThisisthecontrolchannelintheMSNarchitecture.Thenotificationservermaintainsthepresenceofusersinthesystem,andpointstheclienttoindividualswitchboardserverswhenanewinstantmessageorchatsessioniscreated(step4);step3willbediscussedinthenextsubsection.Theswitchboardserverisusedbothforchatsessionsandinstantmessagestootherclients;thisdiffersfromtheotherservicesinthatMSNtreatsinstantmessagesandprivatechatroomsidentically.Instantmessagesareactuallychatroomssetupbetweentwouserswhereadditionaluserscanbeinvitedtothechatroom.TheTCPconnectiontotheswitchboardisopenforthelifetimeofthechatorIMcommunicationtotheotherclient.Theswitchboardserveralsohandlesinvitationsforfiletransfers,video,andvoice.WhileMSNdoesnothaveanexplicitmigrationmechanism,thenotificationservercanclosetheclientconnection,forcingtheclienttostartover.YMSG,ontheotherhand,isverysimpleduetoitssymmetricarchitecture,andisshowninFig.3.Thesameconnectionisusedforallinstantmessagesandchatsessions.Manycorporateenvironmentsemployfirewallstoscreenunwantedtraffic,withacommondefaulttoallowHTTPtraffic.Becauseofthis,manyIMsystemsallowtunnelingoverHTTPasawayaroundthesefirewalls.Interestingly,thethreecommercialIMsystemsallusethesamesymmetricarchitecturewhentunneledoverHTTP;namely,theclientonlyinteractswithasingleHTTPfront-endserver.ThenativeIMprotocoliseffectivelyencapsulatedontopofHTTP,withcommandsandresponsesbeingmultiplexedoverHTTPconnections.AIMusestwoHTTPconnections;oneforsubmittingrequestsasynchronously,andtheotherthatblockswaitingfortheresponses.YMSGusesasinglesynchronousconnection,suchthateachrequestblocksuntilaresponseisreceivedfromthenetwork.MSNalsousesasingleconnection,butsubmitsrequestsasynchronouslyandeitherreceivesaresponseorpollsforaresponsedependinguponthetypeofrequest.UserAuthenticationThefirstthingusersdowhentheylogontoanIMnetworkisauthenticatethemselvestothesystem.Again,severalapproachesarepossiblehere,withclearimplicationsforsecurity.SomeIMsystemsdonotgothroughthefullauthenticationprocessthatisdoneinothercontexts(e.g.,SSL/TLS1),sinceboththeuserandthesystemshareasecretkeyknownonlytothetwoofthem:theusersnameandpassword.Whiletheinitialsystemsign-upistypicallydoneusingHTTPsecuredbySSL/TLS,oncethenameandpasswordaredecided,loginauthenticationistypicallydonebyexchanginghashesofthesharedsecret.Inthisway,thepasswordisnevertransmittedintheclearoverthenetwork,althoughtheusernameis.BothAIMandYMSGworkthisway.Theadvantagetothisapproachisthatexpensivecryptooperationsareavoided,suchasRSApublickeyorAESsharedkeyencryption.Instead,relativelycheaperauthenticationalgorithmsbasedonMD5and/orSHAareused.Thedisadvantageisthatconfidentialityisnotprovided;observerscanmonitorthepacketexchangesanddeterminewhohasloggedin,eveniftheycannotdeterminethepassword.Sincethehashalgorithmsarewellknown,andthechallengeandhashresultaresentintheclear,thesystemsarevulnerabletodictionaryattacks.Usersmustthereforeusepasswordsthataredifficulttocrack.Inaddition,performingtheexchangeintheclearcouldleadtoconnectionhijacking;forexample,AIMusesthecookiereturnedbythelogonserverasacredentialsentinthecleartotheBOSserver.Thiscredentialmustbeusedwithin30secondsortheconnectionwillbeterminatedbytheBOSserver.Thissuggeststhatthereisawindowofopportunitywhereanadversarycouldmonitortheconversation,capturethecookie,anduseittoimpersonatethevictimtotheBOSserver.Figure2.MSNsystemarchitecture.MSNusestheMicrosoftPassportsystem.AfteraclientidentifiesitselftotheMSNnotificationserver,itisredirectedtothePassportloginserver(step3inFig.2),whereauthenticationisperformedoverSSL.TheloginserverthensuppliestheclientwithseveralencryptedcookiesthatserveascredentialstotheMSNnotificationservers.Whiletheinternalcryptoalgorithmsarenotpubliclycookiesaresentintheclear.Thusanattackercouldattemptdocumented,theencryptedtousethecookiesforimpersonationandman-in-the-middleattacks2,3.DataTransferOneofthekeyissuesinanyIMorchatprotocolishowprotocolheadersandpayloadsareencoded.Therepresentationofthisdatacantaketwoforms.Historically,manynetworkprotocolshaveusedabinaryrepresentationofdatainnetworkbyteorder;examplesincludeTCPandIP.Application-layerprotocolssuchasHTTPandSMTPhavetendedtouseatextbasedapproach.Themainadvantagetothebinaryrepresentationisthatitmakesmostefficientuseofspaceonthenetwork.Theadvantageofthetext-basedapproachesisthattherepresentationisclosertothewayhumansviewinformation,andthusdebuggingiseasier.AIMandYMSGbothusebinaryrepresentationfortheirheaders.AIMusesatwo-levelbinarystructure,calledFLAPandSNACpackets,illustratedinFig.4.FLAPpacketshavefixed-lengthheadersandvariable-lengthdata;SNACpacketsareasubtypeofFLAPpacketsthatincludeseveraladditionalfixed-lengthfieldsfollowedbyavariabledatacomponent.YMSG,incontrast,hasasingle-levelstructureoffixedYMSG,incontrast,hasasingle-levelstructureoffixedlengthfieldsfollowedbyvariable-lengthdata,asshowninFig.5.Thedatafieldisasequenceofkey-valuepairs,wherekeysarerepresentedasavariable-lengthASCIInumber.AIMandYMSGhavedifferentmethodsofencodingheaderinformation.AIMfavorsavariable-lengthencodingthatismoreefficientinhowmuchspaceonthewireittakes;YMSGhasamoreregularstructurethatissimplertoparseanddecode.UnlikeAIMandYMSG,MSNheadersaretextbased,asshowninFig.6.MSNheaderstaketheformof,wherecommandisathree-letterencoding,transactionIDisanintegernumber,andparameterListdependsonthecommand.Figure7showsanexampleofsomeMSNmessagesduringtheloginphase,wheredifferentprotocolandoperatingversionsarespecifiedandtheclientistransferredtoanotificationserver.VERindicateswhatnativeprotocolversionsaresupportedbytheclient.CVRindicatesLocaleID,OStype,OSversion,platformarchitecture,clienttype,clientversion,andfixedstringof“MSMSGS”followedbythepassportID.XFRissentbytheserverindicatingtheIPaddressandportofthenewnotificationserverNSfollowedbya0andtheoldIPaddressandport.OnepotentialproblemforIMserviceprovidersareusersthatsenddataatexcessiverates,floodingthenetworkwithuselesstrafficandinconveniencingotherusers.WhileTCPprovidessomeprotectionagainstthisthroughcongestioncontrol,someIMprovidershaveapparentlydecidedthatthisisnotsufficient.Thus,severalsystemsprovidesomekindofratecontroltopreventSPAMordenialofservicewithintheirnetworks.AIMhasarelativelycomplexalgorithmthathasdifferentratelimitsbasedonthemessagetype.Ratesarebasedonatimewindow(inseconds).Iftheclientexceedstherate,theuserwillbewarned,andifthebadbehaviorpersists,theserverwillstartdroppingmessagesandwilleveneventuallydisconnecttheclient.YMSGhasastaticlimitofthreeIMspersecond,whichisenforcedbytheclient.Thisimpliesthatratelimitingcouldbecircumventedbythird-partyclients(suchasgaimorxchat)thatdonotenforcethelimit.MSN,ontheotherhand,doesnothaveanyrate-limitingcontrol.Figure3.YMSGsystemarchitecture.AnotherwaythatIMsystemsminimizetheloadontheirnetworksisbygettingridofidleclients.Idleclientscauseloadonthesystemsbyconsumingmemory(suchasconnectionstate)andevenCPUcycles(throughtimermanagement).Thus,eachsystemmaintainsakeep-aliveheartbeatmessage;iftheclientdoesnotprovideaheartbeatorresponsetoaquery,theconnectionmaybeterminated.InthecaseofAIM,theclientmustsendakeep-aliveeveryminutetotheserver.YSMGhastwotypesofheartbeatrequests,aprimaryandasecondary,thattheservergeneratesandtheclientmustrespondto.Itisnotimmediatelyclearwhytwotypesofsessiontimeoutsareused.Typicalvaluesare60minutesfortheprimaryand13minutesforthesecondary.MSNhasbothclientandserverheartbeats.Whentheclientpings,theserverrespondswithhowlongtheclientshouldwaituntilthenextping.Whentheserverpings,itisachallengetotheclient,whichmustthenrespondwithanMD5hashofthechallengeandtheclientID.Figure4.AIMFLAPandSNACpacketformats.Figure5.YMSGpacketformat.FutureDirectionsRecently,theIETFhasembarkedonanefforttostandardizeIMandchatprotocols.Twocompetingstandardsarebeingdeveloped:onebasedonSIMPLE4andasecondonebasedonXMPP5.SIMPLEisanextensiontotheSessionInitiationProtocol(SIP)6thstaddsinstantmessagingandpresence.SIPisatext-basedcontrol-planeprotocolforestablishingmultimediasessionssuchasVoiceoverIP.SIPcanbetransmittedoverUDP,TCP,orSSL/TLS.TheSIP/SIMPLEworkinggroupdefinestwomodelsformessagingandchatsessions:thepagermodelandthesessionmodel.Thepagermodelisappropriatewhenauserwishestosendasmallnumberofshortmessages.Thesessionmodelisintendedforextendedconversations,suchaschatgroups.TheSIP/SIMPLEpagermetaphorissimilartothatofatwo-waypagerorSMSenabledhandset;thereisnonotionofasessionwithanexplicitstartandend,noranyexplicitassociationbetweenmessages.IMpayloadsarecarriedinsidetheSIPpacketviaanewMESSAGEmethod.SIMPLEthususestheSIMProutinginfrastructuretodelivermessagestoendpoints.SinceSIPisdesignedandusedprimarilyfortransportingcontrolmessages,thereispotentialfortrafficcongestionwithintheSIPinfrastructurewhe
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 河堤砌墙施工方案
- 石拱大桥施工方案
- 广西中考分数试卷及答案
- 瓦工标准施工方案
- 软件项目建设管理制度
- 西学中题库及答案
- 水泥试验检测试题及答案
- 2025事业单位统考高频考题试题及答案
- 文书模板-企业之间告知函的格式及范文
- 安全生产管理制度宣贯课件
- 2021欧洲临床营养与代谢协会ESPEN外科营养治疗实践指引全文
- 非直供电电能表总表单位与实际用电单位电费分割单模板
- 铍金属机械加工
- 线路大型养路机械捣固作业指导书
- 陕西诺正生物科技有限公司年产20000吨农药原药及中间体生产线建设项目环境影响报告
- 生产型企业各类型组织结构图模板(完整版)资料
- 联合动力1.5mw风机变桨系统维护指导书试用版
- GB/T 17880.5-1999平头六角铆螺母
- GB/T 15602-1995工业用筛和筛分术语
- 火力发电-锅炉本体课件
- 医院感染诊断及案例分析课件
评论
0/150
提交评论