ASLRSmack&LaughReference
SeminaronAdvancedExploitationTechniques
TiloM¨uller
RWTHAachen,GermanyChairofComputerScience4
February17,2008
Addressspacelayoutrandomization(ASLR)isasecuritytechnologytopreventexploitationsofbufferover ows.Butthistechnologyisfarfromperfect.”[...]itsonlyuptothecreativityoftheattackerwhathedoes.Soitraisesthebarforusall:)butjustmightmakewritingexploitsaninterestingbusinessagain.”([Dul00]aboutASLR).Thispaperisanintroductionandareferenceaboutthisbusiness.
Keywords:ASLR,AddressSpaceLayoutRandom-ization,Exploitation
likeOpenBSDenabledASLRaswell.SoitisessentialforanattackertodealwithASLRnowadays.
OriginallyASLRwaspartofthePage(PaX)project-acomprehensivesecuritypatchfortheLinuxkernel.PaXhasalreadybeenavailablein2000-yearsbeforekernel2.6.12.TherehavealsobeenthirdpartyimplementationsofASLRforpreviousversionsofWindows.Sotheideaandeventheimplementationofaddressspacerandomizationisnotasnewasitmayappear.
Neverthelessandunlikecommonexploitationtech-niquestherearebarelyusefulinformationsaboutad-vancedtechniquestobypasstheprotectionofASLR.Thispapertriestobringtogethersomeofthescarceinformationsoutthere.
First,Ibrie ywanttoshowhowASLRworksandwhyalotofcommonexploitationtechniquesfailinitspresence.AfterwardsIdemonstratemechanismstoby-passtheprotectionofASLR.Thevulnerabilitiesandtheirexploitsaregettingmoredif cultinthecourseofthispaper.FirstIdescribetwoaggressiveaproaches:Bruteforceanddenialofservice.ThenIexplainhowtoreturnintonon-randomizedmemoryareas,howtobypassASLRbyredirectingpointersandhowtogetasystemtodivulgecriticalstackinformation.AfterthisIexplainsomeadvancedtechniqueslikethestackjug-glingmethods,GOThijacking,offbyonesandover-writingthe.dtorssectionbeforeIcometoaconclu-sion.WhatIshowisthatsystemswithASLRenabledarestillhighlyvulnerableagainstmemorymanipula-tionattacks.Someoftheexploitationtechniquesde-scribedinthispaperarealsousefultobypassanotherpopularsecuritytechnology:Thenonexecutablestack.Thispaperisassistedbyproofofconceptcodes,whicharebasedonaDebianEtchinstallationwithoutanyadditionalsecuritypatches.Itisax86systemwith
1Introduction
Addressspacelayoutrandomizationmakesitmoredif- culttoexploitexistingvulnerabilities,insteadofin-creasingsecuritybyremovingthem.ThusASLRisnotareplacementforinsecurecode,butitcanofferprotec-tionfromvulnerabilitiesthathavenotbeen xedandevennotbeenpublishedyet.TheaimofASLRistointroducerandomnessintotheaddressspaceofapro-cess.Thisletsalotofcommonexploitsfailbycrashingtheprocesswithahighprobabilityinsteadofexecutingmaliciouscode.
Therearealotofotherprophylacticsecuritytech-nologiesbesidesASLR,likeStackGuard,StackShieldorLibsafe.ButonlyASLRisimplementedanden-abledbydefaultintoimportantoperatingsystems.ASLRisimplementedinLinuxsincekernel2.6.12,whichhasbeenpublishedinJune2005.MicrosoftimplementedASLRinWindowsVistaBeta2,whichhasbeenpublishedinJune2006.The nalWin-dowsVistareleasehasASLRenabledbydefault,too-althoughonlyforexecutableswhicharespeci callylinkedtobeASLRenabled.Furtheroperatingsystems
1
热门文档