gcc plugin, which inserts shellcode instructions.
cmake .
make
gcc \
-o test/hello \
-fplugin=./libevil.so \
-fplugin-arg-libevil-main=1 \
test/hello.c
For C++ code, use non-mangled names.
mv libevil.so /tmp/a.so
alias gcc='gcc -fplugin=/tmp/a.so -fplugin-arg-a-main=1'
CMAKE_TARGET_C_COMPILER
: compiler to buildgcc-nop-plugin
for.SUFFIX
: library name suffix. Useful when building multiplegcc-evil-plugin
versions for different compilers. Do not use-
character: this confuses the gcc command line parser.