




已阅读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内蒙古呼和浩特市新城区东街西街街道社区卫生服务中心招聘3人考前自测高频考点模拟试题及完整答案详解
- 2025贵州安顺市紫云苗族布依族自治县利源融资担保有限责任公司招聘1人考前自测高频考点模拟试题及一套完整答案详解
- 2025海南文昌市人民医院编外工作人员招聘(9号)模拟试卷附答案详解(黄金题型)
- 安全培训教师报到册课件
- 安全培训教师工作简历课件
- 小学安全培训总结讲话课件
- 小学安全培训学费课件
- 2025年佳木斯同江市事业单位公开遴选管理人员和专业技术人员73人考前自测高频考点模拟试题及答案详解(夺冠)
- 2025福建三明市大田县住房和城乡建设局(房地产服务中心)补招聘工作人员(政府购买服务)1人模拟试卷及参考答案详解一套
- 2025年杭州市余杭区卫生健康系统事业单位招聘编外工作人员73人模拟试卷及答案详解(夺冠)
- 铁路防雷及接地工程技术规范(TB 10180-2016)
- 饮品运输行业分析
- 胸痛的鉴别诊断和诊断流程课件
- 混料错料预防措施培训课件
- 白鹿原名著导读读书分享
- 医疗设备采购 投标技术方案 (技术方案)
- 国开《建设监理》形成性作业1-4答案
- 合同法教案(第十版)教案全套
- 工伤预防知识培训PPT
- 同济大学信纸
- 室早的危险分层及治疗选择
评论
0/150
提交评论