0

From what I can tell you can only change a parent processes uid by messing with the kernel's address space, is there a better way? If I can only change the kernel's memory, how should I go about this?

Note: Child process has root, parent does not.

0

You cannot change another process's UID.

Actually, you could make it drop privileges with a debugger, but you couldn't elevate privileges this way (a debugger can make a program do what it normally wouldn't do, but not what it isn't authorized to do).

Yes, you can do whatever you want by loading some code into the kernel, or by accessing kernel data structures directly through /dev/mem or /dev/kmem. But finding the right address is difficult, and getting the modification right even more so. It isn't a reasonable way to do anything except a security exploit.

If you absolutely must have a non-privileged process and a privileged child process, make the child process listen to requests from the unprivileged process and perform them on its behalf. Be very careful with what the child process is willing to do: remember that you can't really tell whether the requests are coming from the process that you expect or from a fake one. Any security check must be performed inside the privileged process, without trusting data that comes from the unprivileged process.

  • So it is as I feared, oh well. – gudenau Oct 22 '15 at 4:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.