Is the application related to static?
You can override some characters, for example, override socket
int socket(int domain, int type, int protocol) { write(1,"Error\n",6); return -1; }
Then create a shared library:
gcc -fPIC -shared test.c -o libtest.so
Let the mileage:
nc -l -p 6000
OK
And now:
$ LD_PRELOAD=./libtest.so nc -l -p 6000 Error Can't get socket
What happens when you run the variable LD_PRELOAD=./libtest.so , it overrides the characters defined in libtest.so for more than a thousand defined in the library.
source share