4 centaur is an ELF executable editing toolkit, focusing on code
5 injection and function detouring.
11 Injecting an object file into a program and detouring a function
12 could hardly be simpler:
14 elfucli --input program \
16 --detour oldfunc,newfunc \
17 --output program_modified
19 elfucli parses the command line parameters one by one like a script.
23 1. Loads the executable `program` containing the function `oldfunc`.
24 2. Injects an object file containing the function `newfunc`.
25 3. Overwrites the beginning of `oldfunc` with a jump to `newfunc`.
26 4. Writes the modified program to `program_modified`.
28 This functionality is exposed by the underlying `libelfu` via a C API,
29 at the same high level. `elfucli` serves as an example application for
30 it and doubles as a handy scalpel for ELF files.
32 More examples can be found in the testsuite. The 'detour' test is
33 particularly similar to the example above.
36 Build instructions, testing
37 ---------------------------
43 should be enough to build centaur, provided that a version of libelf
44 and its development files are installed. If not, see docs/building.md
45 for further hints such as the packages to be installed on Ubuntu.
51 will build and run the testsuite. See docs/tests.md for details.
57 See the docs/ directory for all other documentation.