Skip to content

Latest commit

 

History

History
77 lines (61 loc) · 2.08 KB

File metadata and controls

77 lines (61 loc) · 2.08 KB

KerBug Debugger

A lightweight, command-line debugger for Linux x86_64 binaries.
Built with ptrace and pseudo-terminals, KerBug allows you to single-step through programs, inspect registers, and interact with the target process’s standard input/output.


Description

KerBug is a minimalistic debugger designed for educational purposes and low-level system programming exploration. It demonstrates core debugging concepts such as:

  • Process tracing using ptrace
  • Register inspection (RIP, RSP, RBP, RDI, RSI)
  • Instruction-level single-stepping
  • Interaction with debugged processes via pseudo-terminals (PTY)
  • Dynamic attachment using PTRACE_ATTACH and SIGSTOP

The project is intended as a learning tool for understanding how debuggers work internally.


Features

  • Step-by-step execution of instructions
  • Inspect CPU registers
  • Attach to running processes
  • Interact with program input/output
  • Simple and extensible command-line interface

Compilation

Prerequisites

  • Linux (x86_64)
  • g++ (GCC)
  • Standard development libraries

Build

g++ -o kerBug kerBug.cpp -lutil

Usage

Example:

./kerBug 
...after it runs enter the binary-path (e.g. /home/user/testprogram) 

Screenshots

Example Usage Example Gif

Target Audience

  • System programmers curious about debugger internals
  • Students learning Linux process control and ptrace
  • Security researchers exploring binary analysis tools
  • Hobbyists building custom debugging tools

Technical Details

  • Language: C++ (C++11/14)
  • Platform: Linux x86_64
  • Interface: Command-line
  • Core APIs: ptrace, waitpid, fork, execve, pty

Credits

Created by: Fabio Baensch GitHub: KernelPhantom-010

Disclaimer

This project is intended for educational and research purposes only.

Do not use this software to inspect or manipulate processes without proper authorization.
Unauthorized use may violate local laws and regulations.
The author assumes no liability for any misuse of this tool.