版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
WebApplicationBruteForcing101–“EnemyoftheState(Mechanism)”
DavidEndlerMichaelSutton
iDEFENSEThePowerofIntelligence?SMOutlineWhatareSessionIDs?SecurityProblemswithSessionIDsAnEmergingThreat-BruteForcingWebSessionID’sNotableNewsItemsFunExploitationExamples6CommonProblemsGeneralProtectionMeasuresUsersVendorsDevelopersResourcesWebApplicationsLoginsTraditionalBruteForceguestAdmin123123PasswordEtc.SessionIDOverviewHTTPisstatelessprotocolRatherthanmakeauserauthenticateuponeachclickinawebapplication,asenseof“state”iscreatedInordertomaintainstate,asharedstring,token,orsecretbetweenHTTPclientandserverisusuallyusedbydevelopersEssentially,authenticationdata(username/password)exchangedfor“SessionID”WebStateAttacksSessionReplayAtraditionalreplayattackinthecryptographysenseisanattackinwhichavaliddatatransmissionismaliciouslyorfraudulentlyrepeated,eitherbytheoriginatororbyanadversarywhointerceptsthedataandretransmitsit.SessionHijackingSeizingcontrolofalegitimateuser'swebapplicationsessionwhilethatuseris“l(fā)oggedin”totheapplication
SessionIDSessionIDshouldINTHEORYbejustassecureasusername/passwordSessionIDOverviewWhileitisgenerallyclearthatusername/passwordpairsareindeedauthenticationdataandthereforesensitive,itisnotgenerallyunderstoodthatsessionIDsarealsojustassensitivebecauseoftheirfrequentuseforauthentication.SeeRFC2964(UseofHTTPStateManagement).SessionIDOverviewSessionIDsarecommonlystoredincookiesand/orURLs,andhiddenfieldsofwebpages(orsomecombination)SessionIDgeneratedbyWEBSERVER(IIS,etc.)whentheuserfirsthitsthesiteorbyWEBAPPLICATION(ATGdynamo,ApacheTomcat,BEAWebsphere,.jsp,.asp,perl,etc.)whentheuserlogsinCookieRefresherSometimesthecookiesaresettoexpire(i.e.,bedeleted)uponclosingthebrowser;thesearetypicallycalled“sessioncookies”or“non-persistent”cookiesPersistentcookieslastbeyondauser’ssession(i.e.“RememberMe”option)Persistentcookiesareusuallystoredontheuser’sharddriveinalocationaccordingtotheparticularoperatingsystemandbrowser(e.g.,C:\Programfiles\netscape\users\username\cookies.txtforNetscapeandC:\DocumentsandSettings\username\CookiesforIEonWin2K).CookieRefresherCookieRefresher(RFC2965)1.)domain:Thewebsitedomainthatcreatedandthatcanreadthevariable.2.)flag:ATRUE/FALSEvalueindicatingwhetherallmachineswithinagivendomaincanaccessthevariable.3.)path:PathnameoftheURL(s)capableofaccessingthecookiefromthedomain.4.)secure:ATRUE/FALSEvalueindicatingifanSSLconnectionwiththedomainisneededtoaccessthevariable.5.)expiration:TheUnixtimethatthevariablewillexpireon.Unixtimeisdefinedasthenumberofsecondssince00:00:00GMTonJan1,1970.Omittingtheexpirationdatesignalstothebrowsertostorethecookieonlyinmemory;itwillbeerasedwhenthebrowserisclosed.(expiresJuly27,2006)6.)name:ThenameoftheSessionIDvariable(inthiscaseApache).7.)value:ThevalueoftheSessionIDvariable(inthiscase51.16018996349247480).
FALSE/FALSE1154029490Apache51.160189963492474801234567CookieStoredSessionIDExamples.TRUE/rcFALSE1293768100sauidpp0010000000006DCC10255298230000591992.003F75FEF2.TRUE/FALSE1271361612B3qpaarsu48dai&b=2.FALSE/FALSE1026115299session-id103-1456769-7895034.TRUE/FALSE1183296824lucky8694036.TRUE/FALSE1341753778Wookie-Cookie13fe8fff4799f27dcf19c959dafa8437.TRUE/FALSE1154029490Iir=9p&in=4aweec66&i1=AFABCl.TRUE/FALSE1154029490PUt=1URLStoredSessionID/view/7AD30725122120803/r?iid=KVIJBUFDLPVMIVLXYUKB
/greet/view?FXA96K95JAEJS/en/index.jhtml;jsessionid=HYMJK3PJUSJ4CCQCQBJCGWQKAKAFUIV0?_requestid=21122/exec/obidos/subst/home/home.html/102-4524380-3923344SessionIDsinHTMLHiddenFields<FORMMETHOD=POSTACTION="/cgi-bin/bankonline.cgi"><inputtype="hidden"name="sessionID"value=”abcde1234”><inputtype="hidden"name="useraccount"value=”673-12745”><inputtype="submit"name="AccessMyBankInformation"></form>
SessionIDSecurityOverviewSessionIDsecurityisamicrocosmofWebApplicationSecurity.WebApplicationSecuritycutsthroughmanydifferentaspectsofanorganization’sinformationsecurityinfrastructure
AnExample:BruteForcingSessionID’sinURLSDearDavidEndler,
AnAnonymousAdmirerhassentyouagreetingcardfrom123G,aFREEservicecommittedtokeeppeopleintouch.
Toseeyourgreetingcard,choosefromanyofthefollowingoptionswhichworksbestforyou.
Method1
JustclickonthefollowingInternetaddress(ifthatdoesn'tworkforyou,copy&pastetheaddressontoyourbrowser'saddressbox.)
/card/08/01/05/20/BG20801052002282.htmlAnExample:BruteForcingSessionID’sinURLS/view/AD30725122116211/view/AD30725122118909/view/AD30725122120803/view/AD30725122122507/view/AD30725122124100AswestarttoassociatethatthedatewesenttheseelectroniccardsonwasJuly25at12:21PST,wecanstarttoeliminatesomemoreentropyoutofthissessionID(07251221).Noticethenthatwe’releftwithfiveincrementing“random”digitsattheendoftheURL.
/view/AD30725122116211
/view/AD30725122118909
/view/AD30725122120803
/view/AD30725122122507
/view/AD30725122124100AnExample:BruteForcingSessionID’sinURLSAUTOMATEDDEMO!WhyBruteForcingWebSessionID’sisBadCanresultinanonlineuser’swebapplicationaccountbeinghijackedorlossofprivacyEasytoexploitUnliketypicalloginscenario,nofailedloginlockoutPrevalentdisclosureamongsecuritymailinglistsTypicalsecuritysolutions(firewalls,IDS,etc.)donothingtodetectattacksLogdataisusuallynotthatdetailedIDSisnotwelldevelopedforWebApplicationattacksSSL(Serverside)doesnothingtoprotectagainsttheseattacksIntheNews“PrivacyholefoundinVerizonWirelessWebsite“Computerworld,Sept6,2001.
/securitytopics/security/privacy/story/0,10801,63587,00.html
/archive/1/211520/jstage/plsql/ec_navigation_wrapper.nav_frame_display?p_session_id=3346178&p_host=ACTION
URLExample:BruteForcingR
Thankyouforusing'sDomainManager.
Tochangeorre-enteryourpassword,pleasecopyandpastetheURLbelowintothe"Location"or"Address"fieldofyourwebbrowserandhitthe'Enter'keyonyourkeyboard.
Note:Ifyoure-mailprogramsupportsHTML,youmaybeabletoclickonthelinkbelow.
/change_password.cgi?155218782787
Note:Abovelinkwillbeexpirewithinthreedays
Example2:BruteForcingWebSessionID’s/change_password.cgi?486218782865/change_password.cgi?440218782891/change_password.cgi?685218782917/change_password.cgi?505218782956/change_password.cgi?435218782969/change_password.cgi?486218782865/change_password.cgi?440218782891
/change_password.cgi?685218782917
/change_password.cgi?505218782956
/change_password.cgi?435218782969URLExample–BruteForcingDOriginalMessageFrom:test@[mailto:test@]Sent:Monday,July01,20021:38PMTo:dendler@Subject:D.FILMDigitalMovieforDaveDavecreatedadigitalmovieforyou!YoucanviewitatthefollowingURL:/mm2s/mm_route.php?id=110532Cheers, DaveandDFILM. BesuretocheckoutthewebsiteatURLExample–BruteForcingDNoprivacyofotheruser’screations:/mm2s/mm_route.php?id=110532/mm2s/mm_route.php?id=110531/mm2s/mm_route.php?id=110530/mm2s/mm_route.php?id=110529/mm2s/mm_route.php?id=110528/mm2s/mm_route.php?id=110527/mm2s/mm_route.php?id=110526/mm2s/mm_route.php?id=…URLExample–S/servlets/servlets/mysendo?uId=76330URLExample–SViewotherpeople’sevents.Crashaparty,editanevent,cancelandevent,etc./servlets/servlets/mysendo?uId=76330/servlets/servlets/mysendo?uId=76331/servlets/servlets/mysendo?uId=76332/servlets/servlets/mysendo?uId=76333/servlets/servlets/mysendo?uId=76334/servlets/servlets/mysendo?uId=76335/servlets/servlets/mysendo?uId=76336/servlets/servlets/mysendo?uId=…CookieExample–FCookieExample–FLOGIN=dGVzdGluZzEyMy5pdGdvLmNvbToxMjMxMjM0;Base64decodethestring:/tools/base64.asp:1231234username:passwordNext,automateitwithaperlexploitbyfeedingencodedstringsintothecookieCookieExample–F%perlfreeservershack.pltryingtesttryingtest123trying123123trying1231234
Crackedit!Thepasswordtois1231234
GET/cgi-bin/util/my_member_areaUser-Agent:Mozilla/4.75[en](WindowsNT5.0;U)Cookie:LOGIN=dGVzdGluZzEyMy5pdGdvLmNvbToxMjMxMjM%3DCookie2:$Version=1
%CookieExample–FOramuchlongerway:usethebruteforceroneverysinglecookiecharactercombinationCookie/URLExample–ASomesitesusetheURLANDCookieforauthentication:6CommonProblemsWeakAlgorithm–ManyofthemostpopularwebsitestodayarecurrentlyusinglinearalgorithmsbasedoneasilypredictablevariablessuchastimeorIPaddress.NoFormofAccountLockout–WithregardtoSessionIDbruteforceattacks,anattackercanprobablytryhundredsorthousandsofSessionIDsembeddedinalegitimateURLwithoutasinglecomplaintfromthewebserver.
ShortKeySpace–EventhemostcryptographicallystrongalgorithmstillallowsanactiveSessionIDtobeeasilydeterminedifthesizeofthestring’skeyspaceisnotsufficientlylarge.
6CommonProblems–ContinuedIndefiniteExpirationonServer–SessionIDsthatdonotexpireonthewebservercanallowanattackerunlimitedtimetoguessavalidSessionID.
TransmittedintheClear–AssumingSSLisnotbeingusedwhiletheSessionIDcookieistransmittedtoandfromthebrowser,theSessionIDcouldbesniffedacrossaflatnetworktakingtheguess-workawayforamiscreant.Thisisstillaproblemwithproxyservers.InsecureRetrieval–Bytrickingtheuser’sbrowserintovisitinganothersite,anattackercanretrievestoredSessionIDinformationandquicklyexploitthisinformationbeforetheuser’ssessionsexpire.Thiscanbedoneanumberofways:DNSpoisoning,Cross-siteScripting,etc.ToolsSessionsAuditor
/idtools/Session_Auditor.zipVisualTesting–WebSleuth
/dzzie/sleuthWebProxy-/research/tools/index.htmlHTTPush-Achilles-/downloads.htmlMiniBrowser-
/download.htmWhatCanIDoAsaUser?LogoutofallsessionswhendoneDonotselectthe“Rememberme”O(jiān)ptionProtectyourcookies!DesktopSecurityEnsureyouuseSSL–whengivenchoiceofstandard/secureloginPatchyourbrowsertobesafefromsomenastyCross-siteScriptingattacksTreatemailswithSessionIDinfoinURL’sjustassecurelyasusername/passwordsWhatcanIdoasaSoftwareVendor?BuildandrequireSSL(orotherencryption)intothewebapplicationsothattheauthenticationtokencannotbeeasilysniffedintransitbetweenbrowserandserver;Ensurethatallcookiesenablethe"secure"fieldProvidealogoutfunctionthatexpiresallcookiesandotherauthenticationtokensRe-authenticatetheuserbeforecriticalactionsareperformed(i.e.apurchase,moneytransfer,etc.)WhatcanIdoasaSoftwareVendor?RegeneratetheSessionIDaftercertainintervals(30,15min.,etc.)Create“booby-trapped”SessionIDstodetectbruteforcingattemptsWhenpractical,limitsuccessfulsessionstospecificIPaddresses.Onlyworksinintranetsettingwhererangesarepredictableandfinite.Auto-expiresessionsafter15minutesofinactivityEnforcea“nonce”onpreviouspagesWhatcanIdoasaSoftwareVendor?–ANDMOSTIMPORTANT!!Ensurethroughagoodalgorithm(MD5,SH
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 吊車用工合同范例
- 加盟茶飲合同模板
- 國(guó)家單位聘用合同范例
- 切糕買賣合同范例
- 商業(yè)房租用合同范例
- 會(huì)展活動(dòng)搭建合同范例
- 供電水氣合同模板
- 個(gè)人收購(gòu)公司合同范例
- 商鋪改公寓寫合同范例
- 公寓租房續(xù)租合同范例
- 護(hù)坡、阻滑體、齒墻、混凝土施工工藝
- DB13T 1349-2010 超貧磁鐵礦勘查技術(shù)規(guī)范
- 垃圾填埋場(chǎng)工藝流程
- 人教版新起點(diǎn)一年級(jí)下冊(cè)英語(yǔ)-Unit 3 Lesson 3教案
- 思想道德與法治全冊(cè)教案
- T∕CECA-G 0074-2020 T∕CAAMTB 23-2020 質(zhì)量分級(jí)及“領(lǐng)跑者”評(píng)價(jià)要求 純電動(dòng)汽車 (含2022年第1號(hào)修改單)
- 中文報(bào)告boc it operations isae3402report中文版v1.0.zw dh
- 家具生產(chǎn)企業(yè)安全生產(chǎn)標(biāo)準(zhǔn)化規(guī)范
- 2022年河北唐山中考語(yǔ)文試題及答案
- 端正戀愛動(dòng)機(jī)正確對(duì)待失戀《大學(xué)生戀愛心理健康輔導(dǎo)》課件
- CMG軟件組分模型操作手冊(cè)
評(píng)論
0/150
提交評(píng)論