[Edu-sig] chroot jail or sandbox?

Louis Bertrand louis.bertrand@durhamc.on.ca
Wed, 24 Apr 2002 18:52:14 -0400


Hello,

I'm exploring the idea of having my students=20
submit their programming assignments through=20
a Web dropboxand having those assignments=20
automatically marked by a script that runs=20
the submitted program with pre-arranged=20
test data, catching any boo-boos with exceptions.

Here's the problem: this plan violates the secure=20
programming principle that you should never treat=20
data as code and I might be leaving myself=20
open for some serious malware.

Does anyone have any experience with restricting the=20
privileges of a running Python program?

As a first pass, I would:
 * run Python in a chroot(2) jail
 * load the jail with only the bare minimum to run Python
and remove networking and os modules (at least).
 * scan the submitted programs for usage of sys.path.

Any other suggestions?

Thanks
 --Louis

--=20
Louis Bertrand <louis.bertrand@durhamc.on.ca>

School of Technology, Durham College
Oshawa, ON, Canada
+1.905.721.3111 x2468