Reputation: 4904
There are dozen of website where users can directly type code in different languages, for example https://ideone.com/. Is it enough to chroot the process for compiling and executing the software or specifics security measure should be taken?
Is there any open source project that I can check?
Upvotes: 3
Views: 245
Reputation: 165201
Well, it depends on what you want to protect against. To protect the system you're on, a functioning chroot jail should be enough (assuming strong OS security policies).
However, since the jail still has network access, attackers could use it to host other attacks. So they could use it as part of a botnet or other platform to launch DDOS attacks or worse.
This is why these codepads typically go a step further and disable dangerous functionality or limit execution time (and put throttles on users) to limit the potential damage.
Upvotes: 1