ASurveyonRuntimeSmashedStackDetection课件

上传人:磨石 文档编号:240719974 上传时间:2024-05-02 格式:PPT 页数:16 大小:605KB
返回 下载 相关 举报
ASurveyonRuntimeSmashedStackDetection课件_第1页
第1页 / 共16页
ASurveyonRuntimeSmashedStackDetection课件_第2页
第2页 / 共16页
ASurveyonRuntimeSmashedStackDetection课件_第3页
第3页 / 共16页
点击查看更多>>
资源描述
ASurveyonRuntimeSmashedStackDetectionBackgroundnVulnerabilitybecomesSeriousSocialProblemsVulnerabilitybecomesSeriousSocialProblemsex)nMorrisWormonUNIXin1988nCodeRedonWindowsin2001nNimdaonWindowsin2001nRootDNSAttackin2002CERT/CCAdvisoriesDominant Attacksare caused byBuffer OverflowBuffer OverflowBufferOverflowAttacknStackSmashingAttackStackSmashingAttackCommonmodeofbufferoverflowattackforhijackingsystemcontrolnHijackProcessHijackProcess1.InjecttheattackcodenAllapplicationsarereadyforinjection2.ForcetheprocesstoexecutetheinjectedcodenStackbufferoverflowvulnerabilityallowmaliciousinputtooverwritethereturnaddressandtosnatchtheexecutionflowText Area(program)Data AreaStack AreaMalicious CodeStackSmashingAttack(1)nProgramStructureofClikelanguagesProgramStructureofClikelanguagesint main(int argc,char*argv)calc_something(x,y);show_something();return 0;void calc(int n)void calc_something(int x,int y)calc(x);StackSmashingAttack(2)nFlowControlDataFlowControlDataint main(int argc,char*argv)calc_something(x,y);return 0;void calc(int n)void calc_something(int x,int y)calc(x);First In Last Out Buffermain:line ncalc_something:line mStackSmashingAttack(3)nLocalVariablesLocalVariablesAllocatedinFILObufferunifiedwithflowcontroldatavoid calc(int n)int a,b;char buffer1024;foo();bar();return addresschar buffer1024;int b;int a;Local Variablesofcalc()Stack Frameofcalc()StackSmashingAttack(4)nInjectionsandHijacksInjectionsandHijacksreturn addresschar buffer1024;int b;int a;malicious codeoverwritten by buffer overflowas buffer1024,buffer10270 x046424Malicious Code0 x046424Approaches(1)nSoftwareApproachesSoftwareApproachesNovelsecureprogramlanguagesorperfectprogramswithoutbugsCompilerapproacheswithoutfixingeachsourceprogramnStaticAnalysisAFirstStepTowardsAutomatedDetectionofBufferOverrunVulnerabilities“pointer”cannotbeanalyzedperfectlynRuntimeDetectionLibSafe(LibVerify)wrapperlibraryStackGuardStackShieldProPoliceApproaches(2)nHardwareApproachesHardwareApproachesNon-ExecPagesnNonExecutableUserStackvsreturn-into-libcattacksignalhandlingnNonExecutableDataPagesmodifieddynamicloadermodifiedjust-in-time(JIT)compilerSecureReturnAddressStack(SRAS)nArchitectureSupportforDefendingAgainstBufferOverflowAttacksnAProcessorArchitectureDefenseagainstBufferOverflowAttacksSecureCachenACacheArchitecturetoPreventMaliciousCodeExecutionsSecureReturnAddressStack(1)nConceptConceptReturn-Address-Stack(RAS)nimplementedatfetchorissuestageonmodernprocessorsPentium,Alpha,SPARC,POWERnmonitortheinstructionswhichmean“call”and“return”call:pushcurrentprogramcountertotheRASreturn:popanaddressfromtheRASnforimprovementofexecutionpathpredictionbutRASisnotperfectlymatchedwiththerealcallstackspeculativeupdatewithbranchpredictionRAStableoverflowDetectmismatchesbetweenRASandStackinformationnraiseexceptionSecureReturnAddressStack(2)nImprovementImprovementImplementanotherRASatcommitstagenavoidspeculativeupdateTableoptimizationnoverflowhandlingsmainmemorywithhardwareorOSsupportnenoughsizeforthemajority64entryinthecaseofSPEC2000SecureReturnAddressStack(3)nNon-FILOControlFlowOperationProblemsNon-FILOControlFlowOperationProblemssetjmp/longjmpFunctionsC+ExceptionsMultiThreadingTailRecursion(handmadeeccentricassemblylanguageprograms!)ntheseareoftenhistoricalandcritical:-)nProblem&SolutionProblem&SolutionthesecodesaccessandmodifythecallstackdirectlyncausemismatchesbetweenRASandStackinformationwecannottreatthesecodestransparentlywithSRASapproachnspecialinstructionsras_pushandsras_poparerequiredforstackoperationSecureCache(1)nConceptConceptDuplicateCache-linesasread-onlyReplica-linesDetectreturnaddressmismatchesbetweenCache-linesandReplica-linesreturn addressCache LineReplica Linereturn addressmalicious datamismatchSecureCache(2)nAdvantagesAdvantagesEfficientspaceswithoutswapTransparentsupportforNon-FILOControlFlowOperationsnDisadvantageDisadvantageDetectionisnotperfectnLosereplicainformationoncachelinereplacementCommercialImplementsnNXBit/ExecuteDisableBitNXBit/ExecuteDisableBitAMD-Opteron/Athlon64Intel-Itanium/Pentium4Transmeta-EfficeonnSmartMIPSASESmartMIPSASESecureMemorySpacesInterpretedLanguageAccelerationCryptographyAccelerationnSecureCore(ARM)SecureCore(ARM)MemoryProtectionUnitJazelleTechnologyCryptographyAccelerationnTrustZone(ARM)TrustZone(ARM)programsmarkedastrustedrunwithhighlevelprivilegeandcanaccessdatainsecurezoneConclusionnStackSmashingAttacksisimportantsecurityproblemStackSmashingAttacksisimportantsecurityproblemnHardwareapproachesachievemoretransparentwayHardwareapproachesachievemoretransparentwaywithoutmodificationsofapplicationsnRealizationoftruetransparentdetectionisdifficultRealizationoftruetransparentdetectionisdifficultNon-FILOControlFlowOperationProblemsnsetjmp/longjmpFunctionsnC+ExceptionsnMultiThreadingnTailRecursionButcoolideamightrealizesufficientlytransparentdetection
展开阅读全文
相关资源
相关搜索

最新文档


当前位置:首页 > 图纸专区 > 课件教案


copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!