Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Fuzzing Against the Machine

You're reading from   Fuzzing Against the Machine Automate vulnerability research with emulated IoT devices on QEMU

Arrow left icon
Product type Paperback
Published in May 2023
Publisher Packt
ISBN-13 9781804614976
Length 238 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (3):
Arrow left icon
Antonio Nappa Antonio Nappa
Author Profile Icon Antonio Nappa
Antonio Nappa
Eduardo Blázquez Eduardo Blázquez
Author Profile Icon Eduardo Blázquez
Eduardo Blázquez
Eduardo Blazquez Eduardo Blazquez
Author Profile Icon Eduardo Blazquez
Eduardo Blazquez
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Preface 1. Part 1: Foundations
2. Chapter 1: Who This Book is For FREE CHAPTER 3. Chapter 2: History of Emulation 4. Chapter 3: QEMU From the Ground 5. Part 2: Emulation and Fuzzing
6. Chapter 4: QEMU Execution Modes and Fuzzing 7. Chapter 5: A Famous Refrain: AFL + QEMU = CVEs 8. Chapter 6: Modifying QEMU for Basic Instrumentation 9. Part 3: Advanced Concepts
10. Chapter 7: Real-Life Case Study: Samsung Exynos Baseband 11. Chapter 8: Case Study: OpenWrt Full-System Fuzzing 12. Chapter 9: Case Study: OpenWrt System Fuzzing for ARM 13. Chapter 10: Finally Here: iOS Full System Fuzzing 14. Chapter 11: Deus Ex Machina: Fuzzing Android Libraries 15. Chapter 12: Conclusion and Final Remarks
16. Index 17. Other Books You May Enjoy

Fuzzing the kernel

Now, we are ready to launch our docker with TriforceAFL and ready to fuzz:

$: bunzip2 OWRT_x86.tar.bz2 && docker import OWRT_x86.tar
$: docker run --rm -it -v $(pwd)/owrtKFuzz:/krn iot-fuzz/openwrt_x86
root@5930beaa2553:/TriforceLinuxSyscallFuzzer# md5sum krn/bzImage
f59f429b02f6fa13a6598491032715ce  krn/bzImage

As you can see, the Docker image is already equipped with our target kernel to fuzz. Now, we can launch the fuzzer, in this case, AFL 2.0, which is quite old and can be updated with some work:

$: ./runFuzz -M M0

The runFuzz script contains some configuration and the startup of QEMU with 64 MB of memory – see the code in bold:

# run fuzzer and qemu-system
$: export AFL_SKIP_CRASHES=1
$AFL/afl-fuzz $FARGS -t 500+ -i $INP -o outputs -QQ -- \
    $AFL/afl-qemu-system-trace \
    -L $AFL/qemu_mode/qemu/pc-bios \
    -kernel $KERN/bzImage -initrd ./fuzzRoot.cpio...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime