What is the safest way to run an executable on Linux?

前端 未结 9 1257
星月不相逢
星月不相逢 2020-12-05 20:53

I am trying to run a program compiled from C code from an unknown source. I want to make sure that the program does not harm my system in anyway. Like for instance, the pro

相关标签:
9条回答
  • 2020-12-05 21:28

    I wrote an overview of sandboxing methods on Linux (archived) here. You are best off using Linux containers (lxc) or selinux, in my view. You could use a virtualisation solution and automate it, but it is a lot more effort.

    lxc will isolate your processes, filesystem and network, and you can set resource limits on the container. There are still risks of a kernel attack, but they are much reduced.

    0 讨论(0)
  • 2020-12-05 21:28

    Run it on a non-networked computer that you will re-image once it's done. There is no safe way to run it on a machine and continue to trust that machine afterwards.

    0 讨论(0)
  • 2020-12-05 21:35

    Geordi uses a combination of chroot and interception of syscalls to compile and then sandbox arbitrary code.

    0 讨论(0)
提交回复
热议问题