1、内核漏洞挖掘技术张超清华大学第十届开源操作系统年度技术会议(OS2ATC)网络研究院INSC网络研究院INSChttps:/ kernel 漏洞统计数据(source:CVE details)网络研究院INSC网络研究院INSChttps:/ found by Syzbot(Syzkaller)till Mar 24,2023(First commit on Aug 17,2017)网络研究院INSC网络研究院INSChttps:/ Fuzzing 模糊测试 生成/变异测试例,测试,检查,重复 问题/挑战:在无穷的输入空间中,如何高效搜索有限的漏洞样本?模糊测试(fuzzing)monitor
2、inputsGenerator/Mutatortarget programSecurityviolation?bugshow?网络研究院INSC网络研究院INSC测试例筛选测试例生成/选择https:/ Fuzzer与kernel Fuzzer:host用户态 Kernel:guest内核 测试例变异 基于AFL 覆盖率采集 Intel PT(硬件辅助)漏洞检测 N/A 其他特性 支持闭源内核代表性kernel fuzzing方案:kAFL网络研究院INSC网络研究院INSChttps:/ Fuzzer与kernel Fuzzer:guest vm用户态 Kernel:guest vm内核 测
3、试例变异 Syzlang描述syscall格式 覆盖率采集 kcov(源码编译插桩)漏洞检测 KASAN(源码编译插桩)KTSan,KMSan,KUBSan 其他特性 远程管理,web展示,并行化代表性kernel fuzzing方案:Syzkaller测试例筛选测试例生成/选择https:/ Android Native System Services via Automated Interface Analysis”USENIX Security 2020(1)如何改进?网络研究院INSC网络研究院INSC12 C1.Multi-Level Interface Recognition Co
4、llect all top-level Interfaces,then identify multi-level interfaces C2.Interface Model Extraction Collect all of the possible transactions of each interface Extract the input and output variables in the transactions C3.Semantically-correct Input Generation Variable name and variable type,variable de
5、pendency,interface dependency Problem:Android System Service网络研究院INSC网络研究院INSChttps:/ Features of interface Services use onTransact method to dispatch transactions Design网络研究院INSC网络研究院INSChttps:/ Services(interfaces)use onTransact method to dispatch transactions usually implemented as a switch state
6、ment,where each case statement relates to one transaction Services utilize special methods(e.g.,readInt32,writeInt32)to deal with I/O variables Extract I/O variables(patterns,name,type)by analyzing such methodsDesign网络研究院INSC网络研究院INSChttps:/ dependency:Generation dependency:writeStrongBinder()Use de