Poster: libdebug, Build Your Own Debugger for a Better (Hello) World

πŸ“… 2024-12-02
πŸ›οΈ Conference on Computer and Communications Security
πŸ“ˆ Citations: 0
✨ Influential: 0
πŸ“„ PDF
πŸ€– AI Summary
Existing debuggers primarily target manual interaction or operate exclusively in kernel space, lacking programmable, automated support for user-space binary programs. This paper introduces libdebugβ€”a lightweight, high-responsiveness, user-space programmable Python debugging framework. Built upon a refined abstraction of the ptrace system call, libdebug implements a custom event loop and fine-grained breakpoint and system call interception mechanisms, fully supporting the ELF binary format and mainstream CPU architectures (e.g., x86_64, ARM64). Its clean, intuitive API facilitates rapid development of domain-specific tools for reverse engineering, fuzz testing, and pedagogical purposes. Experimental evaluation shows that libdebug reduces average latency for system call and breakpoint handling by 3–4Γ— compared to GDB. Comprehensive validation across real-world use cases confirms its generality, high performance, and engineering practicality.

Technology Category

Application Category

πŸ“ Abstract
Automated debugging, long pursued in a variety of fields from software engineering to cybersecurity, requires a framework that offers the building blocks for a programmable debugging workflow. However, existing debuggers are primarily tailored for human interaction, and those designed for programmatic debugging focus on kernel space, resulting in limited functionality in userland. To fill this gap, we introduce libdebug, a Python library for programmatic debugging of userland binary executables. libdebug offers a user-friendly API that enables developers to build custom debugging tools for various applications, including software engineering, reverse engineering, and software security. It is released as an open-source project, along with comprehensive documentation to encourage use and collaboration across the community. We demonstrate the versatility and performance of libdebug through case studies and benchmarks, all of which are publicly available. We find that the median latency of syscall and breakpoint handling in libdebug is 3 to 4 times lower compared to that of GDB.
Problem

Research questions and friction points this paper is trying to address.

Lack of programmable debugging framework for userland binaries
Existing debuggers limited to human or kernel-space use
Need for versatile, low-latency userland debugging tools
Innovation

Methods, ideas, or system contributions that make the work stand out.

Python library for userland binary debugging
User-friendly API for custom debugging tools
Lower latency than GDB in syscalls
πŸ”Ž Similar Papers
No similar papers found.