版權(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ì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025版XX污水處理廠運(yùn)營(yíng)維護(hù)一體化服務(wù)合同3篇
- 《資本形成與發(fā)展》課件
- 2025版新能源車(chē)充電樁監(jiān)事聘任與基礎(chǔ)設(shè)施建設(shè)合同2篇
- 2024年離婚案中女方股票權(quán)益保護(hù)合同一
- 水電站涵管施工協(xié)議
- 美容化妝品展示廳租賃合同
- 創(chuàng)新研發(fā)合同施工承諾書(shū)
- 2025版智慧社區(qū)卷閘門(mén)系統(tǒng)建設(shè)與運(yùn)營(yíng)合同3篇
- 2024年第三方擔(dān)保協(xié)議規(guī)范化范本版B版
- 2024文化傳媒公司與藝人之間的演藝經(jīng)紀(jì)合同
- 法治副校長(zhǎng)進(jìn)校園教育
- 北京市石景山區(qū)2023-2024學(xué)年七年級(jí)上學(xué)期期末考試數(shù)學(xué)試卷(含答案)
- 2025版寒假特色作業(yè)
- 江西省吉安市2023-2024學(xué)年高一上學(xué)期1月期末考試政治試題(解析版)
- 國(guó)內(nèi)外航空安全形勢(shì)
- 零售業(yè)發(fā)展現(xiàn)狀與面臨的挑戰(zhàn)
- 2024年版汽車(chē)4S店商用物業(yè)租賃協(xié)議版B版
- 《微觀經(jīng)濟(jì)學(xué)》習(xí)題(含選擇題)
- 微信小程序云開(kāi)發(fā)(赤峰應(yīng)用技術(shù)職業(yè)學(xué)院)知到智慧樹(shù)答案
- 2024-2025學(xué)年上學(xué)期福建高二物理期末卷2
- 2024-2025年第一學(xué)期小學(xué)德育工作總結(jié):點(diǎn)亮德育燈塔引領(lǐng)小學(xué)生全面成長(zhǎng)的逐夢(mèng)之旅
評(píng)論
0/150
提交評(píng)論