Coder Social home page Coder Social logo

udbg

crates.io docs.rs

Cross-platform library for binary debugging and memory hacking written in Rust.

  • 👍 Cross-platform: udbg wraps the details of different interfaces on different platform, and provides uniform interfaces
  • 👍 Multiple-target: you can control multiple debug target in most cases
  • 👍 Non-invasive: you can only view the information of target, instead of attaching to it
  • 👍 Various target types: In addition to process, target can be a minidump, a PE file, even be the OS-Kernel space with extra extension.

API Overview

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) ✔️ ✔️ ✔️

Examples

  • Cross-platform interfaces to get target information, see src/test.rs fn target
  • Write a basic debugger, see src/test.rs fn test_debug

udbg's Projects

ferrisetw icon ferrisetw

Basically a KrabsETW rip-off written in Rust

lqt icon lqt

Lua Binding for Qt5

luacom icon luacom

Microsoft Component Object Model (COM) binding for Lua

ntapi icon ntapi

Rust FFI bindings for Native API

udbg icon udbg

Cross-platform library for binary debugging and memory hacking written in Rust

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.