Exclusive binary files
Mike Meyer
mwm-keyword-freebsdhackers2.e313df at mired.org
Sat Sep 1 15:58:14 PDT 2007
On Sat, 1 Sep 2007 14:27:42 -0300 "Klaus Schneider" <klausps at gmail.com> wrote:
> Well, anybody know a way to make the FreeBSD run just binaries that I have
> compiled?
In general, it's impossible. There's no way the system can know that
you compiled a binary. There are a number of things you could do with
a custom kernel and toolchain to indicate that you compiled the binary
(like Peter's changing of ELF OSABI), but that's just security through
obscurity. If someone figures out those changes and replicates them,
you lose. The extreme version of this involves designing a new
processor, getting a copy fabbed, porting FreeBSD to it, and then
using that. Somewhat more practical are crypto technics, say having
the kernel check that you've digitally signed the binaries. Those
aren't unbreakable, just expensive to break.
> For example:
> A hacker get a access to a shell into my server, and then it put a exploit
> code, but on the machine don't have a compiler, then he tries to put the
> compiled exploit... supose that I can't mount the users partition
> in "noexec" mode...
> Anybode knows a solution for these?
You haven't described why you can't make the users partition noexec
(which is really strange since you don't want users to be able to
install executables), so no, I can't provide a solution for that.
There are lots of other possibilities that might turn up with a
different phrasing of the problem. For instance, restricting the
kernel to a fixed list of executables should be doable. But until you
tell us what problem you're really trying to solve, there's no way to
know which would be acceptable and which wouldn't.
<mike
--
Mike Meyer <mwm at mired.org> http://www.mired.org/consulting.html
Independent Network/Unix/Perforce consultant, email for more information.
More information about the freebsd-hackers
mailing list