Crates.io | udbg |
lib.rs | udbg |
version | 0.3.1 |
source | src |
created_at | 2022-03-20 12:09:05.804461 |
updated_at | 2023-10-01 03:55:59.67283 |
description | cross-platform library for binary debugging and memory hacking |
homepage | https://crates.io/crates/udbg |
repository | https://github.com/udbg/udbg |
max_upload_size | |
id | 553537 |
size | 940,415 |
Cross-platform library for binary debugging and memory hacking written in Rust.
minidump
, a PE file
, even be the OS-Kernel space with extra extension.There are two main kinds of interfaces in udbg, target information and debugging interfaces.
Interfaces of target information, which abstracted as the UDbgTarget
trait, represents an observable debugging target, it is an active process
in most cases, also it can be a minidump
, a PE file
, even be the OS-Kernel space with extra extension.
UDbgTarget
contains these functions, memory operation
(read/write/enumeration), module
enumeration, thread
enumeration, handle/FDs
enumeration, etc. Based on these functions, we can implement some utililties over the different types of target, such as module dump, memory search, hook scanning, malicious code scanning, etc.
Debugging interfaces, which abstracted as the UDbgEngine
trait, mainly provides the ability of process control. There is a default implementation
, typically it wraps the Debugging Functions on Windows, and wraps the ptrace interfaces on Linux.
Most of above interfaces were designed to be dynamic objects, which is for script-binding friendly, and udbg provides lua bindings
defaultly.
Current status of target information interfaces
Platform/Target | Memory operation | Memory List | Thread | Module/Symbol | Handle/FD List |
---|---|---|---|---|---|
Windows Process | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
Linux Process | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
MacOs Process | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
Minidump | ✔️ (readonly) | ✔️ | ✔️ | ✔️ | 🚧 |
PE File | ✔️ (readonly) | ✔️ | - | - | - |
Current status of debugging interfaces
Platform/Target | Debug Symbol | Breakpoint | Watchpoint(HWBP) | Multiple Target |
---|---|---|---|---|
Windows(x86/x64) | ✔️ (pdb) | ✔️ | ✔️ | ✔️ |
Windows(aarch64) | ✔️ (pdb) | ✔️ | ✔️ | ✔️ |
Linux(x86_64) | ✔️ (elf) | ✔️ | ✔️ | ✔️ |
Linux(aarch64) | ✔️ (elf) | ✔️ | ✔️ | ✔️ |
src/test.rs
fn target
src/test.rs
fn test_debug