Skip to content

ncleaton/libcallfilt

Repository files navigation

NAME

libcallfilt - library call filter

SYNOPSIS

libcallfilt denyexec COMMAND ARG [,...]

DESCRIPTION

libcallfilt is a wrapper for dynamically linked executables, capable of hooking into function calls into shared libraries.

It can provide an extra layer of security when you're allowing a user to execute a restricted set of commands. Many commands have options or features that can be used to execute other commands, so to make your command restriction effective you need to ensure that you're blocking or filtering all such options of all the commands that you're allowing. If you miss one, your whole security model is defeated.

For commands that don't need to execute anything else in order to work, you can use libcallfilt's denyexec filter to block any calls they make to the libc functions for running external commands. That way if you make a mistake in configuring the option restrictions, you have a second line of defense.

Currently only the denyexec filter is implemented.

DENYEXEC

libcallfilt denyexec COMMAND ARG [,...]

Executes the specified command and arguments, with the LD_PRELOAD environment variable set so that calls to the following libc functions are intercepted and blocked:

system()
popen()
execl()
execlp()
execle()
execv()
execve()
execvp()
execvpe()
fexecve()

LIMITATIONS

Because libcallfilt depends on the LD_PRELOAD mechanism, it is only effective with dynamically linked executables. Programs that make exec-type system calls directly rather than via the libc wrappers cannot be protected.

AUTHOR

Nick Cleaton <nick@cleaton.net>

About

library call filter using LD_PRELOAD

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published