Static code injection using text padding and reverse text extension.
Build:
gcc -nostdlib text_pad_infect.c -o tpi
gcc -nostdlib reverse_text_infect -o rti
Example:
$ cp /bin/ls .
$ ./tpi ./ls
The local ls
now displays 'LSE' before executing.