Code Monkey home page Code Monkey logo

beaniethecat's Introduction

BeanieTheCat Hooking Library

A filthy little hooker library for x86 32/64 named after the one and only Beanie.

BeanieTheCat

What Works

Linux and Windows Binaries of the x86 variety - 32 and 64bit supported.

What needs testing and makefile entries

ARM64 Linux / MacOS

How Does it Work?

Simple interface:

// For hooking an address or module symbol target
void* flh_inline_hook_byname(const char* module_name, const char* function_name, void* redirect_function_address);
void* flh_inline_hook(void* target_address, void* redirect_function_address);

// For restoring original functionality
int flh_inline_unhook_byname(const char* module_name, const char* function_name);
int flh_inline_unhook(void* target_address);

// For pulling the hook table
void* flh_get_entry(void* target_address);

Essentially, specify a module name (or NULL for your process) and a function name along with your hook address and the hooker gets to work:

  1. It supports both relative and absolute inline hooks with proper auto-padding thanks to capstone.

  2. It creates a nearby page that supports multiple chained hooks seamlessly.

  3. The hook function returns a "real_function" address you can use to call the orginal function from a supported trampoline - now with relative rebasing support!!!

  4. Chain multiple hooks together by calling flh_inline_hook multiple times with various functions.

  5. Supported handling to deal with CET calls (via not executing them in the trampoline, we'll see how reliable this is).

Unhooking is as easy as giving flh_inline_unhook the address of the function you want restored or "byname".

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.