• Stars
    star
    186
  • Rank 207,316 (Top 5 %)
  • Language
    C
  • Created over 12 years ago
  • Updated about 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

a quick open/close/ioctl/read/write/free function hooker

ldpreloadhook

a quick open/close/ioctl/read/write/free symbol hooker

Usage:

  1. Compile:
      $ gcc -fPIC -c -o hook.o hook.c
      $ gcc -shared -o hook.so hook.o -ldl
  1. preload the library and run the command you want to hook:
      LD_PRELOAD="./hook.so" command

Optionally, if you want to spy a concrete file you can set the environment variable SPYFILE, for example /dev/serio_raw0:

      LD_PRELOAD="./hook.so" SPYFILE="/dev/serio_raw0" command

All data read from this file will be saved in /tmp/read_data.bin

All data written to this file will be saved in /tmp/write_data.bin

Optionally, if you want to have a delimiter set in the read/write data files each time the file is opened, you can set the environment variable DELIMITER:

      LD_PRELOAD="./hook.so" SPYFILE="/dev/serio_raw0" DELIMITER="---" command

You can also spy on free() calls by setting the environment variable SPYFREE, this will print the contents of every buffer before free()ing them:

      LD_PRELOAD="./hook.so" SPYFREE=1 command

More Repositories

1

random-scripts

scripts I use from time to time
Shell
232
star
2

rootadb

restart adbd with root privileges
C
160
star
3

ggposrv

Unofficial ggpo server (re)implementation
Python
128
star
4

lightum

MacBook automatic light sensor daemon
C
96
star
5

dexinfo

A very rudimentary Android DEX file parser
C
64
star
6

ggpo

GGPO client for Linux and Mac OS X
Python
23
star
7

radare-installer

Application to easily download and install radare2 on android devices
Java
16
star
8

opengalax

opengalax touchscreen daemon
C
15
star
9

root-zte-open

exploit for CVE-2012-4220 working on zte-open
C
15
star
10

fightcadestates

FightCade Savestates
Python
14
star
11

ssf2xj

Super Street Fighter 2X / Super Street Fighter II Turbo
Lua
14
star
12

WifiStaticArp

Android app to set an static ARP entry on the gateway's MAC address when you connect to a WIFI network
Java
10
star
13

nbimg

Smartphone boot splash screen converter (for Android and winCE).
C
10
star
14

lightum-indicator

Indicator for Lightum light sensor daemon
Shell
8
star
15

broadcom-sta

customized broadcom-sta ubuntu package, supporting CFG80211
C
7
star
16

eeepc-fanctld

eeepc-fanctld: simple fan control daemon for eeepc based netbooks
C
4
star
17

PackageEnabler

enable disabled android packages in one click
Java
3
star
18

indicator-sysbat

a simple indicator showing CPU, Memory, Battery and fan speed.
C
3
star
19

lxbat

battery percentage plugin for LXDE lxpanel
C
2
star
20

cubedex

Quickly train Rubik's cube algorithms using a smartcube.
TypeScript
2
star
21

mame-rr

C
2
star
22

htc-flasher

Automatically exported from code.google.com/p/htc-flasher
C
1
star
23

icade-joy

userspace input driver for ION iCade Core
C
1
star
24

fightcade-links

Chrome extension that converts fightcade challenge IDs to clickable links
JavaScript
1
star
25

six-button-notation

Chrome extension that replaces jab/strong/fierce notation with LP/MP/HP on *.shoryuken.com
JavaScript
1
star
26

cubeast2cubedb

Chrome extension to export your Cubeast solves to CubeDB
JavaScript
1
star