I'm currently writing an automatic source code validation tool. Basically students have to upload their C# source code files as a solution for different tasks. The server compiles these files within a framework and checks the program against different input files. If the output the program generates is valid (equal to the predefined output) the programm is valid and the student gets points for the program.
But I don't think I can trust the students ;) The might try to gain file access or execute other bad things on the server.
What can I do to restrict access to a minimum?
What do I need to consider?
Allready thought about:
- file access
- max. execution time
- starting other programms
- doing networking stuff
- reflection
Currently the only way of checking the code I could imagine was to search it for keyword like "File", "Net", "Process", ... using regular expressions.
But I'm pretty sure that this is VERY unsecure.
Any suggestions?