skip to main content
10.1145/3319535.3363212acmconferencesArticle/Chapter ViewAbstractPublication PagesccsConference Proceedingsconference-collections
research-article
Public Access

SLAKE: Facilitating Slab Manipulation for Exploiting Vulnerabilities in the Linux Kernel

Authors Info & Claims
Published:06 November 2019Publication History

ABSTRACT

To determine the exploitability for a kernel vulnerability, a secu- rity analyst usually has to manipulate slab and thus demonstrate the capability of obtaining the control over a program counter or performing privilege escalation. However, this is a lengthy process because (1) an analyst typically has no clue about what objects and system calls are useful for kernel exploitation and (2) he lacks the knowledge of manipulating a slab and obtaining the desired layout. In the past, researchers have proposed various techniques to facilitate exploit development. Unfortunately, none of them can be easily applied to address these challenges. On the one hand, this is because of the complexity of the Linux kernel. On the other hand, this is due to the dynamics and non-deterministic of slab variations. In this work, we tackle the challenges above from two perspectives. First, we use static and dynamic analysis techniques to explore the kernel objects, and the corresponding system calls useful for exploitation. Second, we model commonly-adopted exploitation methods and develop a technical approach to facilitate the slab layout adjustment. By extending LLVM as well as Syzkaller, we implement our techniques and name their combination after SLAKE. We evaluate SLAKE by using 27 real-world kernel vulnerabilities, demonstrating that it could not only diversify the ways to perform kernel exploitation but also sometimes escalate the exploitability of kernel vulnerabilities.

Skip Supplemental Material Section

Supplemental Material

p1707-chen.webm

webm

109.2 MB

References

  1. 2019. Code and Exploits for SLAKE. (2019). https://github.com/chenyueqi/SLAKE.git.Google ScholarGoogle Scholar
  2. 0x3f97. 2018. cve-2017--8890 root case analysis. (2018). https://0x3f97.github.io/exploit/2018/08/13/cve-2017--8890-root-case-analysis/.Google ScholarGoogle Scholar
  3. Thanassis Avgerinos, Sang Kil Cha, Alexandre Rebert, Edward J. Schwartz, Maverick Woo, and David Brumley. 2014. Automatic Exploit Generation. Commun. ACM57 (2014).Google ScholarGoogle Scholar
  4. Tiffany Bao, Ruoyu Wang, Yan Shoshitaishvili, and David Brumley. 2017. Your Exploit is Mine: Automatic Shellcode Transplant for Remote Exploits. In Proceedings of the 38th IEEE Symposium on Security and Privacy(S&P).Google ScholarGoogle ScholarCross RefCross Ref
  5. Daniel P. Bovet and Marco Cesati. 2010. Understanding the Linux Kernel. Elsevier.Google ScholarGoogle Scholar
  6. David Brumley, Pongsin Poosankam, Dawn Xiaodong Song, and Jiang Zheng. 2008. Automatic Patch-Based Exploit Generation is Possible: Techniques and Implications. In Proceedings of the 29th IEEE Symposium on Security and Privacy(S&P).Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Kees Cook. 2010. CVE-2010--2963 v4l compat exploit. (2010). https://outflux.net/blog/archives/2010/10/19/cve-2010--2963-v4l-compat-exploit/.Google ScholarGoogle Scholar
  8. The MITRE Corporation. 2019. common Vulnerability and Exposures. (2019). https://cve.mitre.org/cve/.Google ScholarGoogle Scholar
  9. SSD Secure Disclosure. 2017. SSD Advisory -- Linux Kernel AF_PACKET Use-After-Free. (2017). https://ssd-disclosure.com/archives/3484.Google ScholarGoogle Scholar
  10. Jake Edge. 2014. The kernel address sanitizer. (2014). https://lwn.net/Articles/612153/.Google ScholarGoogle Scholar
  11. The FreeBSD Foundation. 2019. The FreeBSD Project. (2019). https://www.freebsd.org/.Google ScholarGoogle Scholar
  12. Wolfram Gloger. 2006. Wolfram Gloger's malloc homepage. (2006).http://www.malloc.de/en/.Google ScholarGoogle Scholar
  13. google. 2019. syzkaller - kernel fuzzer. (2019). https://github.com/google/syzkaller.Google ScholarGoogle Scholar
  14. Samuel Grob. 2014. Linux local root exploit for CVE-2014-0038. (2014). https://github.com/saelo/cve-2014-0038.Google ScholarGoogle Scholar
  15. S Heelan, T Melham, and D Kroening. 2018. Automatic Heap Layout Manipulation for Exploitation. In Proceedings of the 27th USENIX Security Symposium(USENIX Security).Google ScholarGoogle Scholar
  16. Jann Horn. 2018. A cache invalidation bug in Linux memory management.(2018). https://googleprojectzero.blogspot.com/2018/09/a-cache-invalidation-bug-in-linux.html.Google ScholarGoogle Scholar
  17. Ralf Hund, Thorsten Holz, and Felix C. Freiling. 2009. Return-Oriented Rootkits: Bypassing Kernel Code Integrity Protection Mechanisms. In Proceedings of the 18th USENIX Security Symposium(USENIX Security).Google ScholarGoogle Scholar
  18. ianamason. 2019. Whole Program LLVM: wllvm ported to go. (2019). https://github.com/SRI-CSL/gllvm.Google ScholarGoogle Scholar
  19. Kyriakos K. Ispoglou, Bader Al Bassam, Trent Jaeger, and Mathias Payer. 2018. Block Oriented Programming: Automating Data-Only Attacks. In Proceedings of the 2018 ACM SIGSAC Conference on Computer and Communications Security(CCS '18).Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Vasileios P. Kemerlis, Michalis Polychronakis, and Angelos D. Keromytis. 2014.ret2dir: Rethinking Kernel Isolation. In Proceedings of the 23rd USENIX Security Symposium(USENIX Security).Google ScholarGoogle Scholar
  21. Andrey Konovalov. 2017. Exploiting the Linux kernel via packetsockets.(2017). https://googleprojectzero.blogspot.com/2017/05/exploiting-linux-kernel-via-packet.html.Google ScholarGoogle Scholar
  22. Andrey Konovalov. 2017. A proof-of-concept local root exploit for CVE-2017--6074.(2017). https://github.com/xairy/kernel-exploits/blob/master/CVE-2017--6074/poc.c.Google ScholarGoogle Scholar
  23. Lexfo. 2018. CVE-2017--11176: A step-by-step Linux Kernel exploitation. (2018). https://blog.lexfo.fr/cve-2017--11176-linux-kernel-exploitation-part1.html.Google ScholarGoogle Scholar
  24. Kangjie Lu, M Walter, David Pfaff, and Stefan Nürnberger and Wenke Lee and Michael Backes. 2017. Unleashing Use-Before-Initialization Vulnerabilities in the Linux Kernel Using Targeted Stack Spraying. In Proceedings of the 2017 Network and Distributed System Security Symposium(NDSS).Google ScholarGoogle ScholarCross RefCross Ref
  25. Matt Mackall. 2005. slob: introduce the SLOB allocator. (2005). https://lwn.net/Articles/157944/.Google ScholarGoogle Scholar
  26. Rohit Mothe and Rodrigo Rubira Branco. 2016. DPTrace: Dual Purpose Trace for Exploitability Analysis of Program Crashes. In Black Hat USA Briefings.Google ScholarGoogle Scholar
  27. Vitaly Nikolenko. 2016. CVE-2014--2851 group_info UAF Exploitation. (2016). https://cyseclabs.com/page?n=02012016.Google ScholarGoogle Scholar
  28. Jon Oberheide. 2010. Linux Kernel CAN SLUB Overflow. (2010). https://jon.oberheide.org/blog/2010/09/10/linux-kernel-can-slub-overflow/.Google ScholarGoogle Scholar
  29. Shankara Pailoor, Andrew Aday, and Suman Jana. 2018. MoonShine: Optimizing OS Fuzzer Seed Selection with Trace Distillation. In Proceedings of the 27th USENIX Security Symposium(USENIX Security).Google ScholarGoogle Scholar
  30. Christopher M. Penalver. 2016. How to triage bugs. (2016). https://wiki.ubuntu.com/Bugs/Importance.Google ScholarGoogle Scholar
  31. Enrico Perla and Massimiliano Oldani. 2010.A Guide to Kernel Exploitation. Elsevier.Google ScholarGoogle Scholar
  32. Alexander Popov. 2017. CVE-2017--2636: exploit the race condition in the n_hdlc Linux kernel driver bypassing SMEP. (2017). https://a13xp0p0v.github.io/2017/03/24/CVE-2017--2636.html.Google ScholarGoogle Scholar
  33. Android Open Source Project. 2019. Common Android Kernel Tree. (2019). https://android.googlesource.com/kernel/common/.Google ScholarGoogle Scholar
  34. LLVM Project. 2019. LLVM 6.0.0 Release Notes. (2019). http://releases.llvm.org/6.0.0/docs/ReleaseNotes.html.Google ScholarGoogle Scholar
  35. Dusan Repel, Johannes Kinder, and Lorenzo Cavallaro. 2017. Modular Synthesis of Heap Exploits. In ACM SIGSAC Workshop on Programming Languages and Analysis for Security(PLAS).Google ScholarGoogle Scholar
  36. Steven Rostedt. 2009. Debugging the kernel using Ftrace. (2009). https://lwn.net/Articles/365835/.Google ScholarGoogle Scholar
  37. Chris Salls. 2017. Exploiting CVE-2017--5123 with full protections. SMEP, SMAP, and the Chrome Sandbox!(2017). https://salls.github.io/Linux-Kernel-CVE-2017--5123/.Google ScholarGoogle Scholar
  38. Yan Shoshitaishvili, Ruoyu Wang, Christophe Hauser, Christopher Kruegel, and Giovanni Vigna. 2015. Firmalice - Automatic Detection of Authentication Bypass Vulnerabilities in Binary Firmware. In Proceedings of the 2015 Network and Distributed System Security Symposium(NDSS).Google ScholarGoogle ScholarCross RefCross Ref
  39. Yan Shoshitaishvili, Ruoyu Wang, Christopher Salls, Nick Stephens, Mario Polino, Audrey Dutcher, John Grosen, Siji Feng, Christophe Hauser, Christopher Kruegel, and Giovanni Vigna. 2016. SoK:(State of) The Art of War: Offensive Techniquesin Binary Analysis. In Proceedings of the 37th IEEE Symposium on Security and Privacy(S&P).Google ScholarGoogle ScholarCross RefCross Ref
  40. Richard M. Stallman. 2019. GNU Debugger. (2019). https://www.gnu.org/software/gdb/.Google ScholarGoogle Scholar
  41. Nick Stephens, John Grosen, Christopher Salls, Audrey Dutcher, Ruoyu Wang, Jacopo Corbetta, Yan Shoshitaishvili, Christopher Kruegel, and Giovanni Vigna. 2016. Driller: Augmenting Fuzzing Through Selective Symbolic Execution. In Proceedings of the 2016 Network and Distributed System Security Symposium(NDSS).Google ScholarGoogle ScholarCross RefCross Ref
  42. Dmitry Vyukov. 2018. syzbot and the tale of thousand kernel bugs. (2018). https://events.linuxfoundation.org/wp-content/uploads/2017/11/Syzbot-and-the-Tale-of-Thousand-Kernel-Bugs-Dmitry-Vyukov-Google.pdf.Google ScholarGoogle Scholar
  43. Xi Wang, Haogang Chen, Zhihao Jia, Nickolai Zeldovich, and M. Frans Kaashoek. 2012. Improving Integer Security for Systems with KINT. In Proceedings of the 10th USENIX Symposium on Operating Systems Design and Implementation(OSDI).Google ScholarGoogle Scholar
  44. Yan Wang, Chao Zhang, Xiaobo Xiang, Zixuan Zhao, Wenjie Li, Xiaorui Gong, Bing Chang Liu, Kaixiang Chen, and Wei Zou. 2018. Revery: From Proof-of-Concept to Exploitable. In Proceedings of the 25nd ACM SIGSAC Conference on Computer and Communications Security(CCS).Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. Wei Wu, Yueqi Chen, Xinyu Xing, and Wei Zou. 2019. KEPLER: Facilitating Control-flow Hijacking Primitive Evaluation for Linux Kernel Vulnerabilities. In Proceedings of the 28th USENIX Security Symposium(USENIX Security).Google ScholarGoogle Scholar
  46. Wei Wu, Yueqi Chen, Jun Xu, Xinyu Xing, Wei Zou, and Xiaorui Gong. 2018. FUZE: Towards Facilitating Exploit Generation for Kernel Use-After-Free Vulnerabilities. In Proceedings of the 27th USENIX Security Symposium(USENIX Security).Google ScholarGoogle Scholar
  47. ww9210. 2019. exploit code for a bpf heap overflow vulnerability. (2019). https://github.com/ww9210/kernel4.20_bpf_LPE.Google ScholarGoogle Scholar
  48. Wen Xu, Juanru Li, Junliang Shu, Wenbo Yang, Tianyi Xie, Yuanyuan Zhang, and Dawu Gu. 2015. From Collision To Exploitation: Unleashing Use-After-Free Vulnerabilities in Linux Kernel. In Proceedings of the 22nd ACM SIGSAC Conference on Computer and Communications Security(CCS).Google ScholarGoogle ScholarDigital LibraryDigital Library
  49. Masahiro Yamada and Jani Nikula. 2019. kcov:code coverage for fuzzing. (2019). https://github.com/torvalds/linux/blob/master/Documentation/dev-tools/kcov.rst.Google ScholarGoogle Scholar
  50. Wei You, Peiyuan Zong, Kai Chen, Xiao Feng Wang, Xiaojing Liao, Pan Bian,and Bin Liang. 2017. SemFuzz: Semantics-based Automatic Generation of Proof-of-Concept Exploits. In Proceedings of the 24th ACM SIGSAC Conference on Computer and Communications Security(CCS).Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. SLAKE: Facilitating Slab Manipulation for Exploiting Vulnerabilities in the Linux Kernel

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in
      • Published in

        cover image ACM Conferences
        CCS '19: Proceedings of the 2019 ACM SIGSAC Conference on Computer and Communications Security
        November 2019
        2755 pages
        ISBN:9781450367479
        DOI:10.1145/3319535

        Copyright © 2019 ACM

        Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 6 November 2019

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article

        Acceptance Rates

        CCS '19 Paper Acceptance Rate149of934submissions,16%Overall Acceptance Rate1,261of6,999submissions,18%

        Upcoming Conference

        CCS '24
        ACM SIGSAC Conference on Computer and Communications Security
        October 14 - 18, 2024
        Salt Lake City , UT , USA

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader