Papers
Topics
Authors
Recent
Search
2000 character limit reached

BaseSAFE: Baseband SAnitized Fuzzing through Emulation

Published 15 May 2020 in cs.CR | (2005.07797v1)

Abstract: Rogue base stations are an effective attack vector. Cellular basebands represent a critical part of the smartphone's security: they parse large amounts of data even before authentication. They can, therefore, grant an attacker a very stealthy way to gather information about calls placed and even to escalate to the main operating system, over-the-air. In this paper, we discuss a novel cellular fuzzing framework that aims to help security researchers find critical bugs in cellular basebands and similar embedded systems. BaseSAFE allows partial rehosting of cellular basebands for fast instrumented fuzzing off-device, even for closed-source firmware blobs. BaseSAFE's sanitizing drop-in allocator, enables spotting heap-based buffer-overflows quickly. Using our proof-of-concept harness, we fuzzed various parsers of the Nucleus RTOS-based MediaTek cellular baseband that are accessible from rogue base stations. The emulator instrumentation is highly optimized, reaching hundreds of executions per second on each core for our complex test case, around 15k test-cases per second in total. Furthermore, we discuss attack vectors for baseband modems. To the best of our knowledge, this is the first use of emulation-based fuzzing for security testing of commercial cellular basebands. Most of the tooling and approaches of BaseSAFE are also applicable for other low-level kernels and firmware. Using BaseSAFE, we were able to find memory corruptions including heap out-of-bounds writes using our proof-of-concept fuzzing harness in the MediaTek cellular baseband. BaseSAFE, the harness, and a large collection of LTE signaling message test cases will be released open-source upon publication of this paper.

Citations (65)

Summary

  • The paper introduces BaseSAFE, a novel emulation-based fuzzing framework that leverages partial rehosting to identify baseband security vulnerabilities.
  • It integrates a sanitizing allocator in Rust, enabling efficient detection of memory corruption issues like buffer overflows in firmware.
  • Testing on MediaTek basebands demonstrated its capability to uncover overlooked vulnerabilities in LTE RRC and NAS EMM message parsers.

An Overview of BaseSAFE: Fuzzing Cellular Basebands for Security Analysis

The paper "BaseSAFE: Baseband SAnitized Fuzzing through Emulation," by Dominik Maier, Lukas Seidel, and Shinjo Park, tackles the complex issue of identifying vulnerabilities in cellular basebands through a novel fuzzing framework. The study provides an in-depth investigation into cellular baseband security, proposing a distinctive approach by employing emulation-based fuzzing to examine basebands directly off-device.

Summary of Key Contributions

The foremost contribution of this research is the introduction of BaseSAFE, a platform developed to identify critical security flaws in cellular basebands. This platform harnesses the power of partial rehosting, enabling the execution of baseband functions in an emulated environment rather than on physical devices. This approach allows for higher execution speeds, surpassing traditional black-box testing methods.

The authors designed BaseSAFE to include a sanitizing allocator facilitating the detection of heap-based buffer overflows. Implemented in Rust, with a zero-overhead API, BaseSAFE efficiently manages memory corruption bugs through its integrated heap sanitizer by leveraging emulation capabilities provided by the Unicorn engine. The authors' technical ingenuity is demonstrated in the seamless interfacing with AFL (American Fuzzy Lop), allowing fuzzers to receive feedback through instrumentation akin to AFL's QEMU mode, but optimized for performance.

The implementation and testing focused on MediaTek basebands, particularly leveraging the ARM architecture of the Helio X10 MT6795 processor. The authors chose this popular chipset due to the accessibility of the firmware, enabling them to rehost critical functions in BaseSAFE. During evaluation, BaseSAFE examined LTE radio resource control (RRC) and NAS EMM message parsers, highlighting out-of-bounds read and write vulnerabilities overlooked by traditional testing practices.

Technical Implications

From a technical standpoint, the implications of this work are substantial. First, it demonstrates the practicality of emulation-based techniques in fuzzing environments that traditionally rely on direct hardware interaction. By bypassing hardware constraints, BaseSAFE facilitates a deeper, more efficient analysis of baseband firmware.

Moreover, the insight into MediaTek’s firmware mapping and its task-based architecture allows researchers to better understand how mobile basebands process and manage data, paving the way for future research targeting similar embedded systems. This knowledge is crucial as mobile networks increasingly depend on complex, layered signaling protocols to maintain communications integrity.

Future Directions

The paper suggests several potential expansions for BaseSAFE, such as extending support for additional baseband architectures—inter alia Qualcomm's Hexagon—and refining the framework's automation capabilities. Broadening its applicability could lead to a broader adoption across different baseband producers and operator testing environments.

The authors also hint at the importance of addressing logical flaws beyond memory errors, suggesting enhancements to BaseSAFE’s utilizability across the OSI stack layers. Such advancements indicate future potential in detecting authentication bypasses and enabling robust protocol compliance tests.

Conclusion

In summary, the BaseSAFE framework establishes a paradigm shift in cellular baseband security analysis by effectively harnessing emulation and fuzzing. It demonstrates a robust method for uncovering intricate vulnerabilities in baseband processors, which are critical to securing the smartphone ecosystem against increasingly sophisticated attack vectors.

The open-source nature of BaseSAFE promises to catalyze ongoing research and collaboration efforts in the security community, reinforcing the commitment to safeguarding mobile communications infrastructure. As researchers explore BaseSAFE’s capabilities, it holds the promise of not only improving our understanding of embedded system vulnerabilities but also fostering innovative security solutions across related fields.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Continue Learning

We haven't generated follow-up questions for this paper yet.

Collections

Sign up for free to add this paper to one or more collections.