This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Duly noted, thanks.Don't forget about dlopen() The appropiate place would generally be on the dynamic linker, except for static binaries.
I would probably try to hook the mmap() calls with PROT_EXEC and block
them if it isn't a verified file.
I would aim to prevent such a case - I'll seek to modify the appropriate kernel functions responsible for loading/execution (process.c, exec.c etc) and will only allow the binary formats which can be verified to be loaded/executed. This should be OK, at least in my case, because I plan to use this on a hardened system, so the case of loading anything else, apart from elf-type binaries is not likely. Another possible way of "preventing" verification would be to replace ld.so with a rogue one, but I'll make the kernel check that as well.A verified binary could bypass it by loading another program in a different way, but as I guess you wouldn't "verify" such binary, that's probably ok, since normal users will use mmap().
The problem of verifying binaries (scripts) in dynamic languages, is worse anyway.Indeed. Java, perl, python, bash, to just name a few - can't be protected against, not to mention executing a "verified" "dd if=/dev/zero of=/dev/sda bs=512 count=1000" for example, but no defence or protection built is ever 100% secure, so of course there are potential exploits no matter what system is used.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |