Skip to content

An example for LD_PRELOAD using function hooking

Notifications You must be signed in to change notification settings

sjp38/mallochook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

mallochook
==========

An example for `LD_PRELOAD` based library function hooking.

There are two source code files, `program.c` and `mallochook.c` in this
repository.  `program.c` is source code for a simple program using `malloc()`
and `free()`, that will be hooked.  `mallochook.c` implements the functions
that will be called instead of `malloc()` and `free()`.


Usage
=====

Below command will build necessary binaries and execute the example program
with hooking:

```
$ make run_hooked
```


Below command will build necessary binaries and execute the example program
without hooking:

```
$ make run_unhooked
```


For more detail, `Use the code` ;)


Author
======

SeongJae Park <sj38.park@gmail.com>


License
=======

GPL v3

About

An example for LD_PRELOAD using function hooking

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published