




已阅读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标准技术咨询合同范本
- 2025年企业办公室租赁合同样本
- 商场销售刀具管理制度
- 学校重大项目管理制度
- 医院捐赠耗材管理制度
- 垃圾厂子宿舍管理制度
- 县级政府债务管理制度
- 学校课间教育管理制度
- 食堂生鲜食材供应协议
- 除霜剂采购协议
- 七年级下册生物全册100个必背知识点
- 部编人教版高中语文必修下册知识梳理
- 2024年陕西普通高中学业水平考试通用技术试题
- 腰椎间盘脱出伴坐骨神经痛的健康宣教
- 供水泵(多级立式离心泵)培训课件2016424
- 山东2022年高考英语试题及答案
- 中国国防历史与国防建设课件
- 2022届高三化学一轮复习实验强基练12无机物制备类探究实验含解析
- 春香传(主演:王志萍-陈娜君)
- 2022制造业数据治理白皮书
- 仪器校准管理课件
评论
0/150
提交评论