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).
-
-a
frequency
¶ Become hostile on
accept()
andaccept4()
calls.
-
-c
frequency
¶ Become hostile on
connect()
calls
-
-e
frequency
¶ Become hostile on
recv()
calls
-
-g
frequency
¶ Become hostile on
getaddrinfo()
calls
-
-l
frequency
¶ Become hostile on
poll()
calls
-
-m
frequency
¶ Become hostile on
malloc()
calls
-
-o
frequency
¶ Become hostile on
socket()
calls
-
-p
frequency
¶ Become hostile on
pipe()
andpipe2()
calls
-
-r
frequency
¶ Become hostile on
realloc()
calls
-
-s
frequency
¶ Become hostile on
send()
calls
-
-t
frequency
¶ Become hostile on
setsockopt()
calls
-
-w
frequency
¶ Become hostile on
write()
calls
-
-x
frequency
¶ Become hostile on
close()
calls