hostile.sh¶
The hostile.sh script is a wrapper for libhostile. It will do the LD_PRELOAD for you as well as setup the required calls you want to be hostile with. It should be used as follows:
$ hostile.sh [options] <program> [program_options]
Where <program> is the application/service you wish to be hostile to and [program_options] are the options for it. For example, this would be hostile to malloc() calls with curl:
$ hostile.sh -m 500 curl -L http://www.google.com/
With all the below options the frequency is roughly how often the call should fail. So a frequency of 500 will fail roughly every 1/500 calls (there is a random element to it and a small grace period).
-
-afrequency¶ Become hostile on
accept()andaccept4()calls.
-
-cfrequency¶ Become hostile on
connect()calls
-
-efrequency¶ Become hostile on
recv()calls
-
-gfrequency¶ Become hostile on
getaddrinfo()calls
-
-lfrequency¶ Become hostile on
poll()calls
-
-mfrequency¶ Become hostile on
malloc()calls
-
-ofrequency¶ Become hostile on
socket()calls
-
-pfrequency¶ Become hostile on
pipe()andpipe2()calls
-
-rfrequency¶ Become hostile on
realloc()calls
-
-sfrequency¶ Become hostile on
send()calls
-
-tfrequency¶ Become hostile on
setsockopt()calls
-
-wfrequency¶ Become hostile on
write()calls
-
-xfrequency¶ Become hostile on
close()calls