jail

Create a Chroot Jail and copy all system files into jail

こ雲淡風輕ζ 提交于 2019-12-11 10:16:43
问题 I am creating chroot jail in linux , but i do not have access to any system file like ls/cd/gcc/g++. What are the necessary libs/bin/systme files i need to copy to my chroot jail ? 回答1: Executables like ls/cd/gcc/g++, they depend on shared library (unless you didn't build them to be statically). So, what you need to do is copy all those shared library dependencies to appropriate location into your chroot jail, also you need to find what are those shared dependencies are. To find out you need

Python: Securing untrusted scripts/subprocess with chroot and chjail?

一世执手 提交于 2019-12-05 17:20:05
问题 I'm writing a web server based on Python which should be able to execute "plugins" so that functionality can be easily extended. For this I considered the approach to have a number of folders (one for each plugin) and a number of shell/python scripts in there named after predefined names for different events that can occur. One example is to have an on_pdf_uploaded.py file which is executed when a PDF is uploaded to the server. To do this I would use Python's subprocess tools. For convenience

Python: Securing untrusted scripts/subprocess with chroot and chjail?

风格不统一 提交于 2019-12-04 02:21:58
I'm writing a web server based on Python which should be able to execute "plugins" so that functionality can be easily extended. For this I considered the approach to have a number of folders (one for each plugin) and a number of shell/python scripts in there named after predefined names for different events that can occur. One example is to have an on_pdf_uploaded.py file which is executed when a PDF is uploaded to the server. To do this I would use Python's subprocess tools. For convenience and security, this would allow me to use Unix environment variables to provide further information and