Book Image

Fuzzing Against the Machine

By : Antonio Nappa, Eduardo Blázquez
Book Image

Fuzzing Against the Machine

By: Antonio Nappa, Eduardo Blázquez

Overview of this book

Emulation and fuzzing are among the many techniques that can be used to improve cybersecurity; however, utilizing these efficiently can be tricky. Fuzzing Against the Machine is your hands-on guide to understanding how these powerful tools and techniques work. Using a variety of real-world use cases and practical examples, this book helps you grasp the fundamental concepts of fuzzing and emulation along with advanced vulnerability research, providing you with the tools and skills needed to find security flaws in your software. The book begins by introducing you to two open source fuzzer engines: QEMU, which allows you to run software for whatever architecture you can think of, and American fuzzy lop (AFL) and its improved version AFL++. You’ll learn to combine these powerful tools to create your own emulation and fuzzing environment and then use it to discover vulnerabilities in various systems, such as iOS, Android, and Samsung's Mobile Baseband software, Shannon. After reading the introductions and setting up your environment, you’ll be able to dive into whichever chapter you want, although the topics gradually become more advanced as the book progresses. By the end of this book, you’ll have gained the skills, knowledge, and practice required to find flaws in any firmware by emulating and fuzzing it with QEMU and several fuzzing engines.
Table of Contents (18 chapters)
1
Part 1: Foundations
5
Part 2: Emulation and Fuzzing
9
Part 3: Advanced Concepts
15
Chapter 12: Conclusion and Final Remarks

What this book covers

Chapter 1, Who This Book is For, enumerates prerequisites for understanding the content of this book and introduces the tools used in the rest of the chapters.

Chapter 2, History of Emulation, explains a number of key concepts such as emulation, virtualization, and containerization, and introduces the role of emulation in cybersecurity.

Chapter 3, QEMU from the Ground, presents QEMU as the system emulator of choice for this book, including previous success stories, but also giving a brief introduction to some of its internals.

Chapter 4, QEMU Execution Modes and Fuzzing, details both QEMU user mode and full-system emulation mode, while also introducing static and dynamic fuzzing.

Chapter 5, A Famous Refrain – AFL+QEMU = CVEs, demonstrates the use of QEMU in conjunction with AFL to search for a vulnerability that was reported in 2011 in VLC, a well-known media player.

Chapter 6, Modifying QEMU for Basic Instrumentation, illustrates how Avatar2 can be used as an interface to extend QEMU, for example, to emulate new peripherals such as a UART serial interface.

Chapter 7, Real-Life Case Study – Samsung Exynos Baseband, dives into the CVE-2020-25279, a vulnerability found in modern Samsung phones such as the Galaxy S10.

Chapter 8, Case Study – OpenWrt Full-System Fuzzing, contains a study of the TriforceAFL project, the compilation of the OpenWRT system, and the fuzzing of system calls through TriforceAFL’s driver.

Chapter 9, Case Study – OpenWrt System Fuzzing for ARM, describes the use of a previously seen project (TriforceAFL) for fuzzing OpenWRT built for the ARM architecture, focusing also on the changes required to make it work in this particular architecture.

Chapter 10, Finally Here – iOS Full-System Fuzzing, focuses on the use of QEMU and a modified version of TriforceAFL for emulating and fuzzing on iOS. The chapter also provides an overview of the changes required to both the emulator and the fuzzer.

Chapter 11, Deus Ex Machina – Fuzzing Android Libraries, elaborates on the use of the open source project sloth for fuzzing libraries targeting the Android system, understanding the changes proposed by this project to the QEMU emulator.

Chapter 12, Conclusion and Final Remarks, summarizes the research findings, their implications, and future directions while emphasizing the importance of the research problem and offering closing thoughts on the significance of the study’s contributions.