To make a local compiler for languages like C,C++,Java and Python hosted on a server so that we can access, compile and debug the code anywhere in the college/university.
- Using twitter Bootstrap, jQuery, jQueryUI and custom CSS wherever necessary.
- Editor support is mirrored by CodeMirror UI library.
- Shell UI support is provided by GateOne
- Tabbed editor support using custom CSS
- Chroot Jail environment running on a Linux Server System with support for Django and encrypted users.
- Paramiko library for providing SSH and SFTP support for the underlying network.
- Python scripts that compile and test the execution.
- Restricting the user to a specific directory so that all malicious code and vulnerabilities remain contained
Implement a Chroot jail at the backend for user isolation.
Make separate directories per user.
- Handling timeouts and memory issues for the user programs.
Run the program as a separate process and issue
SIGINT/SIGTERM handlers followed by KILL command
- Securely sending the user submitted program from the Django realm to the backend.
Used Paramiko library for providing SSH and SFTP support for the underlying network.
- Implementing a command line shell within the user workspace so that he can compile and build programs
Used Gate One which is a web-based Terminal Emulator and SSH client that brings the power of the command line to the web
- Limiting memory used by the running process
Use Linux's built in setrlimit and ulimit utilities
(Partially working because ulimit is not reliable)
- Preventing malicious user programs such as a fork bomb
We limited the number of sub processes a parent can create. We appended the following lines to /etc/security/limits.conf per user
<user> hard nproc 20
This restricted the number of child processes to 20