Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

69
DrK: Breaking Kernel Address Space Layout Randomization with Intel TSX Yeongjin Jang, Sangho Lee, and Taesoo Kim Georgia Institute of Technology, August 3, 2016

Transcript of Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

Page 1: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

DrK:BreakingKernelAddressSpaceLayoutRandomizationwithIntelTSX

Yeongjin Jang,Sangho Lee,andTaesoo KimGeorgiaInstituteofTechnology,August3,2016

Page 2: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

Outline

• KASLRBackground• TLBSideChannelAttackonKASLR• AttackingTLBSideChannelwithIntelTSX• AttackingvariousOSes• RootCauseAnalysis• Discussions• Conclusion

Page 3: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

Outline

• KASLRBackground• TLBSideChannelAttackonKASLR• AttackingTLBSideChannelwithIntelTSX• AttackingvariousOSes• RootCauseAnalysis• Discussions• Conclusion

Page 4: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

KernelAddressSpaceLayoutRandomization(KASLR)• Astatisticalmitigationformemorycorruptionexploits

• Randomizeaddresslayoutpereachboot• Efficient(<5%overhead)

• Attackershouldguesswherecode/dataarelocatedforexploit.• InWindows,asuccessfulguessrateis1/8192.

Page 5: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

Example:Linux• Toescalateprivilegetorootthroughakernelexploit,attackerswanttocallcommit_creds(prepare_kernel_creds(0)).

Page 6: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

Example:Linux

• KASLRchangeskernelsymboladdresseseveryboot.

• Kernelsymbolsarehiddentonon-rootusers.

1st Boot

2nd Boot

Page 7: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

Example:tpwn - OSX10.10.5KernelPrivilegeEscalationVulnerability• [CVE-2015-5864]IOAudioFamailiy allowsalocalusertoobtainsensitivekernelmemory-layoutinformationviaunspecifiedvectors.

BypassingKASLRisrequired…

Page 8: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

KASLRMakesAttacksHarder• KASLRintroducesanadditionalbartoexploits• Findinganinformationleakvulnerability

• Bothattackersanddefendersaimtodetectinfoleakvulnerabilities.

Pr[∃MemoryCorruptionVuln ]

Pr[∃ information_leak ] × Pr[∃MemoryCorruptionVuln]

Page 9: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

PopularOSesAdoptedKASLR

Page 10: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

Outline

• KASLRBackground• TLBSideChannelAttackonKASLR• AttackingTLBSideChannelwithIntelTSX• AttackingvariousOSes• RootCauseAnalysis• Discussions• Conclusion

Page 11: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

Isthereanyotherwaythaninfoleak?

• PracticalTimingSideChannelAttacksAgainstKernelSpaceASLR(Hundetal.,Oakland2013)• Ahardware-level sidechannelattackagainstKASLR• No informationleakvulnerabilityinOSisrequired

Page 12: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

TLBTimingSideChannel

• Ifaccessedakerneladdressfromtheuserspace

• Mappedaddress:Accessviolation,Pagefault• Unmappedaddress:Invalidaddress,Pagefault

Page 13: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

TLBTimingSideChannel• Ifanunmapped kerneladdressisaccessed

1.Trytogetpagetableentrythroughpagetablewalk

2.Thereisnopagetableentryfound,generatepagefault!

Page 14: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

TLBTimingSideChannel• Ifamapped kerneladdressisaccessed

1.Trytogetpagetableentrythroughpagetablewalk

2.CachetheentrytoTLB

3.Checkpageprivilegelevel(3<0),generatepagefault!

Page 15: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

TLBTimingSideChannel

TLBVirtualAddress

Hit

Miss

Mappedaddressreturnsquicker!

Unmappedaddresstakes~40cycles

moreforpagetablewalk

Page 16: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

TLBTimingSideChannel• Measuringthetimeinanexceptionhandler

1.GeneratesPageFault

3.OS handlesPageFault

4.OScallsexceptionhandler

2.CPU generatesPageFault

Page 17: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

TLBTimingSideChannel• Result:TLBhittooks lessthan4050cycles,• WhileTLBmisstookmorethanthat…

• Limitation:Toonoisy• <1%timedifference

• (~40within4000cycles)• OSexceptionhandlingistooslow

• Isthereanybetterway?

Page 18: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

Outline

• KASLRBackground• TLBSideChannelAttackonKASLR• AttackingTLBSideChannelwithIntelTSX• AttackingvariousOSes• RootCauseAnalysis• Discussions• Conclusion

Page 19: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

AMorePracticalTLBSideChannelAttackonKASLR• DrK Attack:WepresentaverypracticalsidechannelattackonKASLR• De-randomizingKernelASLR(thisiswhereDrK comesfrom)

• ExploitIntelTSXforOS-freeexceptionfallback• Accurate:99%-100%• Fast:<1second• OSindependent:Linux,Windows,OSX• Stealthy:NoOSexecutionpath• Cloud:TestedinAmazonEC2

Page 20: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

StartingFromaPoC ExampleintheWild

Rafal Wojtczuk,https://labs.bromium.com/2014/10/27/tsx-improves-timing-attacks-against-kaslr/

Lessnoisy

Page 21: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

TSXGivesBetterPrecisiononTimingAttack

• Accesstomapped addressinTSX:172 clk• Accesstounmapped addressinTSX:200 clk• 28clk (>15%)intimingdifference

• Accesstomapped addressin__try:2172 clk• Accesstounmapped addressin_try:2192 clk• <1% intimingdifference

• Why?

Page 22: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

TransactionalSynchronizationExtension(IntelTSX)• TraditionalLock

1.Blockuntilacquiresthelock

3.Releasethelock(finishesatomicregion)

2.Atomicregion(100%success)

Page 23: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

TransactionalSynchronizationExtension(IntelTSX)• TSX:relaxedbutfasterwayofhandlingsynchronization

1.Donotblock,donotuselock

3.Iffailed,handlefailurewithaborthandler(retry,getbacktotraditionallock,etc.)

2.Tryatomicoperation(canfail)

Page 24: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

TransactionAbortsIfExistanyofaConflict• ConditionofConflict• Threadraces• Cacheeviction• Interrupt

• ContextSwitch(timer)• Syscalls

• Exceptions• PageFault• GeneralProtection• Debugging• …

RunIfTransactionAborts

Page 25: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

AbortHandlerSuppressesExceptions• AbortHandlerofTSX• Suppressallsync.exceptions

• E.g.,pagefault• DonotnotifyOS

• Justjumpintoabort_handler()

NoExceptiondeliverytotheOS!(returnsquicker,solessnoisythan__try__except)

RunIfTransactionAborts

Page 26: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

ExploitingTSXasanExceptionHandler• HowtouseTSXasanexceptionhandler?

1.Timestampatthebeginning

2.AccesskernelmemorywithintheTSXregion(alwaysaborts)

3.Measuretimingataborthandler

NoOShandlingpathisinvolved

Page 27: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

MeasuringTimingSideChannel

• AccessMapped/Unmappedkerneladdresses• AttemptREAD accesswithintheTSXregion

• mov [rax], 1

Page 28: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

MeasuringTimingSideChannel

• AccessExecutable/Non-executableaddress• AttemptJUMP accesswithintheTSXregion

• jmp rax

Page 29: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

Demo1:TimingDifferenceonM/UandX/NX

Page 30: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

MeasuringTimingSideChannel• Mapped/Unmappedkerneladdresses• Ran1000iterationsfortheprobing,minimumclockon10runs

• MuchfasterthananOSexceptionhandler!• 209versus4000cycles• Significanttimedifference:~15%

Processor Mapped Page UnmappedPagei7-6700K (4.0Ghz) 209 240(+31)i5-6300HQ(2.3Ghz) 164 188(+24)i7-5600U(2.6Ghz) 149 173(+24)E3-1271v3(3.6Ghz) 177 195(+18)

Page 31: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

MeasuringTimingSideChannel

• Executable/Non-executablekerneladdresses• Ran1000iterationsfortheprobing,minimumclockon10runs

Processor ExecutablePage Non-execPagei7-6700K (4.0Ghz) 181 226(+45)i5-6300HQ(2.3Ghz) 142 178(+36)i7-5600U(2.6Ghz) 134 164(+30)E3-1271v3(3.6Ghz) 159 189(+30)

Page 32: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

ClearTimingChannel

Clearseparationbetweendifferentmappingstatus!

Page 33: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

TSXvsSEH

Clearseparationbetweendifferentmappingstatus!

Page 34: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

Outline

• KASLRBackground• TLBSideChannelAttackonKASLR• AttackingTLBSideChannelwithIntelTSX• AttackingvariousOSes• RootCauseAnalysis• Discussions• Conclusion

Page 35: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

AttackonVariousOSes

• DemoTargets• Fullattack• Linux, Windows,andLinuxinAmazonEC2• Probeeachpageofkernel/drivers(>6,000inLinux,>34,000inWindows)

• Compareitspermissiontopagetabletogettheaccuracy• DetectingModulesLocation

• Basedonsectionsize(X/NX/U),detecttheexactlocationofkernelmodule

• FindingASLRslide• OSX

Page 36: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

AttackonLinux

• OSSettings• Kernel4.6.0,runningwithUbuntu16.04LTS• Addedbootarg ‘kaslr’• EnabledwithCONFIG_X86_PTDUMP=y(justforgroundtruth)

• AvailableSlots• Kernel:64slots

• 0xffffffff80000000– 0xffffffffc0000000(2MBpage)• Module:1,024slots

• 0xffffffffc0000000– 0xffffffffc0400000(4KBpage)

Page 37: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

Demo2:FullAttackonLinux

Page 38: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

Result

• Achieved100%accuracyacross3differentCPUs• Took0.45-0.67sforprobing6,147pages.

• DetectingModules• Fromsizesignature,detected29modulesamong80modules.

Page 39: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

AttackonWindows

• OSSettings• Windows10,10.0.10586• AvailableSlots

• Kernel:8,192slots• 0xfffff80000000000- 0xfffff80400000000(2MBpages)

• Drivers:8,192slots• 0xfffff80000000000- 0xfffff80400000000(4KBpages,alignedwith2MB)

Page 40: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

Result

• 100%ofaccuracyforthekernel(ntoskrnl.exe)• 100%ofaccuracyfordetectingM/Uforthedrivers• 99.28%ofaccuracyfordetectingX/NXfordrivers• Someareasindriveraredynamicallydeallocated• Missessome‘inactive’pages

• DetectingModules• Fromsizesignature,detected97driversamong141drivers

Page 41: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

AttackonOSX

• OSSettings• OSXElCapitan10.11.4• AvailableSlots• Kernel:256slots

• 0xffffff8000000000- 0xffffff8020000000(2MBpages)

• Result• Took31ms onfindingASLRslide(100%accuracyfor10times)

Page 42: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

AttackonAmazonEC2

• OSSettings• Kernel4.4.0,runningwithUbuntu14.04LTS• Addedbootarg ‘kaslr’• EnabledwithCONFIG_X86_PTDUMP

• AvailableSlots• Kernel:64slots

• 0xffffffff80000000– 0xffffffffc0000000(2MBpage)• Module:1,024slots

• 0xffffffffc0000000– 0xffffffffc0400000(4KBpage)

Page 43: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

ResultSummary

• Linux:100%ofaccuracyaround0.5second• Windows:100%forM/Uin5sec,99.28%forX/NXfor45sec• OSX:100%fordetectingASLRslide,in31ms• LinuxonAmazonEC2:100%ofaccuracyin3seconds

Page 44: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

Outline

• KASLRBackground• TLBSideChannelAttackonKASLR• AttackingTLBSideChannelwithIntelTSX• AttackingvariousOSes• RootCauseAnalysis• Discussions• Conclusion

Page 45: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

TimingSideChannel(M/U)• ForMapped/Unmappedaddresses• Measuredperformancecounters(on1,000,000 probing)

• dTLB hitonmappedpages,butnotforunmappedpages.• TimingchannelisgeneratedbydTLB hit/miss

Perf.Counter MappedPage UnmappedPage Description

dTLB-loads 3,021,847 3,020,243

dTLB-load-misses 84 2,000,086 TLB-miss onU

ObservedTiming 209(fast) 240(slow)

Page 46: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

PathforanUnmappedPage

dTLB

Onthefirstaccess

PML4PML3 PML3

PML2 PML2 PML2PML1 PML1 PML1

PTE

PageTable

KerneladdressaccessTLBmiss

Pagefault!

Page 47: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

PathforanUnmappedPage

dTLB

OntheSecondaccess

PML4PML3 PML3

PML2 PML2 PML2PML1 PML1 PML1

PTE

PageTable

KerneladdressaccessTLBmiss

Pagefault!Alwaysdopagetablewalk(slow)

Page 48: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

PathforamappedPage

dTLB

Onthefirstaccess

PML4PML3 PML3

PML2 PML2 PML2PML1 PML1 PML1

PTE

PageTable

KerneladdressaccessTLBmiss

Pagefault!

CacheTLBentry!

PTE

Page 49: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

PathforamappedPage

dTLB

Onthesecondaccess

PML4PML3 PML3

PML2 PML2 PML2PML1 PML1 PML1

PTE

PageTable

Kerneladdressaccess

Pagefault!

dTLB hit

Nopagetablewalkonthesecondaccess(fast)

PTE

Page 50: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

Root-causeofTimingSideChannels(M/U)• ForMapped/Unmappedaddresses

FastPath(Mapped) SlowPath(Unmapped)

1. Access aKerneladdress2. dTLB hits3. Pagefault!

1. AccessaKerneladdress2. dTLB misses3. Walksthroughpagetable4. Pagefault!

Elapsed cycles:209 Elapsed cycles:240

• CachingatdTLB generatestimingsidechannel

Page 51: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

TimingSideChannel(X/NX)• ForExecutable/Non-executableaddresses• Measuredperformancecounters(on1,000,000probing)

Perf.Counter ExecPage Non-execPage UnmappedPage

iTLB-loads(hit) 590 1,000,247 272

iTLB-load-misses 31 12 1,000,175ObservedTiming 181 (fast) 226 (slow) 226 (slow)

• Point#1:iTLB hitonNon-exec,butitisslow(226)why?

• iTLB isnottheoriginofthesidechannel.

Page 52: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

TimingSideChannel(X/NX)• ForExecutable/Non-executableaddresses• Measuredperformancecounters(on1,000,000probing)

Perf.Counter ExecPage Non-execPage UnmappedPage

iTLB-loads(hit) 590 1,000,247 272

iTLB-load-misses 31 12 1,000,175ObservedTiming 181 (fast) 226 (slow) 226 (slow)

• Point#2:iTLB doesnotevenhitonExecpage,whileNXpagehitsiTLB

• iTLB isnotinvolvedinthefastpath

Page 53: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

IntelCacheArchitecture• L1instructioncache• Virtually-indexed,Physically-taggedcache(requiresTLBaccess)• Cachesactualopcode/datacontentofthememory

FromthepatentUS20100138608A1,registeredbyIntelCorporation

Page 54: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

IntelCacheArchitecture

FromthepatentUS20100138608A1,registeredbyIntelCorporation

• Decodedi-cache• Aninstructionwillbedecodedasmicro-ops(RISC-likeinstruction)• Decodedi-cachestoresmicro-ops• Virtually-indexed,Virtually-taggedcache(noTLBaccess)

Page 55: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

PathforanUnmappedPage

iTLB

OntheSecondaccess,226 cycles

PML4PML3 PML3

PML2 PML2 PML2PML1 PML1 PML1

PTE

PageTable

KerneladdressaccessTLBmiss

Pagefault!Alwaysdopagetablewalk(slow)

Page 56: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

PathforanExecutablePage

iTLB

Onthefirstaccess

PML4PML3 PML3

PML2 PML2 PML2PML1 PML1 PML1

PTE

PageTable

Kerneladdressaccess

TLBmiss

Insufficientprivilege,fault!

DecodedI-cache

miss

PTE CacheTLBuops

CacheDecodedInstructions

Page 57: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

PathforanExecutablePage

iTLB

Onthesecondaccess,181 cycles

PML4PML3 PML3

PML2 PML2 PML2PML1 PML1 PML1

PTE

PageTable

Kerneladdressaccess

Insufficientprivilege,fault!

DecodedI-cache

PTEuops

DecodedI-cachehit!

NoTLBaccess,Nopagetablewalk(fast)

Page 58: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

Pathforanon-executable,butmappedPage

iTLB

Onthefirstaccess

PML4PML3 PML3

PML2 PML2 PML2PML1 PML1 PML1

PTE

PageTable

Kerneladdressaccess

TLBmiss

NX,Pagefault!

DecodedI-cache

miss

PTE CacheiTLB

Page 59: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

PathforaNon-executable,butmappedPage

iTLB

Onthesecondaccess,226 cycles

PML4PML3 PML3

PML2 PML2 PML2PML1 PML1 PML1

PTE

PageTable

Kerneladdressaccess Decoded

I-cache

miss

PTE

Pagefault!

TLBhit

Ifnopagetablewalk,itshouldbefasterthanunmapped(butnot!)

Page 60: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

CacheCoherenceandTLB• TLBisnotacoherentcacheinIntelArchitecture

TLB0xff01->0x0010,NX

Core1 1.Core1sets0xff01asNon-executable memory

TLB0xff01->0x0010,X

Core2

2.Core2sets0xff01asExecutable memoryNocoherency,donotupdate/invalidateTLBinCore1

3.Core1trytoexecuteon0xff01->PagefaultbyNX

4.Core1mustwalkthroughthepagetableThepagetableentryisX,updateTLB,thenexecute!

Execute

Page 61: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

PathforaNon-executable,butmappedPage

iTLB

Onthesecondaccess,226 cycles

PML4PML3 PML3

PML2 PML2 PML2PML1 PML1 PML1

PTE

PageTable

Kerneladdressaccess

NX,Pagefault!

DecodedI-cache

miss

PTE CacheTLB

NX,cannotexecute!

TLBhit

Page 62: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

Root-causeofTimingSideChannel(X/NX)• ForeXecute /non-executableaddresses

FastPath(X) SlowPath(NX) SlowPath(U)1. Jmp intotheKerneladdr2. DecodedI-cachehits3. Pagefault!

1. Jmp intothekerneladdr2. iTLB hit3. Protectioncheck fails,

pagetablewalk.4. Pagefault!

1. Jmp intothekerneladdr2. iTLB miss3. Walks throughpagetable4. Pagefault!

Cycles:181 Cycles:226 Cycles: 226

• Decodedi-cache generatestimingsidechannel

Page 63: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

AnalysisSummary

• dTLB cachingmakesfasterfaultonmappedaddress• Mapped:PTEcachedindTLB• Unmapped:PTEisnotcachedindTLB,requirespagetablewalk

• DecodedI-cachemakesfasterfaultonexecutableaddress• Executable:Decodedi-cachehits,noiTLB access,nopagetablewalk• Non-executable:iTLB hits,butrequirespagetablewalk• Unmapped:alwaysrequirespagetablewalk

Page 64: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

Outline

• KASLRBackground• TLBSideChannelAttackonKASLR• AttackingTLBSideChannelwithIntelTSX• AttackingvariousOSes• RootCauseAnalysis• Discussions• Conclusion

Page 65: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

Discussions:ControllingNoise

• Dynamicfrequencyscaling(SpeedStep,TurboBoost)changesthereturnvalueofrdtscp().• RunbusyloopstomakeCPUrunasfull-throttle

• HardwareinterruptsandcacheconflictsalsoabortTSX.• Probemultipletimes(e.g.,2-100)andtaketheminimum

Page 66: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

Discussions:IncreasingCovertness

• OSneverseespagefaults• TSXsuppressestheexception

• Possibletraces:performancecounters• HighcountondTLB/iTLB-miss• Normalprogramssequentiallyaccessinghugememorycouldbehavesimilarly.

• Highcountontx-abortsorCPUtime• Attackerscouldslowdowntheprobingrate(e.g.,5min,stillfast)

Page 67: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

Discussions:Countermeasures?

• ModifyingCPUtoeliminatetimingchannels• DifficulttoberealizedL

• Usingseparatedpagetablesforkernelanduserprocesses• Highperformanceoverhead(~30%)duetofrequentTLBflush

• Fine-grainedrandomization• Difficulttoimplementandperformancedegradation

• Coarse-grainedtimer?• Alwayssuggested,butnooneadoptsit.

Page 68: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

Outline

• KASLRBackground• TLBSideChannelAttackonKASLR• AttackingTLBSideChannelwithIntelTSX• AttackingvariousOSes• RootCauseAnalysis• Discussions• Conclusion

Page 69: Breaking Kernal address space layout rendomization: KASLAR with Intel TSX

Conclusion

• TSXcanbreakKASLRofcommodityOSes.• Ensureaccuracy,speed,andcovertness

• Timingsidechanneliscausedbyhardware,independenttoOS.• dTLB (forMapped&Unmapped)• DecodedI-cache(foreXecutable /non-executable)

• Weconsiderpotentialcountermeasuresagainstthisattack.