Giter Club home page Giter Club logo

libmonkey's Introduction

Hello.

I often find myself needing to do really odd and weird things
in order to avoid administrative overhead of 'fixing' a distro's
library, or installing multiple versions thereof.

Sometimes the actual task to be fixed is trivial, but it's difficult
to make the external library (or even binary) do what you want it
to do.

libmonkey will completely replace a function for you with another
function of your choosing.

The function must match the exact prototype of the old one, and should
return the same type of value as the old one.

Optionally you can obtain the machine code which formerly belonged
to the 'pristine' original function, for later analysis.

This currently only works on ia32/amd64 architectures with the ELF
format and linux/glibc (it's possible it can work on other platforms
supporting ELF, but I doubt that).

See the Makefile and test_inject.c for example usage

DEBUGGING

You can get libmonkey to output more verbose information by setting
LIBMONKEY_DEBUG in the environment. The number should be a numeric
value. The higher the value, the more information is displayed

LIMITATIONS

- The physical code size of the old function must be at least 12 bytes
(for amd64 platforms) or 5 bytes (for i386).

- If the victim binary was compiled with optimizations, it is possible
that the compiler may have entirely inlined the function for various
invocations. This means that control is never transferred to the
victim's actual address.

- M. Nunberg

libmonkey's People

Contributors

mnunberg avatar

Watchers

James Cloos avatar

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.